Skip to content
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

United Kingdom Extensions: Added NHSNumber generator to Person #483

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JohnStabler
Copy link

NHS numbers at 10 digits long. The last digit is a check digit

@bchavez bchavez force-pushed the master branch 27 times, most recently from 9673304 to 97ddbb3 Compare December 22, 2023 18:51
@bchavez bchavez force-pushed the master branch 2 times, most recently from 0b65acc to cc799df Compare December 22, 2023 19:04
@bchavez
Copy link
Owner

bchavez commented Jan 14, 2024

Hi. I think we need a unit test for this. Also, is there a way to generate an NHS number without the do/while loop?

Generally, it's a bad/anti-pattern for generators to have a do -> while -> test-if-valid -> do-again-if-not-valid in Bogus.

A better implementation would be a straight one-shot generation of the NHS number after calling the generation method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants