Skip to content

Commit

Permalink
Fast run updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joeflack4 committed Nov 11, 2024
1 parent 6f08c08 commit 7850298
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/comp_loinc/loinc_builder_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def loinc_parts_all(

count = 0
for node in self.runtime.graph.get_nodes(LoincNodeType.LoincPart):
count = count + 1
count += 1
if self.configuration.fast_run and count > 100:
break
status = node.get_property(LoincPartProps.status)
Expand Down Expand Up @@ -197,8 +197,12 @@ def entity_labels(self):
loinc_tree_loader.load_method_tree()
loinc_tree_loader.load_document_tree()

count = 0
loinc_term: LoincTerm
for loinc_term in self.runtime.current_module.get_entities_of_type(LoincTerm):
count += 1
if self.configuration.fast_run and count > 5000:
break
node = self.runtime.graph.get_node_by_code(
type_=LoincNodeType.LoincTerm, code=loinc_term.id
)
Expand Down Expand Up @@ -253,8 +257,12 @@ def entity_annotations(self):
loinc_tree_loader.load_method_tree()
loinc_tree_loader.load_document_tree()

count = 0
loinc_term: LoincTerm
for loinc_term in self.runtime.current_module.get_entities_of_type(LoincTerm):
count += 1
if self.configuration.fast_run and count > 5000:
break
node = self.runtime.graph.get_node_by_code(
type_=LoincNodeType.LoincTerm, code=loinc_term.id
)
Expand Down Expand Up @@ -364,7 +372,11 @@ def loinc_part_hierarchy_all(self):
loinc_tree_loader.load_method_tree()
loinc_tree_loader.load_document_tree()

count = 0
for child_part_node in graph.get_nodes(type_=LoincNodeType.LoincPart):
count += 1
if self.configuration.fast_run and count > 100:
break
child_part_number = child_part_node.get_property(
type_=LoincPartProps.part_number
)
Expand Down Expand Up @@ -510,10 +522,14 @@ def loinc_term_supplementary_def(self):
loinc_loader = LoincLoader(graph=graph, configuration=self.configuration)
loinc_loader.load_accessory_files__part_file__loinc_part_link_supplementary_csv()

count = 0
loinc_term: LoincTerm
for loinc_term in self.runtime.current_module.get_entities_of_type(
entity_class=LoincTerm
):
count += 1
if self.configuration.fast_run and count > 5000:
break
loinc_term_id = loinc_term.id
loinc_term_node = self.runtime.graph.get_node_by_code(
type_=LoincNodeType.LoincTerm, code=loinc_term_id
Expand Down

0 comments on commit 7850298

Please sign in to comment.