Aggregating data
We will now create some expressions to aggregate and prepare data for visualization.
Cases over time
The IVP_Q_ReportingCasesOverTime
expression is a simple one, as it fetches our daily reporting data and sorts it by date:
a!queryRecordType( recordType: 'recordType!IVP Daily Reporting Data', pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1000, sort: a!sortInfo( field: 'recordType!IVP Daily Reporting Data.fields .date', ascending: true ) ) )
Current case status
In the IVP_Q_ReportingCurrentCaseStatus
expression, we need to exclude all completed cases and group by the status and count the ID:
a!queryRecordType( recordType: 'recordType!IVP Case', ...