Search in sources :

Example 1 with DatasetItemStatus

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

the class DatasetDAO method getEntityFromHashMap.

public Object getEntityFromHashMap(HashMap hm) {
    DatasetBean eb = new DatasetBean();
    this.setEntityAuditInformation(eb, hm);
    eb.setDescription((String) hm.get("description"));
    eb.setStudyId(((Integer) hm.get("study_id")).intValue());
    eb.setName((String) hm.get("name"));
    eb.setId(((Integer) hm.get("dataset_id")).intValue());
    eb.setSQLStatement((String) hm.get("sql_statement"));
    eb.setNumRuns(((Integer) hm.get("num_runs")).intValue());
    eb.setDateStart((Date) hm.get("date_start"));
    eb.setDateEnd((Date) hm.get("date_end"));
    eb.setApproverId(((Integer) hm.get("approver_id")).intValue());
    eb.setDateLastRun((Date) hm.get("date_last_run"));
    eb.setShowEventEnd(((Boolean) hm.get("show_event_end")).booleanValue());
    eb.setShowEventStart(((Boolean) hm.get("show_event_start")).booleanValue());
    eb.setShowEventLocation(((Boolean) hm.get("show_event_location")).booleanValue());
    eb.setShowSubjectDob(((Boolean) hm.get("show_subject_dob")).booleanValue());
    eb.setShowSubjectGender(((Boolean) hm.get("show_subject_gender")).booleanValue());
    eb.setShowEventStatus(((Boolean) hm.get("show_event_status")).booleanValue());
    eb.setShowSubjectStatus(((Boolean) hm.get("show_subject_status")).booleanValue());
    eb.setShowSubjectUniqueIdentifier(((Boolean) hm.get("show_subject_unique_id")).booleanValue());
    eb.setShowSubjectAgeAtEvent(((Boolean) hm.get("show_subject_age_at_event")).booleanValue());
    eb.setShowCRFstatus(((Boolean) hm.get("show_crf_status")).booleanValue());
    eb.setShowCRFversion(((Boolean) hm.get("show_crf_version")).booleanValue());
    eb.setShowCRFinterviewerName(((Boolean) hm.get("show_crf_int_name")).booleanValue());
    eb.setShowCRFinterviewerDate(((Boolean) hm.get("show_crf_int_date")).booleanValue());
    eb.setShowSubjectGroupInformation(((Boolean) hm.get("show_group_info")).booleanValue());
    // eb.setShowDiscrepancyInformation(((Boolean)
    // hm.get("show_disc_info")).booleanValue());
    // do we want to find group info here? looks like the best place for
    // non-repeats...
    // if (eb.isShowSubjectGroupInformation()) {
    eb.setSubjectGroupIds(getGroupIds(eb.getId()));
    // }
    eb.setODMMetaDataVersionName((String) hm.get("odm_metadataversion_name"));
    eb.setODMMetaDataVersionOid((String) hm.get("odm_metadataversion_oid"));
    eb.setODMPriorStudyOid((String) hm.get("odm_prior_study_oid"));
    eb.setODMPriorMetaDataVersionOid((String) hm.get("odm_prior_metadataversion_oid"));
    eb.setShowSubjectSecondaryId((Boolean) hm.get("show_secondary_id"));
    int isId = ((Integer) hm.get("dataset_item_status_id")).intValue();
    isId = isId > 0 ? isId : 1;
    DatasetItemStatus dis = DatasetItemStatus.get(isId);
    eb.setDatasetItemStatus(dis);
    return eb;
}
Also used : DatasetBean(org.akaza.openclinica.bean.extract.DatasetBean) DatasetItemStatus(org.akaza.openclinica.bean.core.DatasetItemStatus)

Aggregations

DatasetItemStatus (org.akaza.openclinica.bean.core.DatasetItemStatus)1 DatasetBean (org.akaza.openclinica.bean.extract.DatasetBean)1