Difference between revisions of "Restrict Code IDs In A Codelist"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Created page with "Category:How_To = Restricting the Code IDs in a Codelist = It is possible to create a Codelist which specifies a restriction on the code IDs that can be created within th...")
 
Line 2: Line 2:
  
 
= Restricting the Code IDs in a Codelist =
 
= Restricting the Code IDs in a Codelist =
It is possible to create a Codelist which specifies a restriction on the code IDs that can be created within the Codelist. This is useful if you wish to ensure that the codes in your codelist conform to a specific format
+
It is possible to create a Codelist which specifies a restriction on the code IDs that can be created within that Codelist. This is useful if you wish to ensure that the codes in your codelist conform to a specific format.
  
To achieve this, on step 1 of the Codelist Wizard enter a Regular Expression in the input area titled: "Restrict Codes". For example to restrict the codes to only be 3 upper-case alphabetic characters, you could use the Regular Expression:  '''[A-Z]{3}'''
+
To achieve this, on step 1 of the Codelist Wizard, there is an input area titled: "Restrict Codes". This area accepts a Regular Expression which you can use to specify the restriction. For example to restrict the codes to only be 3 upper-case alphabetic characters, you could use the Regular Expression:  '''[A-Z]{3}'''.
  
When you define your codes within the Codelist you should specify IDs that conform to this restriction. The Registry User Interface will not warn you if the restriction is not adhered to. When you click "Finish" and submit the Codelist to the Registry, all the codes all checked to ensure that they meet the standard defined in the Regular Expression.
+
When you define your codes within the Codelist you should specify IDs that conform to this restriction. When creating or editing codes, the Registry User Interface will not warn you if the restriction is not adhered to. Only when you click "Finish" and submit the Codelist to the Registry are all the codes checked to ensure that they meet the standard defined in the Regular Expression.
  
  

Revision as of 01:20, 28 September 2020


Restricting the Code IDs in a Codelist

It is possible to create a Codelist which specifies a restriction on the code IDs that can be created within that Codelist. This is useful if you wish to ensure that the codes in your codelist conform to a specific format.

To achieve this, on step 1 of the Codelist Wizard, there is an input area titled: "Restrict Codes". This area accepts a Regular Expression which you can use to specify the restriction. For example to restrict the codes to only be 3 upper-case alphabetic characters, you could use the Regular Expression: [A-Z]{3}.

When you define your codes within the Codelist you should specify IDs that conform to this restriction. When creating or editing codes, the Registry User Interface will not warn you if the restriction is not adhered to. Only when you click "Finish" and submit the Codelist to the Registry are all the codes checked to ensure that they meet the standard defined in the Regular Expression.


Applying a Restriction to an existing Codelist

If you have a Codelist with code IDs already in it, it is permissable to apply a restriction. This is achieved by editing the existing codelist and on step 1, entering the Regular Expression in the appropriate field. Clicking "Finish" will attempt to save the Codelist in the Registry.

If any of the code IDs do not conform to the Regular Expression, you will be informed by way of an error message on the screen. You will then need to either change the codes or change the Regular Expression.