Defines the Nexus EMR FHIR profile for DiagnosticReport resources, based on CA-Core constraints, for aggregating diagnostic reports (e.g., Lab, Imaging) from multiple EMRs. Today Nexus EMR writes every report received over HRM, of any class, and every laboratory feed with coded results here; documents uploaded or scanned are a DocumentReference. Which resource a received report should become is not yet settled, so a reader should expect a received report on either. See Incoming reports.
Every rule in force on a conforming instance. This profile rows are stated here; inherited rows come from the base resource and are listed so that a constraint named on an element is findable. Invariant keys elsewhere on this page link into this table.
Key
Source
Severity
On
Rule
nexus-awaiting-patient-has-no-subject
this profile
error
DiagnosticReport
A record awaiting a patient match (the awaiting-patient tag under CodeSystem/nexus-filing-state) SHALL NOT carry a subject: matching it to a patient sets the subject and removes the tag together. meta.tag.where(system = 'https://fhir.apps.health/CodeSystem/nexus-filing-state' and code = 'awaiting-patient').exists() implies subject.empty()
nexus-diagnosticreport-code-loinc-system
this profile
warning
DiagnosticReport
A LOINC-shaped code under a system other than http://loinc.org SHOULD be accompanied by a coding with system http://loinc.org and the same code: a LOINC code is always written under http://loinc.org, and the arrived coding is kept beside it as a raw code code.coding.where(system.exists() and system != 'http://loinc.org' and code.matches('^[0-9]{1,7}-[0-9]$')).all(code in %resource.code.coding.where(system = 'http://loinc.org').code)
nexus-subject-unless-awaiting-patient
this profile
error
DiagnosticReport
A record SHALL carry a subject unless it is awaiting a patient match (the awaiting-patient tag under CodeSystem/nexus-filing-state). Every other record is about an identified patient. subject.exists() or meta.tag.where(system = 'https://fhir.apps.health/CodeSystem/nexus-filing-state' and code = 'awaiting-patient').exists()
dom-2
inherited
error
DiagnosticReport
If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3
inherited
error
DiagnosticReport
If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference
dom-4
inherited
error
DiagnosticReport
If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5
inherited
error
DiagnosticReport
If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6
inherited
warning
DiagnosticReport
A resource should have narrative for robust management text.div.exists()
ele-1
inherited
error
DiagnosticReport.meta
All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1
inherited
error
DiagnosticReport.meta.extension
Must have either extensions or value[x], not both extension.exists() != value.exists()