FHIR Chat · Multiple "List" resource endpoints · dotnet

Stream: dotnet

Topic: Multiple "List" resource endpoints


view this post on Zulip JA (Nov 24 2020 at 05:56):

My organization is attempting to make these endpoints available on our FHIR .NET core API:
image.png

For more info on the above screenshot: http://hl7.org/fhir/us/Davinci-drug-formulary/#anticipated-client-queries

1) How would we structure a List controller/endpoint to handle different _profile parameters? And what about the identifier parameter in the second endpoint shown in the screenshot above?

For example, should we have a List controller which first checks if the _profile parameter matches the one in the screenshot above? Then, check if an identifier parameter was supplied to determine if the request is looking for "Find All CoveragePlans" vs. "Find CoveragePlan by its PlanID"?

I feel like I am just missing something here.. Any insight is very much appreciated.

view this post on Zulip Mirjam Baltus (Nov 24 2020 at 08:42):

You need only one List endpoint. The requests you show in the screenshot are search requests. They will always result in a Bundle resource, in this case it will be a Bundle with Lists in the Bundle.entry. The parameters are used to filter the Lists you have, so if the _profile is provided, you filter all your lists on that, resulting in a Bundle of Lists that have that profile value in their List.meta.profile field. If the identifier parameter is supplied, you filter so the results are all the Lists that have a List.identifier field with the provided value. If both parameters are on the search, you will perform an AND type filter.

view this post on Zulip JA (Nov 24 2020 at 17:20):

Thank you for your reply Mirjam.

For further clarification, when using Bundle.AddResourceEntry(<resource>,<full-url>)
I don't understand what the <full-url> is in this situation.
Also, would the <resource> be the entire List?

Thanks again Mirjam!

view this post on Zulip Mirjam Baltus (Nov 24 2020 at 17:57):

The fullUrl is the identity of the resource in the entry. Usually it is a combination of your endpoint URL, resource type and the technical id for the resource. Each entry in the Bundle has to have one, see http://hl7.org/fhir/bundle.html#bundle-unique.
The resource will indeed be one of the List resources that were found to match the filter. For each matching List, you will need to add an entry to the Bundle.

view this post on Zulip Brian Postlethwaite (Nov 26 2020 at 02:03):

If it's your first netcore server project, you could use the existing facade projects, then you just need to cover your storage layer. Then add other resource types as required, and makes the conformance statement easier too.
Https://github.com/brianpos/fhir-net-web-api which is available on NuGet. And there is a demo project in that repo showing what to do.


Last updated: Apr 12 2022 at 19:14 UTC