Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

While registering participant, user can enter unique ID per patient which might be different based on locationParticipant can contain an "Unique ID" to store geography specific identifiers. For example, SSN in U.S, Medicare number in AU etc.

In most cases, the UID per location has a specific format. If administrator wants to set pattern so that the format is validated, it can be achieved in OpenSpecimen using settings.

Login as a super admin and follow the steps to set the pattern to validate SSN field:

...

 However, different countries have different formats.

This page describes how to specify the validation rules for the UID field.

  1. Login as Super Admin
  2. Click on ‘Settings’ card
  3. Search for ‘UID Pattern’ property
  4. Click on the property ‘UID Pattern’ and enter the Pattern’ 

  5. Enter the regex pattern in the ‘New Value’ field to validate SSN. 

  6. Click on ‘Update’. This will make sure user always enters the SSN in the format specified. 

E.g. Pattern The regex pattern for US SSN format: ^(?!000|666)[0-8][0-9]{2}-(?!00)[0-9]{2}-(?!0000)[0-9]{4}$

This pattern will validate that the SSN should be of format AAA-GG-SSSS:

  • AAA is 3 digits number, the first digit should be between 0 to 8 followed by 2 digits between 0 to 9 (should not be 000 or 666)

  • GG are any 2 digits between 0 to 9 (should not be 00)

  • SSSS are any 4 digits between 0 to 9 (should not be 0000)

...

Image Added

Learn how to create regex for your pattern: https://regexone.com/