Stream: questionnaire
Topic: Searching for a QuestionnaireResponse
Paul Lynch (Sep 11 2020 at 13:47):
(Moving the discussion started by @Gay Dolin to a separate thread.)
@Gay Dolin - I sorry I was not able to get to your question yesterday, though Brian's answer looked good. You can search for a QuestionnaireResponse by a patient id and a questionnaire id. Is that sufficient for what your were trying to do?
John Moehrke (Sep 11 2020 at 14:25):
can you link to that response?
Paul Lynch (Sep 11 2020 at 14:29):
Link to the response from what?
Gay Dolin (Sep 11 2020 at 14:33):
This was @Brian Postlethwaite s response : Brian Postlethwaite12:14 PM
The QuestionnaireResponse really only has search capacity for metadata around the response, such as which questionnaire it was for, when it was entered, and who was involved. Not about the answers of any specific questions within the questionnaire.
Gay Dolin (Sep 11 2020 at 14:33):
This was @Lloyd McKenzie response: If you need the data you captured in your QuestionnaireResponse to be independently searchable/analyzable, you'll want to 'extract' the information into Observations or other resources. QuestionnaireResponse is good for data capture and rendering, but not great for search/analysis.
Paul Lynch (Sep 11 2020 at 14:35):
Oh! I thought John was asking about linking to a QuestionnaireResponse. :-)
Gay Dolin (Sep 11 2020 at 14:39):
I don't think I agree with this reasoning or the inability to search for QuestionnaireResponse. What if I want to find out if a patient completed a questionnaire I requested - or I want to find that response to derive or assert an observation or condition? Would like to discuss on a call.
Paul Lynch (Sep 11 2020 at 14:42):
There is an almost-weekly call (details below from Lloyd) for Questionnaire.
Lloyd McKenzie said:
As a reminder, we are having a FHIR-I Questionnaire call today at 5 Eastern. Call details: https://zoom.us/j/8583747934
Paul Lynch (Sep 11 2020 at 14:44):
But, if you want "to find out if a patient completed a questionnaire I requested" couldn't you search by the patient id and questionnaire id? Those are both search parameters for QuestionnaireResponse.
Gay Dolin (Sep 11 2020 at 14:44):
could the questionnaire ID be the LOINC code?
Paul Lynch (Sep 11 2020 at 14:47):
In general an id is not the same as the code (though it could be). If you were starting with a code, you would first need to find the instance of Questionnaire that was coded with that code, and then use its id to search for the QuestionnaireResponses.
Gay Dolin (Sep 11 2020 at 14:47):
I think our confusion might be in part that the generated QuestionnaireResponse from the LHC tool doesnt seem to have any association back to the questionnaire
Paul Lynch (Sep 11 2020 at 14:48):
I see that the "code" search parameter in Questionnaire only searches for item.code, and not Questionnaire.code. (I think that issue has been raised before, and there might be tracker item. If I can't find one I'll create one.)
Gay Dolin (Sep 11 2020 at 14:48):
so maybe its a tooling thing
Paul Lynch (Sep 11 2020 at 14:49):
It definitely should have a link back to the Questionnaire. Let me check
Gay Dolin (Sep 11 2020 at 14:50):
is their a library of existing profiles on Questionnaire/QuestionnaireResponse ? Perhaps only in SDC?
Paul Lynch (Sep 11 2020 at 14:55):
Interesting. Our SDC app (https://lhcforms.nlm.nih.gov/sdc) saves QuestionnaireResponses with links back to the Questionnaire. (In other words, when you choose "save as", it will show you a link to created QuestionnaireResponse, and that will contain a reference to the Questionnaire). However, if you choose "Show Form Data As -> QuestionniareResponse" it does not put the reference in for you. I think that is because we allow you to upload a new Questionnaire from a file, so it until the save happens, it doesn't (always) have a reference to the Questionnaire instance. If you are not uploading from a file, it could put the reference there, though.
Gay Dolin (Sep 11 2020 at 14:56):
ahh
Gay Dolin (Sep 11 2020 at 14:56):
OK
Paul Lynch (Sep 11 2020 at 14:56):
Obviously that caused some confusion. I'll make a note to add in that reference when we can.
Gay Dolin (Sep 11 2020 at 14:57):
Thanks!
Paul Lynch (Sep 11 2020 at 15:07):
Paul Lynch said:
I see that the "code" search parameter in Questionnaire only searches for item.code, and not Questionnaire.code. (I think that issue has been raised before, and there might be tracker item. If I can't find one I'll create one.)
The already approved issue is J#22685. The "code" search parameter will be dropped and replaced by new ones. Hopefully this will make it in before R5. A work-around in the meantime would be to set the id to be the same as the code (if supported by the FHIR server). We did that with our LOINC panels in our HAPI FHIR servers, e.g. https://lforms-fhir.nlm.nih.gov/baseR4/Questionnaire/44249-1
Gay Dolin (Sep 11 2020 at 15:35):
Perfect Thanks -- FYI @Jerry Goodnough
Last updated: Apr 12 2022 at 19:14 UTC