Stream: implementers
Topic: QuestionnaireResponse search params
Gang Chen (May 05 2017 at 19:10):
Hi, I am currently working on PGD project with using FHIR server Questionnaire and QuestionnaireResponse resources. Both resources have the identifier field which allows to store 0 - * identifiers for Questionnaire but only 0-1 for QuestionnaireResponse.
Gang Chen (May 05 2017 at 19:13):
However, we cannot use identifier as URL param to query QuestionnaireResponse from FHIR server though we can do this from Questionnaire.
Gang Chen (May 05 2017 at 19:14):
I am precarious why ?
Lloyd McKenzie (May 05 2017 at 19:17):
An identifier search parameter for QuestionnaireResponse was added in STU3. In DSTU2, you'll need to define a custom search parameter. The difference in cardinalities is because we have no use-case for multiple identifiers on QuestionnaireResponse as yet.
Gang Chen (May 05 2017 at 19:21):
Thanks Lloyd. Would you help how to define a single search for QuestionnaireResponse ? Below is my use case
Gang Chen (May 05 2017 at 19:23):
QuestionnaireResponse has Questionnaire reference, but I don't know it when performing the search on QUestionnaireResponse.
Gang Chen (May 05 2017 at 19:24):
All I know is the identifier# stored in that Questionnaire
Gang Chen (May 05 2017 at 19:27):
Is there a way I only submit a single query to get the QuestionaireResponse linked with Questionnaire.id with using the given identifier# ?
Lloyd McKenzie (May 05 2017 at 19:49):
QuestionnaireResponse?questionnaire.identifier=1234|http://somewhere.com/some-identifier-system (the URL would need to be properly escaped)
Lloyd McKenzie (May 05 2017 at 19:49):
That uses the chaining mechanism
ravi.kuchi (May 10 2017 at 17:20):
I have a question related to the same context, there are no search parameters defined/supported based on Item.LinkId and the item.answer components, from the use case perspective we have been receiving requests to retrieve the QR's based on a specific answer like 'Yes' or 'No' to a particular question. Is this something we can expect to come in future or is there a way to serve these requests?
Lloyd McKenzie (May 11 2017 at 05:17):
There are no plans to support this going forward because it's extremely difficult to do "right". In a questionnaire, questions nest beneath other questions and beneath and beside other groups and questions that give them context. Imagine a family history questionnaire that has a group with questions for "name of relative" and "deceased date". Extracting a useful answer could require specifying linkIds and answers for numerous other questions to get what you're looking for. QuestionnaireResponse is intended for data capture, not data analysis. When it comes time to analyze data, the expectation is that information will be extracted from the QuestionnaireResponse and used to populate the appropriate other resources - Observation, FamilyMemberHistory, Patient, MedicationStatement, etc. Those resources are designed to be queried and filtered in a standard way - because they organize and represent data elements in a standard way.
Brian Postlethwaite (May 11 2017 at 19:25):
Agreed, if you really want to support what you've described, custom search parameters would be required. And the fhirpath expression could ensure its the correct questionnairedefinition, and answer (based on the various linkids)
Last updated: Apr 12 2022 at 19:14 UTC