Stream: hapi
Topic: search for baseDefinition profiles
Georg Fette (Apr 26 2019 at 07:44):
When I search for the baseDefinition of a specialized profile, do I also get the resources of the specialized profile ? When I look at specialization as a kind of derivation like in object oriented programming languages, that would be the expected behavior. But I am unsure if this is the same thing here in FHIR.
Grahame Grieve (Apr 26 2019 at 07:47):
it's not the same thing, and in fact, I'm not sure exactly what you are asking about. what does the URL look like?
Georg Fette (Apr 29 2019 at 10:38):
What I mean is, when I search with
http://test.fhir.org/r4/Patient/
and the server contains another profile 'SpecialPatient' that has as baseDefinition
<baseDefinition value="http://hl7.org/fhir/StructureDefinition/Patient"/>
and this other profile contains resources as well, then one could assume that all instances of 'SpecialPatient' also of the type 'Patient' and should be found when searching for the 'Patient' profile.
Patrick Werner (Apr 29 2019 at 13:22):
Hi Georg, in general it is advised to not use profiles for search operations. Using codes, Identifier Systems, etc. is preferred. The problem is that every resource can claim to be conformant in their meta tag. Or they can conform and not declare it in the meta tag. Profiles are meant to validate, not search on.
I couldn't follow your question 100% because I don't know with: "profile contains resources" Profiles don't contain resources, resources are conformant to profiles.
But if i understand you correct, you want to GET http://test.fhir.org/r4/Patient/ - this will give you all Patients no matter to which profile they are declaring conformance.
Last updated: Apr 12 2022 at 19:14 UTC