This tool helps you write simple MySQL queries using fields in the Patient table. Options are hard coded and may not reflect all fields. For more complex queries, see Custom Queries.
- In the Main Menu, click Reports, Standard.
- In the Lists section, click Patients - Raw.
- On the SELECT tab, create the SELECT portion of the query. Highlight the columns you want to see. As you highlight items, the statement will show at the bottom.
- On the WHERE tab, create the WHERE portion of the query. These options will limit the rows returned to only the criteria you specify. The choices available do not exactly match the names of the columns. For instance, instead of simply including birthrate, we have also included an option for Age. Also, options like First Visit Date let you choose items that are not even in the patient table, but must be joined with data from another table.
Field options: They may not exactly match the names of the columns.
Operator: LIKE, equals, greater than, less than, greater than or equal to, less than or equal to, or not equal to.
Text Box: Enter the value that must be met, then click Add. This adds your item to the list in the middle of the page as well as to the formed query at the bottom. Each item in the list is linked by an AND, and the items in the list may be deleted by pressing the Delete Row button (hidden under the dropdown list in the screenshot).
- Click OK to run the query and view results in the User Query. Print or export as needed. To save a query, save it to your Query Favorites.