wiki:i2b2 Data Import Pathology Mapping v2

i2b2 Data Import Pathology Mapping v2

Tags: i2b2

Version 2 of the pathology import of data into i2b2 is based on the mapping of the top 100 Blood Sciences and Microbiology tests ordered from GGH Cardio Locations. The test have been mapped to Snomed CT codes and LOINC codes to see which best serves our requirements.

The current working copy of the mappings is attached to this page. It is currently be reviewed by Paul Smalley.

Snomed CT Mapping

The Snomed CT mapping was carried out using the Snoflake and NPEx Snomed search engines.

It was not always possible to find Snomed CT codes for the exact finding associated with the test. In these instances a code for the procedure was used if one was available. At times Snomed CT had codes for specific findings (for example, a high, low, normal or abnormal level), but not a code for the more general finding.

LOINC Mapping

The LOINC mapping was carried out using the Search Loinc and HIPAA Space LOINC search engines.

LOINC has a lot more codes for the tests required and seems to provide a better match for the codes from the iLab system. LOINC provides multiple codes for each test depending on the sample analysed (blood, or serum or plasma) and the units used (mass/volume, moles/volume, count/volume, etc). The units for each test are recorded in iLab and so a match could be made. Where available, both sample type codes were recorded so that Paul Smalley could be given a choice when he checked the results.

Phase One (In Test)

In phase one Richard Bramley and Paul Smalley mapped 68 codes out of the top 100 tests requested by GGH Cario Locations. The tests that were not mapped were either administration codes (e.g., 'Add Another Test'), codes that represented a common group of other tests, or microbiology tests.

Phase Two (In Development)

The remainder of the codes commonly requested by GGH Cardio Locations - 407 codes in total, including those already mapped and admin codes. This time Paul and Richard are to be joined by Simon Hewson, who will be better able to map microbiology tests.

Phase Three... (In Planning)

Map the remaining tests from the pathology system.

There are 6 potential test results tables in the DWPATH data warehouse database.

Table Number of Tests Types Test Type Column
HAEM_TESTS 1589 Test_Code_Key
MICRO_TESTS 318 Test_Code_Key
CLINIC_TESTS 0 Test_Code_Key
HISTO_STAINS 481 Stain_Code_Key


The MICRO_ORGANISM_TESTS table is a bit different to the rest (If it is a test result table at all). It has two candidate test type columns: MICRO_ORGANISM and MICRO_ORGANISM_TESTS. The second being the first one with a suffix. The number of test types using the different candidate codes is:

Table Number of Tests Types Test Type Column

This cannot be correct. The MICRO_ORGANISM_TESTS column is unique. I need to understand what this table represents.

There is a look up table MF_ORGANISM_CODES which may contain the name for the organisms in the MICRO_ORGANISMS table.

Antibiotic Resistance

As well as reporting their presence, bacteria are also tested for susceptibility to various antibiotics.

I think this information is stored in the table MICRO_ANTIBIOTICS, which is linked to the MICRO_ORGANISMS table using the column Micro_organisms, which in turn is linked to the MICRO_TESTS table using the Micro_Tests column. I THINK!

In the MICRO_ANTIBIOTICS table there are 73 values for the Antibiotic_Code. There are also 4 values for the Interpreted_Sensitivity_Result column, whose meaning I can guess at:

Interpreted_Sensitivity_Result Guessed Meaning Actual Meaning
NULL Not recorded
I Indeterminate?
R Resistant?
S Susceptible?


I do not understand the Histology tables. I have taken a guess that the HISTO_STAINS is the table most similar to test results. However, I think it is probably more complicated than this.

Haematology Fluid Tests

Codes for haematology tests can either be for specific body fluids or generically for any body fluids. The specific ones can be easily mapped to loinc codes, but the generic ones require more work.

Accompanying a generic test is an test of type assay, whose result is the type of fluid. The two rows in the haem_tests table appear to be linked by a shared Haem_Results_File field value. It will therefore be possible to assign a LOINC code to a test code and assay result combination. However, I suspect some combinations may have to be mapped to generic '... in Body Fluid' LOINC codes.

Here is a complete list of the possible Assay results:

Result Result_Expansion
ASCITIAscitic fluid
BILEBile fluid
BILIARBiliary drainage fluid
CLEARClear fluid
GASASPGastric aspirate
INSUFFInsufficient specimen for analysis
JOINTJoint aspirate
KNEEKnee aspirate
KNEESMaterial from knee fluid
N/AAssay not available
NASALNasal fluid
NOSAMNo Sample received.
NSRNo sample received in laboratory
OTHEROther fluid, see diagnosis
PERICAPericardail fluid
PERITOPeritoneal dialysis fluid
PLEURAPleural fluid
STRAStraw colouration
UKUnknown fluid
UNSUITSpecimen unsuitable for analysis
WOUNDWound exudate

Error: Macro BackLinks(None) failed
'Environment' object has no attribute 'get_db_cnx'

Last modified 7 years ago Last modified on 12/10/15 09:26:25

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.