Stream: implementers
Topic: Search parameters for all resources
Yunwei Wang (Feb 28 2021 at 02:22):
I am confused by these two pages:
1) search parameters defined by Resource resource http://build.fhir.org/resource.html#search. There are 8 in the list: _content, _id, _lastUpdated, _profile, _query, _security, _source, _tag
2) "Common search parameters for all resources" in search Summary table http://build.fhir.org/search.html#table. There are 9 in the list with two additional, _text and _list, and one missing: _source (FHIR-28313 addresses the missing one)
Does anyone know why the search page has two additional search parameters for "all resources" than the Resource page? Where are these two parameters defined? Should we keep just one source of truth?
Paul Church (Feb 28 2021 at 02:24):
there's also http://build.fhir.org/domainresource.html#search which adds _text, because the field for that param is not present on Resource
Yunwei Wang (Feb 28 2021 at 02:26):
Hmm. Forgot the DomainResource. Is there any resource which is not DomainResource?
Lloyd McKenzie (Feb 28 2021 at 02:27):
Bundle, Parameters and Binary are direct descendants of Resource (i.e. they don't inherit from DomainResource)
Yunwei Wang (Feb 28 2021 at 02:31):
Where is the _list defined?
The claim "Common search parameters for all resources" in the search page is not exactly correct . :thinking: But I think it should be fine.
Lloyd McKenzie (Feb 28 2021 at 02:35):
Can change "all" to "most" if you like
Lloyd McKenzie (Feb 28 2021 at 02:36):
_list is defined here: http://hl7.org/fhir/search.html#list
Yunwei Wang (Feb 28 2021 at 02:42):
Is there a SearchParameter for _list?
Lloyd McKenzie (Feb 28 2021 at 02:44):
It appears not. Wanna create one? That should also be an R4B technical correction
Yunwei Wang (Feb 28 2021 at 03:10):
Should that be under DomainResource?
Lloyd McKenzie (Feb 28 2021 at 03:20):
I think that's where the others are, though I believe _list is applicable for all resources, not just DomainResources
Jose Costa Teixeira (Mar 30 2021 at 15:59):
On this subject, and unless I'm missing something:
http://hl7.org/fhir/search.html#list only shows search on resource types. I presume we can also do a global GET [base]/?_list=42
or GET [base]/?_type=Observation,Condition&_list=42
?
Lloyd McKenzie (Mar 30 2021 at 16:04):
Don't see any reason why not
Jose Costa Teixeira (Mar 30 2021 at 16:22):
should that be documented as well?
Lloyd McKenzie (Mar 30 2021 at 16:35):
Most of our examples don't show [base] searches. Do we really need to do that everywhere?
Dheeraj Kumar Pal (Mar 30 2021 at 17:47):
Is there any sample query URL, how to use _contained and _containedType parameters ?
Lloyd McKenzie (Mar 30 2021 at 17:58):
@Grahame Grieve
Amit Maheshwari (Apr 19 2021 at 18:16):
this is what I get when try to run the GET [base]/?_type=Observation,Condition&_list=42
"severity": "error",
"code": "processing",
"diagnostics": "This is the base URL of FHIR server. Unable to handle this request, as it does not contain a resource type or operation name.
Lloyd McKenzie (Apr 20 2021 at 02:04):
That doesn't mean the search is wrong - it may be that the server you're hitting doesn't support cross-resource searching.
Amit Maheshwari (Apr 20 2021 at 07:05):
Lloyd McKenzie said:
That doesn't mean the search is wrong - it may be that the server you're hitting doesn't support cross-resource searching.
But the following queries are working fine.. I guess these queries too traverse between two different resourcetypes (observation + patient) and (Encounter + Patient)
http://localhost:8000/Observation?subject.identifier=3022
http://localhost:8000/Encounter?subject.identifier=3022
Amit Maheshwari (Apr 20 2021 at 07:16):
Lloyd McKenzie said:
That doesn't mean the search is wrong - it may be that the server you're hitting doesn't support cross-resource searching.
Any settings to be turned on or off in SmileCDR, that you are aware of? to get cross-resource search enabled?
Lloyd McKenzie (Apr 20 2021 at 13:14):
@James Agnew
Last updated: Apr 12 2022 at 19:14 UTC