0

Fhir object model is a resource driven model which is fine. As a client , let's say I want to get patient information. I called - 'patient/1'. Now , to get related resources like Organization , Care provider - do I have to make 2 other calls?

To get all patient related information with a single call , what do I need to do?

Pratap Das
  • 504
  • 2
  • 7
  • 20

1 Answers1

1

To get everything related to patient, look at the $everything operation (http://www.hl7.org/fhir/patient-operations.html#everything). You can also bring back related information when querying a single resource by using _include and _revinclude (see http://www.hl7.org/fhir/search.html#revinclude)

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • In this page ( http://www.hl7.org/fhir/patient-operations.html#everything ) , I see, return response contains the below text This is clearly not returning details of the organization. – Pratap Das Jun 28 '16 at 20:42
  • With $everything, It's at the discretion of the server to determine how far into the resource chain to go when returning everything. if you find links that are outside what is returned, and you want them, then, you'll have to fetch them. This is not perfect, but the problem is that there's no right answer in terms of how far into the information the client wants to go – Grahame Grieve Jun 28 '16 at 23:01
  • If you want to minimize transactions, you can submit all of the follow-up queries (for organizations or whatever else wasn't returned) by combining all of them into a Batch. – Lloyd McKenzie Jun 29 '16 at 00:57