Java 类ims.core.vo.PasEventAdmitVo 实例源码

项目:openMAXIMS    文件:Logic.java   
private CareContextAdmitVo createCareContext(EpisodeOfCareAdmitVo episodeOfCare, ContextType contextType, PasEventAdmitVo pasEvent, DateTime startDateTime, Date estimatedDischargeDate, HcpRefVo responsibleHCP, ContactLocation locationType, String bedNumber)
{
    CareContextAdmitVo careContext = new CareContextAdmitVo();

    careContext.setContext(contextType);

    careContext.setStartDateTime(startDateTime);
    careContext.setEndDateTime(null);

    careContext.setResponsibleHCP(responsibleHCP);
    careContext.setEpisodeOfCare(episodeOfCare);

    careContext.setPasEvent(pasEvent);
    careContext.setBedNumber(bedNumber);
    careContext.setEstimatedDischargeDate(estimatedDischargeDate);

    CareContextStatusHistoryVo firstStatus = new CareContextStatusHistoryVo();
    firstStatus.setStatus(CareContextStatus.OPEN);
    firstStatus.setStatusDateTime(startDateTime);

    careContext.setCurrentStatus(firstStatus);
    careContext.setStatusHistory(new CareContextStatusHistoryVoCollection());
    careContext.getStatusHistory().add(firstStatus);

    if (episodeOfCare.getCareContexts() == null) episodeOfCare.setCareContexts(new CareContextAdmitVoCollection());
    episodeOfCare.getCareContexts().add(careContext);

    return careContext;
}
项目:openMAXIMS    文件:Logic.java   
private PasEventAdmitVo getPasEvent()
{
    if(form.lyrAdmission().tabBooked().isVisible()
        && form.lyrAdmission().tabBooked().grdElective().getValue() != null)
    {
        return form.lyrAdmission().tabBooked().grdElective().getValue().getPasEvent();
    }
    else if (form.lyrAdmission().tabEDEmergency().isVisible()
        &&form.lyrAdmission().tabEDEmergency().grdEmergency().getValue() != null 
        && form.lyrAdmission().tabEDEmergency().grdEmergency().getValue().getAssociatedPendingEmergencyAdmissionIsNotNull())
    {
            return form.lyrAdmission().tabEDEmergency().grdEmergency().getValue().getAssociatedPendingEmergencyAdmission().getPasEvent();
    }
    else if(form.lyrAdmission().tabPlanned().isVisible()
        &&form.lyrAdmission().tabPlanned().grdTCI().getValue() != null)
    {
        return form.lyrAdmission().tabPlanned().grdTCI().getValue().getPasEvent();
    }
    else if (form.lyrAdmission().tabPendingEmergency().isVisible())
    {
        CatsReferralPendingAdmissionAdmitVo pendingEmergencyAdmission = domain.getPendingEmergencyAdmission(form.lyrAdmission().tabPendingEmergency().grdPendingEmergencyAdmission().getValue());
        if (pendingEmergencyAdmission != null&&pendingEmergencyAdmission.getCareContext()!=null)
        {
            // Set the Pas Event
            return pendingEmergencyAdmission.getCareContext().getPasEvent();
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private CareContextAdmitVo createCareContext(EpisodeOfCareAdmitVo episodeOfCare, ContextType contextType, PasEventAdmitVo pasEvent, DateTime startDateTime, Date estimatedDischargeDate, HcpRefVo responsibleHCP, ContactLocation locationType, String bedNumber)
{
    CareContextAdmitVo careContext = new CareContextAdmitVo();

    careContext.setContext(contextType);

    careContext.setStartDateTime(startDateTime);
    careContext.setEndDateTime(null);

    careContext.setResponsibleHCP(responsibleHCP);
    careContext.setEpisodeOfCare(episodeOfCare);

    careContext.setPasEvent(pasEvent);
    careContext.setBedNumber(bedNumber);
    careContext.setEstimatedDischargeDate(estimatedDischargeDate);

    CareContextStatusHistoryVo firstStatus = new CareContextStatusHistoryVo();
    firstStatus.setStatus(CareContextStatus.OPEN);
    firstStatus.setStatusDateTime(startDateTime);

    careContext.setCurrentStatus(firstStatus);
    careContext.setStatusHistory(new CareContextStatusHistoryVoCollection());
    careContext.getStatusHistory().add(firstStatus);

    if (episodeOfCare.getCareContexts() == null) episodeOfCare.setCareContexts(new CareContextAdmitVoCollection());
    episodeOfCare.getCareContexts().add(careContext);

    return careContext;
}
项目:openMAXIMS    文件:AdmitToWardImpl.java   
@Override
//http://jira/browse/WDEV-22615
public AdmissionDetailVo getAdmissionDetail(PasEventAdmitVo pasEvent)
{
    BedAdmissionComponent implBedAdmissionComponent = (BedAdmissionComponent) getDomainImpl(BedAdmissionComponentImpl.class);
    return implBedAdmissionComponent.getAdmissionDetailByPasEvent(pasEvent);
}
项目:AvoinApotti    文件:Logic.java   
private AdmissionDetailVo createAdmissionDetails(PatientShort patient)
{
    // Fill in data into PatientElectiveList.TCIDetails.AdmissionDetail record - create a new one if needed
    AdmissionDetailVo admissionDetails = new AdmissionDetailVo();

        PasEventAdmitVo pasEvent = new PasEventAdmitVo();

        if (form.ccConsultant().getValue() != null)
            pasEvent.setConsultant(domain.getMedic(new HcpRefVo(form.ccConsultant().getValue().getIMosHcpId(), 0)));
        else
            pasEvent.setConsultant(null);

        pasEvent.setEventDateTime(form.dtimAdmit().getValue());
        pasEvent.setEventType(PasEventType.EMERGENCY);
        pasEvent.setLocation(form.cmbWard().getValue());
        patient.setWard(form.cmbWard().getValue());
        pasEvent.setPatient(patient);
        pasEvent.setSpecialty(form.cmbSpecialty().getValue());
        pasEvent.setPasEventId(patient.getID_Patient().toString() + pasEvent.getEventDateTime().toString(DateTimeFormat.ISO));
        pasEvent.setSourceOfReferral(form.cmbSourceOfReferral().getValue());

        admissionDetails.setPasEvent(pasEvent);


    admissionDetails.setAdmissionDateTime(form.dtimAdmit().getValue());
    admissionDetails.setWard(form.cmbWard().getValue());
    if (form.getGlobalContext().Core.getSelectedBedSpaceState() != null)
        admissionDetails.setBed(form.getGlobalContext().Core.getSelectedBedSpaceState().getBedSpace());

    if (form.ccConsultant().getValue() != null)
        admissionDetails.setConsultant(domain.getMedic(new HcpRefVo(form.ccConsultant().getValue().getIMosHcpId(), 0)));
    else
        admissionDetails.setConsultant(null);

    admissionDetails.setSpecialty(form.cmbSpecialty().getValue());
    admissionDetails.setWardType(form.cmbWardType().getValue());
    admissionDetails.setMethodOfAdmission(form.cmbMethod().getValue());
    admissionDetails.setSourceOfAdmission(form.cmbSource().getValue());
    admissionDetails.setReasonForAdmission(form.txtReason().getValue());
    admissionDetails.setEstDischargeDate(form.dteEstDischarge().getValue());
    admissionDetails.setIsChaplainRequired(form.chkChaplain().getValue());
    admissionDetails.setReferringConsultant(form.ccReferringConsultant().getValue());
    admissionDetails.setPatientStatus(form.cmbPatientStatus().getValue());
    admissionDetails.setAnticipatedStay(form.intAntStay().getValue());

    return admissionDetails;
}
项目:openMAXIMS    文件:Logic.java   
private AdmissionDetailVo createAdmissionDetails(PatientLite_IdentifiersVo patient)
{
    // Fill in data into PatientElectiveList.TCIDetails.AdmissionDetail record - create a new one if needed
    AdmissionDetailVo admissionDetails = new AdmissionDetailVo();

        PasEventAdmitVo pasEvent = new PasEventAdmitVo();

        if (form.qmbConsultant().getValue() != null) //WDEV-23376
        {   
            MedicVo medicVo = domain.getMedic(form.qmbConsultant().getValue().toHcpRefVo());
            pasEvent.setConsultant(new MedicRefVo(medicVo.getID_Hcp(), medicVo.getVersion_Hcp()));
        }   
        else
            pasEvent.setConsultant(null);

        pasEvent.setEventDateTime(form.dtimAdmit().getValue());
        pasEvent.setEventType(PasEventType.EMERGENCY);
        pasEvent.setLocation(form.cmbWard().getValue());
        patient.setWard(form.cmbWard().getValue());
        pasEvent.setPatient(patient);
        pasEvent.setSpecialty(form.cmbSpecialty().getValue());
        pasEvent.setPasEventId(patient.getID_Patient().toString() + pasEvent.getEventDateTime().toString(DateTimeFormat.ISO));
        pasEvent.setSourceOfReferral(form.cmbSourceOfReferral().getValue());
        pasEvent.setService(form.qmbService().getValue()); //WDEV-20910

        admissionDetails.setPasEvent(pasEvent);


    admissionDetails.setAdmissionDateTime(form.dtimAdmit().getValue());
    admissionDetails.setWard(form.cmbWard().getValue());
    admissionDetails.setAdmissionWard(form.cmbWard().getValue());

    if (form.getGlobalContext().Core.getSelectedBedSpaceState() != null)
        admissionDetails.setBed(form.getGlobalContext().Core.getSelectedBedSpaceState().getBedSpace());

    if (form.qmbConsultant().getValue() != null)
        admissionDetails.setConsultant(domain.getMedic(new HcpRefVo(form.qmbConsultant().getValue().getIMosHcpId(), 0)));
    else
        admissionDetails.setConsultant(null);

    admissionDetails.setSpecialty(form.cmbSpecialty().getValue());
    admissionDetails.setWardType(form.cmbWardType().getValue());
    admissionDetails.setMethodOfAdmission(form.cmbMethod().getValue());
    admissionDetails.setSourceOfAdmission(form.cmbSource().getValue());
    admissionDetails.setReasonForAdmission(form.txtReason().getValue());
    admissionDetails.setEstDischargeDate(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS") ? form.dtimEstDischarge().getValue() : (form.dteEstDischarge().getValue() != null ? new DateTime(form.dteEstDischarge().getValue(), new Time(0,0)) : null));
    admissionDetails.setIsChaplainRequired(form.chkChaplain().getValue());
    admissionDetails.setSourceOfEmergencyReferral(form.cmbSourceOfEmergencyReferral().getValue());
    admissionDetails.setReferringConsultant((MedicVo) form.ccReferringConsultant().getValue());
    admissionDetails.setPatientStatus(form.cmbPatientStatus().getValue());
    admissionDetails.setAnticipatedStay(form.intAntStay().getValue());
    admissionDetails.setIsMaternity(form.chkIsMaternity().getValue());
    //WDEV-20323 On Admission, service needs to be saved alongside the specialty - this will be saved in Admission Detail and Consultant Stay
    admissionDetails.setService(form.qmbService().getValue()); //WDEV-20323
    if (ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"))
    {   
        admissionDetails.setSelfAdmitPatient(form.chkSelfAdmitPatient().getValue());
        admissionDetails.setHealthyLodgerDetails(form.getGlobalContext().Core.getHealthyLodgerDetails());
    }   

    admissionDetails.setUpdateCFL(form.CaseFolderYesNo().getValue() != null && form.CaseFolderYesNo().getValue().equals(CaseFolderYesNoEnumeration.rdoYes));

    return admissionDetails;
}
项目:openMAXIMS    文件:Logic.java   
private AdmissionDetailVo createAdmissionDetails(PatientShort patient)
{
    // Fill in data into PatientElectiveList.TCIDetails.AdmissionDetail record - create a new one if needed
    AdmissionDetailVo admissionDetails = new AdmissionDetailVo();

        PasEventAdmitVo pasEvent = new PasEventAdmitVo();

        if (form.ccConsultant().getValue() != null)
            pasEvent.setConsultant(domain.getMedic(new HcpRefVo(form.ccConsultant().getValue().getIMosHcpId(), 0)));
        else
            pasEvent.setConsultant(null);

        pasEvent.setEventDateTime(form.dtimAdmit().getValue());
        pasEvent.setEventType(PasEventType.EMERGENCY);
        pasEvent.setLocation(form.cmbWard().getValue());
        patient.setWard(form.cmbWard().getValue());
        pasEvent.setPatient(patient);
        pasEvent.setSpecialty(form.cmbSpecialty().getValue());
        pasEvent.setPasEventId(patient.getID_Patient().toString() + pasEvent.getEventDateTime().toString(DateTimeFormat.ISO));
        pasEvent.setSourceOfReferral(form.cmbSourceOfReferral().getValue());

        admissionDetails.setPasEvent(pasEvent);


    admissionDetails.setAdmissionDateTime(form.dtimAdmit().getValue());
    admissionDetails.setWard(form.cmbWard().getValue());
    if (form.getGlobalContext().Core.getSelectedBedSpaceState() != null)
        admissionDetails.setBed(form.getGlobalContext().Core.getSelectedBedSpaceState().getBedSpace());

    if (form.ccConsultant().getValue() != null)
        admissionDetails.setConsultant(domain.getMedic(new HcpRefVo(form.ccConsultant().getValue().getIMosHcpId(), 0)));
    else
        admissionDetails.setConsultant(null);

    admissionDetails.setSpecialty(form.cmbSpecialty().getValue());
    admissionDetails.setWardType(form.cmbWardType().getValue());
    admissionDetails.setMethodOfAdmission(form.cmbMethod().getValue());
    admissionDetails.setSourceOfAdmission(form.cmbSource().getValue());
    admissionDetails.setReasonForAdmission(form.txtReason().getValue());
    admissionDetails.setEstDischargeDate(form.dteEstDischarge().getValue());
    admissionDetails.setIsChaplainRequired(form.chkChaplain().getValue());
    admissionDetails.setReferringConsultant(form.ccReferringConsultant().getValue());
    admissionDetails.setPatientStatus(form.cmbPatientStatus().getValue());
    admissionDetails.setAnticipatedStay(form.intAntStay().getValue());

    return admissionDetails;
}
项目:openmaxims-linux    文件:Logic.java   
private AdmissionDetailVo createAdmissionDetails(PatientShort patient)
{
    // Fill in data into PatientElectiveList.TCIDetails.AdmissionDetail record - create a new one if needed
    AdmissionDetailVo admissionDetails = new AdmissionDetailVo();

        PasEventAdmitVo pasEvent = new PasEventAdmitVo();

        if (form.ccConsultant().getValue() != null)
            pasEvent.setConsultant(domain.getMedic(new HcpRefVo(form.ccConsultant().getValue().getIMosHcpId(), 0)));
        else
            pasEvent.setConsultant(null);

        pasEvent.setEventDateTime(form.dtimAdmit().getValue());
        pasEvent.setEventType(PasEventType.EMERGENCY);
        pasEvent.setLocation(form.cmbWard().getValue());
        patient.setWard(form.cmbWard().getValue());
        pasEvent.setPatient(patient);
        pasEvent.setSpecialty(form.cmbSpecialty().getValue());
        pasEvent.setPasEventId(patient.getID_Patient().toString() + pasEvent.getEventDateTime().toString(DateTimeFormat.ISO));
        pasEvent.setSourceOfReferral(form.cmbSourceOfReferral().getValue());

        admissionDetails.setPasEvent(pasEvent);


    admissionDetails.setAdmissionDateTime(form.dtimAdmit().getValue());
    admissionDetails.setWard(form.cmbWard().getValue());
    if (form.getGlobalContext().Core.getSelectedBedSpaceState() != null)
        admissionDetails.setBed(form.getGlobalContext().Core.getSelectedBedSpaceState().getBedSpace());

    if (form.ccConsultant().getValue() != null)
        admissionDetails.setConsultant(domain.getMedic(new HcpRefVo(form.ccConsultant().getValue().getIMosHcpId(), 0)));
    else
        admissionDetails.setConsultant(null);

    admissionDetails.setSpecialty(form.cmbSpecialty().getValue());
    admissionDetails.setWardType(form.cmbWardType().getValue());
    admissionDetails.setMethodOfAdmission(form.cmbMethod().getValue());
    admissionDetails.setSourceOfAdmission(form.cmbSource().getValue());
    admissionDetails.setReasonForAdmission(form.txtReason().getValue());
    admissionDetails.setEstDischargeDate(form.dteEstDischarge().getValue());
    admissionDetails.setIsChaplainRequired(form.chkChaplain().getValue());
    admissionDetails.setReferringConsultant(form.ccReferringConsultant().getValue());
    admissionDetails.setPatientStatus(form.cmbPatientStatus().getValue());
    admissionDetails.setAnticipatedStay(form.intAntStay().getValue());

    return admissionDetails;
}