Summary
Add optional LOINC (Logical Observation Identifiers Names and Codes) codes as metadata on biomarkers. LOINC is the universal standard for identifying lab tests — like ISBN for books but for biomarkers. 71,000+ codes maintained by the Regenstrief Institute (nonprofit, free to use).
Suggested by @fpietrosanti in #57.
Why
- FHIR import: Pull lab results from Apple Health, Epic MyChart, or any EHR that exports FHIR — tests are identified by LOINC codes
- FHIR export: A getbased export with LOINC codes could be imported by other health tools
- Interoperability: Standard way to identify tests across systems, languages, and labs
- AI parsing: Could use LOINC as an additional signal for unambiguous marker identification
Implementation
- Add optional
loinc field to MARKER_SCHEMA entries (e.g., { key: 'glucose', loinc: '2345-7', ... })
- Build a lookup table mapping ~200 existing
category.markerKey → LOINC codes
- Include LOINC codes in JSON export
- Future: FHIR R4 Observation import/export module
Examples
| Marker |
Key |
LOINC |
| Glucose |
biochemistry.glucose |
2345-7 |
| Hemoglobin |
hematology.hemoglobin |
718-7 |
| Total Cholesterol |
lipids.totalCholesterol |
2093-3 |
| Testosterone |
hormones.testosterone |
2986-8 |
| TSH |
thyroid.tsh |
3016-3 |
Notes
- Non-breaking:
loinc field is optional, doesn't affect existing functionality
- Specialty labs (OAT, fatty acids) may not have LOINC codes — custom markers stay as-is
- Main effort is the mapping work (~200 standard markers)
- LOINC is free to use but the full database requires a free license from loinc.org
References
Summary
Add optional LOINC (Logical Observation Identifiers Names and Codes) codes as metadata on biomarkers. LOINC is the universal standard for identifying lab tests — like ISBN for books but for biomarkers. 71,000+ codes maintained by the Regenstrief Institute (nonprofit, free to use).
Suggested by @fpietrosanti in #57.
Why
Implementation
loincfield toMARKER_SCHEMAentries (e.g.,{ key: 'glucose', loinc: '2345-7', ... })category.markerKey→ LOINC codesExamples
biochemistry.glucose2345-7hematology.hemoglobin718-7lipids.totalCholesterol2093-3hormones.testosterone2986-8thyroid.tsh3016-3Notes
loincfield is optional, doesn't affect existing functionalityReferences