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

Intervals with boundaries of varying precision #1451

Open
brynrhodes opened this issue Nov 21, 2024 · 2 comments
Open

Intervals with boundaries of varying precision #1451

brynrhodes opened this issue Nov 21, 2024 · 2 comments
Labels

Comments

@brynrhodes
Copy link
Member

library TestPeriodInterval

using FHIR version '4.0.1'

include FHIRHelpers version '4.1.0'

define FHIRPeriod: FHIR.Period { start: dateTime { value: @2024-03-01T01:00:00.000Z }, end: dateTime { value: @2024-03-01T } }

define TestToInterval: FHIRHelpers.ToInterval(FHIRPeriod)
@brynrhodes brynrhodes added the bug label Nov 21, 2024
@brynrhodes
Copy link
Member Author

In theory, if the starting boundary is @2024-03-01T00:00:00.000Z, then it's incorrect to say that the ending boundary must be greater than, because it's actually the case that no possible value could be less than the start, but that's only the edge case. The general case with any time greater than the midnight on the same day will result in the same issue.

@brynrhodes
Copy link
Member Author

This is arising from patterns in real data being submitted from hospital systems, so we need a general solution here. The workaround in place for now is to update FHIRHelpers.ToPeriod to account for these possibilities by creating an interval with the ending boundary as the maximum time still on the day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant