Support for a GET request on a ResourceType


#1

Hi,
I’m trying to figure out if the FHIR spec would consider a non-search/non-history GET request on a ResourceType to be valid.

For example, in the description of List (https://www.hl7.org/fhir/list.html), we have the line:
“The List resource is only needed if there is a need to filter the set of resources by a mechanism that cannot be accomplished via a simple query; e.g. there is no need to have a list for all AllergyIntolerances that exist on a server for a given patient.”

Does this mean that a query like GET [base]/AllergyIntolerances?patientId={id} would be valid? If so, would a valid response be a Bundle of type collection?

I’m wondering if this is an alternative to using Search or defining a List resource and asking for the individual resource.


#2

GET [base]/AllergyIntolerance?patientId={id}

is a legal search.

The challenge with doing a search against AllergyIntolerance is that you may get lots of duplicates and potentially conflicting records because servers will have lots of reasons to store records that aren’t necessarily current or deemed totally trustworthy (e.g. data received in referrals, as part of documents, etc.) The List resource provides a currated list of allergies and therefore may be more useful.


#3

Thanks Lloyd. I’m still a little confused though - when you say ‘legal search’, do you mean it is expected to return a Bundle of type searchset?


#4

Yes. That syntax is the syntax for a normal search, so you’ll get back a search set Bundle.