Stream: implementers
Topic: Search QuestionnaireResponse by Questionnaire
Signe Hejgaard Kristoffersen (Jul 17 2020 at 09:30):
Hi,
I want to search for QuestionnaireResponses based on the Questionnaire which is referenced in QuestionnaireResponse.questionnaire by a canonical url and the business version of the Questionnaire.
I have tried a search for a versioned reference:
GET http://hapi.fhir.org/baseR4/QuestionnaireResponse?questionnaire=http://hl7.org/fhir/Questionnaire/f201|2020a
, which returns an empty Bundle.
I have also tried searching based on chained parameters:
GET http://hapi.fhir.org/baseR4/QuestionnaireResponse?questionnaire.url=http://hl7.org/fhir/Questionnaire/f201&questionnaire.version=2020a
, which returns
"issue": [ {
"severity": "error",
"code": "processing",
"diagnostics": "Don't know how to convert param type: URI"
} ]
How do I perform this search?
Yunwei Wang (Jul 17 2020 at 14:21):
The first query is correct.
I tried http://hapi.fhir.org/baseR4/QuestionnaireResponse?questionnaire=http://hl7.org/fhir/Questionnaire/f201
which gives the results back.
Yunwei Wang (Jul 17 2020 at 14:37):
I think the problem is that QuestionnaireResponse instances don't' use versioned questionnaire canonical url.
Signe Hejgaard Kristoffersen (Jul 20 2020 at 09:09):
Thank you for your answer, @Yunwei Wang. So it is not possible to perform a search for a specific version of a Questionnaire in any way?
Lloyd McKenzie (Jul 20 2020 at 15:01):
If a QuestionnaireResponse specifies a particular version of the Questionnaire, then you should be able to search QuestionnaireResponse by a version-specific canonical URL. If you data doesn't bind to a specific version, you can't search by a specific version.
Last updated: Apr 12 2022 at 19:14 UTC