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

Composition (Shared Medicines List Authored by Practitioner) has bug in the information-recipient invariant that prohibits a device #59

Closed robeastwood-agency closed 4 years ago

robeastwood-agency commented 4 years ago

Prerequisites

The bug

One invariant on the optional extension Composition.extension:informationRecipient has faulty FHIRPath expression. The consequence of which is that unacceptable content for this element is always valid against this invariant.

The affected invariant is:

With the FHIRath expression:

resolve().where($this is Device).exists().not()

What I expected to happen

Acceptable content for this element shall be valid against these invariants. Unacceptable content for this element shall not be valid against these invariants.

The fix

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

valueReference.reference.resolve().where($this is Device).exists().not()

Workarounds

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

RichardTON commented 4 years ago

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

This behavior is accepted as a known issue and documented in the SML FHIR IG via: 2bacc4b#diff-0c3a887c600181a92b738f7c87f57860

dbojicic-agency commented 4 years ago

Later versions of IG Publisher have been updated and the content validation works as expected when correct FHIRPath expressions are provided. As a result inv-dh-cmp-12 FHIRPath expressions has been updated to: valueReference.reference.resolve().where($this is Device).exists().not()