How to get bundle with all resources

Hello,

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.

Thanks.

What’s your URL? what’s the error?

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 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 believe test.fhir.org/r4 does

Hi LLoyd

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.

Thanks
Nipun

[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.

Thanks
Sahil Khanna

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:

http://hapi.fhir.org/baseDstu3/Patient/1209926/$everything

I appreciate all your help lloyd.

Thanks
Sahil Khanna