From 875cce9f782dbfb958003047875f5e98b00f6ce3 Mon Sep 17 00:00:00 2001 From: vladd-bit Date: Fri, 24 May 2024 11:46:02 +0100 Subject: [PATCH] NiFi scripts: cohort script update. --- nifi/user-scripts/cogstack_cohort_generate_data.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nifi/user-scripts/cogstack_cohort_generate_data.py b/nifi/user-scripts/cogstack_cohort_generate_data.py index f4bafd18..f056c7ca 100644 --- a/nifi/user-scripts/cogstack_cohort_generate_data.py +++ b/nifi/user-scripts/cogstack_cohort_generate_data.py @@ -153,10 +153,8 @@ def _process_annotation_records(annotation_records: list, _doc2ptt: dict): if annotation_entity["nlp.meta_anns"]["Subject"]["value"] == "Patient" and annotation_entity["nlp.meta_anns"]["Presence"]["value"] == "True" and annotation_entity["nlp.meta_anns"]["Time"]["value"] != "Future": _cui2ptt_pos[cui][patient_id] += 1 - print(annotation_record) if "timestamp" in annotation_entity.keys(): time = int(round(datetime.fromisoformat(annotation_entity["timestamp"]).timestamp())) - print(patient_id) if _cui2ptt_tsp[cui][patient_id] == 0 or time < _cui2ptt_tsp[cui][patient_id]: _cui2ptt_tsp[cui][patient_id] = time