Reputation: 21
I am using Postman to test the connectivity with the Hapi FHIR server and have have been testing different queries but nothing is working...
The expected result is to get all the observations that match a certain patient identifier but, at this point, I could only get information by searching for the patient ID.
This is the base query:
http://hapi.fhir.org/baseR4/Observation
I tried lots of different parameters, including:
?identifier:of-type={identifier.system OR identifier.type.coding.system}|MR|1234
?patient.identifier=1234 OR {full url from above}
?identifier={full url OR 1234}
?subject=1234
?_has:Observation:patient:identifier=1234
and so many others. They either respond with a 500, 400 or a 200OK but with nothing in the Bundle. I checked if I had the patient itself as well as the observations and they are all there, if I search using their ID.
Upvotes: 2
Views: 1814
Reputation: 2299
If you have an Observation that is correctly linked to a Patient, you can search for the Observations using the Patient's identifier.
My comment was to try and check if the Observation(s) is/are correctly linked to the Patient. So if you have a Patient with technical id 234567 and identifier 1234, does the Observation.subject field show [base]/Patient/234567
? If so, this search will work on HAPI:
GET [base]/Observation?patient.identifier=1234
and with a system:
GET [base]/Observation?patient.identifier=LocalGymOrg|1234
Also, these below searches will work, but they use the technical id (FHIR logical id) instead of the identifier:
GET [base]/Observation?patient=234567
GET [base]/Observation?subject=Patient/234567
Upvotes: 2