How do we see the relationship between panel test (ex. CBC) and its children (i.e. observation test codes)

Unable to find a relationship from loinc codes table between panel test code and its children.
eg. LOINC 58410-2 CBC panel - Blood by Automated count this gives beautifully the relationship on loinc search through website but unable to find the relationship from the complete dump of table(s).

1 Like

Hi Kumaravelmani,

This requires the use of the panels and forms file in the loinc accessory files (i.e. …\AccessoryFiles\PanelsAndForms\PanelsAndForms.csv). This file will show you all the “child” LOINC codes of a panel as well as the R/O/C flag content. This file can be a bit challenging to work with as it may “loop back” on itself so it may require recurrsion in your programming to deal with nested panels.

The LOINC code you provided: 58410-2 is a very easy example to look at in SQL server. Here is a sample of code to help you along.
SELECT distinct
LOINC.LOINCNumber
, LOINC.LongCommonName
,PanelsAndForms.LOINCNumber
,PanelsAndForms.LongCommonName
,PanelsAndForms.ObservationRequiredInPanel
,PanelsAndForms.SEQUENCE
FROM LNC.LOINC
LEFT JOIN LNC.PanelsAndForms ON PanelsAndForms.ParentLoinc = LOINC.LOINCNumber
WHERE LOINC.LOINCNumber = ‘58410-2’
AND LOINC.LOINCNumber != PanelsAndForms.LOINCNumber
Order by SEQUENCE

I am hoping that @swagers or @timbriscoe can jump in here and verify the correct table joins between the main LOINC table and the panelsandforms table in order to get the exact data that you want.

I hope this helps.
John

2 Likes

Thanks for providing the explanation and SQL, @jwsnyder. This page helps explain the adjacency list model used for this hierarchy: Panels and Forms – LOINC

@kvmaxcord Let us know if you need additional information.

Thanks John and it helps.!!

Here is the snapshot of results (from postgres) and thanks again.

1 Like

Hi Kumaravelmani,

That is the same list of codes that I came up with in SQL server.

Best,
John

1 Like

Hi Kumaravelmani,

What is your use case for wanting the result codes for the CBC? In which country(ies) is your implementation?

Usually the performing laboratory is the source of truth for which results (and thus which LOINC codes) are part of the panel CBC order (and its LOINC). In the US, CMS has indicated for payment several different types of CBC orders and which results are part of them and thus LOINCs were created for them. While these CBC panel orders are fairly standardized, there are still some laboratories that may have variances as to which results (and which LOINCs) will be part of a panel. For example, many include a platelet count, while some do not.

The second aspect to your ask, which may be the most important is different countries have different coding requirements for the CBC or Full Blood Count, as it is called in Australia and in the UK. In Australia, SNOMED CT is used for the lab order term, while LOINC is used to may the results that are part of FBC. I understand any provider can order a FBC and depending on the laboratory performing the test, their results may differ and thus different LOINC codes would be mapped to each. The National Health Service (NHS) in the UK has decided to use SCT for both lab orders and results and not LOINC. So usage of terminologies varied by country.

1 Like