OpenMRS allows you to indicate a required format for patient identifiers, using regular expressions. To specify a format, go to the Administration page, then click on Manage Identifier Types. From here, if you have created Identifier Types (at least one is required by OpenMRS), you can click on the name of the type to edit it. From the edit screen, you will find a field labeled "Regex Expression". Here you can enter a regular expression to specify what format an identifier of that type needs to be.

If you do not enter a regular expression, an identifier of any format can be entered for that identifier type.

If you do enter a regular expression, the system will verify that any identifier of this type conforms to this regular expression whenever an identifier is entered or changed.

The syntax of regular expressions is outside the scope of this page, but there are several sites/pages online that discuss them. Below is a link to a tutorial on regular expressions.

See also

Regular expression info site