Medicare card number checksum
How the parser validates a Medicare number found in PID-3 with identifier type MC.
An Australian Medicare card number is ten digits, often carried in HL7 with an eleventh digit, the
individual reference number (IRN) that identifies the person on the card. The parser looks for it in
PID-3 repetitions whose identifier type code (CX.5) is MC, or whose assigning
authority is AUSHIC with a 10–11 digit value.
The algorithm
- The first digit must be 2–6.
- Multiply digits 1–8 by the weights 1, 3, 7, 9, 1, 3, 7, 9 and sum.
- The sum modulo 10 must equal digit 9, the check digit.
- Digit 10 is the card issue number; digit 11, when present, is the IRN and cannot be 0.
A failing check nearly always means a transcription error upstream, a test value that was never real, or a field mapping that has put something else in the Medicare slot. It is reported as an error because downstream claiming and My Health Record lookups will reject it.
Synthetic example that passes: 67559094511. Fails: 2123456782.