use of org.akaza.openclinica.dao.submit.ItemDAO in project OpenClinica by OpenClinica.
the class CrfBusinessLogicHelper method isEachRequiredFieldFillout.
protected boolean isEachRequiredFieldFillout(EventCRFBean ecb) {
ItemDataDAO iddao = new ItemDataDAO(ds);
ItemDAO idao = new ItemDAO(ds);
int allRequiredNum = idao.findAllRequiredByCRFVersionId(ecb.getCRFVersionId());
int allRequiredFilledOut = iddao.findAllRequiredByEventCRFId(ecb);
if (allRequiredNum > allRequiredFilledOut) {
return false;
}
ArrayList allFilled = iddao.findAllBlankRequiredByEventCRFId(ecb.getId(), ecb.getCRFVersionId());
if (!allFilled.isEmpty()) {
return false;
}
return true;
}
Aggregations