Skip to content

Commit

Permalink
NiFi: cohort script fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Jun 29, 2024
1 parent 9fbb683 commit e6afed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nifi/user-scripts/cogstack_cohort_generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e6afed9

Please sign in to comment.