Working drafts of HL7™ FHIR® artefacts authored and maintained by the Informatics Architecture team at the Australian Digital Health Agency that represent atomic Medicare records in the My Health Record system and related applications.
Other
1
stars
1
forks
source link
Incorrect FHIRPath in Consent Australian Organ Donor Register inv-dh-cons-01 and -02 #5
[x] I have verified the problem exists in the available content
[x] I have searched open and closed issues to make sure it isn't already reported
[x] I have written a descriptive issue title
The bug
The invariants
inv-dh-cons-01: If donation decision is 'permit', there SHALL be a specific organ (except.data.reference).
and
inv-dh-cons-02: If donation decision is 'deny', there SHALL NOT be a specific organ (except.data.reference).
fail for valid examples. In the FHIRPath expressions the antecedents are always true, so e.g. an instance with donation-decision of 'permit' and with a specific organ (except.data.reference) will fail with an error against inv-dh-cons-02.
extension.where(url='http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/extension-donationdecision').value.coding.where(system='http://snomed.info/sct' and code='160654005').exists()
extension.where(url='http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/extension-donationdecision').value.coding.where(system='http://snomed.info/sct' and code='161034004').exists()
Prerequisites
The bug
The invariants
and
fail for valid examples. In the FHIRPath expressions the antecedents are always true, so e.g. an instance with donation-decision of 'permit' and with a specific organ (except.data.reference) will fail with an error against inv-dh-cons-02.
What I expected to happen
Correct the FHIRPath expression:
donationDecision.valueCodeableConcept.coding.code='160654005' implies except.exists()
with
extension.where(url='http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/extension-donationdecision').value.coding.where(system='http://snomed.info/sct' and code='160654005').exists()
donationDecision.valueCodeableConcept.coding.code='161034004' implies except.empty()
with
extension.where(url='http://ns.electronichealth.net.au/ci/fhir/StructureDefinition/extension-donationdecision').value.coding.where(system='http://snomed.info/sct' and code='161034004').exists()
Workarounds
Do not validate against the profile.