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

Update HL7 to FHIR mappings with a consistent strategy for date and datetime values #16604

Open
2 tasks
jack-h-wang opened this issue Nov 19, 2024 · 0 comments
Open
2 tasks
Labels
platform Platform Team

Comments

@jack-h-wang
Copy link
Collaborator

jack-h-wang commented Nov 19, 2024

User Story

As an RS engineer, I want date and datetime values to be handled uniformly so that transforms can be performed consistently.

Description/Use Case

The HL7 to FHIR mappings with regard to date and datetime values have generally been implemented ad hoc, which makes transforms involving all datetimes (e.g. timezone adjustments) difficult. A dedicated mapping to convert FHIR datetime to HL7 DTM or DT exists; we should ensure all date and datetime values in the resulting FHIR bundle are created in a manner consistent with this mapping.

Risks/Impacts/Considerations

Dev Notes

  • It may not currently be possible to create a universal HL7 to FHIR mapping for this purpose, in which case either the mappings must remain ad hoc, or the HL7 to FHIR converter library should change to make this possible.
  • In order to have datetime values be universally transformable, we should always have store datetime values as the FHIR dateTime primitive type so that the underlying dateTime can be transformed uniformly across the entire FHIR bundle.
  • A distinction needs to be made in cases where only the date is available with no associated time (on the FHIR side, date is a unique primitive type for this purpose). Storing date-only values as dateTime could have unintended consequences when performing global transforms on dateTime values.
  • The hl7v2-date-time extension needs a clear definition of what it represents and how it should be used; if it is intended to store the string representation of the HL7 datetime, it should be immutable (contrary to the manipulation introduced in Added transform for converting datetimes to mountain time #16542). If it is intended only to store the original HL7 value in cases where the FHIR mapping resulted in data loss (e.g. if HL7 provides a dateTime and the mapped FHIR only stores a date) and there is no need to preserve the string representation, then it should not be stored as a string and should not be immutable.

Acceptance Criteria

  • A strategy for uniform handling of datetime HL7 to FHIR mappings has been discussed and agreed to by both the Platform and Engagement teams.
  • Mappings have been updated with the agreed upon strategy.
@jack-h-wang jack-h-wang added the platform Platform Team label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform Platform Team
Projects
None yet
Development

No branches or pull requests

1 participant