C - Calculating Mod 10 Check Digits
Last Updated: 2020-06-15 (10 months ago)
The LOINC code is a numeric code with a Mod 10 check digit. The algorithm for calculating a Mod 10 check digit is as follows:
Using the number 12345, assign positions to the digits, from right to left.
1st = 5
2nd = 4
3rd = 3
4th = 2
5th = 1
Take the odd digit positions counting from the right (1st, 3rd, 5th, etc.).
Multiply by 2.
Take the even digit positions starting from the right (2nd, 4th, etc.).
Prepend the results of Step 4 to the results of Step 3.
Add the digits of Step 5 together.
4 + 2 + 1 + 0 + 6 + 2 = 15
Find the next highest multiple of 10.
Subtract the value of Step 6 from the value of Step 7. Thus, 5 is the Mod 10 check digit for 12345.
20 - 15 = 5
Calculating the check digit for LOINC Parts, Answers, and other identifiers with characters
We use a variant of the basic Mod 10 algorithm to calculate LOINC parts and answer identifiers because those identifiers contain the alpha prefixes “LP” and “LA” (which stand for LOINC Part and LOINC Answer). A detailed description of the method is available here:
This same method could be used for calculating check digits for user-assigned “X codes” (that contain a leading “X” character) as well.
- LOINC Release Notes
- Enriched Linkages between LOINC terms and LOINC Parts
- Abbreviations and acronyms used in LOINC
- 1 – Introduction
- 2 – Major Parts of a LOINC term
- 3 – Special cases
- 4 – Clinical observations and measures
- 5 – Claims attachments
- 6 – Document Ontology
- 7 – Panels (Batteries)
- 8 – Evolving principles for naming collections
- 9 – Additional content in the LOINC distribution
- 10 – Standardized assessment measures
- 11 – Editorial policies and procedures
- 12 – Recommendations for best practices in using and mapping to LOINC
- A – LOINC Database Structure
- B – Classes
- C – Calculating Mod 10 Check Digits
- D – Procedure for Submitting Additions or Changes to LOINC
- E – Examples for LOINC Property Matching
- F – Example Acronyms used in LOINC
- G – LOINC Technical Briefs
- D-Dimer Revisions in LOINC
- Cockcroft-Gault formula, Schwartz equation
- Inducible Clindamycin Resistance in Staphylococcus and Streptococcus
- KIR Gene Family
- Oxygen Saturation and LOINC
- Nomenclature of Salmonella Species, Subspecies, and Serovars
- Segmented Neutrophils Versus Polymorphonuclear WBC
- Vitamin D
- Free Thyroxine Index Variants
- Streptococcus pneumoniae serotype nomenclature
- H – LOINC Committee
- LOINC/RSNA Radiology Playbook User Guide
- User Preferences
- Searching in RELMA
- Keyword Spell Check
- Term File Operations
- Import Local Terms
- Mapping Local Terms to LOINC
- Panels, Forms & Surveys
- HIPAA Claims Attachments
- Lab Auto Mapper
- Community Mapping Repository
- LOINC Submissions using RELMA
- HL7 Attachments