-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Faker::NHS - Support for the British National Health Service #801
Conversation
Every person in the United Kingdom has a unique code which identifies them to the National Health Service (NHS). The code is in XXX XXX XXXX format where the final digit is a check digit calculated from the previous ones. More information on NHS numbers can be found here: https://en.wikipedia.org/wiki/NHS_number This commit adds the Faker::NHS class along with the Faker::NHS.nhs_number method to generate a valid NHS number.
d448155
to
a8db5d0
Compare
It would be very nice to have nhs number included! |
a359def
to
a5d7731
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. Don't forget to add documentation next time. Thanks for contributing 🥇
@maxehmookau Travis is red because of this test:
It seems that your algorithm fails when we run the tests in ruby |
@vbrazo thanks for adding some basic docs! That's very strange, glad you had CI running to catch that. I'll load up the older ruby version and try and resolve those failures soon. |
No problem. I tested in the older versions and what I noticed was that it fails because the last digit that is being generated is 10 or 11, that's why we get 13 characters. |
@maxehmookau just a quick update: this commit removes |
…er-ruby#801) * Adds support for the British National Health Service fake data. Every person in the United Kingdom has a unique code which identifies them to the National Health Service (NHS). The code is in XXX XXX XXXX format where the final digit is a check digit calculated from the previous ones. More information on NHS numbers can be found here: https://en.wikipedia.org/wiki/NHS_number This commit adds the Faker::NHS class along with the Faker::NHS.nhs_number method to generate a valid NHS number. * Add docs * Update changelog.md * Naming fixes
Every person in the United Kingdom has a unique code which identifies them to the National Health Service (NHS). The code is in XXX XXX XXXX format where the final digit is a check digit calculated from the previous ones.
More information on NHS numbers can be found here: https://en.wikipedia.org/wiki/NHS_number
This commit adds the Faker::NHS class along with the Faker::NHS.nhs_number method to generate a valid NHS number.