Stream: implementers
Topic: Search
Mat Coolidge (Jun 02 2016 at 18:20):
When I want to search for all appointments in the next week can I do it with something like
?date.after=6/1/2016&date.before=6/9/2016
Yunwei Wang (Jun 02 2016 at 18:23):
Example from http://hl7.org/implement/standards/fhir/search.html#date
Yunwei Wang (Jun 02 2016 at 18:23):
GET [base]/Patient/23/Procedure?date=ge2010-01-01&date=le2011-12-31
Mat Coolidge (Jun 02 2016 at 18:25):
wont either work?
Mat Coolidge (Jun 02 2016 at 18:25):
also what happens if I want to also add &status=booked
Mat Coolidge (Jun 02 2016 at 18:25):
will it narrow those down further?
Grahame Grieve (Jun 02 2016 at 21:02):
Yunwei's example is correct. It used to be date:before but we changed it to use the prefix form in DSTU 2
Mat Coolidge (Jun 03 2016 at 13:34):
so is before no longer correct?
Mat Coolidge (Jun 03 2016 at 13:35):
it seems much more intuative
Grahame Grieve (Jun 05 2016 at 11:26):
right no longer correct. I think the new form has other advantages
Bashar (Jan 31 2019 at 16:21):
Hello,
I have two resources patient and document. The patient has a link to document. If I have a document, how can I find the patient who has the link to that document?
Lloyd McKenzie (Jan 31 2019 at 16:22):
In FHIR, the document (or more specifically, the Composition or DocumentReference) resource would point to the Patient. The Patient wouldn't point to the document.
Bashar (Jan 31 2019 at 16:26):
sorry, I have Binary and document reference. DokumentReference has a link to Binary. If i have a resource of Binary, how can i finde the DokumentReference, which has the link to that resouce in Binary?
Lloyd McKenzie (Jan 31 2019 at 16:35):
Ok. And DocumentReference would have a link to Patient, no?
Bashar (Jan 31 2019 at 16:38):
sorry, I have Binary and document reference. DokumentReference has a link to Binary. If i have a resource of Binary, how can i finde the DokumentReference, which has the link to that resouce in Binary?
John Moehrke (Jan 31 2019 at 16:48):
Search on DocumentReference with the location parameter that is your URL to your Binary
Bashar (Feb 01 2019 at 10:54):
why do I get an error message when I write the following search method in my program?
var binary = new Uri("http://url/Binary/_archivname/60355_512_22113/_dateiname/DATEN\00000075.001");
Console.WriteLine(binary);
var binary_1 = client.Read<Binary>(binary);
Console.WriteLine(binary_1.ContentType);
The error message ist: System.ArgumentException: "Must be a FHIR REST url containing the resource type in its path
Parametername: location"
Bashar (Feb 01 2019 at 11:00):
i want to find the binary resource with the following parameters:
archive name = 60355_512_22113
File name = DATA\00000075.001
How should i write the URL including These two Parameters?
Lloyd McKenzie (Feb 01 2019 at 15:38):
That's not a valid search syntax. Following the resource name (Binary in this case), you can either have '/'[id] where id is a token following the rules for the 'id' data type or you can have '?' followed by search parameters as defined either by HL7 or by yourself following the syntax in the 'search' part of the specification.
Marcel Blumm (Feb 18 2019 at 08:46):
Hi, I am a bit stumped and this is sort of a newbie question: In my hospital patients are stationed at different wards/departments. What is the way in FHIR to query (or model?) that and get a list of patients currently in station ABC?
René Spronk (Feb 18 2019 at 13:17):
[base]/Encounter?location.name=ABC ?
On the assumption that an Encounter would record the Bed location of inpatients (and that Bed locations are modeled as partOf station locations), it would be [base]/Encounter?location.partOf.name=ABC&_include=Encounter.patient
One could probably rephrase that query to be centered on Patient rather than Encounter (using _has) but that would make the query much harder to understand.
Christian (Sep 27 2019 at 10:39):
Hi,
I'm implementing a search using the _content parameter. Procedure, Patient and Practitioner should be searched.
My misery is, I can do a single searches on each entity and merge the results, but then I loose fhir paging capabilities.
I'm fairly new to fhire, maybe I missed something. My question: Is there a way/syntax to combine searches on different resource-types in a single bundle/search set ?
Thanks in advance
Christian
Lloyd McKenzie (Sep 28 2019 at 01:12):
If the server supports it, you can search against the root endpoint and constrain the types. I.e.
[base]?_type=Procedure,Patient,Practitioner&_content=whatever
Josh Mandel (Sep 28 2019 at 01:23):
From the perspective of compatibility, it might be better not to rely on this kind of fancy feature (maintaining three pagination streams and progressing through them as needed is not too difficult on the client side).
That said, I'm also not sure that a lot of real-world FHIR-facade type servers support ?_content=
search in the first place.
Shahzeb Jadoon (Sep 28 2019 at 10:48):
(deleted)
Chidamber Kumar (Apr 15 2020 at 12:30):
Hi
I have a question regarding _sort.
The number and date can be sorted on increasing/decreasing order. how the result is expected to be sorted based on token or string type search parameter.
Ex : GET [base]/Observation?_sort=status
Status has values : registered | preliminary | final | amended
What order is expected ?
Lloyd McKenzie (Apr 15 2020 at 15:05):
Alphabetically. If you like, you can submit a change request for us to clarify that in the spec
Chidamber Kumar (Apr 15 2020 at 16:50):
okay, How to do that ?
Jean Duteau (Apr 15 2020 at 16:57):
down at the bottom of every page in the spec, there is a "Propose a Change" link. that will take you to our Jira where you can raise a change request.
Ravi Ranjan (Mar 16 2021 at 10:27):
Hi All,
I wanted to check the behavior of search params for FHIR.
Lets say we take example of 'RelatedPerson' resource. Valid params of this resource include - patient, active, gender, etc
Here is the general behavior of search params:
active ---- gives proper result
#active, $active ---- throws Bad Request error
_active ---- IGNORED as search param, No Error.
Can we throw a 'Bad request' error for params starting with underscore(for eg, _active here)? If yes, How?
Thanks,
Ravi
René Spronk (Mar 16 2021 at 10:37):
FHIR states that one should ignore unknown parameters, and "_active" fits that pattern. #active and $active are invalid parameter names, which is why servers are likely to complain about these.
Ravi Ranjan (Mar 16 2021 at 12:49):
René Spronk said:
FHIR states that one should ignore unknown parameters, and "_active" fits that pattern. #active and $active are invalid parameter names, which is why servers are likely to complain about these.
Thanks a lot
Last updated: Apr 12 2022 at 19:14 UTC