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

Format dates to ISO8601 in ingestion #37

Merged
merged 4 commits into from
May 30, 2024
Merged

Conversation

pipliggins
Copy link
Collaborator

@pipliggins pipliggins commented May 30, 2024

Adds arguments to convert_data_to_flat function for the current date format and timezone.

On ingestion dates/datetimes are converted to the ISO8601 standard.

FHIRflat natively has validation check that date format matches YYYY-MM-DD, but doesn't check for a timezone if a time is provided (https://github.com/nazrulworld/fhir.resources/blob/3f61a5e7963657ed354e2d02b938c62569583299/fhir/resources/fhirtypes.py#L518).

Chose not to put datetime options in google sheets mapping files to keep files streamlined.

Fixes #33, related to #32

- Will strip times out when a midnight time has been provided, not ideal.
@codecov-commenter
Copy link

codecov-commenter commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.24%. Comparing base (a029781) to head (5bb4d54).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #37      +/-   ##
==========================================
+ Coverage   92.08%   92.24%   +0.15%     
==========================================
  Files          39       39              
  Lines        1580     1611      +31     
==========================================
+ Hits         1455     1486      +31     
  Misses        125      125              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pipliggins pipliggins requested a review from abhidg May 30, 2024 12:34
fhirflat/ingest.py Outdated Show resolved Hide resolved
fhirflat/ingest.py Outdated Show resolved Hide resolved
@abhidg abhidg self-requested a review May 30, 2024 13:30
…time fields to be transformed

Accounts for extension fields with period/date in title which aren't datetime fields
@pipliggins pipliggins merged commit c4550c8 into main May 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add date format option in mapping doc
3 participants