Practitioner Profile¶
| Canonical | ../StructureDefinition/nexus-emr-core-practitioner |
|---|---|
| Status | draft · 1.26.0 |
| Base | Practitioner (constraint) |
| Source | FSH · JSON |
Represents a human that practices medicine -- the stable clinical identity that an EMR user login resolves to. Practitioner holds identity, demographics, and qualifications, and carries the EMR user-account identifier. The person's role(s) at organizations/locations are represented by PractitionerRole (0..*), which is the tenant-scoped role binding -- NOT the EMR user. A person may work at multiple organizations, each represented by a PractitionerRole.
FSH
The authored source of truth: resources/StructureDefinition-nexus-emr-core-practitioner.fsh (edit on GitHub). One FSH file may define several related artifacts.
// NexusEmrCorePractitioner.fsh
Alias: $NexusEmrCorePractitioner = ../StructureDefinition/nexus-emr-core-practitioner
// The EMR user-account authority. Deliberately NOT on the governed `fhir.apps.health` host:
// this is the literal system the platform stamps, and the slice has to match real data to be
// worth anything. See the identifier[userId] notes below.
Alias: $NexusEmrUserId = http://services.well.com/fhir/NamingSystem/user-id
// Ontario regulatory-college licence authorities. External namespaces, ADOPTED rather than
// restated: the colleges assign the numbers, and the namespaces are registered by the Ontario
// Ministry of Health and Long-Term Care in Canada Health Infoway's Canadian URI Registry, which
// publishes these Infoway-hosted URIs as their preferred form. Declared in
// NamingSystem-ca-on-license-physician.fsh and NamingSystem-ca-on-license-nurse.fsh, which is
// where the reasoning for adopting a foreign address instead of minting one on the governed host
// is written down, and which carry the FULL list of addresses each namespace is known by.
//
// EACH NAMESPACE HAS SEVERAL LIVE ADDRESSES AND ONLY ONE IS SLICED. The physician namespace is
// registered at an Infoway URI, an OID and an eHealth Ontario alias, and two further unregistered
// forms are in real data; the nurse namespace is the same minus one. Slicing one address is a
// contract about what to WRITE. Enumerating every address as its own slice was tried and does not
// scale -- it multiplies slice names, licence statements and breaking changes with every address a
// registry adds -- so the read-side list lives on the NamingSystems instead, and the slicing on
// `identifier` stays open so an identifier at any other address remains conformant.
Alias: $CaOnLicensePhysician = https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-license-physician
Alias: $CaOnLicenseNurse = https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-license-nurse
// Profile Definition
Profile: NexusEmrCorePractitioner
Parent: Practitioner
Id: nexus-emr-core-practitioner
Title: "Practitioner Profile"
Description: """
Represents a human that practices medicine -- the stable clinical identity that an EMR user login resolves to.
Practitioner holds identity, demographics, and qualifications, and carries the EMR user-account identifier.
The person's role(s) at organizations/locations are represented by PractitionerRole (0..*), which is the
tenant-scoped role binding -- NOT the EMR user. A person may work at multiple organizations, each represented
by a PractitionerRole.
"""
// THE effective date for this profile (see the EffectiveDate / NoEffectiveDate
// RuleSets): one date concept per resource, declared here rather than guessed.
* insert NoEffectiveDate
// SMART on FHIR exposure -- READ-ONLY. An app may read and search this resource but not
// create, update or delete it: this is reference/directory data, maintained by the EMR
// rather than by third-party apps, and a delete here is data loss rather than workflow.
* insert SmartExposedReadOnly(practitioner)
* ^url = $NexusEmrCorePractitioner // Canonical URL from alias
* obeys practitioner-name-family-or-given
// --- Element Constraints ---
* . ^short = "Nexus EMR Practitioner Core"
* . ^definition = """
Represents healthcare professionals and their qualifications, capturing key details
like identifiers, name, contact information, and credentials using standard
Nexus EMR references. Uses instance-specific identifiers for tracking practitioners
across systems.
"""
* meta.source 0..1 MS
* meta.source ^short = "Identifies EMR instance & pipeline version the resource came from"
* meta.source ^definition = "A URI that identifies the EMR pipeline and version from which this resource originated. This tells you which EMR instance (recommend using the instance identifier), and the version of the pipeline code/transformations."
* text 0..1 MS // Narrative element with human-readable summary
* text ^short = "Narrative"
* text ^definition = "A human-readable narrative summary of the NexusEmrCorePractitioner resource for human interpretation."
// Identifier: Must-support, 0..* (recommended, not required).
* identifier 0..* MS
* identifier.system 1..1
* identifier.value 1..1
* identifier ^short = "Practitioner identifiers"
* identifier ^definition = """
Identifiers for the practitioner.
Practitioners may have multiple identifiers from different systems.
A business identifier is recommended but not required; no specific canonical system is mandated.
A source system's own identifier SHOULD be carried alongside this one, flagged `use = secondary`. See [Carrying the raw code](../guide/patterns/raw-codes.md).
"""
// -----------------------------------------
// Identifier slicing
// -----------------------------------------
* identifier ^slicing.discriminator.type = #pattern
* identifier ^slicing.discriminator.path = "system"
* identifier ^slicing.rules = #open
* identifier ^slicing.description = "Slice identifiers by system"
* identifier contains
userId 0..1 MS and
ohipBillingNumber 0..1 MS and
rmaNumber 0..1 MS and
physicianLicence 0..1 MS and
nurseLicence 0..1 MS
// EMR user-account identifier slice -- the link from a clinical identity to a LOGIN. The
// Practitioner, not PractitionerRole, is the stable identity an EMR user login resolves to
// (the SMART `fhirUser` precedent), so the user-account id lives here.
//
// THE SYSTEM IS PRIVATE INFRASTRUCTURE, and the slice is pinned to the authority the platform
// actually stamps: `http://services.well.com/fhir/NamingSystem/user-id`. It is not on the
// governed `fhir.apps.health` host and is not being moved there in this release; moving it is
// a data migration across every stamped Practitioner, not a spec edit.
//
// Until 1.15.0 this slice pinned the governed host instead, which nothing emitted. The effect
// was quiet rather than loud: `identifier` slicing is OPEN, so a real user-id identifier did
// not fail validation -- it fell into the open remainder and NEVER MATCHED THIS SLICE. Anyone
// reading `identifier[userId]`, or asking a generated accessor for it, got nothing on every
// Practitioner in the estate. Pinning the real authority is what makes the slice match data.
* identifier[userId] ^short = "EMR user-account identifier (the id a login resolves to)"
* identifier[userId] ^definition = """
The EMR user-account identifier -- the login this clinical identity resolves to (e.g. the Auth0
user id). The Practitioner is the stable clinical identity; PractitionerRole is the role binding
at an organization, not the user.
**Private infrastructure -- external consumers must not depend on this.** The system
(`http://services.well.com/fhir/NamingSystem/user-id`) names an internal authority: it is not
resolvable, the value is opaque, and neither the authority nor the value format is a published
contract. Use it, if at all, only to correlate with an authenticated session inside the
platform. Do not parse it, do not display it, and do not treat its absence as meaningful --
a Practitioner without a login (an external referral target, a historical provider) is normal
and conformant, which is why this slice is 0..1.
"""
* identifier[userId].system 1..1
* identifier[userId].system = $NexusEmrUserId (exactly)
* identifier[userId].system ^short = "Fixed: http://services.well.com/fhir/NamingSystem/user-id (private authority)"
* identifier[userId].value 1..1
* identifier[userId].value ^short = "Opaque EMR user-account id -- do not parse"
* identifier[userId].use = #official
// OHIP Billing Number slice (optional — present for providers who bill OHIP directly)
* identifier[ohipBillingNumber] ^short = "OHIP Billing Number"
* identifier[ohipBillingNumber] ^definition = """
Ontario OHIP billing number. Maps to `provider.ohip_no` in Oscar Pro. Required for
submitting OHIP claims; absent for providers who do not bill OHIP directly (e.g. residents,
allied-health staff).
"""
* identifier[ohipBillingNumber].system 1..1
* identifier[ohipBillingNumber].system = $OhipBillingNumber (exactly)
* identifier[ohipBillingNumber].system ^short = "Must be ../NamingSystem/on-ohip-billing-number"
* identifier[ohipBillingNumber].value 1..1
* identifier[ohipBillingNumber].value ^short = "The OHIP billing number value (typically 6 digits)"
* identifier[ohipBillingNumber].use = #usual
// RMA Number slice (optional — group billing / Reciprocal Medical Association identifier)
* identifier[rmaNumber] ^short = "RMA / Group Billing Number"
* identifier[rmaNumber] ^definition = """
Reciprocal Medical Association (RMA) / group billing identifier. Maps to `provider.rma_no` in
Oscar Pro. Used on Ontario claims when the billing provider is submitting under a group billing
arrangement. Optional — absent for providers who bill individually.
"""
* identifier[rmaNumber].system 1..1
* identifier[rmaNumber].system = $RmaNumber (exactly)
* identifier[rmaNumber].system ^short = "Must be ../NamingSystem/on-rma-number"
* identifier[rmaNumber].value 1..1
* identifier[rmaNumber].value ^short = "The RMA number value"
* identifier[rmaNumber].use = #usual
// -----------------------------------------
// Regulatory-college licence slices
// -----------------------------------------
// A LICENCE NUMBER IS CARRIED IN TWO PLACES ON THIS RESOURCE, and both are real. These slices are
// `Practitioner.identifier` -- the address inbound-report routing, provider search and outbound
// HL7 v2 provider mapping all read. `Practitioner.qualification.identifier` further down carries
// the same number as part of a REGISTRATION, with the awarding college and the expiry beside it.
// A consumer that wants "this practitioner's licence number" should read both; a consumer that
// wants "what is this practitioner registered as, with whom, until when" wants `qualification`.
//
// `use` IS NOT PINNED on these slices, deliberately. Real producers disagree: some stamp none,
// others stamp `official`. Pinning it would make conformant stored data nonconformant overnight
// and buy nothing -- `system` is the discriminator, and it is the only thing every producer
// agrees on.
//
// `type` IS NOT PINNED EITHER, and for a sharper reason than `use`. There is no single published
// answer for what kind of identifier a college registration number is. The Canadian URI Registry
// types the physician namespace as v2-0203 `MD` and the nurse namespace as `PRN`; Ontario's own
// published e-referral examples stamp `LN` on exactly these identifiers; and most stored
// identifiers carry no type at all. A pattern would pick one of those and make another producer's
// conformant data fail validation, which is a cost paid for no reading benefit -- `system` is the
// discriminator and it is the only thing every producer agrees on. Each slice carries a comment
// recording the disagreement so a reader does not have to rediscover it.
//
// Separately, and unaffected: some READERS in this estate fall back to a v2-0203 type of `MD` when
// no known system matches, which is a reading heuristic over foreign data and not a statement about
// what these slices carry.
//
// ONE SLICE PER NAMESPACE, NOT ONE SLICE PER ADDRESS. Each licence namespace is known by several
// literal URIs -- a registered preferred form, an OID, a registered alias, and unregistered
// variants that are nonetheless in real data. A slice can only be discriminated by a FIXED value,
// so enumerating addresses means a slice apiece: the slice names multiply, every address needs its
// own third-party licence statement on the IP page, and each address a registry adds or retires is
// a breaking profile change. So these slices fix `system` to the registry's preferred URI, which is
// a statement about what to WRITE, and the full read-side address list lives on the NamingSystems,
// in `uniqueId` -- the element FHIR provides for exactly this, and one that ships in `package.tgz`.
//
// This does not make the other addresses nonconformant. `identifier` slicing here is `#open`, so an
// identifier carried at any other address of the same namespace is a conformant unsliced repeat. A
// reader must therefore match all of a namespace's addresses, not just the sliced one, and the
// NamingSystem for each says which those are.
//
// A REQUIRED BINDING ON `system` WAS CONSIDERED AND DOES NOT FIT. `Patient.identifier` solves the
// same many-addresses problem by binding `system` to the `canadian-phn-systems` value set, whose
// codes are the full literal URIs. That works there because the slice is discriminated by `type`
// (v2-0203 `JHN`, pinned 1..1) and the binding does its work INSIDE an already-established slice.
// These identifiers have no dependable `type`, as above, so a binding would have nothing to
// discriminate on. A required binding is also a closed-world claim -- every address outside the
// list becomes nonconformant -- and that is not a claim to make about a namespace registered by
// someone else, whose address list is theirs to extend.
// Ontario physician licence (CPSO), at the registry's preferred address.
* identifier[physicianLicence] ^short = "Ontario physician licence number (CPSO)"
* identifier[physicianLicence] ^definition = """
The practitioner's College of Physicians and Surgeons of Ontario (CPSO) registration number, under
the licence namespace registered for it in Canada Health Infoway's Canadian URI Registry. This
slice fixes `system` to the URI that registry publishes as the namespace's preferred form, so it is
the address to author against.
**It is not the only address the number appears at, and this slice is not the whole of what to
read.** The same namespace is registered under an OID and an eHealth Ontario alias, and two further
unregistered forms carry the same numbers in real data -- one written historically by this
platform, one used by Ontario's published e-referral package. The complete list, with what each
address is, is on the [CaOnLicensePhysician](../fhir/NamingSystem-CaOnLicensePhysicianNS.md) naming
system. Identifier slicing here is open, so a number carried at any of those addresses is a
conformant unsliced repeat of `Practitioner.identifier` rather than a member of this slice: resolve
this slice first, then scan the remaining identifier repeats for the other addresses, and treat a
value found under any of them as one licence number held under one authority rather than as
several.
Optional, and absence is ordinary rather than an error: nurses, medical office assistants and
administrative users hold no CPSO number. The College assigns and governs these values; this
specification neither mints nor validates them, and a well-formed number is not thereby a number
in good standing.
"""
* identifier[physicianLicence].system 1..1
* identifier[physicianLicence].system = $CaOnLicensePhysician (exactly)
* identifier[physicianLicence].system ^short = "Must be https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-license-physician"
* identifier[physicianLicence].value 1..1
* identifier[physicianLicence].value ^short = "The CPSO registration number, as the College issued it"
* identifier[physicianLicence].type ^short = "Where typed, a v2-0203 identifier-type code -- producers disagree on which; optional, and usually absent"
* identifier[physicianLicence].type ^comment = "⚠ DO NOT RELY ON THIS ELEMENT, and do not pin it. Ontario publishes two answers for what a licence identifier is typed as, and they disagree. The Canadian URI Registry entry for this namespace declares `NamingSystem.type` as v2-0203 `MD` (Medical License number) for the physician namespace and `PRN` (Provider number) for the nurse one. Ontario eReferral's own published Practitioner examples write `LN` (License number) on the identifier instead. A reader that filters on any one of the three drops conformant data from the other producers, and most stored identifiers carry no type at all. Match on `system`, which every producer agrees on; treat a type, when present, as a hint."
// Ontario nurse licence (CNO). One system for three credentials -- see the definition.
* identifier[nurseLicence] ^short = "Ontario nurse licence number (CNO)"
* identifier[nurseLicence] ^definition = """
The practitioner's College of Nurses of Ontario (CNO) registration number, under the licence
namespace registered for it in Canada Health Infoway's Canadian URI Registry. This slice fixes
`system` to the URI that registry publishes as the namespace's preferred form, so it is the address
to author against.
**It is not the only address the number appears at, and this slice is not the whole of what to
read.** The same namespace is registered under an OID and an eHealth Ontario alias, and a third,
unregistered form carries the same numbers in real data. The complete list is on the
[CaOnLicenseNurse](../fhir/NamingSystem-CaOnLicenseNurseNS.md) naming system. Identifier slicing here is
open, so a number carried at any of those addresses is a conformant unsliced repeat rather than a
member of this slice; read them all and treat what you find as one licence number. Unlike the
physician namespace, this one has no older Infoway-hosted `http` address -- do not assume one by
analogy.
**The number does not say which credential is held.** Ontario licenses the nurse practitioner, the
registered nurse and the registered practical nurse through the same College and under this same
system. A consumer that reads the presence of this identifier as meaning "nurse practitioner" will
be wrong on most of them: read the credential from `Practitioner.qualification`, and what the
person does in a given role from `PractitionerRole.code`.
Optional, and absence is ordinary: physicians, medical office assistants and administrative users
hold no CNO number.
"""
* identifier[nurseLicence].system 1..1
* identifier[nurseLicence].system = $CaOnLicenseNurse (exactly)
* identifier[nurseLicence].system ^short = "Must be https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-license-nurse"
* identifier[nurseLicence].value 1..1
* identifier[nurseLicence].value ^short = "The CNO registration number, as the College issued it"
* identifier[nurseLicence].type ^short = "Where typed, a v2-0203 identifier-type code -- producers disagree on which; optional, and usually absent"
* identifier[nurseLicence].type ^comment = "⚠ DO NOT RELY ON THIS ELEMENT, and do not pin it. Ontario publishes two answers for what a licence identifier is typed as, and they disagree. The Canadian URI Registry entry for this namespace declares `NamingSystem.type` as v2-0203 `MD` (Medical License number) for the physician namespace and `PRN` (Provider number) for the nurse one. Ontario eReferral's own published Practitioner examples write `LN` (License number) on the identifier instead. A reader that filters on any one of the three drops conformant data from the other producers, and most stored identifiers carry no type at all. Match on `system`, which every producer agrees on; treat a type, when present, as a hint."
// Active Status: Recommended, MS.
* active 0..1
* active ^short = "Whether this practitioner's record is in active use: defaults to true"
* active ^definition = "If the practitioner is not in active use, the active element should be false. Default is true if not specified."
* active ^comment = "Set to false for retired, deceased, or otherwise inactive practitioners."
// Name: Must support at least one name (1..1 MS from CA Core).
* name 1..1 MS
* name ^short = "Practitioner name(s)"
* name ^definition = "The name(s) associated with the practitioner. At least one official name is required."
* name ^comment = "Practitioners may have multiple names (official, maiden, nickname). The official name should be used for display."
// Removed * name only $ca-core-humanname (Error 27)
// Added explicit constraints back
* name.family 0..1 MS
* name.family ^short = "Family name (surname)"
* name.family ^definition = "The family name (surname) of the practitioner."
* name.given 0..* MS
* name.given ^short = "Given name(s)"
* name.given ^definition = "Given name(s) of the practitioner, including middle names."
* name.prefix 0..* MS
* name.prefix ^short = "Honorific prefix(es) (e.g. Dr., Prof.)"
* name.prefix ^definition = "Part of the name that appears at the start of the practitioner's name (standard R4 HumanName.prefix), e.g. an honorific such as Dr. or Prof."
* name.suffix 0..* MS
* name.suffix ^short = "Name suffix(es) / post-nominal credentials (e.g. MD, RN, NP)"
* name.suffix ^definition = "Part of the name that appears at the end of the practitioner's name (standard R4 HumanName.suffix), including post-nominal credentials such as MD, RN, NP, or PhD."
* name.suffix ^comment = """
Carries only the DISPLAY form of a credential. It is free text, nothing in this specification
parses it, and it carries no issuer, no number and no expiry -- `MD` in a suffix says a person
writes `MD` after their name and nothing more.
Structured licensure lives in two named places on this profile, and both are populated by the EMR:
the registration NUMBER is an identifier under the issuing college's namespace, in the
`physicianLicence` and `nurseLicence` slices of `Practitioner.identifier`;
the REGISTRATION itself -- awarding college, number, expiry -- is a `Practitioner.qualification`.
Read those rather than the suffix, and do not make the suffix the only home for anything you will
later need to match on.
A credential with no suffix is ordinary, and so is a suffix with no matching qualification: the two
elements are populated from different sources and neither is derived from the other.
"""
// -----------------------------------------
// Qualification
// -----------------------------------------
// A REGISTRATION WITH A REGULATORY COLLEGE, and the structured counterpart to the display-only
// credential in `name.suffix`. The EMR writes one qualification per college registration a
// provider holds, and reads them back the same way, so this is a round-trip contract rather than
// a shape the guide merely permits.
//
// TWO PRODUCERS FILL `code` DIFFERENTLY and a reader has to tolerate both. The provisioning path
// writes `code.text` only, carrying the college as the source system names it ("CPSO", "CNO"),
// and reads `code.text` back. Other producers write a `code.coding` from the HL7 degree/licence
// code system the base resource binds, carrying the CREDENTIAL ("MD", "NP", "RN") rather than the
// college. Those are different facts in the same element. Do not require a coding, do not require
// text, and do not assume a coding present means the same thing as the text beside it.
//
// NO COLLEGE CODE SYSTEM IS PUBLISHED HERE, deliberately. The college is already recoverable from
// the licence identifier's `system` -- the physician namespace means CPSO, the nurse namespace
// means CNO -- and a parallel enumeration of the same fact is a second thing to keep in step and a
// second thing to disagree. Nothing in this estate emits a coded college.
* qualification 0..* MS
* qualification ^short = "Regulatory-college registrations held by this practitioner"
* qualification ^definition = """
A registration the practitioner holds with a regulatory college: the licence number, what it is a
registration for, and when it lapses. This is the structured home for licensure that `name.suffix`
is not.
Absence is ordinary and not an error. Administrative users, medical office assistants and external
referral targets held as directory entries hold no registration, and a Practitioner with none is
complete and conformant.
**The list is not guaranteed to be complete.** The EMR manages the registrations it provisions and
leaves any others untouched, so a qualification written by another system survives alongside them.
Treat what you find as the registrations this record knows about, not as an exhaustive statement of
what the practitioner holds.
"""
* qualification.identifier 0..* MS
* qualification.identifier ^short = "The registration number, under the issuing college's namespace"
* qualification.identifier ^definition = """
The licence number this registration is held under. The EMR writes exactly one, with the issuing
college's namespace as its `system`, and reads the first one back -- so a producer writing several
here should not expect the extras to survive a round trip.
This is the same number that appears on `Practitioner.identifier` under the same namespace. Neither
place is derived from the other and a Practitioner may carry it in one, the other, or both.
"""
* qualification.identifier ^slicing.discriminator.type = #pattern
* qualification.identifier ^slicing.discriminator.path = "system"
* qualification.identifier ^slicing.rules = #open
* qualification.identifier ^slicing.description = "Slice registration identifiers by issuing college namespace"
* qualification.identifier contains
physicianLicence 0..1 MS and
nurseLicence 0..1 MS
* qualification.identifier[physicianLicence] ^short = "CPSO registration number for this qualification"
* qualification.identifier[physicianLicence] ^definition = "The College of Physicians and Surgeons of Ontario (CPSO) registration number this qualification records, under the licence namespace registered for it in Canada Health Infoway's Canadian URI Registry. This slice fixes `system` to that registry's preferred URI for the namespace; the same namespace is also known by an OID, by an eHealth Ontario alias and by two unregistered forms that appear in real data, all listed on the [CaOnLicensePhysician](../fhir/NamingSystem-CaOnLicensePhysicianNS.md) naming system. Slicing here is open, so a registration number carried at one of those other addresses is a conformant unsliced repeat rather than a member of this slice. The same number appears in the `physicianLicence` slice of `Practitioner.identifier`; read both, and treat a value found in either as one licence number rather than two."
* qualification.identifier[physicianLicence].system 1..1
* qualification.identifier[physicianLicence].system = $CaOnLicensePhysician (exactly)
* qualification.identifier[physicianLicence].system ^short = "Must be https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-license-physician"
* qualification.identifier[physicianLicence].value 1..1
* qualification.identifier[physicianLicence].value ^short = "The CPSO registration number, as the College issued it"
* qualification.identifier[nurseLicence] ^short = "CNO registration number for this qualification"
* qualification.identifier[nurseLicence] ^definition = "The College of Nurses of Ontario (CNO) registration number this qualification records, under the licence namespace registered for it in Canada Health Infoway's Canadian URI Registry. This slice fixes `system` to that registry's preferred URI for the namespace; the same namespace is also known by an OID, by an eHealth Ontario alias and by one unregistered form that appears in real data, all listed on the [CaOnLicenseNurse](../fhir/NamingSystem-CaOnLicenseNurseNS.md) naming system. Slicing here is open, so a registration number carried at one of those other addresses is a conformant unsliced repeat rather than a member of this slice. The same College licenses the nurse practitioner, the registered nurse and the registered practical nurse, so the number alone does not say which credential is held -- that is what this qualification's `code` is for."
* qualification.identifier[nurseLicence].system 1..1
* qualification.identifier[nurseLicence].system = $CaOnLicenseNurse (exactly)
* qualification.identifier[nurseLicence].system ^short = "Must be https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-license-nurse"
* qualification.identifier[nurseLicence].value 1..1
* qualification.identifier[nurseLicence].value ^short = "The CNO registration number, as the College issued it"
* qualification.code MS
* qualification.code ^short = "What the registration is -- the college, or the credential, depending on the producer"
* qualification.code ^definition = """
What this qualification records. Required by the base resource, and filled two different ways in
practice, which a reader has to expect:
- **`code.text` carrying the COLLEGE**, as the source system names it (`CPSO`, `CNO`). This is what
the EMR's provisioning path writes, and what it reads back; it writes no coding at all.
- **`code.coding` carrying the CREDENTIAL** (`MD`, `NP`, `RN`), from the HL7 degree/licence/
certificate code system bound by the base resource. Other producers write this, with no text.
Those are not the same fact. Do not require a coding, do not require text, and do not read a coding
as a restatement of the text beside it. A registered practical nurse is the clearest case of what
goes wrong: the credential has no code in that HL7 system, so a producer emitting codings honestly
emits none for that person -- an absent coding is a statement about the code system, not a
statement that the person is unregistered.
The issuing college is also recoverable, without ambiguity, from this qualification's identifier
`system`. Prefer that when what you need is the college.
"""
* qualification.code.text 0..1 MS
* qualification.code.text ^short = "The college as the source system names it, e.g. CPSO or CNO"
* qualification.period 0..1 MS
* qualification.period ^short = "When the registration lapses"
* qualification.period ^definition = "The period this registration is valid for. Only `period.end` is written and only `period.end` is read: it carries the registration's expiry date. A qualification with no period is a registration with no recorded expiry, which is ordinary -- it does not mean the registration is expired, and it does not mean it is current."
* qualification.period.end 0..1 MS
* qualification.period.end ^short = "Registration expiry date"
* qualification.issuer 0..1 MS
* qualification.issuer ^short = "The awarding college, when it is carried as an Organization"
* qualification.issuer ^definition = "The organization that awarded the qualification. Carried and reference-resolved on Practitioners that arrive in a referral bundle; the EMR's own provisioning path does not populate it, so an absent issuer is ordinary and the college should be read from the identifier `system` or from `code.text` instead."
Invariant: practitioner-name-family-or-given
Description: "Practitioner must have at least one name with either a family or given name"
Severity: #error
Expression: "name.exists(family.exists() or given.exists())"