...
Use case: The participant’s age registered under the COVID protocol should be between 18-55
Expand |
---|
|
Code Block |
---|
| {
"name" : "editChecks",
"view" : null,
"ctrl" : null,
"data" : {
"constraints" : [ {
"records" : [ "cpr" ],
"rules" : [ {
"when" : "#cpr.participant.extensionDetail?.getAttrsMap()?.get('min_max_age') != null && !#cpr.participant.extensionDetail?.getAttrsMap()?.get('min_max_age').isEmpty()",
"expr" : "T(java.lang.Integer).parseInt(#cpr.participant.extensionDetail?.getAttrsMap()?.get('min_max_age')) >= 18 && T(java.lang.Integer).parseInt(#cpr.participant.extensionDetail?.getAttrsMap()?.get('min_max_age')) <= 55",
"description" : "Partiicpant's age should be between 18 and 55"
} ]
} ]
}
} |
|
Error Report
A report of all the data validation errors can be downloaded from the collection protocol overview page > ‘More’ > ‘Export Errors’
...