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:
Validity
Validity Comment (eg why it is not valid)
Range Region/Type (we have ranges for geographical regions as well as 'testing' ranges
Date Of Birth (for CHI Numbers only)
And this could be extended as necessary for any future info that we are able to return.
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 simplyTrue
orFalse
.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.