FHIR Chat · Searching Question · dotnet

Stream: dotnet

Topic: Searching Question


view this post on Zulip Joe Mundi (Jan 14 2021 at 19:44):

Please forgive another "dumb" question, but how would I go about a search for all Patients that have MedicationStatement resources? Would I use a whole system search and a reverse include? Any help would be greatly appreciated. Thanks in advance.

view this post on Zulip Brian Postlethwaite (Jan 14 2021 at 19:45):

That would be a patient search using the _has query parameter
http://hl7.org/fhir/search.html#has

view this post on Zulip Brian Postlethwaite (Jan 14 2021 at 19:46):

Not sure how many servers support that

view this post on Zulip Joe Mundi (Jan 14 2021 at 19:47):

Thanks Brian. Does the FHIR .Net SDK have that capability, or do I build the appropriate URL and pass it to the FhirClient?

view this post on Zulip Brian Postlethwaite (Jan 14 2021 at 19:52):

It's just a regular search property, so should be able to use it.
client.search<Patient>(new [] {'_has=.....'});
I think.

view this post on Zulip Joe Mundi (Jan 14 2021 at 19:54):

I'll try it and let you know how it works with HAPI. I really appreciate you taking the time to answer. It's like drinking from a firehose, trying to learn FHIR and the SDK at the same time. haha

view this post on Zulip Brian Postlethwaite (Jan 14 2021 at 19:57):

Lol yes, I believe HAPI does support it.
Usually I try things out with a browser, or postman to verify it does what I expect, then use the FHIR client knowning that the server is going to behave nicely :wink:

view this post on Zulip Joe Mundi (Jan 14 2021 at 19:58):

that's a great tip; thank you.


Last updated: Apr 12 2022 at 19:14 UTC