[][src]Module heidi::chi

heidi implements the CHI number validation “Modulus 11”. See: https://www.ndc.scot.nhs.uk/Data-Dictionary/SMR-Datasets//Patient-Identification-and-Demographic-Information/Community-Health-Index-Number/

The CHI Number (Community Health Index) is a unique number allocated to every patient registered with the NHS in Scotland.

A CHI Number is always 10 digits long. The first 6 digits are the date of birth as DDMMYY. The next 2 digits are random between 0 and 9. The 9th digit is random as well but it is always even for females and odd for males.

The last digit of the number is the “check digit” to aid in integrity checks.

Structs

Number

Functions

lottery

Returns a random Chi Number.

Type Definitions

Digit

A digit can be from 0 to 9.