Create a Custom Query
From Optisoft
In order to create a Custom Query, follow the below procedure:
- Click on the Data Generator Module.
- Click New in the ribbon.
- Give your Query a Name.
- Choose a Type for your Query. Query Types are custom and can be maintained by clicking on the Type button.
- Select the necessary Branches and Users
- You can now create your Query using the Tables, Fields, Criteria and Display controls. How you configure your Query vastly depends on what your Query is intended for. We could, for example, be looking for all Patient Names and Addresses with Surname 'Smith'.
- Single click'Patient' in the Tables list in order to highlight it.
- Single click 'Surname' in the Fields list in order to highlight it.
- In the Criteria tab do the following
- Set the Operator drop down to 'Equal To'.
- Enter 'Smith' into the Value field.
- Click the Insert button.
- In the Display tab do the following.
- Click the Display tab
- With 'Patient' still highlighted in the Tables list, double click on 'Surname' and 'Forenames' in the Fields list. They will be added to the Fields controls in the Display tab.
- Repeat for 'Address.Default.1, 2 and 3', 'Address.Default.4_Town', 'Address.Default.5_County' and 'Address.Default.6_Postcode'
- In the Sort By drop down, select 'Patient.Forename'.
- When ready click the Execute Query button in the ribbon. The results of the Query will be displayed in the grid at the bottom of the screen.