0

Using FHIR resources (dstu2), how can I send in the response, the healthcare services provided at a particular location when search location request is made?

Following is the location resource that I use which has no provision to send services in response. (http://hl7.org/fhir/DSTU2/location.html)

In my use-case, I have to send out location details and as part of those details, I have to send out the services offered by that location. How can I combine these two resources in my response ? I already know services that location offers but there is no place holder to send this info in response if I use location resource as my response

1 Answers1

0

Use the HealthcareService resource. You can do a query on HealthcareService, filtering by Location.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • In my use-case, I have to send out location details and as part of those details, I have to send out the services offered by that location. How can I combine these two resources in my response ? I already know services that location offers but there is no place holder to send this info in response if I use location resource as my response. – AdityaKapreShrewsburyBoston Jan 02 '18 at 23:06
  • Three options - the client can choose to do a _revinclude query and ask for the associated HealthcareServices to come back when they query for a set of locations. The alternative is to have the HealthcareServices as contained resources, but that won't work until R4. (In R3 and earlier, the containing resource had to point to the contained resources, you couldn't have the contained resource point to the containing resource). Another option is to use extensions, but they won't be standard and are unlikely to ever become standard. – Lloyd McKenzie Jan 03 '18 at 05:00
  • Thanks @Lloyd. I think _revinclude might be the way to go then. Please let me know if following looks like a good request. [ GET [base]/Location?_revinclude=HealthcareService ] – AdityaKapreShrewsburyBoston Jan 03 '18 at 16:58
  • You'd want `GET [base]/Location?_revinclude=HealthcareService%3alocation` – Lloyd McKenzie Jan 03 '18 at 20:36