On this page

Records shared between apps

Several apps can write to one customer's charts. These rules make sure each app can read what the others wrote, and does not damage it.

REC-1 Records conform to the OpenOrchid Core profiles​

An app SHALL write each record of a type listed below so that it passes the matching profile, and SHALL name the profile in meta.profile.

RecordProfile
Patientoo-patient
Allergy or intoleranceoo-allergyintolerance
Problem or diagnosisoo-condition
Medication the patient takesoo-medicationstatement
Laboratory resultoo-observation-lab
Vital signoo-observation-vitalsigns
Report grouping resultsoo-diagnosticreport
Immunizationoo-immunization
Clinicianoo-practitioner
Clinic, lab or other organizationoo-organization

Every record that passes an OpenOrchid Core profile also passes the CA Core+ profile it derives from. The records for allergies, problems and medications also pass the matching PS-CA profiles, so they can fill the three required sections of a pan-Canadian Patient Summary.

  • Who: platform, once a project can require profiles. Until then, the app.
  • Enforced by: Gap: OPE-71 and OPE-60, as for ID-1.
  • Check: validate every record the app writes against its profile.

REC-2 Visits are optional, and every reader handles both​

A record MAY point at the visit it belongs to (encounter on most records, context on MedicationStatement), and MAY leave it out. An app that writes an Encounter SHALL make it pass CA Core+ encounter-ca-core.

An app that reads the chart SHALL find records by patient (subject or patient), not by visit, and SHALL show a record whether or not it points at a visit. An app SHALL NOT hide, drop or refuse a record because it has no visit, and SHALL NOT create a visit for a record another app wrote.

  • Who: app.
  • Check: write a Condition with no encounter through one app; the reading app shows it on the chart.
  • Why: decision 0002.

A code is recommended, not required, for problems, allergies, medications, results and immunizations, as in CA Core+. An app SHOULD send a code from the value set CA Core+ prefers for the element, and SHALL include it whenever the person entering the record picked one.

An app that reads a coded element SHALL show its text, or a coding's display when there is no text. An app SHALL NOT hide, drop or refuse a record because it has no code, or a code from a system the app does not know.

Vital signs are the exception: the FHIR specification requires every vital sign to be coded in LOINC with its value in UCUM units, so oo-observation-vitalsigns requires both.

  • Who: app.
  • Check: write a Condition with only code.text through one app; the reading app shows the text.
  • Why: decision 0003.

REC-4 Shared concepts use the named extensions​

When an app records one of the concepts below, it SHALL use the extension named for it, and SHALL NOT define its own extension for that concept.

ConceptExtension
Gender identityhttp://hl7.org/fhir/StructureDefinition/individual-genderIdentity
Pronounshttp://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/individualPronouns
Recorded sex or genderhttp://hl7.org/fhir/StructureDefinition/individual-recordedSexOrGender
Sex assigned at birthhttp://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/patient-birthSex
Indigenous identityhttp://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/patient-indigenousIdentity
Racialized grouphttp://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/patient-racializedGroup
Communication barrierhttp://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/patient-communicationBarrier
Time of birthhttp://hl7.org/fhir/StructureDefinition/patient-birthTime
Health card version codehttp://hl7.org/fhir/ca/baseline/StructureDefinition/ext-identifierversion
Allergy resolved datehttp://hl7.org/fhir/StructureDefinition/allergyintolerance-abatement
Medication instructions as shownhttp://prescribeit.ca/fhir/StructureDefinition/ext-medication-rendered-dosage
No value, or value unknownhttp://hl7.org/fhir/StructureDefinition/data-absent-reason

These are the extensions CA Core+ 1.2.1-dft names on the profiles above. An app MAY add its own extensions for concepts not in the table.

  • Who: app.
  • Check: a review of each app's extensions against the table.

REC-5 An update keeps what other apps wrote​

An app that changes a record SHALL keep every element and extension it does not understand: it SHALL update with PATCH, or read the current version and write it back whole with only its own changes. Each update SHALL send If-Match with the version it read, so that it fails instead of overwriting a change another app made in between.

  • Who: app. The platform rejects an update whose If-Match version is not current.
  • Enforced by: versioned updates in the server (If-Match returns 412 on a stale version).
  • Check: one app adds an extension to a record; a second app edits the record; the extension is still there.