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 invariants for information-recipient #50

Closed robeastwood-agency closed 4 years ago

robeastwood-agency commented 4 years ago

Prerequisites

The bug

Five invariants on the optional extension Composition.extension:informationRecipient have faulty FHIRPath expressions. The consequence of which is that acceptable content for this element always fails to be valid against these invariants.

The affetced invariants are:

All of the above invariants share the same FHIRath expression pattern, which are variations of

all($this.reference.exists() implies resolve().where($this is Practitioner).conformsTo('http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/practitioner-dh-base-1'))

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:

all($this.valueReference.reference.resolve().where($this is Practitioner).exists() implies $this.valueReference.reference.resolve().conformsTo('http://ns.electronichealth.net.au/ci/fhir/3.0/StructureDefinition/practitioner-dh-base-1'))

Workarounds

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

dtr-agency commented 4 years ago

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

robeastwood-agency commented 4 years ago

Hi @RichardTON, this issue is being re-opened given the change of default behavior of the publisher as well as the additional invariant being faulty (inv-dh-cmp-12, as documented in #59).

Asking you to review the known issue variation (see CIFMM-3278) and if OK, to re-close this issue.

thanks

RichardTON commented 4 years ago

Change in IG Publisher validation behvaiour from always failing instances with Composition.extension:informationRecipient to always passing.

This behavior is accepted as a known issue and documented in the SML FHIR IG via: https://github.com/AuDigitalHealth/ci-fhir-stu3/commit/2bacc4bba68eaf042fae5e3545ea6b8fffb580a0#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, FHIRPath expressions have been updated for invariants inv-dh-cmp-07 to inv-dh-cmp-11: