OHDSI Home | Forums | Wiki | Github

How to link various test results coming out of the same order?

Hello,

We are in the process of converting our data into Common Data Model. We have All Scripts EHR database.

Test orders and test results are linked in our database. For example,
OrderID: 1
OrderName: Complete Blood Count
Order LOINC: 58410-2

This order (ID: 1) is linked with multiple blood test results:

  1. Hemoglobin (LOINC 718-7)
  2. WBC Count (LOINC 57845-0)
  3. RBC Count (LOINC 26453-1)

The blood test results have their values, units etc. associated with them.

When we convert the data into CDM, how can we carry over both LOINC codes (Result as well as Order)? We would like to link what test result is part of what order.

Capture

Thank you,
Shreya

This is how we do this kind of panel test.

First, load both order test and detailed test into Measurement table as shown below:

Measurement table
measurement_id person_id measurement_date measurement_concept_id value_as number measurement_source_value
222333 99999 11/21/2019 40761511 58410-2
444555 99999 11/21/2019 3000963 14.5 718-7
666777 99999 11/21/2019 40760954 6.2 57845-0
888999 99999 11/21/2019 3026361 4.82 26453-1

Then link the Panel test name with detailed test in the Fact_Relationship table using relationship “Panel Contains” (46233678) as shown below:

Fact_Relationship table
DOMAIN_CONCEPT_ID_1 FACT_ID_1 DOMAIN_CONCEPT_ID_2 FACT_ID_2 RELATIONSHIP_CONCEPT_ID
21 222333 21 444555 46233678
21 222333 21 666777 46233678
21 222333 21 888999 46233678

Some relevant reading is here

1 Like

Thank you very much Qi! That was helpful!

t