OHDSI Home | Forums | Wiki | Github

How to implement a LOINC lab test panel?

(Qi Yang) #1

I have a lab test panel (Complete urine culture panel) which includes multiple test items such as RBC, WBC etc. The data is shown below.

The LOINC code 58077-9 belongs to Measurement domain. But if I put this data into Measurement table, there is no column to put the test item description information, i.e., PH, RBC, WBC etc. After reading some of the forum post, it looks like I should put this information into fact_relationship table. But I am not sure how because fact_relationship table only takes concept_id. Does this mean I need to map all the individual test item into standard concept_id? Also how do I get fact_id?

How to link various test results coming out of the same order?
(Anna Ostropolets) #2

Good question.
As long as it’s a panel and doesn’t have the actual result but rather a set of test and results, you may simply split your records into separate tests. That what makes sense. If you’re really interested in this particular code, you may link the panel with the tests using fact_relationship.
And to get the tests you may use ‘Panel contains’ relationship in cocnept_relationship. After a number of iterations, you’ll eventually get your list of tests.
Like in your example you’ll get a link to Urinalysis and then to another panel and finally to a set of tests

(Dmytry Dymshyts) #3

Well, yes, you need to map.
So first you get the set of the tests contained in the panel (as @aostropolets said)
Then you need to match each testitem code to the concepts from this list.

581436 Parent to Child Measurement - the relationship_id for Panel to Test
581437 Child to Parent Measurement - the relationship_id for Test to Panel


fact_id_1: The unique identifier in the table corresponding to the domain of fact one.
fact_id_2: The unique identifier in the table corresponding to the domain of fact two.

So when you build Panel to Test relationship:
the fact_id_1 is the measurement_id for the Panel entry
and fact_id_2 is the measurement_id for the individual test entry
and relatationship_id = 581436 (Parent to Child Measurement)
and vice versa for the Test to Panel relationship

(Qi Yang) #4

Thank you very much, Anna and Dmitry !