Skip to content

Commit

Permalink
NiFi scripts: cohort script update.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed May 24, 2024
1 parent 86496ed commit 875cce9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions nifi/user-scripts/cogstack_cohort_generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 875cce9

Please sign in to comment.