FHIR Chat · mustSupport semantics and support for allowed fields · conformance

Stream: conformance

Topic: mustSupport semantics and support for allowed fields


view this post on Zulip Morten Ernebjerg (Nov 08 2019 at 09:23):

I have been looking at the semantics of mustSupport in various IGs and have several times come across formulations similar to this one from the current International Patient Summary IG build:

Implementers conforming to the IPS Implementation Guide, when receiving IPS content (...) SHALL be capable of processing resource instances containing mustSupport data elements without generating an error or causing the application to fail.

The way I would naively read this is that there is, conversely, no requirement that the application should not fail if there is data in fields which can be present but are not flagged as mustSupport. I had always assumed, however, that an application claiming to handle a given profile must never crash given any resource conforming to the profile. Or, put the other way around: any field that could "legally" crash a conformant application should be prohibited in the profile.

Seems I am misunderstanding some part(s) of this - could someone perhaps clarify?

view this post on Zulip Eric Haas (Nov 08 2019 at 15:06):

That is a minimum expectation but yes in the real world you would probably wanted to be more robust.

view this post on Zulip Lloyd McKenzie (Nov 08 2019 at 16:22):

That statement for 'mustSupport' is pretty much useless. No system should fail when generating a valid FHIR instance, whether the elements it receives are supported or not. 'mustSupport' is intended to set expectations for what systems must actually do with the data so flagged (persist it, display it, consider it in decision support, make it available for subsequent query, etc.)

view this post on Zulip Alexander Kiel (Nov 09 2019 at 06:51):

@Morten Ernebjerg I can only second what @Lloyd McKenzie said. Above all specifications Postel's law should always taken into account. So an application never should fail on unknown input. It rather should ignore it. FHIR does allow to ignore received data.

view this post on Zulip Lloyd McKenzie (Nov 09 2019 at 15:21):

I can see some systems failing if you send data in the wrong format, or even if you send elements that aren't supported for a declared version (though that would be bad practice). But systems should not fail for any valid FHIR element unless that element is explicitly prohibited by business rules from being present.

view this post on Zulip Morten Ernebjerg (Nov 11 2019 at 13:09):

Thanks for the input, makes sense - I also had smt. like the "Postellian" view in mind.

view this post on Zulip Ioana Singureanu (Sep 21 2020 at 15:42):

@Alexander Henket , @Robert Scanlon, @Mark Kramer we are planning to discuss an extension intended to enhance the semantics of "must-support" in Conformance tomorrow at 10 am EST (during the virtual WGM). This extensions to ElementDefinition is called "Usage Indicator" and it's explicitly intended to support reuse/constraint of national profile libraries (e.g. US Core, Da Vinci ,NICTIZ, etc.) and improve testability for conformance testing. We've designed a coded extension and described its uses in the associated design document :

view this post on Zulip Mark Kramer (Sep 21 2020 at 15:43):

It's on my schedule!

view this post on Zulip Alexander Henket (Sep 21 2020 at 15:59):

I'll be there

view this post on Zulip Jens Villadsen (Sep 21 2020 at 16:56):

@Kirstine Rosenbeck Gøeg

view this post on Zulip Robert Scanlon (Sep 21 2020 at 20:29):

Unfortunately I am not attending this week's WGM. @Yunwei Wang is the only member of the inferno team attending this WGM, and I'll see if he can attend this meeting

view this post on Zulip Grahame Grieve (Sep 24 2020 at 06:19):

on this subject, I am looking at J#28539. I think we missed something - the extension totally makes sense on .type or (.type.code?) as well as .type.profile and .type.targetProfile. I am going to implement it on one of those as well. .type, I think

view this post on Zulip Grahame Grieve (Sep 24 2020 at 09:54):

ok, step #1:

image.png

or

image.png

view this post on Zulip Grahame Grieve (Sep 24 2020 at 09:54):

I'll work on the tables next

view this post on Zulip Grahame Grieve (Sep 24 2020 at 15:40):

image.png

view this post on Zulip Grahame Grieve (Sep 24 2020 at 15:45):

image.png

view this post on Zulip Grahame Grieve (Sep 24 2020 at 15:46):

@Brett Marquard fyi, these are generated from this structure definition:

<?xml version="1.0" encoding="UTF-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../input-cache/schemas/R5/fhir-single.xsd">
  <id value="myObservation"/>
  <url value="http://somewhere.org/fhir/uv/myig/StructureDefinition/myObservation"/>
  <name value="MyObservation"/>
  <title value="My Observation Profile"/>
  <status value="draft"/>
  <description value="A profile showing the use of XML to author profiles"/>
  <fhirVersion value="4.0.0"/>
  <kind value="resource"/>
  <abstract value="false"/>
  <type value="Observation"/>
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Observation"/>
  <derivation value="constraint"/>
  <differential>
    <element id="Observation.basedOn">
      <path value="Observation.basedOn"/>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.partOf">
      <path value="Observation.partOf"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Procedure">
          <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support">
            <valueBoolean value="true"/>
          </extension>
        </targetProfile>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Immunization"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.code">
      <path value="Observation.code"/>
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org"/>
          <code value="85354-9"/>
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject"/>
      <type>
        <code value="Reference"/>
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient">
          <!-- this is an error - it is meaningless unless the element itself is must-support -->
          <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support">
            <valueBoolean value="true"/>
          </extension>
        </targetProfile>
      </type>
    </element>
    <element id="Observation.focus">
      <path value="Observation.focus"/>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.value[x]">
      <path value="Observation.value[x]"/>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support">
          <valueBoolean value="true"/>
        </extension>
        <code value="Quantity"/>
      </type>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.component">
      <path value="Observation.component"/>
      <slicing>
        <discriminator>
          <type value="pattern"/>
          <path value="code"/>
        </discriminator>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <min value="2"/>
      <max value="*"/>
    </element>
    <element id="Observation.component:Systolic">
      <path value="Observation.component"/>
      <sliceName value="Systolic"/>
      <min value="1"/>
      <max value="1"/>
    </element>
    <element id="Observation.component:Systolic.code">
      <path value="Observation.component.code"/>
      <short value="Systolic pressure"/>
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org"/>
          <code value="8480-6"/>
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:Systolic.value[x]">
      <path value="Observation.component.valueQuantity"/>
      <type>
        <code value="Quantity"/>
      </type>
    </element>
    <element id="Observation.component:Systolic.value[x]:valueQuantity.value">
      <path value="Observation.component.valueQuantity.value"/>
      <min value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.component:Systolic.value[x]:valueQuantity.system">
      <path value="Observation.component.valueQuantity.system"/>
      <min value="1"/>
      <fixedUri value="http://unitsofmeasure.org"/>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.component:Systolic.value[x]:valueQuantity.code">
      <path value="Observation.component.valueQuantity.code"/>
      <min value="1"/>
      <fixedCode value="mm[Hg]"/>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.component:Diastolic">
      <path value="Observation.component"/>
      <sliceName value="Diastolic"/>
      <min value="1"/>
      <max value="1"/>
    </element>
    <element id="Observation.component:Diastolic.code">
      <path value="Observation.component.code"/>
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org"/>
          <code value="8462-4"/>
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:Diastolic.value[x]:valueQuantity">
      <path value="Observation.component.valueQuantity"/>
      <type>
        <code value="Quantity"/>
      </type>
    </element>
    <element id="Observation.component:Diastolic.value[x]:valueQuantity.value">
      <path value="Observation.component.valueQuantity.value"/>
      <min value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.component:Diastolic.value[x]:valueQuantity.system">
      <path value="Observation.component.valueQuantity.system"/>
      <min value="1"/>
      <fixedUri value="http://unitsofmeasure.org"/>
      <mustSupport value="true"/>
    </element>
    <element id="Observation.component:Diastolic.value[x]:valueQuantity.code">
      <path value="Observation.component.valueQuantity.code"/>
      <min value="1"/>
      <fixedCode value="mm[Hg]"/>
      <mustSupport value="true"/>
    </element>
  </differential>
</StructureDefinition>

Last updated: Apr 12 2022 at 19:14 UTC