For new dynamic selection queries a UIM page must be created  so that an audit coordinator can enter values for the new selection  criteria. Similarly, if a new algorithm requiring parameters is to  be used, then this input screen must be developed. See Example: Implementing a Dynamic Selection Query for an example using the 'Every Nth Case' algorithm. The following  outlines the steps required to use a custom Dynamic Selection Query.
- Create a new UIM that contains the required selection  criteria. The name of this UIM must match the name that the  systems administrator enters for the Random Generation page name when configuring selection queries.
- Any other required input screens must also be developed,  such as screens for entering algorithm parameters, entering the  number of cases to be returned etc. If multiple screens are used they should be developed as a wizard. For more information on  wizards, please consult the Cúram Web Client Reference Manual.
- Create the necessary struct to cater for the selection  criteria.
- Create and implement a new facade method that is  responsible for generating the list of cases for audit.  Note that a Case Audit Query Management API is available  to help generate this list of cases.
- The systems administrator must create, validate and  publish a new Selection Query with the SQL required to retrieve  the data and the selection criteria associated with it.  The selection query must then be associated with the relevant  case audit configuration.
An example of these steps is provided in Example: Implementing a Dynamic Selection Query