CanDIG / clinical_ETL_code

A library to convert clinical data in csv format into json documents for CanDIG ingestion
GNU Lesser General Public License v3.0
0 stars 0 forks source link

DIG-1671: Adding date format to manifest #66

Closed yavyx closed 3 months ago

yavyx commented 3 months ago

What's new

How to test

Previously: Added a date_format parameter to the date_interval mapping function to specify the order of day, month and year to parse ambiguous dates properly.

How to test - Add date_format to any date field in the template DONOR.INDEX.date_of_birth, {date_interval(Donor.date_of_birth, date_format="DMY")} - Run CSVConvert.py using a dataset with ambiguous dates for that field and try different patterns in the template to confirm they are parsed as indicated.

yavyx commented 3 months ago

Re-submitting PR, DIG-1671

What's new

How to test

mshadbolt commented 3 months ago

I added some try catch blocks to the part that is reading the manifest so that if the fields are blank, the script exits as well as if the manifest doesn't have those specified at all, also added a catch to ensure the date format is some form of 'DMY/MDY/YDM'

yavyx commented 3 months ago

@daisieh I addressed the changes and Marion's fix is working