This function will varify nhs numbers according to the checksum process outlined by UK Government Data Standards Catalogue (GDSC), Version 2.0, Agreed 01.01.02 availible as reference here: https://www.datadictionary.nhs.uk/version2/data_dictionary/data_field_notes/n/nhs_number_de.asp?shownav=0

verify_nhs(nhs_numbers = NULL)

Arguments

nhs_numbers

as character vector

Value

a logical vector

Details

Please enter the NHS number as characters (i.e. "6744424270" and not 6744424270). Remove all formatting, including spaces and dashes.

Examples

verify_nhs("6744424270") # expect TRUE
#> [1] TRUE