Presenter

Grace Chen, MASc candidate in Systems Design Engineering

Abstract

Labs often record test results using local codes. The results can be exchanged between hospitals, used in clinical decision support, and pooled for research when coded using an interoperability standard like LOINC. Mapping local codes to LOINC is mostly slow and expensive manual work. Existing automated methods mostly map using the test name or aggregate statistics alone. None use the patient’s record surrounding a lab observation.

This thesis frames mapping as classifying masked code tokens over each patient’s FHIR records. Four models were compared on the MIMIC-IV dataset in FHIR format: a FHIR-pretrained encoder (FHIR-MLM), BioClinical ModernBERT, Llama-3.1-8B-Instruct, and a single-observation TF-IDF baseline. To simulate lab tests from another site, descriptions were replaced with paraphrases, real institutional names, or nothing, and numbers were shifted by published inter-lab variations. Accuracy was measured for each observation (per-observation) and each local code (per-code).

When holding the model, tokenizer, and observations constant, the surrounding record adds 12.8 percentage points of per-code accuracy for FHIR-MLM. It helps more for rare LOINC codes per-observation, and when the descriptions are unfamiliar or missing, or the numbers are unfamiliar. When descriptions are removed, FHIR-MLM stays accurate per-observation and drops 9.7 percentage points per-code, while TF-IDF collapses per-code. Models trained on only one site’s numbers use the reference range as a shortcut. For the four models, training on perturbed numbers recovers 94–99% of the per-observation accuracy lost on unfamiliar numbers. FHIR-MLM can auto-map 98.5% of local codes with real institutional names at a 5% error budget, with the rest going to human review. FHIR-MLM leads per-code and is on par with Llama per-observation on paraphrases and perturbed numbers, and it is the cheapest deep model to run.

By volume, a modestly sized deep model can largely solve code mapping at a single site for local codes already in clinical use and in the label space.

Join us online via MS Teams!

This seminar counts towards the graduate student seminar attendance milestone!