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

when querying _history with _since we are not using fhir search parsing rules for the timestamp #3175

Closed
d0roppe opened this issue Jan 11, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@d0roppe
Copy link
Collaborator

d0roppe commented Jan 11, 2022

Describe the bug
when adding _since or _before to the _history query you have to have a timezone and you have to have a full timestamp with or without miliseconds to have the query currently work. We should be able to follow fhir search parsing for the timestamp that defaults to the utz timezone and allows partial timestamps.

Environment
fhir main.

Expected behavior
defaults to the utz timezone and allows partial timestamps.

@d0roppe d0roppe added the bug Something isn't working label Jan 11, 2022
@lmsurpre
Copy link
Member

lmsurpre commented Jan 11, 2022

The spec isn't very clear on this but, in the table of parameters for _history, they document that the type of the _since parameter is an "instant" and they link instant to https://www.hl7.org/fhir/search.html#date which does seem to imply that we should use the datetime model from fhir-search for this (rather than our FHIR model's DateTime support).

With that said, its less clear since they use the word "instant". One option is to ask for clarification at chat.fhir.org.

The _before parameter is something of our own invention, but that should work the same as _since for consistency.

Note: whatever we decide, it does NOT make sense to support search prefix values (lt, le, gt, etc) with these parameters.

punktilious added a commit that referenced this issue Jan 12, 2022
Signed-off-by: Robin Arnold <robin.arnold@ibm.com>
punktilious added a commit that referenced this issue Jan 12, 2022
@d0roppe
Copy link
Collaborator Author

d0roppe commented Jan 12, 2022

A documentation change was added to state the the _before and _since are treated as instant data types and linked to the definition of instant data type in the spec. This clarifies what you need to provide in the timestamp to use _before and _since. Closing issue

@d0roppe d0roppe closed this as completed Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants