Metadata-Version: 2.1
Name: python-nhi
Version: 1.0.1
Summary: A function to check strings against the New Zealand Ministry of Health NHI Validation Routine
License: MIT License
        
        Copyright (c) 2022 James Finnie-Ansley
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: repository, https://github.com/James-Ansley/python-nhi
Keywords: NHI
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# Python-NHI

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

## Install

```
pip install python-nhi
```

## Usage

```python
from nhi import check_nhi

print(check_nhi("WLD9413"))  # True
print(check_nhi("ZZZ00AA"))  # False
```

Checks are case-insensitive

## Note

In previous revisions of HISO 10046 and the NHI validation routine there
have been inconsistencies regarding whether a checksum of 0 is invalid
in the new format. This issue has been resolved in later revisions
and a checksum of 0 in the new format is *NOT* considered invalid.

## See Also

- https://www.health.govt.nz/publication/hiso-100462022-consumer-health-identity-standard
- https://www.health.govt.nz/our-work/health-identity/national-health-index/information-health-it-vendors-and-developers/nhi-interfaces
