FHIR Chat · Querying on a type of List · implementers

Stream: implementers

Topic: Querying on a type of List


view this post on Zulip Dimitar (Sep 27 2017 at 07:56):

Hello,
I am quite new to the FHIR standard and I am currently doing some implementations in .NET to practice more with it. I am trying to extract only the MedicationStatement List, how would that work in .NET? Currently I am just iterating through the whole bundle of lists for a specific patient and checking whether the list contains an entry of MedicationStatement type, but I am sure there is a more direct way to query only for that type of list. Thank you in advance.

view this post on Zulip Ewout Kramer (Sep 27 2017 at 11:50):

The only "type" we have on a List is the List.code property - and you can search the Lists available on a FHIR server based on that code an a given patient.

If you'd want to search using the items on the List, you are looking at criteria on a resource referenced by List.item (in this case its type). For this, you can use a chained search (http://hl7.org/fhir/search.html#chaining):

http://myserver.org/fhir/List?subject=xxxxxx&item._type=MedicationStatement

Although I have never seen this before, and I wonder whether servers implement it.

I would try it out using Postman on several servers - and when you get it to work, it is trivial to run the search using the .NET client.

view this post on Zulip Dimitar (Sep 27 2017 at 12:08):

@Ewout Kramer Appreciate the help, I will try out this approach.

view this post on Zulip Ewout Kramer (Sep 27 2017 at 13:02):

Feel free to ask (preferably in the dotnet stream) for help with actually invoking this search using the .NET library once you have found a server that implements this query!

view this post on Zulip Christiaan Knaap (Sep 27 2017 at 13:08):

I looked for some appropriate data to test this and this works perfectly (run it from Postman): http://vonk.furore.com/List?subject=Patient/example&item._type=FamilyMemberHistory

view this post on Zulip Christiaan Knaap (Sep 27 2017 at 13:09):

Even though the FamilyMemberHistory resources that are referenced, are contained in the List resource itself.

view this post on Zulip Dimitar (Sep 27 2017 at 13:47):

Thank you very much @Christiaan Knaap , works like a charm indeed

view this post on Zulip Dimitar (Sep 27 2017 at 13:50):

Thanks @Ewout Kramer, yes I've realised just now that there is a separate stream for .NET specific questions, where I'll address future implementation issues.


Last updated: Apr 12 2022 at 19:14 UTC