Skip to content

Incoming reports

A primary care clinic receives reports all day: imaging and laboratory results, consultant letters, discharge summaries, records released by another clinic. They arrive by fax, by mail, over HRM and over Ontario Health's electronic feeds. This page says where each one lands, what is recorded about how it arrived and who it was sent to, and who is responsible for acting on it.

Which resource

An incoming report is a DiagnosticReport or a DocumentReference. It is never a Composition. A Composition is a document authored in this EMR; a received report was written somewhere else (see Review and Attestation).

Which of the two a received report becomes is not yet settled by this guide (see Open: where a received report is stored below). What Nexus EMR writes today:

Arrives as Stored today as
A report received over HRM, of any class DiagnosticReport, with HRM's accompanying data items as Observation results
A document uploaded or scanned into the inbox or chart, including a fax or mailed paper DocumentReference
A laboratory feed with discrete, coded results DiagnosticReport, with an Observation per result

An HRM report keeps its class as a raw code in hrm-report-class, whichever resource holds it.

Open: where a received report is stored

Two things are undecided:

  • Which resource a received report becomes: by channel, or by content. The cases that decide between them are a diagnostic report that arrives as a document (a faxed imaging or laboratory report) and a narrative report that arrives over a diagnostic channel (an HRM consultant letter or discharge summary).
  • How later versions and duplicates of a received report are represented: updated in place, or one record per version linked by replaces and marked superseded; and which source-side value orders the versions.

What decides them is how readers query received reports -- a single list of a patient's documents, "all laboratory results", sign-off of one specific version -- and what it costs every reader to filter out superseded records. Until it is settled, expect a received report on either DiagnosticReport or DocumentReference, and query both.

A document Bundle stored as a DocumentReference

Where an Ontario Health clinical report that arrives as a FHIR document Bundle -- a Composition with the rendered report as a Binary -- is stored as a DocumentReference, it is translated on ingest. The rendered document becomes the attachment, in content.attachment, and the Composition's metadata is copied across: its type, author, custodian, service period, encounter and related documents. The Composition is not stored. The pan-Canadian exchange specification (CA:FeX) does the same thing with its operation for deriving a DocumentReference from a submitted document.

Who it was sent to

A received report names the people it was addressed to. The nexus-report-recipient extension records each one, on either resource, with a role from HL7 v3 ParticipationType:

Code Role
PRCP primary information recipient: who the report was sent to
TRC tracker: a secondary recipient who was copied

These are the codes CDA uses on informationRecipient, the recipients of a clinical document. A recipient is a Practitioner, a PractitionerRole or an Organization. A recipient the clinic holds no record of is referenced by identifier alone, for example a CPSO number, rather than by a record created for them.

On ingest:

Source Role
Ontario Health ext-recipient PRCP
HRM DeliverToUserID PRCP
Ontario Health copiedParticipants TRC
OLIS copy-to (OBR-28) TRC

How and when it arrived

The nexus-content-source extension sits on the rendition that arrived -- the DocumentReference.content entry, or the DiagnosticReport.presentedForm entry, holding the delivered file. A rendition produced locally from it, such as a text extraction, carries nothing.

  • source: the system it came through, as the receiving pipeline knows it (HRM, a fax server).
  • channel: how it came, as a v3 ParticipationMode code. FAXWRIT for fax and eFax, MAILWRIT for mail, EMAILWRIT for email, ELECTRONIC for HRM, Ontario Health's feeds or a portal.
  • sent: when the sender sent it, where the channel says (a fax header, an HRM message, a Bundle timestamp).

The received time is not on the rendition:

  • On a DocumentReference it is date, when the document was filed.
  • On a DiagnosticReport it is the HL7 extensions-pack extension event-recorded, whose context includes DiagnosticReport. issued is the report's own issue time, set by the service that produced it.

A report that matches no patient

A received report whose patient cannot be identified is kept, with no patient, until someone matches it. The demographics may match no chart, a health card number may be mistyped, or the report may have been sent to the wrong clinic. The report is never discarded, and it is never filed under a placeholder patient: a placeholder is a real patient record, and every search, report and export would then have to know to leave it out.

  • The record has no subject and carries the awaiting-patient tag in meta.tag, under CodeSystem/nexus-filing-state. The tag is what makes the missing subject legitimate; a record with no subject and no tag is malformed. The same tag is used on a DiagnosticReport, on each Observation in its result, and on a DocumentReference.
  • Every record in the report carries it. A DiagnosticReport awaiting a match and its result Observations are tagged together, so each validates on its own and none appears on a chart early.
  • Matching is one write. It sets subject and removes the tag on the report and on every result in it, together. A record never carries both; each profile has an invariant that rejects it.
  • A later report for the same person is still unmatched. An awaiting-patient record is matched to a patient's chart, never to another awaiting-patient record, so two reports with the same details wait separately until each is matched.
  • The inbox item has no patient either. The review Task for an unmatched report has no for and names the report in focus; matching sets Task.for in the same write.
  • The details the source sent are kept as sent, so the match can be checked against them, and they are not overwritten by the patient's chart when the report is matched. This guide does not yet define a structured element for them.

Find unmatched records with _tag=https://fhir.apps.health/CodeSystem/nexus-filing-state|awaiting-patient. See the potassium report and its result.

Who is responsible for acting on it

The clinic provider responsible for acting on a received report is the owner (Task.owner) of its open review Task. Nothing else records it.

It is never DocumentReference.authenticator. In R4 the authenticator is a signer within the author's institution, so on a received document it is the sender's signer. A source that put its responsible provider in authenticator is translated on ingest: the provider becomes the owner of the review Task, and authenticator is left empty unless the source carries the sender's signer.

A recipient is not the responsible provider either. The sender addresses the report to its recipients; the clinic makes someone responsible for it. The primary recipient usually becomes the review Task's owner, but they are two facts, recorded in two places.

Who wrote the report is author on a DocumentReference. A received document is often authored by an organization -- a hospital, a laboratory -- and the author may be an Organization.

Notes on a report

A clinic's notes on a received report -- "discussed with the patient", "original filed in the paper chart" -- go in nexus-emr-resource-note, on either resource. R4 gives neither DiagnosticReport nor DocumentReference a note element. Each note is one turn in the Task Note shape: author and time required, read oldest first. The extension is equivalent to HL7's http://hl7.org/fhir/StructureDefinition/note, and an export to a system that uses that extension maps one to the other.

A laboratory's own comment on its report is not a clinic note. It is part of the report as issued.

LOINC codes

A LOINC code is always written under http://loinc.org. A LOINC code that arrives under any other system -- for example an Ontario Health document-type code, which re-hosts LOINC codes under Ontario Health's own address -- is written as http://loinc.org with the same code, and the arrived coding is kept beside it as a raw code, with userSelected = true (see Carrying the raw code):

"type": {
  "coding": [
    { "system": "http://loinc.org", "code": "87254-9", "display": "Addiction medicine Consult note" },
    { "system": "http://ontariohealth.ca/fhir/ehr/CodeSystem/provincial-extension-document-type",
      "code": "87254-9", "userSelected": true }
  ]
}

Both profiles check this with a warning, on DocumentReference.type and on DiagnosticReport.code: a code with the LOINC shape (^[0-9]{1,7}-[0-9]$) under a system other than http://loinc.org should have a coding beside it with system http://loinc.org and the same code. It is a warning because a local code system can mint a code that looks like a LOINC code without being one.

A source code that is not a LOINC code -- an HRM report class, an Ontario Health placeholder code -- stays a raw code, and a LOINC coding is added only where a published mapping supports it. A published mapping from HRM report classes to LOINC document types is planned.