Skip to content

Commit

Permalink
FHIR-41554 - Adopt the invariants from the Lab Report IG (EU and UV) …
Browse files Browse the repository at this point in the history
…profiles).
  • Loading branch information
rhausam committed Jul 31, 2024
1 parent e73561b commit da25906
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions input/fsh/invariants/ips-2.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: ips-2
Description: "if no \"hasMember\" element is present then Observation must have a\" value\""
* severity = #error
* expression = "value.exists() or hasMember.exists()"
Description: "If observation status is other then \"registered\" or \"cancelled\", at least one of these Observation elements shall be provided: \"value\", \"dataAbsentReason\", \"hasMember\" or \"component\""
Severity: #error
Expression: "(status in ('registered'|'cancelled')) or value.exists() or hasMember.exists() or component.exists() or dataAbsentReason.exists()"
4 changes: 4 additions & 0 deletions input/fsh/invariants/ips-3.fsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Invariant: ips-3
Description: "If observation has components and observation status is other than \"registered\" or \"cancelled\", at least one of these Observation.component elements shall be provided: \"value\" or \"dataAbsentReason\""
Severity: #error
Expression: "component.exists() implies (status in ('registered'|'cancelled')) or component.value.exists() or component.dataAbsentReason.exists()"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This observation may represent the result of a simple laboratory test such as he
* . ^short = "Laboratory (including Pathology) result for a simple test or for a panel/study"
* . ^definition = "This observation may represent the result of a simple laboratory or pathology test such as hematocrit, or it may group the set of results produced by a multi-test study or panel such as a complete blood count, a dynamic function test, or a urine specimen study. In the latter case, the observation carries the overall conclusion of the study and references the atomic results of the study as \"has-member\" child observations"
* . ^comment = "Represents either a lab simple observation or the group of observations produced by a laboratory study."
* obeys ips-2
* obeys ips-2 and ips-3
* status = #final (exactly)
* status ^extension[0].url = "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint"
* status ^extension[=].valueString = "default: final"
Expand Down

0 comments on commit da25906

Please sign in to comment.