Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
{
"metricsCfg": {
	    "patients": {
		
        "type": "AQL",
		        "aql": "select count(Participant.id) where date_range(Participant.regDate, last_cal_month)"
    	},
 
    	"aliquots": {
		        "type": "AQL",
		
        "aql": "select count(Specimen.id) where Specimen.lineage = \"Aliquot\" and Specimen.availableQty > 0 and date_range(Specimen.createdOn, last_cal_month)"
    	}
},
 
"emailTmpl":"#macro(getNumber $result) #if ($result && $result.getRows() && $result.getRows().size() > 0 && $result.getRows().get(0).size() > 0) $result.getRows().get(0)[0] #else N/A #end #end <table> <tbody> <tr> <td>New Patients: </td> <td> #getNumber($patients) </td> </tr> <tr> <td> Aliquots Created: </td> <td> #getNumber($aliquots) </td> </tr> <tr> <td> Data File: </td> <td> <a href="$appUrl'https:/rest/ng/collection-protocols/$cpId/report?fileId=$dataFile">Data Report<openspecimen.atlassian.net/wiki/x/DgCPAw'>Learn how to customise or disable this report</a> </td> </tbody> </table>"
 
}


Recipients

List of users to whom report email should be sent.

Scheduling

As of version v3.4, there is no mechanism to schedule report generation on a per CP basis. There is a single CP reporting job, which by default runs on the 1st day of every calendar month at 01:10 am, iterates through the list of CPs enabled for reporting and generates a corresponding report. In other words, all CP reports are generated on the same day at the same time.

Disabling reports

...