Skip to content

Commit

Permalink
Clinical ETL: Fix codeable concepts for KP2023 functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sallybg committed Dec 4, 2023
1 parent 516aa71 commit ff603d1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/seattleflu/id3c/cli/command/etl/clinical.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,11 @@ def create_symptom_conditions(record: dict, patient_reference: dict, encounter_r
for symptom in record['symptom']:
mapped_symptom_name = map_symptom(symptom)
onset_date = record['date_symptom_onset']
symptom_code = {
"system": f"{SFS}/symptom",
"code": mapped_symptom_name
}
symptom_code = create_codeable_concept(
system = f"{SFS}/symptom",
code = mapped_symptom_name
)


condition_resource = create_condition_resource(mapped_symptom_name,
patient_reference,
Expand Down Expand Up @@ -1047,7 +1048,10 @@ def create_icd10_conditions_kp2023(record:dict, patient_reference: dict) -> list
condition_resource = create_condition_resource(icd10_code,
patient_reference,
None,
icd10_codes[icd10_code]
create_codeable_concept(
system = icd10_codes[icd10_code]["system"],
code = icd10_codes[icd10_code]["code"],
display = icd10_codes[icd10_code]["display"])
)

condition_entries.append(create_resource_entry(
Expand Down

0 comments on commit ff603d1

Please sign in to comment.