LOINC codes explained for product teams
What LOINC actually encodes, how the six parts of a code work, the codes every health product should know first, and the three mistakes that break reporting.
If you are putting lab results into a product, LOINC is the vocabulary you cannot avoid. It is also widely misunderstood — often treated as “the test ID” when it encodes something narrower and more useful.
What LOINC is
LOINC (Logical Observation Identifiers Names and Codes) is a standard for identifying what was measured, independent of which laboratory measured it or which instrument was used. It was developed by the Regenstrief Institute and is free to use under the LOINC licence.
A LOINC code is a stable string such as 58410-2. That string means “Hemoglobin [Mass/volume] in Blood”. It does not mean “CBC”, does not mean “the test our lab calls HGB”, and does not carry a price or a turnaround time.
The six axes behind every code
Each LOINC term is defined by six parts. Understanding them explains why similar-sounding tests have different codes.
| Axis | Question it answers | Example |
|---|---|---|
| Component | What is measured | Hemoglobin |
| Property | What kind of quantity | Mass concentration |
| Time | Time aspect | Point in time |
| System | Specimen or system | Blood |
| Scale | Result type | Quantitative |
| Method | How it was measured | (often absent) |
Because method is usually unspecified in the code, 58410-2 covers many analytical methods. When a method matters clinically, LOINC provides a method-specific term — which is why you sometimes see two codes for what looks like one test.
The codes worth hard-coding first
Most products start with a small set. These are the highest-volume assays in our network:
58410-2— Hemoglobin, blood24323-8— Comprehensive metabolic panel, serum or plasma57698-3— Lipid panel with direct LDL3016-3— Thyrotropin (TSH), serum4548-4— Hemoglobin A1c, blood2986-8— Testosterone, serum1989-3— 25-hydroxyvitamin D3, serum2276-4— Ferritin, serum30522-7— C-reactive protein, high sensitivity, serum2243-4— Estradiol, serum2857-1— Prostate specific antigen, serum2143-6— Cortisol, serum
Panels are different: a panel is a set of component LOINC codes, and LOINC also assigns codes to panel terms. Store both — the panel code for the order, the component codes for the results.
Three mistakes that break reporting
1. Using local lab codes as the key. Every laboratory has internal codes, and they collide across labs. If you key your database on HGB, a lab change silently rewrites your history. Key on LOINC, store the local code as an attribute.
2. Ignoring units. A result without a unit is not a result. 13.4 means nothing until you know it is g/dL and not mmol/L. Pair every value with a UCUM unit string and store the reference range that the laboratory actually used, not a range you computed.
3. Assuming one code per analyte. Hemoglobin in blood and hemoglobin in urine are different LOINC codes with different clinical meaning. Free-text matching on “hemoglobin” will eventually mix them.
How to validate your mapping
Three practical checks:
- Query the LOINC search API for the analyte and confirm the specimen matches yours.
- Compare the unit your API returns against the unit listed on the LOINC term’s example UCUM units.
- Round-trip a known abnormal result through your UI and confirm the flag matches the reference range, not a hard-coded threshold.
LOINC and everything else
LOINC answers “what was measured”. It does not answer “what does this mean” — that requires reference ranges, patient context and clinician interpretation. It also does not replace CPT for billing, SNOMED for clinical findings, or UCUM for units. A well-designed result payload carries all four where they apply, each doing one job.
That separation is the whole point: LOINC gives you a stable join key across laboratories, so your product can stop caring which lab ran the test.