Skip to main content

A function to check strings against the New Zealand Ministry of Health NHI Validation Routine

Project description

NHI

Repository License PyPi

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_nhi-1.3.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_nhi-1.3.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file python_nhi-1.3.2.tar.gz.

File metadata

  • Download URL: python_nhi-1.3.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for python_nhi-1.3.2.tar.gz
Algorithm Hash digest
SHA256 b9bc266ed0feb737261534d456e0fa37361046cac2ea53332b3c203d043c82c3
MD5 74794409fa324eebaae94282e1bbb497
BLAKE2b-256 dc3f2ad291517c4cea36a447644603bac13de40f5dea1acfb54827a455457db7

See more details on using hashes here.

File details

Details for the file python_nhi-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: python_nhi-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for python_nhi-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00295f682d198ed1aac6dc6d1ed8d0f298306fdb142a135d29469faefd93c7a6
MD5 4c9eb47e18a0e31832c1a84c31304f14
BLAKE2b-256 5e44b72d76f25a0eb7f4a4a3bf2e61865e21b6924e7ba3b71ac647c3a2a8434a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page