NHI Validation

Here is a National Health Index (NHI) validator and generator that I created. NHIs are healthcare identifiers used in New Zealand[1][2][3].

NHI Validator
Generate NHIs

Generate random NHIs

    • NHI's uses the letters A-Z without I or O.
    • NHI's start with three letters and end with four numbers.
    • The last digit is a checksum.
    • NHI's are assigned randomly. I believe hospitals have distinct sets ready to be assigned.
    • Its possible for somebody to have multiple NHIs (first alphabetically is the primary).

    The current Id. structure only allows for around 13.8 million NHI's. With a population of around 5 million in 2019 and the possibility of a single person being associated to multiple Id.s, I suspect NHIs in their current form wont be around very long.


    (last checked 2023-06-06)

    1. https://en.wikipedia.org/wiki/NHI_Number
    2. https://www.health.govt.nz/our-work/health-identity/national-health-index
    3. http://www.midcentraldhb.govt.nz/PatientsandVisitors/GeneralInformation/Pages/NHI.aspx

    [EDIT]: Thanks to Chris W for pointing out a bug in my previous implementation. If the checksum is a '0' before being subtracted from 11, the NHI number is deemed to be invalid. This is now fixed in the generator.