The use of Electronic Health Records (EHR) by healthcare providers or hospitals has grown significantly over the years to now include an unprecedented amount and variety of patient’s information including demographics, vital sign measurements, laboratory test results, prescriptions, procedures performed, digitized notes and imaging reports. EHR usually contain a mix of structured data such as admission dates, as well as unstructured data such as medical notes written by doctors. Medical coders usually go through an entire patient’s report, which was documented during a doctor’s visit, to extract medical information and assign relevant codes from 1000s of code lists or guidelines. This complex process is crucial in producing an invoice or medical claim for healthcare payers, which requires much time, effort, and attention from medical coders around the world.
For most healthcare providers, medical coding at this day and time is still done manually. With the overwhelming volume of patient reports generated each year, the cumbersome task of coding may lead to multiple errors which can affect up to 30% to 40% of medical billsi. Such errors can have serious consequences like over-billing or under-billing by healthcare providers (when a hospital charges patients, insurers, or governments more or less than what it should for the services provided). Also, medical coding errors may result in penalties due to cases of fraud, waste, and abuse including legal consequences and a waste of healthcare budget. Moreover, it is estimated that doctors in the U.S. loose approximately $125 billion each year due to poor billing practicesii.
To extract and report on diseases, procedures, and medications from patient’s reports in an automated and accurate way, we at TachyHealth have developed our novel solution, AiCode, based on Natural Language Processing (NLP) technology to achieve better performance or outcomes from new corpora (collections of written texts) compared to other NLP models trained on a single corpus.
Our task was to use multi-label classification in order to extract diseases, procedures, and medications from a patient’s medical report.
To do so, we have collected a dataset for diseases and procedures with their associated ICD-10 codes and developed a deep-learning algorithm that is able to identify and extract medical terms efficiently from any context in merely few seconds. Our hybrid model was previously trained on 24 million abstracts of biomedical articles from PubMed corpus and 3 million full texts originating from PMC corpus. We have used FastTextiii as a word embeddings encoder. The prediction of named entities is performed by a Bidirectional-Long Short-Term Memory - Conditional Random Fields (BiLSTM-CRF) algorithmiv with a hidden size of 256 layers that is used to process the input sequence for 200 epochs with a batch size of 32, an initial learning rate of 0.1, and a dropout of 0.5. This powerful structure enables our model to efficiently identify and extract clinical terms successfully and efficiently compared to other models as seen in Table (1).
We have created a corpus or a collection of written texts which includes a list of sentences where each represent a procedure. Then, we implemented an algorithm that works as a document segmentation tool; breaking up the corpus into smaller segments, these words are then used as vectors to represent procedures. By applying our algorithm on paragraphs of clinical text, the model delivers only trained or seen tokenized sentences as a procedure and ignores other non-related tokens. After that, we “concatenated” or linked all sequential related tokens to get a list of expressions. Finally, we trained a One Class Support Vector Machine (SVM)v classifier on the collected procedure names list, that (if the resulting expression's vector is included inside the distribution so, it is a procedure, else, it is not).
We have fine-tuned the model’s parameters until we discovered the optimal value which achieves the best performance.
Table , Performance and time consumption of AiCode compared to Comprehend Medical by AWS
Random text from patients' medical reports was chosen to validate the performance of AiCode compared to one of the novel systems in the market by Amazon Web Services (AWS) called Comprehend Medicalvi. As seen in Table (1), in the 1st patient, AiCode was able to successfully extract the 5 diseases with high confidence value, while Comprehend Medical could detect only 2 of them. In Procedures category, both performed well. Whereas in Medications category, AiCode was able to extract the 5 medications from the text, while Comprehend Medical missed 2 of them (Adol & Corticosteroids). Amazingly, AiCode performed the task 5.3 times faster than AWS (16 seconds compared to only 3 seconds).
In the 2nd case, both AiCode and Comprehend Medical performed well under Diseases category. While in Procedures category, AiCode has successfully extracted all procedures except 1 (Biopsies), whereas Comprehend Medical failed to extract all 7 procedures. With the processing time reaching 2 seconds by AiCode compared to 12 seconds by AWS, clearly AiCode has an advantage of being faster too.
In the 3rd case, AiCode shows an advantage in extracting 4 more diseases compared to Comprehend Medical, while both failed to extract Disoriented. Although AiCode showed better results compared to Comprehend Medical by extracting additional 2 procedures, both models failed to extract Post Chemical and Pleurodesis. Improvement of AiCode is a work in progress to reach even higher sensitivity. Both AiCode and Comprehend Medical performed well under Medications category. The processing time of AiCode surpass AWS by a staggering 4 seconds compared with 24 seconds by Comprehend Medical.
Processing of medical texts, especially in EHR, is a challenging task as it implies the recognition of a large number of medical expressions from a huge number of texts. This requires not only sufficient deep learning techniques, but also suitable methods to build an appropriate NLP structure that can process such amount of data in a short time.
To conclude, TachyHealth’s AiCode smart medical coding software, outperforms Comprehend Medical by AWS in terms of the number of medical expressions extracted (under diagnosis, procedures, and medications), and in the amount of time required to extract them. AiCode’s consumption time is about 3 times faster than Comprehend Medical when processing different medical forms which varies in specialization, size and type of file (image, PDF, etc.).
To perform such high-level computations, we at TachyHealth utilize powerful infrastructure such as Graphics Processing Unit machine Tesla-v100 and other storage capabilities, which allows us to build such complex models and perform extremely intricate relations and mining of medical data in a secure and efficient way.
iiiPiotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. 2016. Enriching word vectors with subword information. CoRR abs/1607.04606.
ivJason Weston, Sumit Chopra, and Antoine Bordes. 2015. Memory networks. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015). San Diego, USA.
vBoser, B.E., Guyon, I.M. & Vapnik, V.N. A training algorithm for optimal margin classifiers. in 5th Annual ACM Workshop on COLT (ed. Haussler, D.) 144–152 (ACM Press, Pittsburgh, PA, 1992).
viP. Bhatia, B. Celikkaya, M. Khalilia and S. Senthivel, "Comprehend Medical: A Named Entity Recognition and Relationship Extraction Web Service," 2019 18th IEEE International Conference On Machine Learning And Applications (ICMLA), Boca Raton, FL, USA, 2019, pp. 1844-1851, doi: 10.1109/ICMLA.2019.00297.