As per FHIR URL, resource type has to be mentioned while getting resources.
What if I want bundle of all resources ?
(For example, get all resources of patient having identifier=“1234”
or get all resources of patient having name “Rakesh Waghulde”)
I tried removing resource type from URL and it gave error.
What’s your URL? what’s the error?
It sounds like you’re doing a “search”. So your first example should look like this:
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:
I am using “https://fhirtest.uhn.ca/home” this public FHIR server. and it seems that it does not support all search “[base]?identifier=1234”.
Is there any public FHIR server which supports this ?
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.
I’m not sure what you mean by “only fetching the record within a particular resource”. What specific query are you executing? Against what server?
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:
I appreciate all your help lloyd.