Lab Values in i2b2

272 views
Skip to first unread message

Riyaz Moosa

unread,
Mar 17, 2015, 5:16:13 PM3/17/15
to i2b2-ins...@googlegroups.com
Hello,

We are not mandated to have LOINC codes for the lab results we insert in EMR. So when it comes to i2b2, we drop significant number of records. I just wanted to reach out to see if  anyone has seen any such problems and/or possible solution?
Also for EPIC system is there an external source that provides LOINC for each component ID? Please advise. Thanks.


Phillips, Lori C.

unread,
Mar 17, 2015, 5:29:39 PM3/17/15
to <i2b2-install-help@googlegroups.com>
In what context are you referring to the LOINC codes?  Are you forced to use them?

Typically, users modify the ontology to fit their needs.  In your case you could modify the ontology by replacing the LOINC codes with the codes you use in your system.  Or build your own ontology.

Lori Phillips

--
You received this message because you are subscribed to the Google Groups "i2b2 Install Help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to i2b2-install-h...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Riyaz Moosa

unread,
Mar 17, 2015, 5:44:22 PM3/17/15
to i2b2-ins...@googlegroups.com
Thanks Lori!
We are not forced to use them. Our initial deployment was ontology based on LAB LOINC codes..  Is there any document on i2b2 for replacing the coding system based on source system? or for new ontology creation?

Please advise.

Thanks

AFB

unread,
Mar 17, 2015, 9:38:20 PM3/17/15
to i2b2-ins...@googlegroups.com
So, a discussion of how to use the i2b2Metadata cell won't fit in a brief post, but this doc is a good starting point... https://i2b2.org/software/files/PDF/current/Ontology_Design.pdf

But, once you understand how to create new concept folders and concept leaves, here is a possible way to structure your customized ontology:

For each terminal LOINC concept (i.e. codes that are only numeric, not containing a leading MTHU or LP), create a concept folder, and fill it with concept leaves corresponding to the native EPIC codes. EPIC codes that are less granular than LOINC concepts I guess you could create as loose concept leaves inside MTHU or LP containers.

The reasoning behind this: your researchers will probably be using a standard nomenclature like LOINC, not a vendor-specific coding system. They won't care about the difference between COMPONENT_ID:6856 and COMPONENT_ID:6852... they'll just drag the whole folder called LOINC:4086-5, "valproate in serum or plasma" to the search panes, and they're good to go. If someone does care about the different components, they can still drill down into them by opening the LOINC:4086-5 folder.

Good luck!

Phillips, Lori C.

unread,
Mar 18, 2015, 7:41:28 AM3/18/15
to i2b2-ins...@googlegroups.com

Look here ; the presentation applies to your case.

https://community.i2b2.org/wiki/display/DevForum/Ontology+Approaches+for+Federated+Query+Systems

 

I think in your csse, all you would have to do is replace the LOINC codes in the ontology with your local codes; then update the concept_dimension table accordingly.

As for creating your own ontology , the Edit Terms view may help. 

Message has been deleted

Riyaz Moosa

unread,
Mar 18, 2015, 10:14:06 AM3/18/15
to i2b2-ins...@googlegroups.com
These are some great information. Thanks a lot Lori and AFB!

Peter Beninato

unread,
Mar 19, 2015, 12:29:36 PM3/19/15
to i2b2-ins...@googlegroups.com

Hi,

 

Regarding information that might be available in your EHR.

 

In the clarity data store, do you see a table, clarity.LNC_DB_MAIN

 

Or

 

Select *

From    clarity.LNC_DB_MAIN

Join       clarity.clarity_component

On        clarity_component.default_lnc_id = lnc_db_main.record_id

 

This should allow you to map loincs to lab components.

Fyi.

 

-Peter

--

Riyaz Mohammed

unread,
Mar 19, 2015, 12:36:53 PM3/19/15
to i2b2-ins...@googlegroups.com
Thanks a lot Peter. I checked that table yesterday. Unfortunately, not every default_lnc_id is populated in clarity_component table. So, that's returning quite significant component_ids without a loinc code associated. 
I have been exploring the idea of using component_id from epic to build lab ontologies. 

I think one of the biggest challenge is to come up with hierarchy (with all componentIDs) that can be presented in web client. I am trying to work with application team to help build that. I have seen epic provides tree structure for Labs. Have you explored that / do you have a hierarchy that can be used ? 

Thanks.

Peter Beninato

unread,
Mar 20, 2015, 1:49:49 PM3/20/15
to i2b2-ins...@googlegroups.com

Hi,

 

Unfortunately, we were unable to get the lab tree out of the transaction system and into clarity.

 

Labs are a highly manual process, of examining the results, to determine if quantitative, unit-of-measure, if common components can be grouped together.

 

And then a lab grouping, as to where it exists in the tree. I’m not sure if it’ll be of utility to you. I don’t thing component Ids are the same across EHR implementation, so my component 12345 might be a different lab for you.

 

If I have some spare cycles, I’ll chop out the lab hierarchy and send it as a csv.

 

-Peter

 

From: i2b2-ins...@googlegroups.com [mailto:i2b2-ins...@googlegroups.com] On Behalf Of Riyaz Mohammed
Sent: Thursday, March 19, 2015 9:37 AM
To: i2b2-ins...@googlegroups.com
Subject: Re: Lab Values in i2b2

 

Thanks a lot Peter. I checked that table yesterday. Unfortunately, not every default_lnc_id is populated in clarity_component table. So, that's returning quite significant component_ids without a loinc code associated. 

Riyaz Mohammed

unread,
Mar 20, 2015, 4:04:04 PM3/20/15
to i2b2-ins...@googlegroups.com
Thanks for the insights Peter! I would appreciate the lab hierarchy you have

Thanks.

Riyaz Moosa

unread,
Mar 24, 2015, 3:27:47 PM3/24/15
to i2b2-ins...@googlegroups.com
I checked ontology design doc and ontology approach presentation and found very good explanation on technical piece in terms of table structure and data retrieval. Here are the steps I am thinking in terms of structuring customized ontology.

  • Find componentID/ Name in EPIC that don't have a LOINC
  • Find EPIC section Name, Base_name, Component_Id and Name. An example would be something similar to table below
Section_Name Base_Name  Component_ID Name
HEMATOLOGY CD4QHELPER 590 CD4 HELPER T CELL % CD4Q
IBT LABORATORIES INTERLEU13 998 INTERLEUKIN 13 SERUM
 
  • Take the LOINC ontology table and extract C_HLevel 2 and 3 info. In my case, it would be about 25 description in level 2 and about 500 breakdowns in level 3
  • Work with lab team to determine the folder EPIC component/Name/Base_name/Section_Name falls under
  • Update metadata and concept combined table accordingly with custom data without a LOINC

Per AFB suggestion, this will ensure researcher still queries using standard nomenclature (LOINC) and if all the components are mapped to one of the LOINC root folders, there won't be any drop from source to i2b2.

I would greatly appreciate any feedback/suggestions on the approach and if there is a better way to handle this?


Thanks,

Riyaz

Peter Beninato

unread,
Mar 26, 2015, 11:59:12 AM3/26/15
to i2b2-ins...@googlegroups.com

Hi,

 

Attached are a few files that might be useful.

 

The ctas sql file, will build an i2b2_lab_map table.

 

The csv file is a comma-separated-value file of the contents (no header). You may want to load the csv into the i2b2_lab_map after running the Create table as (CTAS) statement.

 

I think you will want to run updates on the src_systm_compnt_id for the component id in your local EMR. I looked at your other email, and ran a query for one of the Ids in our EHR and they do not match.

 

Also, you will want to modify the Load function (another sql file), We flag the labs that are to be loaded, and an attempt is made to map similar components to a common ID, so investigators don’t have to drag over multiple items. You may not want to do this, so rather than   the i2b2_lab_id, you may want to revert to src_systm_compnt_id.

 

The lab map includes our EHR component name, and also a base_name, so you may be able to look for similarly named components in your EHR for use in any updates to the src_systm_compnt_id, and possibly by extension the i2b2_lab_id.

 

I’ve chopped out from an Oracle package the function that is used to load our lab hierarchy into our local i2b2 system. You may want to modify this. You may only want to load “NUMBER” based quantitative labs for starters.

 

Lastly, I’ve included a snippet from a script that is used to load our SHRINE instance.

 

I hope this helps.

Riyaz Moosa

unread,
Mar 26, 2015, 12:09:21 PM3/26/15
to i2b2-ins...@googlegroups.com, beni...@ohsu.edu
Thanks a lot Peter. These are some really helpful tips.. Thank you

I don't see the attachments. Could you please re-send the files?

Thanks,
Riyaz

Peter Beninato

unread,
Mar 26, 2015, 12:19:39 PM3/26/15
to i2b2-ins...@googlegroups.com

Umm, err, this time with attachments!

ctas_i2b2_lab_map.sql
i2b2_lab_map.csv
i2b2_ont_load_labs_fn.sql
shrine_lab_obs_fact_mapper_loader.sql

Riyaz Mohammed

unread,
Mar 26, 2015, 12:21:04 PM3/26/15
to i2b2-ins...@googlegroups.com
Great. Thank you!

rb...@med.unc.edu

unread,
May 8, 2015, 4:20:17 PM5/8/15
to i2b2-ins...@googlegroups.com
Hi Peter,

I just wanted to tag onto this chain that we were in a similar situation here at UNC with the lab code mappings. Your scripts were very beneficial to helping identify a reasonable path to building a lab ontology, as the stock i2b2 lab ontology and larger LOINC ontology on BioPortal weren't appropriate for our needs.

So just wanted to say thanks for sharing!

- Robert

----------------
Robert Bradford
Research Analyst, Lead i2b2 Developer
UNC-CH - NC TraCS Institute
(919) 843-3127
http://tracs.unc.edu/i2b2

Peter Beninato

unread,
May 8, 2015, 4:26:30 PM5/8/15
to i2b2-ins...@googlegroups.com

Hi,

 

I’m glad some things I do are useful! Your feedback is appreciated.

 

-Peter

Reply all
Reply to author
Forward
0 new messages