FHIR Chat · Forge error when adding Must support = true to an extension · implementers

Stream: implementers

Topic: Forge error when adding Must support = true to an extension


view this post on Zulip David McKillop (Apr 04 2018 at 02:21):

@Michel Rutten when setting "Must support" to be true on an extension ie "accuracyIndicator" refer to:
CIFMM-1261-no-must-support-20180404.JPG
and then save the change, Forge gives the following error when you try to re-open the file:

CIFMM-1261-must-support-20180404.JPG
The presence of the following code gives the error :

    <element id="Patient.deceased[x].deceased[x]:deceasedDateTime.extension:accuracyIndicator">
      <path value="Patient.deceasedDateTime.extension" />
      <sliceName value="accuracyIndicator" />
      <mustSupport value="true" />
    </element>

Any suggestions on how to resolve this or is it a bug? Thanks for your assistance.

view this post on Zulip David McKillop (Apr 04 2018 at 05:17):

@Michel Rutten further to the above - it seems that when there is a "choice" data element rather than an extension that is the issue - refer to the attached where birthDate.accuracyIndicator has "Must support" = true and doesn't cause an error; where as when deceased[x].deceasedDateTime.accuracyIndicator has "Must support" = true this causes an error when re-opening the file.
Your thoughts?CIFMM-1261-choice-20180404.JPG

view this post on Zulip Michel Rutten (Apr 04 2018 at 08:02):

Hi @David McKillop, could you please send me the extension profile, so I can try to reproduce?

view this post on Zulip David McKillop (Apr 04 2018 at 22:38):

Hi @Michel Rutten , our patient profile is derived from an HL7 Australia profile (@Brett Esler ) which includes the extension for date accuracy indicator which can be found at:
https://github.com/hl7au/au-fhir-base/blob/master/resources/structuredefinition-date-accuracy-indicator.xml
If you need any further information, please let me know.
Thanks for your assistance with this - greatly appreciated.

view this post on Zulip David McKillop (Apr 05 2018 at 06:00):

Hi @Michel Rutten further to the previous information, when "Must support" is set to true on the element deceased.date-accuracy-indicator the IG Publisher runs and produces the desired output - refer to the attached:
CIFMM-1261-all-must-support-20180405.JPG
the issue is that Forge gives the error when trying to re-open the file. I hope this helps.

view this post on Zulip Michel Rutten (Apr 09 2018 at 09:41):

Hi @David McKillop, I created a Patient profile with type slice on deceased[x], then added accuracy extension to deceasedDateTime slice and enabled MustSupport. I cannot seem to reproduce the issue (using latest Forge release 18.2.1), Forge re-loads the profile without any warnings:
pasted image
Here's the generated profile xml:

<?xml version="1.0" encoding="utf-8"?>
<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://example.org/fhir/StructureDefinition/PatientWithDeceasedExtension" />
  <name value="PatientWithDeceasedExtension" />
  <status value="draft" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Patient" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient" />
  <derivation value="constraint" />
  <differential>
    <element id="Patient.deceased[x]">
      <path value="Patient.deceased[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Patient.deceased[x]:deceasedBoolean">
      <path value="Patient.deceased[x]" />
      <sliceName value="deceasedBoolean" />
      <type>
        <code value="boolean" />
      </type>
    </element>
    <element id="Patient.deceased[x]:deceasedDateTime">
      <path value="Patient.deceased[x]" />
      <sliceName value="deceasedDateTime" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="Patient.deceased[x]:deceasedDateTime.extension">
      <path value="Patient.deceased[x].extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Patient.deceased[x]:deceasedDateTime.extension:accuracy">
      <path value="Patient.deceased[x].extension" />
      <sliceName value="accuracy" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org.au/fhir/StructureDefinition/date-accuracy-indicator" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>

Note: in your post above, you mention an element with path "Patient.deceased[x].deceased[x]:deceasedDateTime.extension:accuracyIndicator", however this path is incorrect; the "deceased[x]" segment should not be repeating. Maybe this is causing the reported issues?

view this post on Zulip David McKillop (Apr 10 2018 at 03:11):

Hi @Michel Rutten - thanks for looking into this. In your testing above the "Must support" flag = true is only on "Patient.deceased[x]:deceasedDateTime.extension:accuracy". I've forwarded you 2 emails of some of the troubleshooting that's been done when all of the data elements in the :deceased[x]" group with/without Patient.deceased[x]:deceasedDateTime.extension:accuracy are flagged with Must support =true. I hope this helps.
Cheers D. Mc

view this post on Zulip Michel Rutten (Apr 10 2018 at 15:05):

Hi @David McKillop, thank you for reporting this issue and providing useful feedback. I've analyzed the issue and responded via e-mail.


Last updated: Apr 12 2022 at 19:14 UTC