Stream: implementers
Topic: Date search parameters
Robert Lichtenberger (Dec 02 2016 at 06:31):
I am trying to understand date parameter semantics in the presence of incomplete dates and prefixes. Are the following statements correct:
- /Patient?birthdate=gt2016-03 will find patients born on or after the first of march 2016.
- /Patient?birthdate=sa2016-03 will find patients born on or after the first of april 2016.
My rationale would be that 2016-03 must be seen as range [2016-03-01;2016-03-31] but gt is defined as "the range above the search value intersects (i.e. overlaps) with the range of the target value", so the question is what "the search value" is.
For sa it seems clear to me, since the definition there is "the range of the search value does not overlap with the range of the target value, and the range above the search value contains the range of the target value", therefore any birth date in march does not qualify as it would intersect with [2016-03-01;2016-03-31].
Peter Scholz (Dec 02 2016 at 07:35):
yes gt2016-03 will find those born at or after march 1st the range you are thinking about would be "eq2016-03" as that means every day in march 2016
Brian Postlethwaite (Dec 02 2016 at 07:36):
Thats right gt
is greater than, ge
would be what you've described.
http://build.fhir.org/search.html#prefix
Brian Postlethwaite (Dec 02 2016 at 07:37):
sa
is similar to the gt
the difference is really noticed when the type you are comparing to is a period and not a single date value.
Robert Lichtenberger (Dec 02 2016 at 08:00):
So sa2016-03 should also find on or after the first of march 2016? I was thinking that sa2016-03 and gt2016-03 behave differently.
Peter Scholz (Dec 02 2016 at 09:10):
Maybe it's a good idea to beef up the examples of timerange and prefix
Grahame Grieve (Dec 02 2016 at 10:47):
I'm happy to add more examples. Someone want to create a gForge task?
Peter Scholz (Dec 02 2016 at 11:48):
created http://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=12414
Last updated: Apr 12 2022 at 19:14 UTC