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

Shared Health Summary composition profile - missing constraints on elements with a Reference #62

Closed dtr-agency closed 4 years ago

dtr-agency commented 4 years ago

Prerequisites

The issue / feature

Change description

The Shared Health Summary Composition is missing constraints on elements with a logical type of Reference.

Without a constraint on Reference there is a wide range of values that are accepted as passing validation, some of which are undesirable. For example,

Add constraints on Composition elements of type Reference where additional constraints are desired for the use case:

This is expected to be:

What it actually enables people to do

Enables consistent implementation and validation of meaningful data that serves the use case. Provides clarification of how to support the expected usage scenarios.

Mockups

Not available.

How awesome would it be?

Highly desirable - the design is incomplete without these constraints. This issue must addressed at some stage prior to release for implementation.

Workarounds

This missing design feature may be addressed in the STU3 profile by documentation of a known issue rather than adding invariants to the Composition. Or possibly a mix of both, addition of some invariants / constraints and a known issue covering off the other invariants not included in the STU3 profile. Example known issue content

Reference Description Issue No.
subject The design of this element is incomplete. In the future it is intended subject shall be constrained to at least have a reference or an identifier with at least a system and a value. See ci-fhir-stu3/issues/62
attester (legalAttester) party The design of this slice is incomplete. In the future it is intended party.Reference shall be constrained to at least have a reference or an identifier with at least a system and a value. See ci-fhir-stu3/issues/62

...

Additional context

composition-sml-prac-1 is an example of a Composition with these constraints in place including functioning FHIRPath expression.

dbojicic-agency commented 4 years ago

Work is underway to implement a number of additional constraints in the composition profile to better define reference elements, as described above.

dbojicic-agency commented 4 years ago

This was addressed in two ways:

  1. Added the following invariants to introduce rules around refere

    1. Composition
      1. inv-dh-cmp-09: The author role shall at least have a reference that conforms to PractitionerRole with Practitioner with Mandatory Identifier or an identifier with at least a system and a value" and moved to the Composition level.
      2. inv-dh-cmp-10: The subject shall at least have a reference or an identifier with at least a system and a value
        1. inv-dh-cmp-11: The author shall at least have a reference or an identifier with at least a system and a value
        2. inv-dh-cmp-12: The custodian shall at least have a reference or an identifier with at least a system and a value
      3. Composition.attester.legalAttester:
        1. inv-dh-cmp-13: The party shall at least have a reference or an identifier with at least a system and a value
  2. Adding a cardinality constraint of 1..1 on the reference element of the following: 1.Composition.section:allergies.entry.reference

    1. Composition.section:medications.entry.reference
    2. Composition.section:medicalHistory.entry.reference
      1. Composition.section:immunisations.entry.reference