Sign inSign up

milkyware/nhs-no-validator

By milkyware

•Updated over 1 year ago

Image
0

654

milkyware/nhs-no-validator repository overview

⁠NHS No Validator

⁠Overview

This is a simple microservice to perform initial validation on NHS numbers. Validating NHS numbers is achieved by performing a Modulus 11 based check on the first 9 digits with the final, check digit. More detail can be found on NHS Data Dictionary⁠, but a summary of the steps involed are below:

  1. Multiply each of the first 9 digits by a declining weighting factor starting at 10
  2. Sum together the totals from the previous step
  3. Calculate the modulo remainder of the total by 11
  4. Subtract the remainder from 11 to give the expected check digit
    • If the result is 10, the NHS number is not valid. If 11, the expected check digit becomes 0
  5. Compare the expected check digit with the final digit of the NHS number

⁠Docker

Below is an example command of running the API in a docker container locally

docker run -d -p 8080:80 milkyware/nhs-no-validator:latest

⁠References

Tag summary

Content type

Image

Digest

sha256:b354c7b50…

Size

45.4 MB

Last updated

over 1 year ago

docker pull milkyware/nhs-no-validator