Clinical Use

Reporting and HMIS

Governed patient, operational, facility, programme, public-health, statutory, and national reporting over canonical clinical records.

Reporting contract: AMCDR derives reports from canonical openEHR clinical content and governed operational projections. A report, dashboard, extract, or metric does not become a competing clinical record.

Available Reporting Options

OptionPurposeTypical output
Ad hoc AQLExplore canonical openEHR records, validate report logic, investigate cohorts, and answer controlled clinical questions.Interactive result table or JSON response.
Saved AQL queries and viewsVersion repeatable queries with stable keys, named parameters, provenance, access policy, schedules, snapshots, and reusable result columns.UI results, JSON, CSV, XML, printable layouts, or scheduled snapshots.
Report modellerModel saved-AQL, operational, combined, indicator, and export-oriented reports using grid or single-record layouts.A4 portrait or landscape print/PDF, with governed export intent.
HMIS dashboard and APIFacility/programme summaries, service-duration distributions, coded patient prevalence, outlier review, trends, and facility/template breakdowns.Dashboard cards, duration/P90 measures, authorised patient drill-down, trend series, tables, and JSON API results.
Measure BuilderPublish approved aggregate metrics from built-in collectors, canonical openEHR AQL, saved AQL, or governed operational workflow measures without placing patient-level data in observability systems.Metric samples, Prometheus series, Grafana dashboards, and reusable reporting measures.
Cohort reportingDefine inclusion and exclusion criteria, preview governed patient populations, and subscribe to cohort changes.Cohort preview, approved cohort definition, or event subscription.
Scheduled saved-query deliveryExecute an approved report on a schedule and retain a result snapshot when the result is ready or changes.Snapshot metadata, webhook notification, CSV, XML, or JSON retrieval.
Lifecycle activity reportingAnswer what and how many EHRs, compositions, templates, patients, or other governed resources changed during a time range.Totals, grouped counts, pagination, item details, and batch delivery.
Statutory and vital-event reportingGenerate governed birth, death, civil-registration, public-health, and humanitarian reporting events from approved workflows.Queued report event and configured outbound delivery.
Patient summariesProduce patient-context clinical summaries for care, discharge, continuity, SHR, or cross-border IPS use.Printable summary, openEHR/FHIR projection, SHR, or IPS document.

Reporting Workspaces

WorkspaceUse
Analytics → AQL workbenchBuild, validate, execute, save, parameterize, version, schedule, and inspect provenance for AQL queries and saved views.
Analytics → Report modellerSelect a report source, bind named fields, configure grid or form layout, preview the result, save the layout, and print.
Analytics → HMISReview summary indicators, service performance, coded ICD-10/SNOMED CT/LOINC prevalence, longest journeys, trends, facility/template breakdowns, and governed measures.
Cohort builderCreate inclusion/exclusion definitions and controlled population views without using ordinary patient-list APIs for population reporting.
Patient workspaceRun patient-bound summaries and reports within the active care, consent, protected-record, and release-policy context.
Swagger and APIAutomate approved queries, HMIS retrieval, exports, schedules, snapshots, lifecycle reports, and outbound delivery.

Reporting Data Sources

Choose from five report source types, according to the information you need and where it is maintained.

SourceExamplesAuthority rule
Saved AQLDiagnoses, observations, medication statements, laboratory results, pregnancy outcomes, discharge summaries.Read from published-template openEHR compositions.
Operational datasetsVisits, encounters, queues, movement, ward/resource allocation, workflow state, discharge register.Read from tenant-scoped operational projections linked to patient/EHR/encounter context.
Combined reportsClinical facts by facility, service, visit, encounter, or workflow status.Join only through governed keys such as patient ID, EHR ID, visit ID, encounter ID, composition UID, or template ID.
IndicatorsNumerators, denominators, programme indicators, safety metrics, readiness measures.Use approved definitions, documented populations, suppression rules, and retained samples.
ExportsRecipient-specific extracts and print packages.Apply the same source policy, column selection, access checks, and audit as the underlying report.

Output and Delivery Formats

FormatAvailabilityUse
JSONNative query, HMIS, cohort, metric, lifecycle, and snapshot APIs.Application integration and structured downstream processing.
CSVNative execution and saved-query export endpoints with selected columns, delimiter, and metadata options.Tabular reporting, controlled analysis, and partner extracts.
XMLNative execution and saved-query export endpoints with selected columns and metadata options.Legacy integration, national reporting gateways, and XML-based partner contracts.
A4 print / PDFNative report-modeller print output; PDF is produced through the approved browser or print service.Registers, summaries, certificates, signature forms, and formal report packs.
XLSXAvailable as a report packaging target; binary workbook generation requires the configured export or downstream reporting connector.Governed spreadsheet delivery where locally approved.
Webhook or broker notificationNative scheduled-query, lifecycle, cohort, and reporting event delivery model.Notify recipients that a governed result or event is ready; recipients then retrieve the authorized payload.
Prometheus / GrafanaAggregate clinical metrics only.Low-cardinality operational and programme indicators without patient identifiers or row-level clinical payloads.

Core Reporting APIs

POST /workbench/execute
GET  /workbench/queries
POST /workbench/queries/{query_id}/execute
GET  /workbench/queries/{query_id}/snapshots
POST /workbench/executions/{execution_id}/export.csv
POST /workbench/executions/{execution_id}/export.xml

GET  /hmis/summary
POST /hmis/indicators
GET  /hmis/patient/{patient_id}
GET  /hmis/trends
GET  /hmis/breakdown/facilities
GET  /hmis/breakdown/templates
GET  /hmis/service-performance

GET  /clinical-metrics/definitions
POST /clinical-metrics/definitions/{metric_key}/refresh
GET  /clinical-metrics/definitions/{metric_key}/samples

GET  /integration/outbound/saved-queries/{saved_query_key}/execute
GET  /integration/outbound/saved-queries/{saved_query_key}/execute.csv
GET  /integration/outbound/saved-queries/{saved_query_key}/execute.xml
POST /integration/outbound/saved-queries/{saved_query_key}/schedules

Swagger provides the current request and response schemas. Use AQL Query Guide for query examples, Clinical Metrics Registry for aggregate metric configuration, and Subscriptions and Outbound Delivery for scheduling, snapshots, webhooks, retries, and replay.

Common Reporting Use Cases

DomainExample reports
Facility operationsAttendance, admissions, discharges, median/P90 admission stay, outpatient facility time, encounter cycle time, longest journeys, ward movement, occupancy, referral status, queue time, and incomplete intervals.
Maternal and child healthPregnancy registrations, antenatal contacts, multiple pregnancy, delivery outcomes, stillbirth, low birth weight, prematurity, newborn linkage, NICU admission, and postpartum follow-up.
LaboratoryOrders, specimens awaiting collection or transport, turnaround time, final/corrected results, critical-result acknowledgement, and reportable conditions.
Medication and safetyPrescribing and dispensing activity, medication reconciliation, allergy/interaction alerts, overrides, unresolved safety tasks, and medicine programme indicators.
Public health and HMISDisease surveillance lines, programme numerators/denominators, immunisation or screening coverage, facility/month summaries, and annual hospital statistics.
Vital eventsBirth notification, death notification, maternal/perinatal mortality, cause and manner of death, and civil-registration submission status.
Quality and governanceMissing required fields, terminology conformance, template adoption, delayed results, protected-record access, break-glass activity, and clinical guardrail outcomes.
Repository lifecycleResources created, updated, logically deleted, restored, merged, or physically deleted within a time range, with totals and item evidence.
Patient continuityPatient summary, discharge summary, longitudinal condition/medication/laboratory view, SHR, and IPS.

Service Performance and Coded Activity

HMIS → Service performance calculates completed visit and encounter durations and reports the excluded open, missing, or invalid intervals. It also counts distinct patients by terminology-bound ICD-10, SNOMED CT, or LOINC code in current canonical openEHR composition versions. FHIR staging rows can supplement an unmapped inbound record, but remain labelled and do not replace openEHR as the clinical authority.

Measure Builder

Open HMIS → Service performance → Measure Builder or use the Indicators action. Define a stable key, source, calculation, unit, parameters, refresh schedule, sensitivity and minimum group size. Keep the measure in Draft until it is reconciled to known fixtures and approved.

SourceUse
openEHR composition (AQL)Clinical facts stored in current canonical composition versions.
Saved AQL definitionAn approved, versioned reusable clinical query.
Operational workflowAdmission length of stay, outpatient facility time, encounter cycle time, or distinct patients with a code.
System counterA controlled built-in aggregate.

For operational durations select count, average, median, P90, or maximum. For coded patient count provide code and optionally code_system. Use AQL or saved AQL for calculations outside the built-in operational set. A measure is a governed derivative and does not write a result back into the clinical record.

Building and Publishing a Report

  1. Confirm that the required clinical concepts exist in published openEHR templates and that operational fields have approved foundation bindings.
  2. Define the reporting purpose, population, numerator/denominator, time semantics, organisation/facility scope, required columns, and disclosure classification.
  3. Build and validate the AQL, saved view, operational dataset, combined join, cohort, or indicator definition with realistic data.
  4. Use stable aliases and parameters. Do not embed one facility, reporting period, patient, or tenant directly in reusable report logic.
  5. Review row-level results, aggregate totals, null handling, terminology versions, duplicates, merged EHR behavior, and late/corrected compositions.
  6. Select the approved output: interactive dashboard, printable layout, API response, export, scheduled snapshot, webhook, or aggregate metric.
  7. Assign owner, version, access policy, recipient, retention, schedule, and review date before publication.
  8. Retain test evidence and reconcile official totals against the source clinical population before operational release.

Printable Reports

The report modeller turns named source fields into either a repeated grid or a single-record form. Use a grid for registers, surveillance lines, activity tables, medication summaries, and annual reporting. Use a single-record form for a patient summary, discharge extract, certificate, referral summary, or other fixed document.

Scheduled Reports and Notifications

A saved query can have one or more schedules. Each schedule records its parameters, tenant/organisation/environment scope, recipient or subscription, cadence, and change-notification behavior. Executions produce retained snapshots so recipients can identify the exact result version that triggered delivery.

Delivery rule: send the minimum necessary payload. For sensitive or large reports, notify the recipient that a snapshot is ready and require authenticated retrieval instead of placing clinical rows directly in the webhook body.

Access, Consent, and Disclosure Controls

Production Acceptance

Jurisdiction policy packs and submission

Use HMIS Dashboard → Jurisdiction submission for legally mandated external reports. Create a versioned specification from the regulator's approved schema, business rules, code systems, ValueSets, FHIR profiles/implementation-guide packages, endpoint and certification examples. A validation run retains its payload hash, issue list, error/warning counts and validator evidence. Only a passed run can be queued.

Submission uses HTTPS with credentials, client certificates and signing keys held in deployment secrets and referenced from the specification. Retries preserve the submission identifier and evidence. Leave AMCDR_OUTBOUND_JURISDICTION_REPORTING_ENABLED=false until the jurisdiction has approved the exact payload and endpoint. Generic JSON/FHIR validation does not replace regulator certification.

  1. Reconcile report totals against known fixtures and independently calculated source counts.
  2. Test current composition versions, corrections, merged EHRs, logical deletion, restoration, time zones, incomplete encounters, and missing values.
  3. Verify cross-tenant denial, facility/service scope, patient consent, protected records, export authorization, and recipient restrictions.
  4. Test scheduled execution, retries, snapshot retrieval, cache invalidation after clinical writes, and webhook replay.
  5. Load-test the largest approved period and population without degrading clinical read/write operations.
  6. Approve retention, legal hold, deletion, residency, encryption, and audit evidence for every report destination.
  7. Prove missing required paths, invalid terminology and failed FHIR profiles cannot queue; simulate HTTP 429/500, timeout and TLS failures against a non-production endpoint.

Related Documentation