Available Reporting Options
| Option | Purpose | Typical output |
|---|---|---|
| Ad hoc AQL | Explore canonical openEHR records, validate report logic, investigate cohorts, and answer controlled clinical questions. | Interactive result table or JSON response. |
| Saved AQL queries and views | Version 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 modeller | Model 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 API | Facility/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 Builder | Publish 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 reporting | Define inclusion and exclusion criteria, preview governed patient populations, and subscribe to cohort changes. | Cohort preview, approved cohort definition, or event subscription. |
| Scheduled saved-query delivery | Execute 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 reporting | Answer 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 reporting | Generate governed birth, death, civil-registration, public-health, and humanitarian reporting events from approved workflows. | Queued report event and configured outbound delivery. |
| Patient summaries | Produce 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
| Workspace | Use |
|---|---|
| Analytics → AQL workbench | Build, validate, execute, save, parameterize, version, schedule, and inspect provenance for AQL queries and saved views. |
| Analytics → Report modeller | Select a report source, bind named fields, configure grid or form layout, preview the result, save the layout, and print. |
| Analytics → HMIS | Review summary indicators, service performance, coded ICD-10/SNOMED CT/LOINC prevalence, longest journeys, trends, facility/template breakdowns, and governed measures. |
| Cohort builder | Create inclusion/exclusion definitions and controlled population views without using ordinary patient-list APIs for population reporting. |
| Patient workspace | Run patient-bound summaries and reports within the active care, consent, protected-record, and release-policy context. |
| Swagger and API | Automate 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.
| Source | Examples | Authority rule |
|---|---|---|
| Saved AQL | Diagnoses, observations, medication statements, laboratory results, pregnancy outcomes, discharge summaries. | Read from published-template openEHR compositions. |
| Operational datasets | Visits, encounters, queues, movement, ward/resource allocation, workflow state, discharge register. | Read from tenant-scoped operational projections linked to patient/EHR/encounter context. |
| Combined reports | Clinical 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. |
| Indicators | Numerators, denominators, programme indicators, safety metrics, readiness measures. | Use approved definitions, documented populations, suppression rules, and retained samples. |
| Exports | Recipient-specific extracts and print packages. | Apply the same source policy, column selection, access checks, and audit as the underlying report. |
Output and Delivery Formats
| Format | Availability | Use |
|---|---|---|
| JSON | Native query, HMIS, cohort, metric, lifecycle, and snapshot APIs. | Application integration and structured downstream processing. |
| CSV | Native execution and saved-query export endpoints with selected columns, delimiter, and metadata options. | Tabular reporting, controlled analysis, and partner extracts. |
| XML | Native execution and saved-query export endpoints with selected columns and metadata options. | Legacy integration, national reporting gateways, and XML-based partner contracts. |
| A4 print / PDF | Native report-modeller print output; PDF is produced through the approved browser or print service. | Registers, summaries, certificates, signature forms, and formal report packs. |
| XLSX | Available 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 notification | Native 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 / Grafana | Aggregate 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
| Domain | Example reports |
|---|---|
| Facility operations | Attendance, 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 health | Pregnancy registrations, antenatal contacts, multiple pregnancy, delivery outcomes, stillbirth, low birth weight, prematurity, newborn linkage, NICU admission, and postpartum follow-up. |
| Laboratory | Orders, specimens awaiting collection or transport, turnaround time, final/corrected results, critical-result acknowledgement, and reportable conditions. |
| Medication and safety | Prescribing and dispensing activity, medication reconciliation, allergy/interaction alerts, overrides, unresolved safety tasks, and medicine programme indicators. |
| Public health and HMIS | Disease surveillance lines, programme numerators/denominators, immunisation or screening coverage, facility/month summaries, and annual hospital statistics. |
| Vital events | Birth notification, death notification, maternal/perinatal mortality, cause and manner of death, and civil-registration submission status. |
| Quality and governance | Missing required fields, terminology conformance, template adoption, delayed results, protected-record access, break-glass activity, and clinical guardrail outcomes. |
| Repository lifecycle | Resources created, updated, logically deleted, restored, merged, or physically deleted within a time range, with totals and item evidence. |
| Patient continuity | Patient 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.
- Use median for the typical journey and P90 to expose unusually slow paths; always retain population and exclusion counts.
- Admission stay runs from inpatient/admission visit start to recorded end. Outpatient facility time runs from front-desk/visit start to recorded end. Encounter cycle time runs from encounter creation to explicit end, with a labelled terminal-update fallback.
- Use the authorised longest-record drill-down to inspect clinician, service, location and linked coded conditions. Duration alone is not evidence of poor care.
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.
| Source | Use |
|---|---|
| openEHR composition (AQL) | Clinical facts stored in current canonical composition versions. |
| Saved AQL definition | An approved, versioned reusable clinical query. |
| Operational workflow | Admission length of stay, outpatient facility time, encounter cycle time, or distinct patients with a code. |
| System counter | A 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
- Confirm that the required clinical concepts exist in published openEHR templates and that operational fields have approved foundation bindings.
- Define the reporting purpose, population, numerator/denominator, time semantics, organisation/facility scope, required columns, and disclosure classification.
- Build and validate the AQL, saved view, operational dataset, combined join, cohort, or indicator definition with realistic data.
- Use stable aliases and parameters. Do not embed one facility, reporting period, patient, or tenant directly in reusable report logic.
- Review row-level results, aggregate totals, null handling, terminology versions, duplicates, merged EHR behavior, and late/corrected compositions.
- Select the approved output: interactive dashboard, printable layout, API response, export, scheduled snapshot, webhook, or aggregate metric.
- Assign owner, version, access policy, recipient, retention, schedule, and review date before publication.
- 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.
- Use explicit AQL aliases because printable bindings are based on stable alias names.
- Use A4 portrait or landscape and test long patient names, diagnoses, facilities, translations, high row counts, wrapping, and page boundaries.
- Place reporting period, facility, source, generated time, classification, and page context in the report header or footer.
- Save the layout only after the underlying source definition is governed; a visual layout does not approve the query itself.
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.
Access, Consent, and Disclosure Controls
- Patient-context reports remain constrained to the active patient/EHR and the caller's care relationship, consent, protected-record clearance, and purpose of use.
- Population reporting requires an approved reporting role and governed query/report definition. Clinical list APIs cannot be used to bypass population-reporting controls.
- Tenant, organisation, environment, facility, service, and patient filters are applied server-side where required; UI filters are not the security boundary.
- Exports must record the query/report version, parameters, columns, requester, recipient, time, row count, classification, and delivery outcome.
- Suppression and de-identification must be applied where small counts, sensitive diagnoses, protected persons, or research/publication use create disclosure risk.
- Prometheus labels and monitoring dashboards must never contain patient IDs, EHR IDs, MRNs, composition UIDs, accession numbers, or clinical free text.
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.
- Reconcile report totals against known fixtures and independently calculated source counts.
- Test current composition versions, corrections, merged EHRs, logical deletion, restoration, time zones, incomplete encounters, and missing values.
- Verify cross-tenant denial, facility/service scope, patient consent, protected records, export authorization, and recipient restrictions.
- Test scheduled execution, retries, snapshot retrieval, cache invalidation after clinical writes, and webhook replay.
- Load-test the largest approved period and population without degrading clinical read/write operations.
- Approve retention, legal hold, deletion, residency, encryption, and audit evidence for every report destination.
- 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.