Skip to content

Commit

Permalink
Comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joeflack4 committed Nov 11, 2024
1 parent 16a6a7d commit 6cdc025
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/comp_loinc/loinc_builder_steps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""LOINC Builder: Populate module with entity objects"""
import logging
import typing as t
from pathlib import Path
Expand Down Expand Up @@ -112,7 +113,7 @@ def loinc_terms_all(
),
] = False,
):
"""LOad all terms."""
"""Load all terms."""
logger.info(f"Starting lt-inst-all")
graph = self.runtime.graph
loinc_loader = LoincLoader(graph=graph, configuration=self.configuration)
Expand Down Expand Up @@ -232,7 +233,11 @@ def entity_labels(self):
loinc_part.entity_label = f"{prefix} {final_name}"

def entity_annotations(self):
"""Updates / synchronizes properties in LinkML model Entity class representations of terms with any properties that exist on the term from its node within the graph."""
"""Entity property annotations.
Updates / synchronizes properties in LinkML model Entity class representations of terms with any properties that
exist on the term from its node within the graph.
"""
graph = self.runtime.graph
loinc_loader = LoincLoader(graph=graph, configuration=self.configuration)
loinc_loader.load_loinc_table__loinc_csv()
Expand Down Expand Up @@ -284,6 +289,7 @@ def entity_annotations(self):
loinc_part.part_display_name = part_display

def loinc_parts_root_parent(self):
"""Make LOINC parts a child of a grouper LoincPart class."""
loinc_part_parent = self.runtime.current_module.get_entity(
entity_class=LoincPart, entity_id="LoincPart"
)
Expand Down Expand Up @@ -343,6 +349,7 @@ def loinc_part_to_snomed_quivalence(self):
part.equivalent_class.append(snomed_concept.id)

def loinc_part_hierarchy_all(self):
"""Asserts part hierarchy for all parts based on component hierarchy file."""
graph = self.runtime.graph
loinc_loader = LoincLoader(graph=graph, configuration=self.configuration)
loinc_loader.load_accessory_files__part_file__part_csv()
Expand Down Expand Up @@ -498,6 +505,7 @@ def loinc_term_primary_def(self):
loinc_term.primary_rad_view_view_type = loinc_part_id

def loinc_term_supplementary_def(self):
"""Populate supplementary definition slots."""
graph = self.runtime.graph
loinc_loader = LoincLoader(graph=graph, configuration=self.configuration)
loinc_loader.load_accessory_files__part_file__loinc_part_link_supplementary_csv()
Expand Down Expand Up @@ -710,7 +718,7 @@ def _parent_class_string(class_string: str) -> t.Optional[str]:

# TODO
def loinc_part_class_hierarchy(self):
"""Sets up LOINC Part hierarchy."""
"""Sets up LOINC Part class hierarchy."""
pass

def load_schema(
Expand Down
1 change: 1 addition & 0 deletions src/comp_loinc/snomed_builder_steps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""SNOMED Builder: Populate module with entity objects"""
import logging
import typing as t

Expand Down

0 comments on commit 6cdc025

Please sign in to comment.