Stream: conformance
Topic: STU3 Qustionnaire snapshot generation
Hans van Amstel (Mar 28 2022 at 11:04):
One of our derived profiles is based on the stu3 questionnaire resource when we try to use the snapshot of this resource in the firely .NET sdk it creates a stack overflow exception.
The reason for this seems to be that the snapshot that we create using the HL7 validator (several version tried including the latest, 18th March 2022) creates an absolute reference instead of an relative reference.
"contentReference": "http://hl7.org/fhir/StructureDefinition/Questionnaire#Questionnaire.item",
When I view the snapshot on the HL7 website it has an relative reference.
<contentReference value="#Questionnaire.item"/>
Also when I create the snapshot of our derived profile usign the Firely terminal the generated snapshot has an relative reference.
The derived profile only adds metadata and does not contrain or influence the questionnaire.item.
In our build pipeline we are using the HL7 validator for snapshot generation, validation etc. How can we usign the HL7 validator makes sure the snapshot has the relative reference instead of the absolute reference?
Lloyd McKenzie (Mar 28 2022 at 14:08):
@Grahame Grieve
Grahame Grieve (Mar 28 2022 at 21:48):
no the relative content references must be replaced with absolute content references when a snapshot is generated
David Simons (Apr 11 2022 at 08:46):
Grahame Grieve said:
no the relative content references must be replaced with absolute content references when a snapshot is generated
As @Hans van Amstel indicated, that is not what is in the HL7 FHIR downloadable specs, @Grahame Grieve :
from https://hl7.org/fhir/R4/definitions.xml.zip
, line 381561:
<element id="Questionnaire.item.item">
<path value="Questionnaire.item.item"/>
<short value="Nested questionnaire items"/>
<definition value="Text, questions and other groups to be nested beneath a question or group."/>
<comment value="There is no specified limit to the depth of nesting. However, Questionnaire authors are encouraged to consider the impact on the user and user interface of overly deep nesting."/>
<requirements value="Reports can consist of complex nested groups."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Questionnaire.item.item"/>
<min value="0"/>
<max value="*"/>
</base>
<contentReference value="#Questionnaire.item"/> <<<<<<<<<<<<<<<<<<<<<<<<<<<< line 381561
<condition value="que-1"/>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression value="hasValue() or (children().count() > id.count())"/>
<xpath value="@value|f:*|h:div"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value=".outboundRelationship[typeCode=COMP].target"/>
</mapping>
</element>
</snapshot>
Grahame Grieve (Apr 11 2022 at 08:52):
I believe you, but that's basically considered in error retrospectively
Grahame Grieve (Apr 11 2022 at 08:52):
oh no - that's the base questionnaire definition, right?
David Simons (Apr 11 2022 at 09:08):
Grahame Grieve said:
oh no - that's the base questionnaire definition, right?
correct - I am fine either way - but we now have a discrepancy that is causing conformance challenges using snapshots generated with one toolset in another toolset (which I am guessing is using this base definition)
Grahame Grieve (Apr 11 2022 at 09:41):
in the base definition, it is a local reference, so that's not wrong
Grahame Grieve (Apr 11 2022 at 09:41):
anyway, I believe that this is a dot net tool problem, so you should take it up with @Ward Weistra's team somewhere
David Simons (Apr 11 2022 at 10:03):
Grahame Grieve said:
anyway, I believe that this is a dot net tool problem, so you should take it up with Ward Weistra's team somewhere
Thank you - for clarifying - you're saying that in a dependent profile snapshot it has to become an absolute uri - to the base definition - since no longer within that base.
"contentReference": "http://hl7.org/fhir/StructureDefinition/Questionnaire#Questionnaire.item",
We have started that conversation with @Ward Weistra at Firely on the .Net tooling.
Ward Weistra (Apr 11 2022 at 18:08):
Reported as https://github.com/FirelyTeam/firely-net-sdk/issues/2039
Last updated: Apr 12 2022 at 19:14 UTC