AuDigitalHealth / ci-fhir-stu3

Working drafts of HL7™ FHIR® Release 3 (STU) artefacts authored and maintained by the Clinical Informatics team at the Australian Digital Health Agency.
Other
11 stars 0 forks source link

AllergyIntolerance (Summary Statement of Allergy or Intolerance) has a bug in inv-dh-ait-04 #55

Closed dtr-agency closed 4 years ago

dtr-agency commented 4 years ago

Prerequisites

The bug

As part of the SML assurance validation task, a bug has been discovered with the FHIRPath of the Summary Statement of Allergy or Intolerance profile's invariant inv-dh-ait-04.

The invariant is: Description: A related person shall conform to Base RelatedPerson Element: AllergyIntolerance.extension:authorRelatedPerson FHIRPath: resolve().conformsTo('http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/relatedperson-dh-base-1')

All examples, including ones that should obviously pass are failing (ie an error being raised against inv-dh-ait-04

What I expected to happen

Scenario Expected result
The AllergyIntolerance instance does not include a recorder related person pass
The AllergyIntolerance instance includes a recorder related person with a reference, to contained RelatedPerson resource that conforms to Base RelatedPerson pass
The AllergyIntolerance instance includes a recorder related person with a reference, to an external RelatedPerson resource that conforms to Base RelatedPerson pass 
The AllergyIntolerance instance includes a recorder related person with a reference, to contained RelatedPerson resource that conforms to Base RelatedPerson pass  
The AllergyIntolerance instance includes a recorder related person with a reference, to contained RelatedPerson resource that does not conform to Base RelatedPerson fail
The AllergyIntolerance instance includes a recorder related person with a reference, to contained RelatedPerson resource that does not conform to Base RelatedPerson fail

The fix

Verification of this FHIRPath pattern with targeted examples, conclude that the FHIRPath that works is this:

valueReference.reference.resolve().conformsTo('http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/relatedperson-dh-base-1')

Workarounds

Providing a logical reference via identifier rather than a reference to a resource.

QA.html excerpt

TBD

dtr-agency commented 4 years ago

This issue is accepted as a known issue due to project constraints in accordance with the following requirements: