FHIR Chat · Structure for revinclude · Canadian eReferral

Stream: Canadian eReferral

Topic: Structure for revinclude


view this post on Zulip Tim Berezny (Mar 11 2021 at 00:19):

If I want to get a specific ServiceRequest, and include all related QuestionnaireResponses, is this the correct request structure?

GET {{baseurl}}/ServiceRequest?_id={{id}}&_revinclude=QuestionnaireResponse:subject

view this post on Zulip Lloyd McKenzie (Mar 11 2021 at 01:21):

If the QuestionnaireResponse was 'basedOn' the ServiceRequest, you could do this:
GET [base]/ServiceRequest?_id=[id]&_revinclude=QuestionnaireResponse:based-on

view this post on Zulip Lloyd McKenzie (Mar 11 2021 at 01:23):

You could also try:
GET [base]/ServiceRequest?_id=[id]&_include=ServiceRequest:subject&_revinclude:iterate=QuestionnaireResponse:subject

view this post on Zulip Lloyd McKenzie (Mar 11 2021 at 01:23):

(Though I wouldn't count on many systems supporting something that complex)

view this post on Zulip Lloyd McKenzie (Mar 11 2021 at 01:23):

You can't join on a resource not returned

view this post on Zulip Tim Berezny (Mar 11 2021 at 13:21):

Right, I should have not said =QuestionnaireResponse:subject, it is indeed connected via based-on. Thanks @Lloyd McKenzie


Last updated: Apr 12 2022 at 19:14 UTC