Skip to content

Commit

Permalink
fixed type insert
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardKoschicek committed Mar 4, 2025
1 parent 59e483e commit e7d8ac5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions install/import/femcare_patients.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ def insert_activity(self) -> Entity:
def get_diagnose_types(entries_: list[Entry]) -> dict[str, Entity]:
diagnose_types_ = {}
for e_ in entries_:
if e_.diagnose not in diagnose_types_:
print(e_.diagnose)
type_ = Entity.insert('type', e_.diagnose)
type_.link('P127', diagnose_hierarchy)
diagnose_types_[e_.diagnose] = type_
if e_.diagnose in diagnose_types_.keys():
continue
type_ = Entity.insert('type', e_.diagnose)
type_.link('P127', diagnose_hierarchy)
diagnose_types_[e_.diagnose] = type_
return diagnose_types_


Expand All @@ -140,4 +140,3 @@ def get_diagnose_types(entries_: list[Entry]) -> dict[str, Entity]:
source.link('P67', person)
source.link('P67', activity)
activity.link('P11', person)
break

0 comments on commit e7d8ac5

Please sign in to comment.