Saturday, March 21, 2015

Searching for HL7 FHIR Patient Resources

With our previous success with creating a Patient resource, we now look to searching for them to avoid creating duplicates.  Glancing through the search documentation reveals that a search is done using an HTTP get to the base resource along with search criteria as query parameters.  Using the Advanced REST Client, we can easily search for the patient we previously created by its MRN using the following URL:

http://spark.furore.com/fhir/Patient?identifier=654321&_format=application%2fjson%2bfhir



If you look at the response, you will notice the "totalResults" has the value 3.  There are in fact 3 patient resources with the identifier 654321.  Two of these patients are ones I created while writing the prior blog entry.  One of them already existed in the spark server.  This raises an interesting question of how unique entities are managed in HL7 FHIR, but not something I am going to worry about right now for this spike - I want to move forward and create the DiagnosticReport resource.  Given the ease of creating the Patient resource, I am hoping it is fairly straightforward.

No comments:

Post a Comment