NHI
A function to check strings against the New Zealand Ministry of Health NHI Validation Routine. Supports the old and new NHI number formats specified in HISO 10046:2025.
Install
pip install python-nhi
For the other versions of this library, see:
Usage
New format NHI values:
from nhi import is_nhi
is_nhi("ABC12DS") # True
is_nhi("ABC12D0") # False
Old format NHI values:
from nhi import is_nhi
is_nhi("AAA1116") # True
is_nhi("AAA1110") # False
By default, test NHI values (starting with 'Z') are rejected:
from nhi import is_nhi
is_nhi("ZZZ00AC") # False
Test values can be allowed with the allow_test_values flag:
from nhi import is_nhi
is_nhi("ZZZ00AC", allow_test_values=True) # True
See Also
Metadata
Release files for python-nhi 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_nhi-1.3.2.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_nhi-1.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / python_nhi-1.3.2.tar.gz
| Download URL | python_nhi-1.3.2.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9bc266ed0feb737261534d456e0fa37361046cac2ea53332b3c203d043c82c3
|
|
BLAKE2b-256 checksum How to use checksums |
dc3f2ad291517c4cea36a447644603bac13de40f5dea1acfb54827a455457db7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / python_nhi-1.3.2-py3-none-any.whl
| Download URL | python_nhi-1.3.2-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00295f682d198ed1aac6dc6d1ed8d0f298306fdb142a135d29469faefd93c7a6
|
|
BLAKE2b-256 checksum How to use checksums |
5e44b72d76f25a0eb7f4a4a3bf2e61865e21b6924e7ba3b71ac647c3a2a8434a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|