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

Update instructions for generate() in usage.md #26

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ True

### `generate()`

Returns a list of 1 or more valid NHS numbers generated randomly.

By default numbers will be generated from any valid range, including ranges allocated for live patient use.

```python

>>> import nhs_number
Expand All @@ -72,6 +76,9 @@ True
['7709030025']
```

!!! warning "Working with synethetic / unallocated numbers only"
If you want to avoid generating numbers which may have been allocated to real patients, apply the `for_region=REGION_SYNTHETIC` parameter to constrain the output of the function to only numbers from the 900000000n - 999999999n testing range.

### Regions

You can obtain Region objects via the package's `REGION_*` constants:
Expand Down