Skip to content

Commit

Permalink
fix: downgrade for python < 3.11 compatibility (#208)
Browse files Browse the repository at this point in the history
* fix: downgrade for python < 3.11 compat

* Update utils_onco_analytics.py
  • Loading branch information
chgl authored Oct 7, 2024
1 parent 354c0b0 commit 97073f6
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/obds_fhir_to_opal/utils_onco_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ def map_icd10(icd10_code):

# to do: add case "unkown" here separately in the future
def map_gender(gender_string):
match gender_string:
case None | "":
return 0
case "female" | "weiblich":
return 1
case "male" | "männlich":
return 2
case _:
return 3 # other / divers / unknown
if gender_string in [None, ""]:
return 0
elif gender_string in ["female", "weiblich"]:
return 1
elif gender_string in ["male", "männlich"]:
return 2
else:
return 3 # other / divers / unknown


def group_entities(icd10_code_mapped):
Expand Down

0 comments on commit 97073f6

Please sign in to comment.