Noise to LOINC
This module converts noisy laboratory names extracted from medical faxes into validated LOINC codes for downstream EHR integration.
The production pipeline requires the local UMLS/ScispaCy asset and SapBERT model. It starts with the local LOINC release in data/, extracts source-neutral six-axis facts, retrieves universal candidates from the pinned release, applies deterministic mappings and safety validation, uses UMLS semantic evidence, reranks with SapBERT, and abstains when evidence is insufficient.
Source-laboratory mappings are optional governed evidence, not the only route to
ordinary results. Start with Universal multi-lab mapping
to understand how Creatinine, Urine, 24-hour urine, method, and specimen
facts work without a laboratory-specific alias.
Start with the Pipeline tutorial, then use the Deployment runbook to plug the mapper into a fax service and the Maintenance runbook to refresh releases without mixing incompatible artifacts.
For the operational review loop, see Clinician-governed learning. It defines the doctor-friendly form/CSV contract, immutable registry snapshots, and the boundary between this stateless package and the main fax application.
Local development
python -m unittest discover -s tests -v
Production mapping requires all pipeline stages and therefore also needs --umls-path, an installed ScispaCy model, and locally available SapBERT weights. The mapper returns the selected code, ranked alternatives, evidence, provenance, and review reasons.