Stage 5: Display-name enrichment¶
Some health systems send codes without a display name, or with a placeholder such as "no display" or "unknown". Stage 5 fills in a label for common codes so the record viewer and reports are readable. It never changes a code, and it never replaces a display name the record already has.
| Code | Display in the record | After enrichment |
|---|---|---|
| LOINC 8480-6 | empty | Systolic blood pressure |
| LOINC 4548-4 | no display |
Hemoglobin A1c |
| LOINC 82953-1 | empty | ALSFRS-R total score |
| SNOMED CT 86044005 | empty | Amyotrophic lateral sclerosis |
The lookup tables¶
LOINC_DISPLAY and SNOMED_DISPLAY, near the top of run_pipeline.py, hold common laboratory and vital sign codes (blood counts, metabolic and lipid panels, thyroid and coagulation tests, cardiac markers, pulmonary function tests) and ALS-related codes, including the ALSFRS-R total (82953-1) and panel (82954-9), forced vital capacity (19868-9) and FVC percent predicted (19872-1), creatine kinase, and common conditions in an ALS cohort. They are deliberately small; their purpose is to label the codes most likely to arrive without a display.
The ALS and pulmonary function LOINC codes were checked against loinc.org in November 2026. LOINC has no codes for the four ALSFRS-R domain subscores.
Adding codes¶
Add entries to either dictionary:
For complete labels, load an Athena vocabulary download into the OMOP module, which reads concept names directly.
The rule¶
enrich_one(code, display) returns the record's own display unless it is empty or one of the placeholders no display and unknown. Only then does it look the code up.