It sounds like you’re doing a “search”. So your first example should look like this:
[base]/Patient?identifier=1234
Searches always return a Bundle. However, if you’re searching against a specific resource like Patient, the URL will still contain the resource name. Some servers support searching independent of any resource. E.g. “Find me anything - Patient, Observation, Practitioner, MedicationRequest, etc. - with identifier ‘1234’” would look like this:
[base]?identifier=1234
I tried extracting all resource based on a patient id using HAPI and Vonk but it didn’t worked. The above linked you mentioned test.fhir.org/r4 also didn’t worked
Is there a way I can extract all resources associated with a patient to formulate my HL7 message.
[base]?identifier=1234 would not return all data for patient 1234. It would return all records that happened to have the identifier 1234 - regardless of patient. If you want all data for patient with identifier 1234, look at the $everything operation.
lloyd, i tried using $everything but it is only fetching the record with in a particular resource. I am trying to fetch all the data linked to a particular MRN. Below is URL syntax:
URL : [base]/Patient/[id]/$everything
Please let me know in case we have any other workaround for this.
lloyd, “$everything” is working fine. The first GET call which i executed returned only patient resource linked to that MRN because there were no other resources (Observations, procedure etc). Then i tried on a different MRN, then i was able to get all the resources linked to that MRN.
In case anyone is looking for the syntax i am posting the query for their help: