Search in sources :

Example 46 with StudyParameterValueDAO

use of org.akaza.openclinica.dao.service.StudyParameterValueDAO in project OpenClinica by OpenClinica.

the class OdmStudySubjectController method mayProceed.

private boolean mayProceed(String studyOid, StudySubjectBean ssBean) throws Exception {
    boolean accessPermission = false;
    StudyBean study = getParentStudy(studyOid);
    StudyParameterValueDAO spvdao = new StudyParameterValueDAO(dataSource);
    StudyParameterValueBean pStatus = spvdao.findByHandleAndStudy(study.getId(), "participantPortal");
    participantPortalRegistrar = new ParticipantPortalRegistrar();
    // ACTIVE , PENDING , INACTIVE
    String pManageStatus = participantPortalRegistrar.getRegistrationStatus(studyOid).toString();
    // enabled , disabled
    String participateStatus = pStatus.getValue().toString();
    // available , pending , frozen , locked
    String studyStatus = study.getStatus().getName().toString();
    logger.info("pManageStatus: " + pManageStatus + "  participantStatus: " + participateStatus + "   studyStatus: " + studyStatus + "  studySubjectStatus: " + ssBean.getStatus().getName());
    System.out.println("pManageStatus: " + pManageStatus + "  participantStatus: " + participateStatus + "   studyStatus: " + studyStatus + "  studySubjectStatus: " + ssBean.getStatus().getName());
    if (participateStatus.equalsIgnoreCase("enabled") && studyStatus.equalsIgnoreCase("available") && pManageStatus.equalsIgnoreCase("ACTIVE") && ssBean.getStatus() == Status.AVAILABLE) {
        accessPermission = true;
    }
    return accessPermission;
}
Also used : ParticipantPortalRegistrar(org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar) StudyParameterValueBean(org.akaza.openclinica.bean.service.StudyParameterValueBean) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) StudyParameterValueDAO(org.akaza.openclinica.dao.service.StudyParameterValueDAO)

Example 47 with StudyParameterValueDAO

use of org.akaza.openclinica.dao.service.StudyParameterValueDAO in project OpenClinica by OpenClinica.

the class AnonymousFormControllerV2 method mayProceed.

private boolean mayProceed(String studyOid) throws Exception {
    boolean accessPermission = false;
    StudyBean siteStudy = getStudy(studyOid);
    StudyBean study = getParentStudy(studyOid);
    StudyParameterValueDAO spvdao = new StudyParameterValueDAO(dataSource);
    StudyParameterValueBean pStatus = spvdao.findByHandleAndStudy(study.getId(), "participantPortal");
    participantPortalRegistrar = new ParticipantPortalRegistrar();
    // ACTIVE , PENDING , INACTIVE
    String pManageStatus = participantPortalRegistrar.getRegistrationStatus(study.getOid()).toString();
    // enabled , disabled
    String participateStatus = pStatus.getValue().toString();
    // available , pending , frozen , locked
    String studyStatus = study.getStatus().getName().toString();
    // available , pending , frozen , locked
    String siteStatus = siteStudy.getStatus().getName().toString();
    System.out.println("pManageStatus: " + pManageStatus + "  participantStatus: " + participateStatus + "   studyStatus: " + studyStatus + "   siteStatus: " + siteStatus);
    logger.info("pManageStatus: " + pManageStatus + "  participantStatus: " + participateStatus + "   studyStatus: " + studyStatus + "   siteStatus: " + siteStatus);
    if (participateStatus.equalsIgnoreCase("enabled") && studyStatus.equalsIgnoreCase("available") && siteStatus.equalsIgnoreCase("available") && pManageStatus.equalsIgnoreCase("ACTIVE")) {
        accessPermission = true;
    }
    return accessPermission;
}
Also used : ParticipantPortalRegistrar(org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar) StudyParameterValueBean(org.akaza.openclinica.bean.service.StudyParameterValueBean) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) StudyParameterValueDAO(org.akaza.openclinica.dao.service.StudyParameterValueDAO)

Example 48 with StudyParameterValueDAO

use of org.akaza.openclinica.dao.service.StudyParameterValueDAO in project OpenClinica by OpenClinica.

the class OdmController method mayProceed.

private boolean mayProceed(String studyOid) throws Exception {
    boolean accessPermission = false;
    StudyBean study = getParentStudy(studyOid);
    StudyParameterValueDAO spvdao = new StudyParameterValueDAO(dataSource);
    StudyParameterValueBean pStatus = spvdao.findByHandleAndStudy(study.getId(), "participantPortal");
    participantPortalRegistrar = new ParticipantPortalRegistrar();
    // ACTIVE ,
    String pManageStatus = participantPortalRegistrar.getRegistrationStatus(studyOid).toString();
    // PENDING ,
    // INACTIVE
    // enabled , disabled
    String participateStatus = pStatus.getValue().toString();
    // available , pending , frozen , locked
    String studyStatus = study.getStatus().getName().toString();
    System.out.println("pManageStatus: " + pManageStatus + "  participantStatus: " + participateStatus + "   studyStatus: " + studyStatus);
    logger.info("pManageStatus: " + pManageStatus + "  participantStatus: " + participateStatus + "   studyStatus: " + studyStatus);
    if (participateStatus.equalsIgnoreCase("enabled") && studyStatus.equalsIgnoreCase("available") && pManageStatus.equalsIgnoreCase("ACTIVE")) {
        accessPermission = true;
    }
    return accessPermission;
}
Also used : ParticipantPortalRegistrar(org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar) StudyParameterValueBean(org.akaza.openclinica.bean.service.StudyParameterValueBean) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) StudyParameterValueDAO(org.akaza.openclinica.dao.service.StudyParameterValueDAO)

Example 49 with StudyParameterValueDAO

use of org.akaza.openclinica.dao.service.StudyParameterValueDAO in project OpenClinica by OpenClinica.

the class OpenRosaServices method mayProceedPreview.

private boolean mayProceedPreview(String studyOid) throws Exception {
    boolean accessPermission = false;
    StudyBean study = getParentStudy(studyOid);
    StudyParameterValueDAO spvdao = new StudyParameterValueDAO(dataSource);
    StudyParameterValueBean pStatus = spvdao.findByHandleAndStudy(study.getId(), "participantPortal");
    participantPortalRegistrar = new ParticipantPortalRegistrar();
    // ACTIVE ,
    String pManageStatus = participantPortalRegistrar.getRegistrationStatus(studyOid).toString();
    // PENDING ,
    // INACTIVE
    // enabled , disabled
    String participateStatus = pStatus.getValue().toString();
    // available , pending , frozen , locked
    String studyStatus = study.getStatus().getName().toString();
    logger.info("pManageStatus: " + pManageStatus + "  participantStatus: " + participateStatus + "   studyStatus: " + studyStatus);
    if (participateStatus.equalsIgnoreCase("enabled") && (studyStatus.equalsIgnoreCase("available") || studyStatus.equalsIgnoreCase("pending") || studyStatus.equalsIgnoreCase("frozen") || studyStatus.equalsIgnoreCase("locked")) && (pManageStatus.equalsIgnoreCase("ACTIVE") || pManageStatus.equalsIgnoreCase("PENDING") || pManageStatus.equalsIgnoreCase("INACTIVE"))) {
        accessPermission = true;
    }
    return accessPermission;
}
Also used : ParticipantPortalRegistrar(org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar) StudyParameterValueBean(org.akaza.openclinica.bean.service.StudyParameterValueBean) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) StudyParameterValueDAO(org.akaza.openclinica.dao.service.StudyParameterValueDAO)

Example 50 with StudyParameterValueDAO

use of org.akaza.openclinica.dao.service.StudyParameterValueDAO in project OpenClinica by OpenClinica.

the class OpenRosaServices method mayProceedSubmission.

private boolean mayProceedSubmission(String studyOid, StudySubjectBean ssBean) throws Exception {
    boolean accessPermission = false;
    StudyBean study = getParentStudy(studyOid);
    StudyParameterValueDAO spvdao = new StudyParameterValueDAO(dataSource);
    StudyParameterValueBean pStatus = spvdao.findByHandleAndStudy(study.getId(), "participantPortal");
    participantPortalRegistrar = new ParticipantPortalRegistrar();
    // ACTIVE ,
    String pManageStatus = participantPortalRegistrar.getRegistrationStatus(studyOid).toString();
    // PENDING ,
    // INACTIVE
    // enabled , disabled
    String participateStatus = pStatus.getValue().toString();
    // available , pending , frozen , locked
    String studyStatus = study.getStatus().getName().toString();
    logger.info("pManageStatus: " + pManageStatus + "  participantStatus: " + participateStatus + "   studyStatus: " + studyStatus + "  studySubjectStatus: " + ssBean.getStatus().getName());
    if (participateStatus.equalsIgnoreCase("enabled") && studyStatus.equalsIgnoreCase("available") && pManageStatus.equalsIgnoreCase("ACTIVE") && ssBean.getStatus() == Status.AVAILABLE) {
        accessPermission = true;
    }
    return accessPermission;
}
Also used : ParticipantPortalRegistrar(org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar) StudyParameterValueBean(org.akaza.openclinica.bean.service.StudyParameterValueBean) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) StudyParameterValueDAO(org.akaza.openclinica.dao.service.StudyParameterValueDAO)

Aggregations

StudyParameterValueDAO (org.akaza.openclinica.dao.service.StudyParameterValueDAO)55 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)37 ArrayList (java.util.ArrayList)36 StudyDAO (org.akaza.openclinica.dao.managestudy.StudyDAO)29 StudyParameterValueBean (org.akaza.openclinica.bean.service.StudyParameterValueBean)28 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)22 FormProcessor (org.akaza.openclinica.control.form.FormProcessor)21 EventDefinitionCRFBean (org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)17 EventDefinitionCRFDAO (org.akaza.openclinica.dao.managestudy.EventDefinitionCRFDAO)16 CRFVersionDAO (org.akaza.openclinica.dao.submit.CRFVersionDAO)16 StudyEventDefinitionDAO (org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO)15 Date (java.util.Date)13 CRFVersionBean (org.akaza.openclinica.bean.submit.CRFVersionBean)13 CRFBean (org.akaza.openclinica.bean.admin.CRFBean)10 ParticipantPortalRegistrar (org.akaza.openclinica.service.pmanage.ParticipantPortalRegistrar)10 CRFDAO (org.akaza.openclinica.dao.admin.CRFDAO)9 HashMap (java.util.HashMap)8 Iterator (java.util.Iterator)7 StudyEventDAO (org.akaza.openclinica.dao.managestudy.StudyEventDAO)7 StudyConfigService (org.akaza.openclinica.dao.service.StudyConfigService)7