Medicare Number Preference

The main identifying number relating to a patient is stored in the database as the Medicare Number. This is the field used for NHS numbers, Medicare numbers and any national ID numbers that relate directly to the patient and will not change over time.

This preference allows the information that is displayed on the front screens within iGene to be formatted correctly. For example, a UK NHS Number is displayed in the 3-3-4 format (e.g. 123 456 7890) but it is stored in the database without any spaces. This is a requirement of all new systems implemented in the NHS.

Similar formatting can be performed on other identifiers if required. The default is to display the items directly as they are stored in the database without any formatting.

The formatting is applied when the data is returned from the database and is not a mask on the field. The user will be able to enter the details in the correct format or without any formatting. When the field is retrieved from the database, the formatting will then be applied.

Location

Medicare Number Preferences

Format Medicare Number?

This is the main option. If this is checked then the other items within this area are used. If this is not checked then the medicare number will be displayed as it is stored in the database.

Store Without Spaces?

Using the Store Without Spaces option informs iGene that when it is storing the number to remove any spaces within the string.

Format Pattern

The Format Pattern is a regular expression. It splits the number into groups using the regular expression ready to be displayed. For an NHS number the pattern is:

([0-9]{3})([0-9]{3})([0-9]{4})

The above code example splits the number from the database into three separate items. The code looks for the first value between 0-9 and repeats it three times, the next does the same whilst the 3rd section shows the last 4 numbers. The brackets around each of the [0-9]{3} denote the section.

If a number does not fit this pattern then it will be displayed as it is produced from the database.

Format Replacement

The Format Replacement takes the sections specified in the above format pattern and informs the system how to display them. For an NHS number the expression would be:

$1 $2 $3

The above code takes the first group from the format pattern, then adds a space and does the same for the remaining groups. It would be possible to format a medicare number like this:

($1) $2-$3

The code above would wrap the first group in brackets, add a space and then put a hyphen between groups 2 and 3.

Validation Pattern

The Validation Pattern is a regular expression that is used to validate the number when it is entered. This is used to ensure that the number is entered in the correct format. For an NHS number the pattern is:

^[0-9]{3} [0-9]{3} [0-9]{4}$

The ^ and $ denote the start and end of the string. The pattern looks for 3 numbers, a space, 3 numbers, a space and then 4 numbers. If the number does not match this pattern then the system will not allow the number to be saved.