AHI logo

There are a number of different health identifiers in use throughout Australia, some for patients, some for doctors, some for organisations. Each identifier has its own particular use and rules around its format, with some more complex than others.

Good software will generally check the validity of field inputs where possible. For example, a field for an email address would normally check the format to ensure it is entered along the lines of something@something.something, and in some cases may go further to ensure the domain component is a real component (curmi.com versus curmi.con, for example). Similarly, mobile number fields should check the number starts with 04 in Australia, and is 10 digits long.

In the same way, good health software in Australia should generally validate health identifier fields. This article outlines many of the health identifiers in use in Australia, their formats, and any checksums or other devices used to check validity. Hopefully this can serve as a resource to developers building quality healthcare software.

Australian Health Identifiers

If you find this article useful, please consider downloading my iPhone/iPad/Mac app Australian Health Identifiers in the Apple App Store. It’s a one-time purchase and provides an easy-to-use tool that can generate random format-valid identifiers as discussed here, as well as check identifiers for format-validity, all with a slick user interface. Useful for developers, but also useful to GPs and nurses needing to use demo health identifiers in software testing and demonstrations.

The Australian health identifiers I will detail here are as follows:

Medicare Number

The Australian Medicare Number is the most well-known health identifier in the country as it is a unique number provided to every Australian citizen for claiming health services under Medicare. Just about every person in the country has one.

The Medicare Number format consists of 10 digits and an Individual Reference number of the form:

Medicare card
  • The first digit is in the range 2–6.
  • The next 7 digits are in the range 0–9.
  • The next digit is a checksum digit (see below).
  • The next digit is the issue number (starting at 1; each time a card is replaced (expired/lost) this number is increased).
  • The next digit is the Individual Reference Number (IRN) – a reference to the individual on the card.

Software will often only request the first 10 digits, and may require the IRN to be include separately or after a “/”.

The checksum digit is a simple algorithm that produces a digit based on the other numbers. This helps to reduce input errors by misreading a number or swapping digits as the checksum will be different in such cases indicating incorrect entry. The algorithm is as follows:

  • Take each digit from the first 8 digits.
  • Multiple them in turn using the following weights: 1, 3, 7, 9, 1, 3, 7, 9.
  • The check digit is the sum of the weighted values modulo 10.

For example, if the first 8 digits were 31899770, then the check digit would be (3*1+1*3+8*7+9*9+9*1+7*3+7*7+0*9)%10 = 2.

Good healthcare software should check the digits are in the range as above, there are 10 (plus an IRN if required), and that the check digit matches.

Provider Number

Medicare Provider Numbers are issued to GPs (doctors), Allied Health and other specialists. A provider has a unique provider number for every location they practice at, so may have multiple provider numbers.

Providers do not receive a physical card with their provider number, but for explanatory purposes I have created one to show the format of the Medicare Provider Number:

Provider Number card
  • The first 6 digits are in the range 0–9 (know as the provider stem).
  • The next character is the practice location character, an alphanumeric character (0–9 and A–Z) excluding I, O, S and Z.
  • The final character is the check character, one of A, B, F, H, J, K, L, T, W, X or Y (see below).

To calculate the check digit you first convert the location character to a Practice Location Value (PLV) – a number between 0 and 31. The conversion is according to the following table:

Location CharacterPLV
00
11
22
33
44
55
66
77
88
99
A10
B11
C12
D13
E14
F15
Location CharacterPLV
G16
H17
J18
K19
L20
M21
N22
P23
Q24
R25
T26
U27
V28
W29
X30
Y31
  • Take each digit from the first 6 digits, followed by the PLV.
  • Multiple them in turn using the following weights: 3, 5, 8, 4, 2, 1, 6.
  • The check digit is the sum of the weighted values modulo 11.
  • Convert the check digit to a check character using the following table.
Check DigitCheck Character
0Y
1X
2W
3T
4L
5K
6J
7H
8F
9B
10A

As an example, if the first 6 digits are 486674 and the location character is Y, then the PLV is 31, the checksum is (4*3+8*5+6*8+6*4+7*2+4*1+31*6)%11 = 9, and 9 maps to the check character B.

Note that if a provider number is presented with 5 digits, you should add a 0 to the front before calculating the check character. It is likely some very early numbers were 5 digits before the government moved to 6 digits.

Prescriber Number

A prescriber number is a unique, 7-digit number that identifies a registered health professional as eligible to prescribe medication under the Pharmaceutical Benefits Scheme (PBS) in Australia. If you’ve ever been issued a prescription in paper form in Australia you’d likely see a prescriber number up the top near the prescriber’s name.

Providers do not receive a physical card with their prescriber number, but for explanatory purposes I have created one to show the (very simple) format of the number:

Prescriber Number card
  • The first 6 digits are in the range 0–9.
  • The next digit is a checksum digit (see below).

There are actually two different algorithms for calculating the check digit.

If the first digit is 0:

  • Take each digit from the first 6 digits.
  • Multiple them in turn using the following weights: 0, 5, 8, 4, 2, 1.
  • The check digit is the sum of the weighted values modulo 11.

If the first digit is not 0:

  • Take each digit from the first 6 digits.
  • Multiple them in turn using the following weights: 1, 3, 7, 9, 1, 3.
  • The check digit is the sum of the weighted values modulo 10.

For example, if the stem was 084840, the check digit would be (8*5+4*8+8*4+4*2+0*1)%11 = 2. If the stem was 242573, the check digit would be (2*1+4*3+2*7+5*9+7*1+3*3)%10 = 9.

Note that the algorithm here is unclear in the case of a stem starting with 0 giving a remainder of 10. For example, 012342 gives a check digit of 10. The specification I have seen does not say what to do with the check digit in this case. Do you put an “A“? Is the specification wrong and it should also use modulo 10? Does this never happen in the real world? If anyone knows, let me know and I’ll update the notes here.

Individual Health identifier (IHI)

The Individual Health identifier (IHI) is a unique 16 digit identifier assigned to all residents and others accessing healthcare in Australia. It is often used with My Health Record APIs, though most patients in Australia don’t even know this identifier exists.

Individuals do not receive a physical card with their IHI, but for explanatory purposes I have created one to show the format of the number:

IHI card
  • The first 6 digits are the issuer ID. This is the same for all IHIs, and is 800360.
  • The next 9 digits identify the individual.
  • The last digit is a check digit (see below).

The check digit is based on the Luhn formula modulus 10. This is the same formula used for check digits on credit cards. It is a little more complicated than others we have looked at previously:

  • Start with the Issuer ID and the next 9 digits (so no check digit).
  • Double every second digit starting at the second last. If the result of doubling a digit is > 9, subtract 9 from the result (or add the digits).
  • Add together all the doubled digits and the ones that weren’t. Call this s.
  • The check digit is calculated by (10 - s mod 10)) mod 10.

Here is a Swift function that calculates the check digit. It is close enough to pseudo-code that any developer should be able to translate this to their favourite language:

    func generateCheck(_ id:[Int]) -> Int {
        var check = 0
        for count in 1...(id.count) {
            let digit = id[count - 1]
            if count%2 == 0 {
                check += digit
            } else {
                check += (Int((digit*2)/10) + (digit*2)%10)
            }
        }
        check = abs((10 - (check%10))%10)
        return check
    }

As an example, if our base is 800360790627904, we do the following to find s:

Base800360790627904
Double0601812140
Add double digits935
Add All digits800660790325904

Adding the bottom row gives s = 8+0+0+6+6+0+7+9+0+3+2+5+9+0+4 = 59. Finally, check digit is (59%10)%10 = 9.

Health Provider Identifier for Individuals (HPI-I)

The Healthcare Provider Identifier for Individuals (HPI-I) is allocated by Medicare to healthcare providers and other health personnel involved in providing patient care. Like the IHI, it is often used with My Health Record API calls.

Providers do not receive a physical card with their HPI-I, but for explanatory purposes I have created one to show the format of the number:

HPI-I card
  • The first 6 digits are the issuer ID. This is the same for all HPI-Is, and is 800361.
  • The next 9 digits identify the individual.
  • The last digit is a check digit (see below).

The check digit is based on the Luhn formula modulus 10. See IHI above for an explanation of how this algorithm works to calculate the check digit.

Health Provider Identifier for Organisations (HPI-O)

The Healthcare Provider Identifier for Organisations (HPI-O) is allocated by Medicare to healthcare practices involved in providing patient care. Like the IHI and HPI-I, it is often used with My Health Record API calls.

Practices do not receive a physical card with their HPI-O, but for explanatory purposes I have created one to show the format of the number:

HPI-O card
  • The first 6 digits are the issuer ID. This is the same for all HPI-Os, and is 800362.
  • The next 9 digits identify the individual.
  • The last digit is a check digit (see below).

The check digit is based on the Luhn formula modulus 10. See IHI above for an explanation of how this algorithm works to calculate the check digit.

Department of Veterans’ Affairs File Number (DVA)

A Department of Veterans’ Affairs (DVA) file number is a reference number for veterans and dependents.

The DVA number will be 8 or 9 characters long. Individuals with this card may have 3 different coloured cards:

Veteran Gold card

Veteran Gold Card: Allows access to clinically required treatment, pharmaceuticals, support, and services for all health conditions. Surviving partners and dependents may also be eligible for this card.

Veteran White card

Veteran White Card: Allows access to clinically required treatment for specific health conditions related to the veteran’s service. White Card holders may be eligible for Veterans’ Home Care (VHC) services.

Veteran Orange card

Veteran Orange Card: Allows access to clinically required pharmaceutical items for all medical conditions at a cheaper concession rate. To be eligible, veterans must have qualifying service from World War I or World War II, be at least 70 years old, and have been a resident of Australia for at least 10 years.

The DVA number itself will be 8 or 9 characters long, and the card will look similar to the following:

DVA card
  • The first character is a state identifier from the following values:
State IdentifierState
NNew South Wales (including ACT)
SSouth Australia (including Northern Territory)
WWestern Australia
TTasmania
VVictoria
QQueensland
  • The War Code characters optionally follow the state identifier (for WW1, no code is used). War Codes are valid from the following list:
War CodeWar Name
World War I
AAllied Forces
AGXAct of Grace 1939
BURBurma
BWBoer War
CGWCommonwealth Gulf War
CIVCivilians
CNCanadian Forces 1914
CNKCanada Korea/Malaya
CNSCanada Special Overseas Service
CNXCanadian Forces 1939
FIJFiji
GHAGhana
GWAustralian Gulf War
HKSHong Kong (SP Eligibility)
HKXHong Kong 1939
INDIndia
IVIndigenous Veteran 1939
KMKorea-Malaya
KYAKenya
MALMalaya-Singapore
MAUMauritius
MLSMalaysia – Singapore SP Eligibility
MTXMalta 1939
MWIMalawi
NNew Zealand 1914
NFNewfoundland
NGNew Guinea Civilian War Pension
NGRNigeria
NKNew Zealand Korea-Malaya
NRDNorthern Rhodesia
NSMNew Zealand Serving Members
NSSNew Zealand Special Overseas Service
NSWNew Zealand Merchant Navy
NXNew Zealand 1939
PBritish Pension 1914
PADBritish Admiralty Pension
PAMBritish Air Ministry Pension
PCAGovernments and Administration
PCRBritish Service Department – CRO
PCVBritish Pension Civilian
PKBritish Korea/Malaya
PMSBritish Merchant Seaman 1914
PSMBritish Serving Members
PSWBritish Merchant Seaman 1939
PWOBritish War Offices Pension
PXBritish Pension 1939
QQuery
RDSouthern Rhodesia 1914
RDXSouthern Rhodesia 1939
SASouth African Forces 1914
SAXSouth African Forces 1939
SLSierra Leone
SMServing Member
SRFar East Strategic Reserve
SSSpecial Overseas Act
SUDSudan
SWPSeamans War Pension 1939
TZATanganyika (Tanzania)
XAustralian Forces 1939
ZZZanzibar
  • The numeric file number follows the War Code (or the State ID where no War Code exists) and consists of up to 6 numeric characters.
  • The dependency indicator is the last item of the DVA number. It consists of a single alphabetic character (or space where no dependency exists).
  • There is NO check digit in this identifier.

Keep in mind when validating this identifier that others wars may have been added to the list above (and will, unfortunately, be added in the future). You should be able to determine that the identifier appears to be in a valid format if it has 1–3 characters for the War Code, even if you can’t recognise the code.

AHPRA Registration Number

The Australian Health Practitioner Regulation Agency (AHPRA) Registration Number is a unique identifier for health practitioners in Australia.

The AHPRA Registration Number consists of 3 letters and 10 digits and is of the form:

AHPRA card
  • The first 3 letters represent the health profession, according to the following table:
Health Profession CodeHealth Profession
ATSATSI Health Practice
CMRChinese Medicine
CHIChiropractic
DENDental
MEDMedical
MRPMedical Radiation Practice
NMWNursing and Midwifery
OCCOccupational Therapy
OPTOptometry
OSTOsteopathy
PHAPharmacy
PHYPhysiotherapy
PODPodiatry
PSYPsychology
  • The following 10 digits identifier the individual within that profession.
  • There is NO check digit in this identifier.

Final Words

I hope this resource was useful and helps all of us to build better healthcare software in Australia. And if you have any corrections, please send them to me for inclusion.

And finally, if you want a really easy way to generate or test these identifiers when building your own software, or when using test data in your practice, or you just want to thank me for putting together this resource, take a look at my app below.

All the best.

Jamie

Australian Health Identifiers

If you find this article useful, please consider downloading my iPhone/iPad/Mac app Australian Health Identifiers in the Apple App Store. It’s a one-time purchase and provides an easy-to-use tool that can generate random format-valid identifiers as discussed here, as well as check identifiers for format-validity, all with a slick user interface. Useful for developers, but also useful to GPs and nurses needing to use demo health identifiers in software testing and demonstrations.

Australian Health Identifiers
Tagged on:                 

One thought on “Australian Health Identifiers

  • Avatar for David Matthews
    December 16, 2024 at 4:18 pm
    Permalink

    Nice work Jamie. Very detailed

Leave a Reply

Your email address will not be published. Required fields are marked *