Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Search prefixes sa and eb #666

Closed
makampf opened this issue Mar 30, 2022 · 0 comments
Closed

Support for Search prefixes sa and eb #666

makampf opened this issue Mar 30, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request module:db
Milestone

Comments

@makampf
Copy link

makampf commented Mar 30, 2022

Please support FHIR Search prefixes sa (starts after) and eb (ends before) as in [1] and [2].

The already supported prefixes like

  • lt (lesser than)
  • ge (greater than or equals)
  • gt (greater than)

do not support non-overlapping period filtering. If any point in time of the period of the resource is inside the specified range, the resource is not filtered out - which is in some situations not what would be expected intuitively.

Example:

Assume we have four Encounters with the following date periods:

  • Encounter 1: period.start=1990-01-01 und period.end=2019-01-01
  • Encounter 2: period.start=1990-01-01 und period.end=1991-01-01
  • Encounter 3: period start=1990-01-01 und period.end=null
  • Encounter 4: period.start=2019-01-01 und period.end=2019-01-31

A FHIR search query with date filter:

  • ge(2018-01-01) and lt(2021-12-31) would return Encounter 1, 3 and 4
  • sa(2018-01-01) and eb(2022-01-01) would only return Encounter 4 (which is intuitively expected in most cases)

[1] https://www.hl7.org/fhir/search.html#prefix
[2] https://www.hl7.org/fhir/search.html#date

@makampf makampf changed the title Support for Search prefixes sa and be Support for Search prefixes sa and eb Mar 30, 2022
@alexanderkiel alexanderkiel self-assigned this Mar 30, 2022
@alexanderkiel alexanderkiel added enhancement New feature or request module:db labels Mar 30, 2022
@alexanderkiel alexanderkiel added this to the v0.20.4 milestone Apr 30, 2023
alexanderkiel added a commit that referenced this issue Apr 30, 2023
The equal search worked like approximately (ap) search. Now it tests for
fully contains instead of overlapping. The Prefixes sa (starts-after),
eb (ends-before) and ap (approximately) were also added.

Closes: #666
alexanderkiel added a commit that referenced this issue Apr 30, 2023
The equal search worked like approximately (ap) search. Now it tests for
fully contains instead of overlapping. The Prefixes sa (starts-after),
eb (ends-before) and ap (approximately) were also added.

Closes: #666
alexanderkiel added a commit that referenced this issue Apr 30, 2023
The equal search worked like approximately (ap) search. Now it tests for
fully contains instead of overlapping. The Prefixes sa (starts-after),
eb (ends-before) and ap (approximately) were also added.

Closes: #666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module:db
Projects
None yet
Development

No branches or pull requests

2 participants