Skip to content

Commit

Permalink
fix node not defined check
Browse files Browse the repository at this point in the history
  • Loading branch information
nilskre committed Apr 5, 2024
1 parent 32e9f5b commit 6dd3f3a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions patient_kg/adapters/clinical_dataset_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def get_nodes(self):

if object_type == "concept":
# add node concepts (each column is one node representing one snomedct concept)
if coding_system == "not_mapped_to_ontology":
if (
coding_system == "not_mapped_to_ontology_binary"
or coding_system == "not_mapped_to_ontology_continuous"
):
node = Node.create_instance(
node, None, {}, coding_system, object_type
)
Expand Down Expand Up @@ -172,11 +175,14 @@ def get_edges(self):
]
target_nodes_dict = {}
for target_node_name in target_nodes_list:
tragte_node_coding_system = self.dataset_mapping["Nodes"][
target_node_name
]["coding_system"]
if (
self.dataset_mapping["Nodes"][target_node_name][
"coding_system"
]
== "not_mapped_to_ontology"
tragte_node_coding_system == "not_mapped_to_ontology_binary"
) or (
tragte_node_coding_system
== "not_mapped_to_ontology_continuous"
):
target_nodes_dict[target_node_name] = target_node_name
else:
Expand Down

0 comments on commit 6dd3f3a

Please sign in to comment.