Skip to content

Commit

Permalink
Merge pull request #654 from Health-Informatics-UoN/fix/x/circular-im…
Browse files Browse the repository at this point in the history
…port

Fix circular import
  • Loading branch information
AndyRae authored Mar 20, 2024
2 parents 2941397 + c089517 commit 911c4ef
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions app/api/mapping/services_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
ScanReportTable,
ScanReportValue,
)
from mapping.serializers import ConceptSerializer


class NonStandardConceptMapsToSelf(Exception):
Expand Down Expand Up @@ -406,39 +405,6 @@ def find_standard_concept(source_concept):
return concept


class Concept2OMOP:
@staticmethod
def get_rules_by_scan_report_concept(scan_report_concept_id):
print("scan_report_concept_id: {}".format(scan_report_concept_id))

_scan_report_concept = ScanReportConcept.objects.get(pk=scan_report_concept_id)

print("concept_id: {}".format(_scan_report_concept.concept.concept_id))

_concept = Concept.objects.get(
concept_id=_scan_report_concept.concept.concept_id
)

serializer = ConceptSerializer(_concept)

concept = serializer.data

if concept.get("domain_id") == "Condition":
"""
https://ohdsi.github.io/TheBookOfOhdsi/CommonDataModel.html#conditionOccurrence
condition_occurrence_id: This is typically an autogenerated value creating a unique identifier for each record.
person_id: This is a foreign key to Laura’s record in the PERSON table and links PERSON to CONDITION_OCCURRENCE.
condition_concept_id: A foreign key referring to the SNOMED code 266599000: 194696.
condition_start_date: The date when the instance of the Condition is recorded.
condition_source_value: This is the original source value representing the Condition. In Lauren’s case of dysmenorrhea the SNOMED code for that Condition is stored here, while the Concept representing the code went to the CONDITION_SOURCE_CONCEPT_ID and the Standard Concept mapped from that is stored in the CONDITION_CONCEPT_ID field.
condition_source_concept_id: If the condition value from the source is coded using a vocabulary that is recognized by OHDSI, the concept ID that represents that value would go here. In the example of dysmennorhea the source value is a SNOMED code so the Concept representing that code is 194696. In this case it has the same value as the CONDITION_CONCEPT_ID field.
"""
pass

return concept


def get_mapping_rules_list(structural_mapping_rules, page_number=None, page_size=None):
"""
Args:
Expand Down

0 comments on commit 911c4ef

Please sign in to comment.