Skip to content

PCR Registered Extension

Canonical../StructureDefinition/pcr-registered
Statusdraft · 1.26.0
BaseExtension (constraint)
ContextPatient (element)
SourceFSH · JSON

Whether the provincial client registry holds this patient, as far as this EMR has been able to establish by sending it.

FSH

The authored source of truth: extensions/PcrPatientExtensions.fsh (edit on GitHub). One FSH file may define several related artifacts.

// PcrPatientExtensions.fsh
// Two flags a patient record carries about the PROVINCIAL CLIENT REGISTRY: whether the registry
// holds this patient, and which of the record's merges have been sent to it.
//
// WHAT THE REGISTRY IS, AND WHY THE CHART CARRIES ANYTHING ABOUT IT. A provincial client registry
// is the province's own index of health-care clients. An EMR that participates sends it patient
// demographics and merges, and provincial services downstream of the registry will not accept a
// record for a patient the registry does not yet hold. So the chart has to be able to answer
// "has this patient reached the registry yet", and it answers it here.
//
// BOTH ARE ABOUT WHAT THIS EMR HAS SENT, NOT ABOUT WHAT THE PROVINCE HOLDS. Neither element is a
// read of the registry, and neither is a statement about a patient's provincial registration or
// coverage. They record the state of one outbound integration. A consumer that reads either as a
// fact about the patient rather than about the transmission has read something the data does not
// say.
//
// ────────────────────────────────────────────────────────────────────────────────────────────────
// THE CANONICALS HERE ARE NOT THE ONES THE SOFTWARE WRITES TODAY.
//
// These publish under `../StructureDefinition/...`, the base
// `conventions.md` names for everything in this guide. Nexus EMR writes them under
// `http://services.well.com/fhir/pcr/...`, on a host this specification does not govern -- minted
// in code before the guide declared them, and not followed here, because a guide that adopts every
// address its implementation happens to have minted has no canonical base at all.
//
// THE SEGMENTS ALSO CHANGE, so a suffix rule does not reach the pre-migration addresses. `exists`
// becomes `pcr-registered` and `replacedByInPcr` becomes `pcr-replaced-by-propagated`, because
// neither original segment says what the element records: read on its own, `exists` does not say
// what exists, and `replacedByInPcr` does not say that the value is the merge target this EMR has
// already reported. Match the two addresses per element, exactly, as the pairs are listed on the
// handbook's Canonical URLs page.
//
// MOVING THE WRITERS, AND THE STORED PATIENT RECORDS BEHIND THEM, IS TRACKED AS FHIR-381. The
// handbook states the rule and indexes every published artifact in this position: see
// `docs/guide/patterns/canonical-urls.md`.
// ────────────────────────────────────────────────────────────────────────────────────────────────

Extension: PcrRegistered
Id: pcr-registered
Title: "PCR Registered Extension"
Description: """
Whether the provincial client registry holds this patient, as far as this EMR has been able to
establish by sending it.

Set `true` once the registry has accepted an add for the patient, and also when the registry
refuses that add as a duplicate of a client it already holds -- both outcomes mean the same thing
for a reader, which is that the registry has a record. It is not set from a read of the registry
and it is never set speculatively.

**Absent and `false` mean the same thing: not known to be in the registry.** The value is only ever
written `true`; nothing writes `false`, so a reader should treat the absence of this extension as
the negative case rather than looking for one.

**This is not a statement about the patient.** It says nothing about whether a person is registered
provincially, whether their coverage is valid, or whether the registry's record agrees with this
one. It records the state of one outbound transmission, and a consumer reading it as a clinical or
administrative fact about the patient has read something it does not say.

**It gates provincial reporting that depends on the registry.** Estate surfaces that must not send
a provincial message about a patient the registry has never seen -- an appointment arrival, for
instance -- wait on this flag rather than sending and being refused. That is why it is stamped on
the chart at all rather than kept in the integration's own store: the surfaces that need it read
the patient, not the integration.

**MIGRATION.** Nexus EMR writes this extension today at `http://services.well.com/fhir/pcr/exists`
(FHIR-381): that address is live in stored patient records and in code, and is under migration to
the canonical declared here. Write the canonical; when reading, match both addresses exactly -- the
two share no segment, so a suffix rule does not reach the pre-migration one.
"""
* ^url = "../StructureDefinition/pcr-registered"
* ^status = #draft
* ^date = "2026-09-04"
* ^publisher = "WELLSTAR Technologies Corp."
* ^context[0].type = #element
* ^context[0].expression = "Patient"
* . ^short = "The provincial client registry holds this patient"
* extension 0..0
* url 1..1
* value[x] 1..1 MS
* value[x] only boolean
* valueBoolean ^short = "True once the registry has accepted this patient; absent otherwise"
* valueBoolean ^definition = "True when the provincial client registry has accepted an add for this patient, or has refused one as a duplicate of a client it already holds. Only `true` is written: absent means not known to be in the registry, and so does `false`."

Extension: PcrReplacedByPropagated
Id: pcr-replaced-by-propagated
Title: "PCR Replaced-By Propagated Extension"
Description: """
One `Patient.link` of type `replaced-by` whose merge has already been sent to the provincial client
registry. REPEATS: a record merged more than once carries one of these per merge that has been
sent.

**The value is the surviving patient's reference as a plain string** -- `Patient/<id>` -- and it is
compared literally against `Patient.link.other.reference`. It is a string rather than a `Reference`
because it is a marker matched against a reference that already exists on the record, not a second
way of pointing at the surviving patient. The link is the merge; this only says the registry has
been told about it.

**READ IT AS A PAIR WITH `Patient.link`, AND READ THE ABSENCE.** A `replaced-by` link with no
matching value here is a merge this EMR has recorded and the registry has not yet been sent. That
gap is the whole point of the element: it is what lets the integration find a merge still owing
transmission after the chart has already been updated. A consumer that reads only `Patient.link`
sees the merge and cannot tell whether the province knows about it; a consumer that reads only this
element sees the merges already reported and misses the ones outstanding.

**It is not a merge status from the registry.** Nothing here reflects what the registry did with
the merge afterwards, and nothing removes the value if the registry later disagrees.

**MIGRATION.** Nexus EMR writes this extension today at
`http://services.well.com/fhir/pcr/replacedByInPcr` (FHIR-381): that address is live in stored
patient records and in code, and is under migration to the canonical declared here. Write the
canonical; when reading, match both addresses exactly -- the two share no segment, so a suffix rule
does not reach the pre-migration one.
"""
* ^url = "../StructureDefinition/pcr-replaced-by-propagated"
* ^status = #draft
* ^date = "2026-09-04"
* ^publisher = "WELLSTAR Technologies Corp."
* ^context[0].type = #element
* ^context[0].expression = "Patient"
* . ^short = "A replaced-by merge already sent to the provincial client registry"
* extension 0..0
* url 1..1
* value[x] 1..1 MS
* value[x] only string
* valueString ^short = "The surviving patient's reference, as it appears on Patient.link.other.reference"
* valueString ^definition = "The surviving patient's reference written as a plain string (`Patient/<id>`), matched literally against `Patient.link.other.reference`. NOT a `Reference`: it marks which of the record's existing replaced-by links has been sent to the registry."