README
Statistical Linkage Key
This small library handles both the generation and validation of an SLK. The library itself exposes two functions:
- generate
- is_valid
SLK.generate
The generate
function takes 4 arguments:
- First Name (Full)
- Last Name (Full)
- Date of Birth (Given in YYYY-MM-DD format)
- Gender Identifier given as an integer from the following
Gender | Identifier |
---|---|
Male | 1 |
Female | 2 |
Intersex or Indeterminate | 3 |
Not stated/inadequately described | 9 |
SLK.is_valid
This function will validate a given string based off of three separate 'types'
- A 14 character SLK in the METeOR spec, with the date of birth validated as a true date.
- A 32 character Crockford encoded string, using a subset of characters to represent a 14 character SLK
- A 40 character hex encoded string
The return value of the is_valid
function is an object with key value pairings of passed and
failed validations.