HPI Respiratory Model Retraining
The objective was to retrain machine learning models for converting Electronic Health Records (EHR) to ICD and CPT codes, improving accuracy and addressing data drift.
Pandas
Python
Contents
  • Objective
  • Business Impact
  • Challenge
  • Solution
  • Result
HPI Respiratory Model Retraining

Objective

The goal was to retrain machine learning models that convert Electronic Health Records (EHR) into ICD and CPT codes, addressing data drift and enhancing accuracy and confidence scores.

Business Impact

A model that reads clinical notes accurately today will not read them accurately in a year. The data underneath it shifts, and accuracy falls until somebody measures it.
  • Accuracy from 78.6% to 98.1%. Measured on 2,000 records the model had not seen before, so it is not simply recognizing its own training data.
  • Drift fixed before it reached billing. Retraining brought the model back in line with current data instead of waiting for miscoded claims to surface.
  • Compared with the model it replaced. Old and new were measured side by side, so the improvement can be shown to an auditor rather than asserted.
  • Retraining that stays affordable. New data folds into the existing model instead of starting again, which is what makes doing this regularly realistic.

Challenge

The primary challenge was tackling data drift, which impacted the reliability of the existing models. Retraining was essential to adapt to new data patterns, maintain classification accuracy, and minimize errors in medical coding.

Solution

The process involved extracting key data columns such as HPI, Chief Complaint, and Vitals from EHR records. The input data was cleaned using the NLTK library to remove stop words, while a Pain Scale Index was extracted using Regular Expressions. The cleaned dataset was then split into training, test, and validation sets. Supervised learning was applied with incremental training to integrate new data into the existing model. Performance evaluation was conducted using a confusion matrix to compare accuracy and quality against the previous model.

Result

The retrained model significantly improved both accuracy and confidence scores. When tested on an unseen dataset of 2,000 entries, the new model achieved 98.1% accuracy, a substantial increase from the old model’s 78.6%.
Contact Us