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.
| Record | Profile |
|---|---|
| Patient | oo-patient |
| Allergy or intolerance | oo-allergyintolerance |
| Problem or diagnosis | oo-condition |
| Medication the patient takes | oo-medicationstatement |
| Laboratory result | oo-observation-lab |
| Vital sign | oo-observation-vitalsigns |
| Report grouping results | oo-diagnosticreport |
| Immunization | oo-immunization |
| Clinician | oo-practitioner |
| Clinic, lab or other organization | oo-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.
REC-3 Codes are recommended; text is always readable
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.textthrough 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.
| Concept | Extension |
|---|---|
| Gender identity | http://hl7.org/fhir/StructureDefinition/individual-genderIdentity |
| Pronouns | http://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/individualPronouns |
| Recorded sex or gender | http://hl7.org/fhir/StructureDefinition/individual-recordedSexOrGender |
| Sex assigned at birth | http://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/patient-birthSex |
| Indigenous identity | http://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/patient-indigenousIdentity |
| Racialized group | http://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/patient-racializedGroup |
| Communication barrier | http://fhir.infoway-inforoute.ca/ca-ext/StructureDefinition/patient-communicationBarrier |
| Time of birth | http://hl7.org/fhir/StructureDefinition/patient-birthTime |
| Health card version code | http://hl7.org/fhir/ca/baseline/StructureDefinition/ext-identifierversion |
| Allergy resolved date | http://hl7.org/fhir/StructureDefinition/allergyintolerance-abatement |
| Medication instructions as shown | http://prescribeit.ca/fhir/StructureDefinition/ext-medication-rendered-dosage |
| No value, or value unknown | http://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-Matchversion is not current. - Enforced by: versioned updates in the server (
If-Matchreturns 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.