How to Test a Unit Template

The regular expressions that you specify when you define unit templates may be too permissive—allowing unwanted values instead of filtering them out—or too restrictive—filtering out valid values that you want to accept. Use the Transform Validator tool when you create unit templates to make sure the regular expressions you specify allow and filter the appropriate values, before referencing the templates in a unit definition.

To test a unit template in the Transform Validator:

  1. In Windows Explorer, navigate to the \vocera\vcts\tools\TransformValidator\bin.
  2. Run the TransformValidator.bat file.

    The Transform Validator appears.

  3. In the Template field, enter the template that will filter the list of group names from the Vocera Voice Server database, allowing only the role-based group names for the unit you are defining.
  4. In the Input String field, enter the name of an actual role-based group from the unit.

    The Transform Validator passes this string to the template to see if the template allows it as a group name. One of the following situations occurs::

    • If the template filters the group name successfully, the Transform Validator displays the value of each template part in the Template Variables pane.
    • If the template is unable to filter the group name, the Template field is highlighted in orange and the Template Variables pane remains empty.
  5. If necessary, edit the template definition until the template allows the group name in the Input String field.
  6. After one group name is allowed, try other group names from the unit you are defining and make sure they are also allowed. Adjust the template if necessary until it allows a representative sample of group names from the unit.
  7. Enter group names from other units that have similar naming conventions to make sure that the template correctly filters them out.

    When you are finished, the template successfully allows all the role based groups from the unit you are defining. Copy the template definition from the Transform Validator and paste it into the Vocera Group Template field in either the Add Unit or Update Unit dialog box.

    See How to Create a Unit and How to Update a Unit.

For example, suppose you wanted to test a Template and an Input String using the values shown in the following table:

Element Value

Template

{Room} {$Room#([100‑199],1,3)} {Bed} {$Bed#([1-2],0,1)} {$Role(1,3)}

Input String

Room 1 0 3 Bed 2 Nurse

After entering the Template and Input String in the Template Validator, the Template Variables section shows that the variable values are assigned as expected.