Applied Medical Code Mapping with Character-based Deep Learning Models and Word-based Logic (2021)

Abstract: Logical Observation Identifiers Names and Codes (LOINC) is a standard set of codes that enable clinicians to communicate about medical tests. Laboratories depend on LOINC to identify what tests a doctor orders for a patient. However, clinicians often use site specific, custom codes in their medical records systems that can include shorthand, spelling mistakes, and invented acronyms. Software solutions must map from these custom codes to the LOINC standard to support data interoperability. A key challenge is that LOINC is comprised of six elements. Mapping requires not only extracting those elements, but also combining them according to LOINC logic. We found that character-based deep learning excels at extracting LOINC elements while logic based methods are more effective for combining those elements into complete LOINC values. In this paper, we present an ensemble of machine learning and logic that is currently used in several medical facilities to map from

## introduction loinc supports several use cases in the medical domain. for instance, a doctor can use loinc codes to precisely indicate which blood tests they want a laboratory to perform. a major challenge is that clinicians often use custom codes when entering data into medical records systems. custom codes may be more intuitive for humans to understand but also suffer from personal nuance and error. they can contain misspellings, shorthand, and invented acronyms. further, custom codes are site-specific such that the codes in one facility may differ from those in another. these differences make it difficult for facilities to communicate. for instance, if a doctor uses one set of codes to order tests, and a laboratory uses a different set of codes to perform tests, then the laboratory may not be able to correctly identify which tests to perform what tests the doctor is ordering. it is necessary for software solutions to map from custom codes to standards like loinc to eliminate differences between the codes that facilities use and support data interoperability. ## the task there are around 40,000 loinc codes. each code contains six elements as shown in the data for our project came from prior mappings that were performed manually by clinical informaticists. the distribution of loinc values was skewed, with ten codes making up 87.7% of the data. the remaining codes made up a long tail distribution but not all possible loinc codes were present. ## related research both machine learning and logic-based methods for nlp struggle with noisy text inputs. vectorization methods including term frequency -inverse document frequency (tf-idf) vectorization @xcite and word embeddings @xcite are particularly sensitive, though the use of sub-words (i.e. n-grams of characters) can somewhat ameliorate the issue @xcite . pre-trained transformer models have recently topped some nlp benchmarks but are also sensitive to noisy text @xcite @xcite . pruthi, dhingra, and lipton have shown that misspellings reduce bert performance by significant margins and propose an independent model for spelling correction @xcite . luong and manning have used hybrids of character and word based recurrent neural networks (rnn) to address unknown words in translation @xcite . zhang and yang have used a lattice of long short term memory (lstm) and gated recurrent unit (gru) models (variants of rnns) at the character and word level to improve performance of named entity extraction @xcite . we evaluated multiple methods and determined to use a similar hybrid approach for extracting canonical loinc terms from noisy text inputs. ## hybrid solution for loinc mapping we evaluated several methods for addressing noisy text inputs. logic-based methods were paired with fuzzy matching, word frequency analysis, and synonym dictionaries. only around 3% of incoming strings could be mapped in this manner. we found that character-based grus excelled at extracting loinc elements from noisy text inputs but plateaued around 60% accuracy when combining those elements into a final code. a combination of machine learning and logic-based approaches achieved much higher accuracy and coverage. the resulting hybrid model is shown in figure 1 . a given input string is first processed by six, character-based grus for each of the loinc elements (though the figure shows only three). the outputs of these models are then input to logic that combines them in a final loinc code. the following sections describe these processing steps and provide a final evaluation.