In v5.2, OpenSpecimen is enhanced to allow users to schedule saved queries to run automatically at specific time intervals and notify users. E.g. weekly specimen collection summary, monthly QC reports, etc.
How to schedule a query?
Create the query and save it. Go to saved queries and open the menu at the right of the query and click on 'Schedule'
Fill the details to schedule the query, select the specific users who needs to be notified when the scheduled query is run and specify the time interval when the query should be run.
Run as User
|Indicates which user login is used to run the query. This is used for privileges check and filtering data.|
|Notify Users||One or more users who should be notified once the query is run. These users can download the data exported in a CSV file.|
Who can schedule queries?
Users with role having 'Create' privileges on 'Job' resource can schedule queries.
How are query results filtered?
When the scheduled query is run, the notification is sent to specific users with link to download the results of the query. The query output contains only those records for which the user specified in 'Run as User' has privileges.
For example, in screenshot above the 'Run as User' is set a super admin. This means query results are not filtered as super admin has access to all data.