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

fhir-path parser cannot parse datetime fractionalSeconds with more than 6 digits of precision #1506

Closed
michaelwschroeder opened this issue Sep 14, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@michaelwschroeder
Copy link
Contributor

Describe the bug
When attempting to use a dateTime value with fractional seconds of more than 6 digits of precision in a FHIRPath expression, an exception is returned: com.ibm.fhir.path.exception.FHIRPathException: java.time.format.DateTimeParseException: Text '2012-04-15T15:00:00.000000000Z' could not be parsed, unparsed text found at index 26

To Reproduce
Steps to reproduce the behavior:

  1. use a dateTime value with a fractional seconds precision of more than 6 digits in a FHIRPath expression

Expected behavior
In order to be consistent with parsing of dateTime and instant fields on object creation (see issue #1446), and date values in search queries (see issue #1505), up to 9 digits of precision should be allowed for fractional seconds in FHIRPath dateTime values, and should be truncated to 6 digits of precision when evaluating the FHIRPath expression.

Additional context
Add any other context about the problem here.

@michaelwschroeder michaelwschroeder added the bug Something isn't working label Sep 14, 2020
@lmsurpre lmsurpre added this to the Sprint 18 milestone Sep 15, 2020
@JohnTimm JohnTimm reopened this Sep 17, 2020
@JohnTimm JohnTimm modified the milestones: Sprint 18, Sprint 17 Sep 17, 2020
michaelwschroeder added a commit that referenced this issue Sep 18, 2020
Signed-off-by: Mike Schroeder <mschroed@us.ibm.com>
@lmsurpre
Copy link
Member

lmsurpre commented Oct 6, 2020

Unit test coverage looks good.

@lmsurpre lmsurpre closed this as completed Oct 6, 2020
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

3 participants