@@ -9,9 +9,11 @@ common functionality that may apply to many services in relation to NHS Number m
99 - [ Table of Contents] ( #table-of-contents )
1010 - [ Using the NHS Number Tools class] ( #using-the-nhs-number-tools-class )
1111 - [ ` _nhs_number_checks() ` : Checks if the NHS number is valid] ( #_nhs_number_checks-checks-if-the-nhs-number-is-valid )
12+ - [ Example Usage for ` _nhs_number_checks() ` ] ( #example-usage-for-_nhs_number_checks )
1213 - [ Required Arguments] ( #required-arguments )
1314 - [ Raises] ( #raises )
1415 - [ ` spaced_nhs_number() ` : Return Spaced NHS Number] ( #spaced_nhs_number-return-spaced-nhs-number )
16+ - [ Example Usage for ` spaced_nhs_number() ` ] ( #example-usage-for-spaced_nhs_number )
1517 - [ Required Arguments] ( #required-arguments-1 )
1618 - [ Returns] ( #returns )
1719
@@ -25,6 +27,8 @@ You can initialise the NHS Number Tools class by using the following code in you
2527
2628The ` _nhs_number_checks() ` method does basic checks on NHS number value provided and raises an exception if the number is not valid:
2729
30+ ## Example Usage for ` _nhs_number_checks() `
31+
2832 from utils.nhs_number_tools import NHSNumberTools
2933 incorrect_nhs_no = "A23456789"
3034 NHSNumberTools._nhs_number_checks(incorrect_nhs_no)
@@ -46,6 +50,8 @@ NHSNumberToolsException: If the NHS number is not numeric or not 10 digits long.
4650The ` spaced_nhs_number() ` method is designed to take the provided NHS number and return it in a formatted
4751string of the format ` nnn nnn nnnn ` . It's a static method so can be used in the following way:
4852
53+ ## Example Usage for ` spaced_nhs_number() `
54+
4955 # Return formatted NHS number
5056 spaced_nhs_number = NHSNumberTools.spaced_nhs_number("1234567890")
5157
0 commit comments