Stream: implementers
Topic: Condition search by onset-date
Mamata Thakkar (Oct 08 2019 at 20:16):
FHIR R4 US Core supports search by onset-date with composite AND.
http://build.fhir.org/ig/argonautproject/R4/branches/master/StructureDefinition-us-core-condition.html
SHOULD support searching using the combination of the patient and onset-date search parameters:
◦including support for these onset-date comparators: gt,lt,ge,le
◦including optional support for composite AND search on onset-date (e.g.onset-date=[date]&onset-date=[date]]&...)
Example: with onset-date=2019&onset-date=2018
Here, AND means give me patients all conditions with onset-date 2019 and all conditions with onset-date 2018
Or it means give me patients condition records whose onset-date= 2019 AND onset-date =2018 (Is it possible to have same problem with two different onset-date?
Here, yes, the date interval would be 2019-01-01T00:00, 2019-12-31T23:59, and 2018-01-01T00:00, 2018-12-31T23:59
Yunwei Wang (Oct 08 2019 at 20:24):
"If a parameter repeats, such as /Patient?language=FR&language=NL, then this matches a patient who speaks both languages."
Mamata Thakkar (Oct 08 2019 at 20:31):
ok, so we apply same rule for condition onset-date (a condition should have both onset-date), then the query should always return 0 records, as condition can have only 1 onset-date.
Yunwei Wang (Oct 08 2019 at 21:00):
That is correct for the query you gave. A more common example is onset-date=lt2019-01-01&onsite-date=ge2018-01-01. This query gives patients having onsite-date in 2018.
Lloyd McKenzie (Oct 09 2019 at 02:12):
Because of the way dates work, partial dates expand into a range automatically, so if you want the boundaries of a specific year, you can just say onset-date=2018. But as soon as you want to span years or the boundary isn't Jan 1-Dec 31, then the lt + ge pair is what's needed.
Jeremy Smelski (Apr 29 2021 at 19:05):
Hi all, I will tag in on this thread so others searching information on onset-date can also find this question. I have a partner who wants to query for my condition resource using &date=2019-01-01 but my server requires &onset-date=2019-01-01. Is it true I should support both formats for condition as my query partner is suggesting?
Jean Duteau (Apr 29 2021 at 19:10):
if you only support the standard search parameters, then it must be onset-date. there is no 'date' parameter. http://hl7.org/fhir/condition.html#search
Jeremy Smelski (Apr 29 2021 at 19:16):
Thanks @Jean Duteau for confirming this for me.
Last updated: Apr 12 2022 at 19:14 UTC