Return all Patients

40 views
Skip to first unread message

donwla...@gmail.com

unread,
Apr 13, 2023, 4:10:30 PM4/13/23
to FHIR DOTNET
I've probably missed something somewhere.

I am trying to call a FHIR server using FHIR Client and want to return a Bundle with all the patients. I've tried the following but only getting errors:

****
SearchParams q = new SearchParams().Include("Patient");
 var bundle = fhirClient.Search<Patient>(q);

****

Is there another way to do this

Thanks

donwla...@gmail.com

unread,
Apr 14, 2023, 2:39:23 AM4/14/23
to FHIR DOTNET
Fixed 

This works

SearchParams q = new SearchParams().Add("_type", "Patient");

var bundle = fhirClient.Search<Patient>(q);

Brian Postlethwaite

unread,
Apr 14, 2023, 3:13:43 AM4/14/23
to FHIR DOTNET
The parameters to the search should be optional to retrieve all.
var bundle = fhirClient.Search<Patient>();

Then iterate over the returned set in case the server is paging the data down

while (bundle != null)
{
    bundle = fhirClient.Continue(bundle);
}

As per the firely SDK docs
Reply all
Reply to author
Forward
0 new messages