FHIR Chat · QuestionnaireResponse in DSTU2 · implementers

Stream: implementers

Topic: QuestionnaireResponse in DSTU2


view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:39):

Could anyone point me to a link or links showing profiles based on QuestionnaireResponse in DSTU2 which have the group.question element sliced please? I have run my profile with its associated xml example through the Furore validation tool and am getting an error message I can't explain, so I think it could be a problem with how I am profiling. Would it be useful to attach the problematic files here?

view this post on Zulip Eric Haas (Jul 31 2017 at 15:43):

better yet post the error message and the sliciing definition

view this post on Zulip Lloyd McKenzie (Jul 31 2017 at 15:46):

Profiling QuestionnaireResponse is unusual as typically you just define the Questionnaire and use that to guide the QuestionnaireResponse. Profiling QuestionnaireResponse would only be used if you wanted to define behavior for responses independent of any particular Questionnaire.

view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:47):

This is the error message
[ERROR] Code 'Y' from system 'https://fhir.nhs.uk/ADW-CarerConsultationStatus-1' with display 'Yes' is not valid for required binding to valueset 'https://fhir.nhs.uk/ValueSet/ADW-ConsultationStatus-1' (at Bundle.entry[10].resource[0].group[0].question[1].answer[0].value[0])
[INFORMATION] Code 'Y' from system 'https://fhir.nhs.uk/ADW-CarerConsultationStatus-1' does not exist in valueset 'https://fhir.nhs.uk/ValueSet/ADW-ConsultationStatus-1' (at Bundle.entry[10].resource[0].group[0].question[1].answer[0].value[0])

view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:49):

Here is the zipped up set of files.Profile.ADW-DischargeNotice.zip

view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:49):

Sorry there are a lot of files, but I thought it would be better to be complete rather than omit some you might need.

view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:50):

The error message points me to the valueset, but that seems correct, so I'm thinking something is wrong in the ADW-Discharge-QuestionnaireResponse-1 profile.

view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:51):

Have I got my slicing and grouping correct in the profile?

view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:52):

The example throwing the error is ADW-Message-Discharge-Notice-Bundle-1-Example-1.xml

view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:52):

@Lloyd McKenzie - do you think we should have used Questionnaire instead?

view this post on Zulip Katie Wheatley (Jul 31 2017 at 15:57):

At http://hl7.org/fhir/DSTU2/questionnaireresponse.html it does state that "QuestionnaireResponse provides a complete or partial list of answers to a set of questions filled when responding to a questionnaire. The questions may be included directly or by reference to a Questionnaire resource that defines the questions as well as the constraints on the allowed answers." and I have included the questions directly in QR with a choice of answer.

view this post on Zulip Katie Wheatley (Jul 31 2017 at 16:03):

The profile can be viewed visually at https://nhsconnect.github.io/FHIR-ADW-Messaging/Generated/Profile.ADW-DischargeNotice/adw-discharge-questionnaire-response-1.html, although I have since changed the profile name. The profile itself is the same apart from the labels for the child elements of the group.question element which I have removed in the zipped version..

view this post on Zulip Ewout Kramer (Jul 31 2017 at 16:03):

@Katie Wheatley, from looking at the files, it seems there's both a ADW-ConsultationStatus-1 and a ADW-CarerConsultationStatus-1 valueset. You are probably using a code from the first valueset against a binding to the second!

view this post on Zulip Katie Wheatley (Jul 31 2017 at 16:05):

@Ewout yes that's what I thought, but when I investigated this further it all looks correct.

view this post on Zulip Ewout Kramer (Jul 31 2017 at 16:06):

You should use the code "Y" with system 'https://fhir.nhs.uk/ADW-ConsultationStatus-1' against the binding to valueset https://fhir.nhs.uk/ValueSet/ADW-ConsultationStatus-1, but you are not, you are using "Y" from system 'https://fhir.nhs.uk/ADW-CarerConsultationStatus-1'

view this post on Zulip Katie Wheatley (Jul 31 2017 at 16:13):

@Ewout - both these valuesets contain a code "Y" and I have used "Y" for both of my answers which I believe to be valid.

view this post on Zulip Ewout Kramer (Jul 31 2017 at 16:16):

Yes, but both the code AND the system need to be correct. In FHIR codes are not correct by merely comparing the codes - the systems need to be correct too!

view this post on Zulip Ewout Kramer (Jul 31 2017 at 16:18):

All codes in the valueset https://fhir.nhs.uk/ValueSet/ADW-ConsultationStatus-1 are from the system https://fhir.nhs.uk/ADW-ConsultationStatus-1, so if you provide the code for an element with a binding to that valueset you MUST use the system mentioned in that file which is https://fhir.nhs.uk/ADW-ConsultationStatus-1

view this post on Zulip Lloyd McKenzie (Jul 31 2017 at 16:22):

@Katie Wheatley Questionnaire gives you a lot more control - and if you're gathering a QuestionnaireResponse, most systems will expect a Questionnaire to exist and will be guided by that more than by a profile on QuestionnaireResponse.

view this post on Zulip Katie Wheatley (Jul 31 2017 at 16:23):

@Ewout - here is my code from my xml example - it does appear to be correct with the system in place.
<group>
<question>
<text value="Has the patient been consulted regarding the proposed discharge date?"/>
<answer>
<valueCoding>
<system value="https://fhir.nhs.uk/ADW-ConsultationStatus-1"/>
<code value="Y"/>
<display value="Yes"/>
</valueCoding>
</answer>
</question>
<question>
<text value="Has the patient's carer (if applicable) been consulted regarding the proposed discharge date?"/>
<answer>
<valueCoding>
<system value="https://fhir.nhs.uk/ADW-CarerConsultationStatus-1"/>
<code value="Y"/>
<display value="Yes"/>
</valueCoding>
</answer>
</question>
</group>

view this post on Zulip Ewout Kramer (Jul 31 2017 at 16:49):

Katie, is that example in the zip? If not, I'd like to have the full example, just PM me privately and I'll double check.

view this post on Zulip Katie Wheatley (Jul 31 2017 at 16:53):

@Ewout - yes the example is in the zip. It is in the Examples folder and it is called ADW-Message-Discharge-Notice-Bundle-1-Example-1.xml. Many thanks for your time with this, Ewout. I'm keen to hear your views on this issue.

view this post on Zulip Katie Wheatley (Jul 31 2017 at 16:57):

@Ewout - I have to log off now, but I please do not hesitate to reply in this forum or to PM me and I will pick it up when I am back online.

view this post on Zulip Katie Wheatley (Aug 01 2017 at 06:16):

@Ewout Kramer I have resolved the problem with QuestionnaireResponse that we discussed here. The problem was in the profile which I have identified and now corrected.I'm really impressed with how quickly colleagues respond on this forum.

view this post on Zulip Ewout Kramer (Aug 01 2017 at 11:19):

@Ewout Kramer I have resolved the problem with QuestionnaireResponse that we discussed here. The problem was in the profile which I have identified and now corrected.I'm really impressed with how quickly colleagues respond on this forum.

Ah, thanks for notifying me, I was just diving into this and starting to realize I had been hunting more or less the same issue for @Richard Kavanagh. I remember now, it was the bit starting around line 190 with "QuestionnaireResponse.group.question.linkId"!

view this post on Zulip Katie Wheatley (Aug 01 2017 at 16:03):

@Ewout Kramer Cheers, Ewout, your pointers helped me to resolve this.

view this post on Zulip Katie Wheatley (Aug 01 2017 at 16:30):

@Ewout Kramer However, the issue you were looking into for Richard may not be exactly the same, so please don't consider Richard's issue fixed because I fixed my issue with your direction. Thanks again Ewout.


Last updated: Apr 12 2022 at 19:14 UTC