Sameer
Sameer

Reputation: 519

filter GCP FHIR QuestionnaireResponse resources by a linkId

I'm Trying to filter the GCP healthcare Fhir QuestionnaireResponse by specific linkId. I have tried following queries in GCP FHIR Viewer.

It's trying to filter the QuestionnaireResponse of specific patient and by the linkIds.

Upvotes: 0

Views: 279

Answers (2)

Paul Church
Paul Church

Reputation: 264

In order to search on a field there has to be a search parameter defined for the field, either a standard param (which can be found at https://hl7.org/fhir/r4/questionnaireresponse.html#search for QuestionnaireResponse) or custom.

GCP supports custom search parameters - see the howto doc https://cloud.google.com/healthcare-api/docs/how-tos/fhir-custom-search

For this example you would want an expression of "QuestionnaireResponse.item.linkId". The custom param has a name of your choice, in the style of the standard you might choose link-id, and then once the search parameter was created and enabled using the configureSearch method, the search query would be QuestionnaireResponse?subject=xxx&link-id=yyy

Upvotes: 0

Lloyd McKenzie
Lloyd McKenzie

Reputation: 6793

There is no standard search parameter defined to search by linkId. To perform that search, you'd have to define a custom SearchParameter and get the server in question to support it. Also, if searching by linkId, you should always also search by Questionnaire.url because the same linkId value can have completely different meanings in different Questionnaires.

In general, QuestionnaireResponse isn't designed to be searched based on the answers provided. The expectation is that data will be extracted into other resources (e.g. Observation) and will be searched that way. (Questionnaires are too non-standard and the meaning of answers is too dependent on other answers to safely search against answers in QuestionnaireResponse.)

Upvotes: 1

Related Questions