Stream: IG creation
Topic: Questionnaire enableWhen
Sarah Gaunt (Mar 15 2019 at 05:18):
So I have the following in a Questionnaire:
<item>
<linkId value="disposition-date" />
<text value="Disposition date if discharged, transferred, or expired" />
<type value="date" />
<enableWhen>
<question value="infant-disposition" />
<answerCoding>
<system value="http://snomed.info/sct" />
<code value="183665006" />
</answerCoding>
</enableWhen>
<enableWhen>
<question value="infant-disposition" />
<answerCoding>
<system value="http://snomed.info/sct" />
<code value="266751003" />
</answerCoding>
</enableWhen>
<enableWhen>
<question value="infant-disposition" />
<answerCoding>
<system value="http://snomed.info/sct" />
<code value="371828006" />
</answerCoding>
</enableWhen>
<required value="false" />
<repeats value="false" />
</item>
Then I have the following in the QuestionnaireResponse:
<item>
<linkId value="infant-disposition"/>
<text value="Disposition of infant"/>
<answer>
<valueCoding>
<system value="http://snomed.info/sct"/>
<code value="266751003"/>
<display value="Transferred from department (finding)"/>
</valueCoding>
</answer>
</item>
<item>
<linkId value="disposition-date"/>
<text value="Disposition date if discharged, transferred, or expired"/>
<answer>
<valueDate value="2019-01-02"/>
</answer>
</item>
The value in infant-disposition is one of the enableWhen answers, but I get this error from the IG Publisher:
QuestionnaireResponse/hai-questionnaireResponse-los-denom: QuestionnaireResponse.item error Item has answer, even though it is not enabled disposition-date
Grahame Grieve (Mar 15 2019 at 05:20):
can you make an test case - that is, a simple questionnaire/questionnaire response that shows this problem, so I can add it to the test cases for the validator?
Sarah Gaunt (Mar 15 2019 at 05:22):
In fact, the only other place I have an enableWhen, it also errors with the IG publisher:
<item>
<linkId value="los-contributed-to-death"/>
<text value="Infection contributed to death"/>
<type value="boolean"/>
<enableWhen>
<question value="died"/>
<answerBoolean value="true"/>
</enableWhen>
<required value="true"/>
<repeats value="false"/>
</item>
QuestionnaireResponse:
<item>
<linkId value="died"/>
<text value="Died"/>
<answer>
<valueBoolean value="true"/>
</answer>
</item>
<item>
<linkId value="los-contributed-to-death"/>
<text value="Infection contributed to death"/>
<answer>
<valueBoolean value="false"/>
</answer>
</item>
Also errors.
Sarah Gaunt (Mar 15 2019 at 05:22):
Yes, will create test case...
Sarah Gaunt (Mar 15 2019 at 05:41):
BTW - this is R3
Sarah Gaunt (Mar 15 2019 at 05:49):
Emailed test instances to you @Grahame Grieve
Grahame Grieve (Mar 15 2019 at 07:11):
hmm works fine in the validator
Sarah Gaunt (Mar 18 2019 at 00:45):
Hmmm, I wonder if the issues I'm having have anything to do with the fact that the SNOMED code isn't being validated...
Sarah Gaunt (Mar 18 2019 at 00:50):
I think I'll just comment out those answers from the QuestionnaireResponses for now, just so I have a (almost - still will have the SNOMED code issue) clean build.
Sarah Gaunt (Mar 18 2019 at 01:03):
Oh just saw this - I guess there IS an issue? http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=20550
Grahame Grieve (Mar 18 2019 at 02:30):
yes there is an issue.
Last updated: Apr 12 2022 at 19:14 UTC