uk-fci / nhs-number

Python package to provide utilities for NHS Numbers, including validity checks, normalisation, and generation.
https://nhs-number.uk-fci.tech/
MIT License
4 stars 6 forks source link

Explanations of reasons a given number is invalid #6

Closed pacharanero closed 1 year ago

pacharanero commented 1 year ago

Explanations of reasons a given number is invalid. CHI numbers have additional constraints on them which mean that certain numbers, whilst mathematically valid, are not “calendrically” valid.

The main is_valid function should always return simply True or False.

However we would add another function which will return a dictionary of information on any given NHS/CHI/H&C Number, including:

And this could be extended as necessary for any future info that we are able to return.