From e6afed9b39008cf8f5c521458fc49237c288ef24 Mon Sep 17 00:00:00 2001 From: vladd-bit Date: Sat, 29 Jun 2024 10:27:42 +0100 Subject: [PATCH] NiFi: cohort script fix. --- nifi/user-scripts/cogstack_cohort_generate_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifi/user-scripts/cogstack_cohort_generate_data.py b/nifi/user-scripts/cogstack_cohort_generate_data.py index 1b884d63..c27b11db 100644 --- a/nifi/user-scripts/cogstack_cohort_generate_data.py +++ b/nifi/user-scripts/cogstack_cohort_generate_data.py @@ -101,7 +101,7 @@ def _process_patient_records(patient_records: list): _ptt2sex[patient_record[PATIENT_ID_FIELD_NAME]] = _tmp_gender - dob = patient_record[PATIENT_BIRTH_DATE_FIELD_NAME] + dob = patient_record[PATIENT_BIRTH_DATE_FIELD_NAME] if PATIENT_BIRTH_DATE_FIELD_NAME in patient_record.keys() else 0 if isinstance(dob, int): dob = datetime.fromtimestamp(patient_record[PATIENT_BIRTH_DATE_FIELD_NAME] / 1000, tz=timezone.utc)