Search in sources :

Example 1 with EntityBean

use of org.akaza.openclinica.bean.core.EntityBean in project OpenClinica by OpenClinica.

the class ItemFormMetadataDAO method findByItemIdAndFormLayoutIdNotInIGM.

public ItemFormMetadataBean findByItemIdAndFormLayoutIdNotInIGM(int itemId, int formLayoutId) {
    this.setTypesExpected();
    HashMap<Integer, Integer> variables = new HashMap<Integer, Integer>();
    variables.put(new Integer(1), new Integer(itemId));
    variables.put(new Integer(2), new Integer(formLayoutId));
    EntityBean eb = this.executeFindByPKQuery("findByItemIdAndFormLayoutIdNotInIGM", variables);
    if (!eb.isActive()) {
        return new ItemFormMetadataBean();
    } else {
        return (ItemFormMetadataBean) eb;
    }
}
Also used : HashMap(java.util.HashMap) EntityBean(org.akaza.openclinica.bean.core.EntityBean) ItemFormMetadataBean(org.akaza.openclinica.bean.submit.ItemFormMetadataBean)

Example 2 with EntityBean

use of org.akaza.openclinica.bean.core.EntityBean in project OpenClinica by OpenClinica.

the class ImportDataHelper method createEventCRF.

public EventCRFBean createEventCRF(HashMap<String, String> importedObject) {
    EventCRFBean eventCrfBean = null;
    int studyEventId = importedObject.get("study_event_id") == null ? -1 : Integer.parseInt(importedObject.get("study_event_id"));
    String crfVersionName = importedObject.get("crf_version_name") == null ? "" : importedObject.get("crf_version_name").toString();
    String crfName = importedObject.get("crf_name") == null ? "" : importedObject.get("crf_name").toString();
    String eventDefinitionCRFName = importedObject.get("event_definition_crf_name") == null ? "" : importedObject.get("event_definition_crf_name").toString();
    String subjectName = importedObject.get("subject_name") == null ? "" : importedObject.get("subject_name").toString();
    String studyName = importedObject.get("study_name") == null ? "" : importedObject.get("study_name").toString();
    logger.info("found the following: study event id " + studyEventId + ", crf version name " + crfVersionName + ", crf name " + crfName + ", event def crf name " + eventDefinitionCRFName + ", subject name " + subjectName + ", study name " + studyName);
    // << tbh
    int eventCRFId = 0;
    EventCRFDAO eventCrfDao = new EventCRFDAO(sm.getDataSource());
    StudyDAO studyDao = new StudyDAO(sm.getDataSource());
    StudySubjectDAO studySubjectDao = new StudySubjectDAO(sm.getDataSource());
    StudyEventDefinitionDAO studyEventDefinistionDao = new StudyEventDefinitionDAO(sm.getDataSource());
    CRFVersionDAO crfVersionDao = new CRFVersionDAO(sm.getDataSource());
    StudyEventDAO studyEventDao = new StudyEventDAO(sm.getDataSource());
    CRFDAO crfdao = new CRFDAO(sm.getDataSource());
    SubjectDAO subjectDao = new SubjectDAO(sm.getDataSource());
    StudyBean studyBean = (StudyBean) studyDao.findByName(studyName);
    // .findByPK(studyId);
    // generate the subject bean first, so that we can have the subject id
    // below...
    SubjectBean subjectBean = // .findByUniqueIdentifierAndStudy(subjectName,
    subjectDao.findByUniqueIdentifier(subjectName);
    StudySubjectBean studySubjectBean = studySubjectDao.findBySubjectIdAndStudy(subjectBean.getId(), studyBean);
    // .findByLabelAndStudy(subjectName, studyBean);
    logger.info("::: found study subject id here: " + studySubjectBean.getId() + " with the following: subject ID " + subjectBean.getId() + " study bean name " + studyBean.getName());
    StudyEventBean studyEventBean = (StudyEventBean) studyEventDao.findByPK(studyEventId);
    // TODO need to replace, can't really replace
    logger.info("found study event status: " + studyEventBean.getStatus().getName());
    // [study] event should be scheduled, event crf should be not started
    CRFVersionBean crfVersion = (CRFVersionBean) crfVersionDao.findByFullName(crfVersionName, crfName);
    // .findByPK(crfVersionId);
    // replaced by findByName(name, version)
    logger.info("found crf version name here: " + crfVersion.getName());
    EntityBean crf = crfdao.findByPK(crfVersion.getCrfId());
    logger.info("found crf name here: " + crf.getName());
    // trying it again up here since down there doesn't seem to work, tbh
    StudyEventDefinitionBean studyEventDefinitionBean = (StudyEventDefinitionBean) studyEventDefinistionDao.findByName(eventDefinitionCRFName);
    if (studySubjectBean.getId() <= 0 && studyEventBean.getId() <= 0 && crfVersion.getId() <= 0 && studyBean.getId() <= 0 && studyEventDefinitionBean.getId() <= 0) {
        logger.info("Throw an Exception, One of the provided ids is not valid");
    }
    // >> tbh repeating items:
    ArrayList eventCrfBeans = eventCrfDao.findByEventSubjectVersion(studyEventBean, studySubjectBean, crfVersion);
    // TODO repeating items here? not yet
    if (eventCrfBeans.size() > 1) {
        logger.info("found more than one");
    }
    if (!eventCrfBeans.isEmpty() && eventCrfBeans.size() == 1) {
        eventCrfBean = (EventCRFBean) eventCrfBeans.get(0);
        logger.info("This EventCrfBean was found");
    }
    if (!eventCrfBeans.isEmpty() && eventCrfBeans.size() > 1) {
        logger.info("Throw a System exception , result should either be 0 or 1");
    }
    if (eventCrfBean == null) {
        StudyBean studyWithSED = studyBean;
        if (studyBean.getParentStudyId() > 0) {
            studyWithSED = new StudyBean();
            studyWithSED.setId(studyBean.getParentStudyId());
        }
        AuditableEntityBean studyEvent = studyEventDao.findByPKAndStudy(studyEventId, studyWithSED);
        if (studyEvent.getId() <= 0) {
            logger.info("Hello Exception");
        }
        eventCrfBean = new EventCRFBean();
        // eventCrfBean.setCrfVersion(crfVersion);
        if (eventCRFId == 0) {
            // ???
            if (studyBean.getStudyParameterConfig().getInterviewerNameDefault().equals("blank")) {
                eventCrfBean.setInterviewerName("");
            } else {
                // default will be event's owner name
                eventCrfBean.setInterviewerName(studyEventBean.getOwner().getName());
            }
            if (!studyBean.getStudyParameterConfig().getInterviewDateDefault().equals("blank")) {
                if (studyEventBean.getDateStarted() != null) {
                    // default
                    eventCrfBean.setDateInterviewed(studyEventBean.getDateStarted());
                // date
                } else {
                    // logger.info("evnet start date is null, so date
                    // interviewed is null");
                    eventCrfBean.setDateInterviewed(null);
                }
            } else {
                eventCrfBean.setDateInterviewed(null);
            }
            eventCrfBean.setAnnotations("");
            eventCrfBean.setCreatedDate(new Date());
            eventCrfBean.setCRFVersionId(crfVersion.getId());
            // eventCrfBean.setCrfVersion((CRFVersionBean)crfVersion);
            eventCrfBean.setOwner(ub);
            // eventCrfBean.setCrf((CRFBean)crf);
            eventCrfBean.setStatus(Status.AVAILABLE);
            eventCrfBean.setCompletionStatusId(1);
            // problem with the line below
            eventCrfBean.setStudySubjectId(studySubjectBean.getId());
            eventCrfBean.setStudyEventId(studyEventId);
            eventCrfBean.setValidateString("");
            eventCrfBean.setValidatorAnnotations("");
            try {
                eventCrfBean = (EventCRFBean) eventCrfDao.create(eventCrfBean);
            // TODO review
            // eventCrfBean.setCrfVersion((CRFVersionBean)crfVersion);
            // eventCrfBean.setCrf((CRFBean)crf);
            } catch (Exception ee) {
                logger.info(ee.getMessage());
                logger.info("throws with crf version id " + crfVersion.getId() + " and study event id " + studyEventId + " study subject id " + studySubjectBean.getId());
            }
        // note that you need to catch an exception if the numbers are
        // bogus, ie you can throw an error here
        // however, putting the try catch allows you to pass which is
        // also bad
        // logger.info("CREATED EVENT CRF");
        } else {
            // there is an event CRF already, only need to update
            // is the status not started???
            logger.info("*** already-started event CRF with msg: " + eventCrfBean.getStatus().getName());
            if (eventCrfBean.getStatus().equals(Status.PENDING)) {
                logger.info("Not Started???");
            }
            eventCrfBean = (EventCRFBean) eventCrfDao.findByPK(eventCRFId);
            eventCrfBean.setCRFVersionId(crfVersion.getId());
            eventCrfBean.setUpdatedDate(new Date());
            eventCrfBean.setUpdater(ub);
            eventCrfBean = (EventCRFBean) eventCrfDao.update(eventCrfBean);
        // eventCrfBean.setCrfVersion((CRFVersionBean)crfVersion);
        // eventCrfBean.setCrf((CRFBean)crf);
        }
        if (eventCrfBean.getId() <= 0) {
            logger.info("error");
        } else {
            // TODO change status here, tbh
            // 2/08 this part seems to work, tbh
            studyEventBean.setSubjectEventStatus(SubjectEventStatus.DATA_ENTRY_STARTED);
            studyEventBean.setUpdater(ub);
            studyEventBean.setUpdatedDate(new Date());
            studyEventDao.update(studyEventBean);
        }
    }
    eventCrfBean.setCrfVersion(crfVersion);
    eventCrfBean.setCrf((CRFBean) crf);
    // repeating?
    return eventCrfBean;
}
Also used : EventCRFDAO(org.akaza.openclinica.dao.submit.EventCRFDAO) CRFDAO(org.akaza.openclinica.dao.admin.CRFDAO) CRFVersionDAO(org.akaza.openclinica.dao.submit.CRFVersionDAO) AuditableEntityBean(org.akaza.openclinica.bean.core.AuditableEntityBean) StudySubjectDAO(org.akaza.openclinica.dao.managestudy.StudySubjectDAO) SubjectDAO(org.akaza.openclinica.dao.submit.SubjectDAO) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) ArrayList(java.util.ArrayList) StudyEventDefinitionBean(org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean) StudyEventBean(org.akaza.openclinica.bean.managestudy.StudyEventBean) StudySubjectDAO(org.akaza.openclinica.dao.managestudy.StudySubjectDAO) Date(java.util.Date) SubjectBean(org.akaza.openclinica.bean.submit.SubjectBean) StudySubjectBean(org.akaza.openclinica.bean.managestudy.StudySubjectBean) EventCRFBean(org.akaza.openclinica.bean.submit.EventCRFBean) StudyEventDefinitionDAO(org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO) StudySubjectBean(org.akaza.openclinica.bean.managestudy.StudySubjectBean) StudyEventDAO(org.akaza.openclinica.dao.managestudy.StudyEventDAO) EntityBean(org.akaza.openclinica.bean.core.EntityBean) AuditableEntityBean(org.akaza.openclinica.bean.core.AuditableEntityBean) CRFVersionBean(org.akaza.openclinica.bean.submit.CRFVersionBean) StudyDAO(org.akaza.openclinica.dao.managestudy.StudyDAO) EventCRFDAO(org.akaza.openclinica.dao.submit.EventCRFDAO)

Example 3 with EntityBean

use of org.akaza.openclinica.bean.core.EntityBean in project OpenClinica by OpenClinica.

the class DataEntryServlet method createEventCRF.

/**
 * Creates a new Event CRF or update the exsiting one, that is, an event CRF can be created but not item data yet, in this case, still consider it is not
 * started(called uncompleted before)
 * @param request TODO
 * @param fp TODO
 *
 * @return
 * @throws Exception
 */
private EventCRFBean createEventCRF(HttpServletRequest request, FormProcessor fp) throws InconsistentStateException {
    locale = LocaleResolver.getLocale(request);
    // < resmessage =
    // ResourceBundle.getBundle("org.akaza.openclinica.i18n.page_messages",
    // locale);
    // < restext =
    // ResourceBundle.getBundle("org.akaza.openclinica.i18n.notes",locale);
    // <
    // resexception=ResourceBundle.getBundle(
    // "org.akaza.openclinica.i18n.exceptions",locale);
    UserAccountBean ub = (UserAccountBean) request.getSession().getAttribute(USER_BEAN_NAME);
    StudyBean currentStudy = (StudyBean) request.getSession().getAttribute("study");
    EventCRFBean ecb;
    EventCRFDAO ecdao = new EventCRFDAO(getDataSource());
    int crfVersionId = fp.getInt(INPUT_CRF_VERSION_ID);
    LOGGER.trace("***FOUND*** crfversionid: " + crfVersionId);
    int studyEventId = fp.getInt(INPUT_STUDY_EVENT_ID);
    int eventDefinitionCRFId = fp.getInt(INPUT_EVENT_DEFINITION_CRF_ID);
    int subjectId = fp.getInt(INPUT_SUBJECT_ID);
    int eventCRFId = fp.getInt(INPUT_EVENT_CRF_ID);
    LOGGER.trace("look specifically wrt event crf id: " + eventCRFId);
    LOGGER.trace("Creating event CRF.  Study id: " + currentStudy.getId() + "; CRF Version id: " + crfVersionId + "; Study Event id: " + studyEventId + "; Event Definition CRF id: " + eventDefinitionCRFId + "; Subject: " + subjectId);
    StudySubjectDAO ssdao = new StudySubjectDAO(getDataSource());
    StudySubjectBean ssb = ssdao.findBySubjectIdAndStudy(subjectId, currentStudy);
    if (ssb.getId() <= 0) {
        LOGGER.trace("throwing ISE with study subject bean id of " + ssb.getId());
        // "begin_data_entry_without_event_but_subject"));
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("begin_data_entry_without_event_but_subject"));
    }
    StudyEventDefinitionDAO seddao = new StudyEventDefinitionDAO(getDataSource());
    StudyEventDefinitionBean sedb = seddao.findByEventDefinitionCRFId(eventDefinitionCRFId);
    // logger.trace("study event definition:" + sedb.getId());
    if (sedb.getId() <= 0) {
        addPageMessage(resexception.getString("begin_data_entry_without_event_but_study"), request);
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("begin_data_entry_without_event_but_study"));
    }
    CRFVersionDAO cvdao = new CRFVersionDAO(getDataSource());
    EntityBean eb = cvdao.findByPK(crfVersionId);
    if (eb.getId() <= 0) {
        // addPageMessage(resexception.getString("begin_data_entry_without_event_but_CRF"));
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("begin_data_entry_without_event_but_CRF"));
    }
    StudyEventDAO sedao = new StudyEventDAO(getDataSource());
    StudyEventBean sEvent = (StudyEventBean) sedao.findByPK(studyEventId);
    StudyBean studyWithSED = currentStudy;
    if (currentStudy.getParentStudyId() > 0) {
        studyWithSED = new StudyBean();
        studyWithSED.setId(currentStudy.getParentStudyId());
    }
    AuditableEntityBean aeb = sedao.findByPKAndStudy(studyEventId, studyWithSED);
    if (aeb.getId() <= 0) {
        addPageMessage(resexception.getString("begin_data_entry_without_event_but_especified_event"), request);
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("begin_data_entry_without_event_but_especified_event"));
    }
    ecb = new EventCRFBean();
    if (eventCRFId == 0) {
        // no event CRF created yet
        ArrayList ecList = ecdao.findByEventSubjectVersion(sEvent, ssb, (CRFVersionBean) eb);
        if (ecList.size() > 0) {
            ecb = (EventCRFBean) ecList.get(0);
        } else {
            ecb.setAnnotations("");
            ecb.setCreatedDate(new Date());
            ecb.setCRFVersionId(crfVersionId);
            if (currentStudy.getStudyParameterConfig().getInterviewerNameDefault().equals("blank")) {
                ecb.setInterviewerName("");
            } else {
                // default will be event's owner name
                ecb.setInterviewerName(sEvent.getOwner().getName());
            }
            if (!currentStudy.getStudyParameterConfig().getInterviewDateDefault().equals("blank")) {
                if (sEvent.getDateStarted() != null) {
                    // default
                    ecb.setDateInterviewed(sEvent.getDateStarted());
                // date
                } else {
                    // logger.trace("evnet start date is null, so date
                    // interviewed is null");
                    ecb.setDateInterviewed(null);
                }
            } else {
                ecb.setDateInterviewed(null);
            // logger.trace("date interviewed is
            // null,getInterviewDateDefault() is blank");
            }
            // ecb.setOwnerId(ub.getId());
            // above depreciated, try without it, tbh
            ecb.setOwner(ub);
            ecb.setStatus(Status.AVAILABLE);
            ecb.setCompletionStatusId(1);
            ecb.setStudySubjectId(ssb.getId());
            ecb.setStudyEventId(studyEventId);
            ecb.setValidateString("");
            ecb.setValidatorAnnotations("");
            ecb = (EventCRFBean) ecdao.create(ecb);
            LOGGER.debug("*********CREATED EVENT CRF");
        }
    } else {
        // there is an event CRF already, only need to update
        ecb = (EventCRFBean) ecdao.findByPK(eventCRFId);
        ecb.setCRFVersionId(crfVersionId);
        ecb.setUpdatedDate(new Date());
        ecb.setUpdater(ub);
        ecb = updateECB(sEvent, request);
        ecb = (EventCRFBean) ecdao.update(ecb);
    }
    if (ecb.getId() <= 0) {
        addPageMessage(resexception.getString("new_event_CRF_not_created"), request);
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("new_event_CRF_not_created"));
    } else {
        if (sEvent.getSubjectEventStatus().equals(SubjectEventStatus.SIGNED)) {
            sEvent.setSubjectEventStatus(SubjectEventStatus.COMPLETED);
            sEvent.setUpdater(ub);
            sEvent.setUpdatedDate(new Date());
            sedao.update(sEvent);
        } else {
            sEvent.setSubjectEventStatus(SubjectEventStatus.DATA_ENTRY_STARTED);
            sEvent.setUpdater(ub);
            sEvent.setUpdatedDate(new Date());
            sedao.update(sEvent);
        }
    }
    return ecb;
}
Also used : CRFVersionDAO(org.akaza.openclinica.dao.submit.CRFVersionDAO) AuditableEntityBean(org.akaza.openclinica.bean.core.AuditableEntityBean) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) ArrayList(java.util.ArrayList) StudyEventDefinitionBean(org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean) StudyEventBean(org.akaza.openclinica.bean.managestudy.StudyEventBean) StudySubjectDAO(org.akaza.openclinica.dao.managestudy.StudySubjectDAO) InconsistentStateException(org.akaza.openclinica.web.InconsistentStateException) Date(java.util.Date) EventCRFBean(org.akaza.openclinica.bean.submit.EventCRFBean) StudySubjectBean(org.akaza.openclinica.bean.managestudy.StudySubjectBean) StudyEventDefinitionDAO(org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO) EntityBean(org.akaza.openclinica.bean.core.EntityBean) AuditableEntityBean(org.akaza.openclinica.bean.core.AuditableEntityBean) StudyEventDAO(org.akaza.openclinica.dao.managestudy.StudyEventDAO) UserAccountBean(org.akaza.openclinica.bean.login.UserAccountBean) EventCRFDAO(org.akaza.openclinica.dao.submit.EventCRFDAO)

Example 4 with EntityBean

use of org.akaza.openclinica.bean.core.EntityBean in project OpenClinica by OpenClinica.

the class TableOfContentsServlet method createEventCRF.

/**
 * Creates a new Event CRF or update the exsiting one, that is, an event CRF
 * can be created but not item data yet, in this case, still consider it is
 * not started(called uncompleted before)
 *
 * @return
 * @throws Exception
 */
private EventCRFBean createEventCRF() throws Exception {
    EventCRFBean ecb;
    ecdao = new EventCRFDAO(sm.getDataSource());
    int crfVersionId = fp.getInt(INPUT_CRF_VERSION_ID);
    int studyEventId = fp.getInt(INPUT_STUDY_EVENT_ID);
    int eventDefinitionCRFId = fp.getInt(INPUT_EVENT_DEFINITION_CRF_ID);
    int subjectId = fp.getInt(INPUT_SUBJECT_ID);
    int eventCRFId = fp.getInt(INPUT_EVENT_CRF_ID);
    logger.info("Creating event CRF within Table of Contents.  Study id: " + currentStudy.getId() + "; CRF Version id: " + crfVersionId + "; Study Event id: " + studyEventId + "; Event Definition CRF id: " + eventDefinitionCRFId + "; Subject: " + subjectId);
    StudySubjectDAO ssdao = new StudySubjectDAO(sm.getDataSource());
    StudySubjectBean ssb = ssdao.findBySubjectIdAndStudy(subjectId, currentStudy);
    if (!ssb.isActive()) {
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("trying_to_begin_DE1"));
    }
    StudyEventDefinitionDAO seddao = new StudyEventDefinitionDAO(sm.getDataSource());
    StudyEventDefinitionBean sedb = seddao.findByEventDefinitionCRFId(eventDefinitionCRFId);
    if (!ssb.isActive() || !sedb.isActive()) {
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("trying_to_begin_DE2"));
    }
    CRFVersionDAO cvdao = new CRFVersionDAO(sm.getDataSource());
    EntityBean eb = cvdao.findByPK(crfVersionId);
    if (!eb.isActive()) {
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("trying_to_begin_DE3"));
    }
    StudyEventDAO sedao = new StudyEventDAO(sm.getDataSource());
    StudyEventBean sEvent = (StudyEventBean) sedao.findByPK(studyEventId);
    StudyBean studyWithSED = currentStudy;
    if (currentStudy.getParentStudyId() > 0) {
        studyWithSED = new StudyBean();
        studyWithSED.setId(currentStudy.getParentStudyId());
    }
    AuditableEntityBean aeb = sedao.findByPKAndStudy(studyEventId, studyWithSED);
    if (!aeb.isActive()) {
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("trying_to_begin_DE4"));
    }
    ecb = new EventCRFBean();
    if (eventCRFId == 0) {
        // no event CRF created yet
        ecb.setAnnotations("");
        ecb.setCreatedDate(new Date());
        ecb.setCRFVersionId(crfVersionId);
        ecb.setInterviewerName("");
        if (sEvent.getDateStarted() != null) {
            // default date
            ecb.setDateInterviewed(sEvent.getDateStarted());
        } else {
            ecb.setDateInterviewed(null);
        }
        ecb.setOwnerId(ub.getId());
        ecb.setStatus(Status.AVAILABLE);
        ecb.setCompletionStatusId(1);
        ecb.setStudySubjectId(ssb.getId());
        ecb.setStudyEventId(studyEventId);
        ecb.setValidateString("");
        ecb.setValidatorAnnotations("");
        ecb = (EventCRFBean) ecdao.create(ecb);
        logger.info("CREATED EVENT CRF");
    } else {
        // there is an event CRF already, only need to update
        ecb = (EventCRFBean) ecdao.findByPK(eventCRFId);
        ecb.setCRFVersionId(crfVersionId);
        ecb.setUpdatedDate(new Date());
        ecb.setUpdater(ub);
        ecb = (EventCRFBean) ecdao.update(ecb);
    }
    if (!ecb.isActive()) {
        throw new InconsistentStateException(Page.LIST_STUDY_SUBJECTS_SERVLET, resexception.getString("new_event_CRF_not_created_database_error"));
    } else {
        sEvent.setSubjectEventStatus(SubjectEventStatus.DATA_ENTRY_STARTED);
        sEvent.setUpdater(ub);
        sEvent.setUpdatedDate(new Date());
        sedao.update(sEvent);
    }
    return ecb;
}
Also used : CRFVersionDAO(org.akaza.openclinica.dao.submit.CRFVersionDAO) AuditableEntityBean(org.akaza.openclinica.bean.core.AuditableEntityBean) StudyBean(org.akaza.openclinica.bean.managestudy.StudyBean) StudyEventDefinitionBean(org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean) StudyEventBean(org.akaza.openclinica.bean.managestudy.StudyEventBean) StudySubjectDAO(org.akaza.openclinica.dao.managestudy.StudySubjectDAO) InconsistentStateException(org.akaza.openclinica.web.InconsistentStateException) Date(java.util.Date) EventCRFBean(org.akaza.openclinica.bean.submit.EventCRFBean) DisplayEventCRFBean(org.akaza.openclinica.bean.submit.DisplayEventCRFBean) StudySubjectBean(org.akaza.openclinica.bean.managestudy.StudySubjectBean) StudyEventDefinitionDAO(org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO) EntityBean(org.akaza.openclinica.bean.core.EntityBean) AuditableEntityBean(org.akaza.openclinica.bean.core.AuditableEntityBean) StudyEventDAO(org.akaza.openclinica.dao.managestudy.StudyEventDAO) EventCRFDAO(org.akaza.openclinica.dao.submit.EventCRFDAO)

Example 5 with EntityBean

use of org.akaza.openclinica.bean.core.EntityBean in project OpenClinica by OpenClinica.

the class Table method showTable.

/**
 * @deprecated
 */
@Deprecated
public String showTable() {
    if (rows.size() <= 0) {
        return "<p><i>There are no " + getEntitiesNamePlural() + " available for display.</i></p>";
    }
    String table = showHeader();
    Iterator rowsIt = rows.iterator();
    while (rowsIt.hasNext()) {
        EntityBean e = (EntityBean) rowsIt.next();
        table += showRow(e);
    }
    table += showFooter();
    return table;
}
Also used : EntityBean(org.akaza.openclinica.bean.core.EntityBean) Iterator(java.util.Iterator)

Aggregations

EntityBean (org.akaza.openclinica.bean.core.EntityBean)20 HashMap (java.util.HashMap)10 ArrayList (java.util.ArrayList)7 Iterator (java.util.Iterator)7 AuditableEntityBean (org.akaza.openclinica.bean.core.AuditableEntityBean)4 StudyEventDAO (org.akaza.openclinica.dao.managestudy.StudyEventDAO)4 StudyEventDefinitionDAO (org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO)4 StudySubjectDAO (org.akaza.openclinica.dao.managestudy.StudySubjectDAO)4 Date (java.util.Date)3 Map (java.util.Map)3 Set (java.util.Set)3 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)3 StudyEventBean (org.akaza.openclinica.bean.managestudy.StudyEventBean)3 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)3 StudySubjectBean (org.akaza.openclinica.bean.managestudy.StudySubjectBean)3 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)3 ItemDataBean (org.akaza.openclinica.bean.submit.ItemDataBean)3 CRFVersionDAO (org.akaza.openclinica.dao.submit.CRFVersionDAO)3 EventCRFDAO (org.akaza.openclinica.dao.submit.EventCRFDAO)3 UserAccountBean (org.akaza.openclinica.bean.login.UserAccountBean)2