nhs-number-replacer-cli

Crates.ionhs-number-replacer-cli
lib.rsnhs-number-replacer-cli
version0.2.0
created_at2025-06-12 20:18:51.48646+00
updated_at2025-06-23 12:27:58.508548+00
descriptionNational Health Service (NHS) number replacer command line interface (CLI) for NHS England, NHS Wales, NHS Isle of Man.
homepage
repositoryhttps://github.com/GIG-Cymru-NHS-Wales/nhs-number-replacer-cli-using-rust/
max_upload_size
id1710347
size20,913
Joel Parker Henderson (joelparkerhenderson)

documentation

README

NHS Number replacer CLI

National Health Service (NHS) Number replacer command line interface (CLI).

Steps

This program does these steps:

  1. Read each line from standard input.

  2. Match a regex pattern that is essentially "### ### ####".

  3. Replace the match with a NHS Number that is a testable random sample i.e. in the NHS Number reserved range of "999 000 0000" to "999 999 9999".

  4. Output each line to standard output.

Example

Run:

echo "111 111 1111" | nhs-number-replacer-cli

Output:

999 265 6328
Commit count: 1

cargo fmt