Stream: implementers
Topic: search on extension values
Sathish Tiptur (Jan 24 2019 at 14:37):
If I want to support search on FHIR extension fields, is it same as any other standard field defined in the resource?
Michele Mottini (Jan 24 2019 at 14:42):
yes
Sathish Tiptur (Jan 24 2019 at 14:48):
Thanks @Michele Mottini
Sathish Tiptur (Jan 24 2019 at 15:24):
Hi @Michele Mottini , I am trying to an extension to Observation resource as follows
{
"resourceType":"Observation",
"extension": [
{
"url":"http://www.example.com/fhir/StructureDefinition/observation-sessionId",
"valueString":"xxxxx"
}
],
.
.
}
If I need to search on the above extension, is the following search string correct:
GET [base]/Observation?extension:url=http://www.example.com/fhir/StructureDefinition/observation-sessionId&valueString=xxxxx&date=ge2010-01-01&date=le2011-12-31
Thanks!
Michele Mottini (Jan 24 2019 at 15:28):
No, it is not (I misunderstood you question)
Michele Mottini (Jan 24 2019 at 15:28):
there is no built-in way to search for extensions
Michele Mottini (Jan 24 2019 at 15:29):
a server can add custom search parameters that search on data that is represented as extension
Sathish Tiptur (Jan 24 2019 at 15:32):
Does it mean, I can have sessionId as a custom search parameter and the search string can look like the following:
GET [base]/Observation?sessionId=xxxxx&date=ge2010-01-01&date=le2011-12-31
Of course only my server would support the sessionId custom query parameter. Is my thinking correct?
Michele Mottini (Jan 24 2019 at 15:33):
Yes, correct
Sathish Tiptur (Jan 24 2019 at 15:34):
Thank you very much @Michele Mottini !!
Last updated: Apr 12 2022 at 19:14 UTC