© 2024 IQVIA - All Rights Reserved
collectCompletedFormData
Summary
findFormData returns all formData matching the query criteria. This includes noncomplete data and also non-conformant data.
This utility method will return only formData which is complete, thus removing canceled, nonconformant data etc.
Formal Expression
function collectCompleted(formDataArray) {
if (formDataArray == null) { return []; }
var keepers = [];
for (var i = formDataArray.length - 1; i >= 0; i--) {
var formData = formDataArray[i];
if (formData.form.canceled == false && formData.form.itemGroups[0].canceled == false && (formData.form.dataCollectionStatus == 'Complete'
)) {
keepers.push(formData);
}
}
return keepers;
}
Exported and Printed Copies Are Uncontrolled