Uploaded image for project: 'FHIR Specification Feedback'
  1. FHIR Specification Feedback
  2. FHIR-27927

IG Publisher doesn't require constraints on discriminator path (for pattern type)

    XMLWordPrintableJSON

Details

    • Icon: Change Request Change Request
    • Resolution: Not Persuasive
    • Icon: Medium Medium

    Description

      The R4 spec on profiling says:

      Each slice must use the element definition for the element(s) in the discriminator(s) to ensure that the slices are clearly differentiated by assigning an appropriate value domain, depending on the discriminator type. If the type is value, or pattern, then the element definition must use either:

      • ElementDefinition.fixed[x], or
      • ElementDefinition.pattern[x], or
      • if the element has a terminology binding, a required binding with a Value Set that enumerates the list of possible codes in the value set ("extensional definition")

       

      I take this to mean that if a discriminator type is pattern then the element pointed to by the discriminator path must have either a pattern[x] or binding property directly on it (and maybe a fixed[x] would be OK - not sure).

      But... I've found that the IG Publisher doesn't seem to care. The following FSH produces no errors or warnings in the IG Publisher:

       

      Profile: BPComponentDiscriminatesOnThisButConstrainsCode
      Parent: Observation
      Title: "BP Component Discriminates On $this but Constrains Code"
      Description: """
        An example of a case where a pattern discriminator is on $this, but
        $this does not contain any pattern[x] or binding constraints; the
        constraints are actually on $this's child 'code' property. This should
        probably be an error, but the IG Publisher seems happy with it.
      """
      * component ^slicing.rules = #open
      * component ^slicing.discriminator.type = #pattern
      * component ^slicing.discriminator.path = "$this"
      * component contains systolic 0..1 and diastolic 0..1
      * component[systolic].code = http://loinc.org#8480-6
      * component[diastolic].code = http://loinc.org#8462-4

      I expected some flack from the publisher because the component discriminator type is pattern and the path is $this -- but the pattern[x] and binding are not on component (which is $this), but rather are on component.code.

      FSH-produced StructureDefinition is attached.

      See Zulip for discussion: https://chat.fhir.org/#narrow/stream/179177-conformance/topic/pattern.20discriminators.20and.20pattern.5Bx.5D.2Fbinding

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            cmoesel Chris Moesel
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: