NHS numbers are 10 digit numbers where the 10th digit is a checksum. This function validates the checksums of the supplied NHS numbers.

is_number_valid(nhs_number, warn = TRUE)

Arguments

nhs_number

A 10 digit NHS number to validate

warn

Boolean that controls display of warning messages

Examples

is_valid(1234567881)
#> [1] TRUE
is_valid(1234567890, warn = FALSE)
#> [1] FALSE