Queries and Rules
The Reporting Queries feature allows users to return a desired set of data from their instance after specifying to the platform how to retrieve the data. In the Queries feature, one query corresponds to one set of data that usually answers one question (e.g., Who are the students with asthma that have a current action plan on file?).
To specify the retrieval of this data (or, in other words, ask the platform the question), users add rules to the query. A rule is specific criterion that the platform will use to retrieve your results; it is analogous to parts of the question you are asking. For example, if your question is "Who are the students with asthma that have a current action plan on file?," your rules, in plain terms, are:
The student's list of conditions contains 'Asthma'
The student's list of documents on file contains a file with the tag "Asthma"
The student's
The aforementioned file has a status of "Current"
These rules can be built out in the Query Builder section of the page as follows:
Rules and Groups
A group is a collection of two or more rules that pertain to the same type of data you are asking about. For example, in the above query answering the question "Who are the students with asthma that have a current action plan on file?," the two rules about the file made up a group because they both pertain to Documents, or file, data.
Notice that the rule that corresponds to "The student's list of conditions contains 'Asthma'" is not included in this group because Conditions data is separate from Documents data!
Operators
When asking a question (and thus creating a query), sometimes the different criteria should not all be true. In the the above query, all the criteria, or rules, needed to be true. This is where operators become important and necessary! Operators allow the user to specify how the platform should use a rule or group to retrieve the data by assessing what combination of the rule(s) and/or group(s) present should be true. The available operators are:
And: used to tell the platform that both rules/groups should be true
Or: used to tell the platform that either rules/groups should be true
Not: used to tell the platform that a rule/group should not true
For example, if you wanted to remind all students who may need to take an inhaler at school to have their parents send in up-to-date inhaler forms, you may want to ask the platform "Who are the students who have asthma OR have an incomplete inhaler enrollment form on file?"