Java 类ims.core.vo.lookups.MethodOfAdmission 实例源码

项目:openMAXIMS    文件:Logic.java   
private MethodOfAdmission getMethodOfAdmissionFromElectiveAdmissionData(PatientElectiveListBedAdmissionVo patientElectiveList)
{
    if (patientElectiveList == null)
        return null;
    if (ElectiveAdmissionType.ELECTIVE_TYPE11.equals(patientElectiveList.getElectiveAdmissionType()))
        return MethodOfAdmission.WAITING_LIST;
    if (ElectiveAdmissionType.BOOKED_TYPE12.equals(patientElectiveList.getElectiveAdmissionType()))
        return MethodOfAdmission.BOOKED;
    if (ElectiveAdmissionType.PLANNED_TYPE13.equals(patientElectiveList.getElectiveAdmissionType()))
        return MethodOfAdmission.PLANNED;
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromElectiveAdmissionData(PatientElectiveListBedAdmissionVo patientElectiveList, boolean isBooked)
    {
        form.getLocalContext().setAdmissionDetail(null);
        clearScreen();
        showExtraUIControls_ElectiveList();

        if (patientElectiveList == null)
            return;

        if (patientElectiveList.getTCIDetails() != null 
            && patientElectiveList.getTCIDetails().getTCIWardIsNotNull())
        {
            form.cmbWard().newRow(patientElectiveList.getTCIDetails().getTCIWard(), patientElectiveList.getTCIDetails().getTCIWard().getName());
            form.cmbWard().setValue(patientElectiveList.getTCIDetails().getTCIWard());
        }

        form.cmbWardType().setValue(null);

        form.ccConsultant().setValue(patientElectiveList.getConsultant());

        if (patientElectiveList.getElectiveList() != null && patientElectiveList.getElectiveList().getService() != null && patientElectiveList.getElectiveList().getService().getSpecialty() != null)
        {
            form.cmbSpecialty().newRow(patientElectiveList.getElectiveList().getService().getSpecialty(), patientElectiveList.getElectiveList().getService().getSpecialty().getText());
            form.cmbSpecialty().setValue(patientElectiveList.getElectiveList().getService().getSpecialty());
        }

        form.cmbMethod().setValue(MethodOfAdmission.BOOKED);
        form.cmbSource().setValue(null);
//      form.cmbPatientStatus().setValue(patientElectiveList.getPatientStatus());

        if (patientElectiveList.getTCIDetails() != null)
        {
            if (patientElectiveList.getTCIDetails().getTCITime() != null)
                form.dtimAdmit().setValue(new DateTime(patientElectiveList.getTCIDetails().getTCIDate(), patientElectiveList.getTCIDetails().getTCITime()));
            else
                form.dtimAdmit().setValue(new DateTime(patientElectiveList.getTCIDetails().getTCIDate(), new Time(0, 0, 0)));

            form.intAntStay().setValue(patientElectiveList.getAnticipatedStay());
            form.dteEstDischarge().setValue(calculateEstimateDischarge(patientElectiveList.getTCIDetails().getTCIDate(), patientElectiveList.getAnticipatedStay()));
            form.txtReason().setValue(patientElectiveList.getTCIDetails().getBedManagerComment());
        }

        form.cmbSourceOfReferral().setValue(null);
        form.ccReferringConsultant().setValue(null);
    }
项目:openMAXIMS    文件:Logic.java   
private void initiateDischarge()
{
    InpatientEpisodeLiteVo voInpat = null;
    AdmissionDetailVo currentAdmissionDetail = form.getLocalContext().getAdmissionDetails();

    if (form.getGlobalContext().Core.getSelectedBedSpaceStateIsNotNull())
    {
        BedSpaceStateLiteVo voBedSpaceState = (BedSpaceStateLiteVo) form.getGlobalContext().Core.getSelectedBedSpaceState().clone();
        voInpat = voBedSpaceState.getInpatientEpisode();
    }
    else if (form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull())
        voInpat = form.getGlobalContext().Core.getSelectedWaitingAreaPatient();
    else throw new CodingRuntimeException("Check GC population");

    boolean uiValidationForDischarge = getUIValidationForDischarge();
    if (!uiValidationForDischarge)
        return;

    PatientElectiveListBedAdmissionVo patientElectiveList = null;
    if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue()))
    {
        patientElectiveList = domain.getPatientElectiveListForDischarge(voInpat.getPasEvent());

        if (patientElectiveList != null)
        {
            patientElectiveList = populatePatientElectiveListForDischarge(voInpat, patientElectiveList);

            form.getLocalContext().setPatientElectiveListDischarge(patientElectiveList);
        }

        //WDEV-18454
        if (voInpat.getPasEvent() != null && (patientElectiveList != null || (currentAdmissionDetail != null && currentAdmissionDetail.getMethodOfAdmission() != null && MethodOfAdmission.EMERGENCY.getID() == currentAdmissionDetail.getMethodOfAdmission().getID())) && Boolean.TRUE.equals(domain.hasElectiveListsToRemove(form.getGlobalContext().Core.getPatientShort(), patientElectiveList, voInpat.getPasEvent().getSpecialty())))
        {
            //form.getLocalContext().setInpatientEpisodeSpecialty(voInpat.getPasEvent().getSpecialty());
            form.getLocalContext().setMessageBoxPELCheck(engine.showMessage("The patient has other Elective List/TCI records for this service. Please review these records.", "Info", MessageButtons.OK, MessageIcon.INFORMATION));
            return;
        }

    }//WDEV-22448
    if (dischargePatient(patientElectiveList, null, form.getLocalContext().getbCancelPatientAppointments(), currentAdmissionDetail))
    {           
        engine.close(DialogResult.OK);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromPatientSelected(PatientLite_IdentifiersVo patient)
    {
        clearScreen();

        if(patient == null)
            return;

        // Default in Ward
        if(form.getGlobalContext().Core.getADTWardIsNotNull())
        {
            form.cmbWard().newRow(form.getGlobalContext().Core.getADTWard(), form.getGlobalContext().Core.getADTWard().toString());
            form.cmbWard().setValue(form.getGlobalContext().Core.getADTWard());         
        }

        // No defaults on Service
        // No defaults on Speciality
        // No defaults on Consultant

        // No defaults on WardType
        // No defaults on Source Of Admission

        // Default on Method of Admission 
        //WDEV-20501 (Note: tanWaiting is actually Emergency Admission)
        if(form.lyrAdmission().tabWaiting().isVisible())
        {
            form.cmbMethod().setValue(MethodOfAdmission.EMERGENCY);
            form.cmbMethod().setEnabled(false);
        }//WDEV-20501

        // No default on Patient Category
        // Patient Category is defaulted to NHS - is this correct?
//      if(!form.lyrAdmission().tabWardAttenders().isVisible())
//           form.cmbPatientStatus().setValue(PatientStatus.NHS);

        // Default Admit Date Time to current date time
        form.dtimAdmit().setValue(new DateTime());
        // No Default on Anticipated Stay
        // Estimated discharge Date Time - calculated field
        DateTime estimatedDischargeDateTime = calculateEstimateDischarge(form.dtimAdmit().getValue(), form.intAntStay().getValue());
        if (!ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"))
        {   
            form.dteEstDischarge().setValue(estimatedDischargeDateTime != null ? estimatedDischargeDateTime.getDate() : null);
        }
        else
        {   
            form.dtimEstDischarge().setValue(estimatedDischargeDateTime);
        }

        // No Default on chaplain

        // No default on Source of Referral

        if (form.chkSelfAdmitPatient().isVisible())
            form.chkSelfAdmitPatient().setValue(Boolean.TRUE.equals(patient.getIsSelfAdmitPatient()));

        // Default category from patient record
        form.cmbPatientStatus().setValue(patient.getPatientCategory());
        loadEpisodes();
    }
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromPatientSelected_WardAttenders(PatientLite_IdentifiersVo patient)
{
    clearScreen();

    BookAppointmentForWardAttendersVo wardBooking = form.lyrAdmission().tabWardAttenders().grdWardAttenders().getValue();
    if (patient == null || wardBooking == null || wardBooking.getSession() == null)
        return;

    // Default in current ward
    if(form.getGlobalContext().Core.getADTWardIsNotNull())
    {
        form.cmbWard().newRow(form.getGlobalContext().Core.getADTWard(), form.getGlobalContext().Core.getADTWard().toString());
        form.cmbWard().setValue(form.getGlobalContext().Core.getADTWard());         
    }

    // Default in Service from Ward Attenders list
    form.qmbService().setValue(wardBooking.getSession().getService());
    if (wardBooking.getSession().getService() != null && form.qmbService().getValue() == null)
    {
        form.qmbService().newRow(wardBooking.getSession().getService(), wardBooking.getSession().getService().getServiceName());
        form.qmbService().setValue(wardBooking.getSession().getService());
    }

    // Default in Speciality
    if (wardBooking.getSession().getService() != null && wardBooking.getSession().getService().getSpecialty() != null && form.cmbSpecialty().getValue() == null)
    {
        form.cmbSpecialty().newRow(wardBooking.getSession().getService().getSpecialty(), wardBooking.getSession().getService().getSpecialty().getText());
        form.cmbSpecialty().setValue(wardBooking.getSession().getService().getSpecialty());
    }

    // No default on Consultant

    // No default on Ward Type
    // No default on Source of Admission
    // Method of Admission defaulted to 24 - Emergency
    form.cmbMethod().setValue(MethodOfAdmission.EMERGENCY);
    // No default on Patient Category

    // No default on Admit Date Time
    form.dtimAdmit().setValue(new DateTime());
    // No default on Anticipated Stay
    // Estimated date of discharged to be calculated based on the above two values
    DateTime estimatedDischargeDateTime = calculateEstimateDischarge(form.dtimAdmit().getValue(), form.intAntStay().getValue());
    if (!ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"))
    {   
        form.dteEstDischarge().setValue(estimatedDischargeDateTime != null ? estimatedDischargeDateTime.getDate() : null);
    }
    else
    {   
        form.dtimEstDischarge().setValue(estimatedDischargeDateTime);
    }

    // Set Source of Emergency Referral to 24
    form.cmbSourceOfEmergencyReferral().setValue(SourceOfEmergencyReferral.CONSULTANT_CLINIC);

    // No default on Chaplain
    // No default on Case Note Folder Location

    // Default category from appointment
    if (wardBooking.getPatientCategory() != null)
    {
        form.cmbPatientStatus().setValue(wardBooking.getPatientCategory());
    }
    else
    {
        form.cmbPatientStatus().setValue(wardBooking.getPatient().getPatientCategory());
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFrom_ED_EmergencyData(PendingEmergencyAdmissionAdmitVo pendingEDAdmission)
{
    clearScreen();
    if (pendingEDAdmission == null)
        return;

    // Default ward from Pending ED Admission
    // Default in current ward
    if(form.getGlobalContext().Core.getADTWardIsNotNull())
    {
        form.cmbWard().newRow(form.getGlobalContext().Core.getADTWard(), form.getGlobalContext().Core.getADTWard().toString());
        form.cmbWard().setValue(form.getGlobalContext().Core.getADTWard());         
    }

    // Default Service from PendingEmergencyAdmission
    if (pendingEDAdmission != null && pendingEDAdmission.getService() != null)
    {
        form.qmbService().newRow(pendingEDAdmission.getService(), pendingEDAdmission.getService().getServiceName());
        form.qmbService().setValue(pendingEDAdmission.getService());
    }

    // Default Speciality from service of PendingEmergencyAdmission
    if (pendingEDAdmission != null && pendingEDAdmission.getService() != null && pendingEDAdmission.getService().getSpecialty() != null)
    {
        form.cmbSpecialty().newRow(pendingEDAdmission.getService().getSpecialty(), pendingEDAdmission.getService().getSpecialty().getText());
        form.cmbSpecialty().setValue(pendingEDAdmission.getService().getSpecialty());
    }

    // Do not default Consultant
    // Do not default Ward Type
    // Do not default Source of Admission

    // Default Method of Admission to 21 (Emergency)
    form.cmbMethod().setValue(MethodOfAdmission.EMERGENCY);

    // Default Patient Category to the one from patient
    form.cmbPatientStatus().setValue(pendingEDAdmission.getPasEvent().getPatient().getPatientCategory());

    // Admit Date Time - default to current date time
    form.dtimAdmit().setValue(new DateTime());
    // Do not default Anticipated Stay
    // Estimated Discharge Date Time will be calculated based on Admit DateTime + Anticipated Stay
    DateTime estimatedDischargeDateTime = calculateEstimateDischarge(form.dtimAdmit().getValue(), form.intAntStay().getValue());
    if (!ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"))
    {   
        form.dteEstDischarge().setValue(estimatedDischargeDateTime != null ? estimatedDischargeDateTime.getDate() : null);
    }
    else
    {
        form.dtimEstDischarge().setValue(estimatedDischargeDateTime);
    }

    // Do not default chaplain
    // Default Source of Emergency Referral to 21 - 'Accident and Emergency'
    form.cmbSourceOfEmergencyReferral().setValue(SourceOfEmergencyReferral.ACCIDENT_EMERGENCY);

    // Do not default on Update Case Note Folder Location

    // Default category from patient record
    form.cmbPatientStatus().setValue(pendingEDAdmission != null && pendingEDAdmission.getPasEventIsNotNull() && pendingEDAdmission.getPasEvent().getPatientIsNotNull() ? pendingEDAdmission.getPasEvent().getPatient().getPatientCategory() : null);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromPatientSelected_PET()
{
    clearScreen();

    PendingEmergencyTheatreForAdmitVo pendingEmergencyTheatre = form.lyrAdmission().tabPET().grdPET().getValue();

    if (pendingEmergencyTheatre == null || pendingEmergencyTheatre.getPatient() == null)
        return;

    // Default in current ward
    if(form.getGlobalContext().Core.getADTWardIsNotNull())
    {
        form.cmbWard().newRow(form.getGlobalContext().Core.getADTWard(), form.getGlobalContext().Core.getADTWard().toString());
        form.cmbWard().setValue(form.getGlobalContext().Core.getADTWard());         
    }

    // Default in Service from Ward Attenders list
    if (pendingEmergencyTheatre.getService() != null)
    {
        form.qmbService().newRow(pendingEmergencyTheatre.getService(), pendingEmergencyTheatre.getService().getServiceName());
        form.qmbService().setValue(pendingEmergencyTheatre.getService());
    }

    // Default in Speciality
    if (pendingEmergencyTheatre.getService() != null && pendingEmergencyTheatre.getService().getSpecialty() != null && form.cmbSpecialty().getValue() == null)
    {
        form.cmbSpecialty().newRow(pendingEmergencyTheatre.getService().getSpecialty(), pendingEmergencyTheatre.getService().getSpecialty().getText());
        form.cmbSpecialty().setValue(pendingEmergencyTheatre.getService().getSpecialty());
    }

    // Default in Consultant  WDEV-22760
    MedicVo medic = domain.getMedic(pendingEmergencyTheatre.getResponsibleHCP());
    if (medic != null)
    {
        form.qmbConsultant().newRow(medic, medic.getIMosName());
        form.qmbConsultant().setValue(medic);
    }

    // No default on Ward Type
    // No default on Source of Admission
    // Method of Admission defaulted to 24 - Emergency
    form.cmbMethod().setValue(MethodOfAdmission.EMERGENCY);

    // No default on Patient Category

    // Default on Admit Date Time
    form.dtimAdmit().setValue(new DateTime());

    // No default on Anticipated Stay
    // Estimated date of discharged to be calculated based on the above two values
    DateTime estimatedDischargeDateTime = calculateEstimateDischarge(form.dtimAdmit().getValue(), form.intAntStay().getValue());
    if (!ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"))
    {   
        form.dteEstDischarge().setValue(estimatedDischargeDateTime != null ? estimatedDischargeDateTime.getDate() : null);
    }
    else
    {   
        form.dtimEstDischarge().setValue(estimatedDischargeDateTime);
    }
    // No default on Emergency Referral
    // No default on Chaplain
    // No default on Case Note Folder Location

    //Default category from the Referral
    form.cmbPatientStatus().setValue(pendingEmergencyTheatre.getPendingAdmissionPatientCategory() != null ? pendingEmergencyTheatre.getPendingAdmissionPatientCategory() : pendingEmergencyTheatre.getPatient().getPatientCategory());
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromElectiveAdmissionData(PatientElectiveListBedAdmissionVo patientElectiveList, boolean isBooked)
    {
        form.getLocalContext().setAdmissionDetail(null);
        clearScreen();
        showExtraUIControls_ElectiveList();

        if (patientElectiveList == null)
            return;

        if (patientElectiveList.getTCIDetails() != null 
            && patientElectiveList.getTCIDetails().getTCIWardIsNotNull())
        {
            form.cmbWard().newRow(patientElectiveList.getTCIDetails().getTCIWard(), patientElectiveList.getTCIDetails().getTCIWard().getName());
            form.cmbWard().setValue(patientElectiveList.getTCIDetails().getTCIWard());
        }

        form.cmbWardType().setValue(null);

        form.ccConsultant().setValue(patientElectiveList.getConsultant());

        if (patientElectiveList.getElectiveList() != null && patientElectiveList.getElectiveList().getService() != null && patientElectiveList.getElectiveList().getService().getSpecialty() != null)
        {
            form.cmbSpecialty().newRow(patientElectiveList.getElectiveList().getService().getSpecialty(), patientElectiveList.getElectiveList().getService().getSpecialty().getText());
            form.cmbSpecialty().setValue(patientElectiveList.getElectiveList().getService().getSpecialty());
        }

        form.cmbMethod().setValue(MethodOfAdmission.BOOKED);
        form.cmbSource().setValue(null);
//      form.cmbPatientStatus().setValue(patientElectiveList.getPatientStatus());

        if (patientElectiveList.getTCIDetails() != null)
        {
            if (patientElectiveList.getTCIDetails().getTCITime() != null)
                form.dtimAdmit().setValue(new DateTime(patientElectiveList.getTCIDetails().getTCIDate(), patientElectiveList.getTCIDetails().getTCITime()));
            else
                form.dtimAdmit().setValue(new DateTime(patientElectiveList.getTCIDetails().getTCIDate(), new Time(0, 0, 0)));

            form.intAntStay().setValue(patientElectiveList.getAnticipatedStay());
            form.dteEstDischarge().setValue(calculateEstimateDischarge(patientElectiveList.getTCIDetails().getTCIDate(), patientElectiveList.getAnticipatedStay()));
            form.txtReason().setValue(patientElectiveList.getTCIDetails().getBedManagerComment());
        }

        form.cmbSourceOfReferral().setValue(null);
        form.ccReferringConsultant().setValue(null);
    }
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromElectiveAdmissionData(PatientElectiveListBedAdmissionVo patientElectiveList, boolean isBooked)
    {
        form.getLocalContext().setAdmissionDetail(null);
        clearScreen();
        showExtraUIControls_ElectiveList();

        if (patientElectiveList == null)
            return;

        if (patientElectiveList.getTCIDetails() != null 
            && patientElectiveList.getTCIDetails().getTCIWardIsNotNull())
        {
            form.cmbWard().newRow(patientElectiveList.getTCIDetails().getTCIWard(), patientElectiveList.getTCIDetails().getTCIWard().getName());
            form.cmbWard().setValue(patientElectiveList.getTCIDetails().getTCIWard());
        }

        form.cmbWardType().setValue(null);

        form.ccConsultant().setValue(patientElectiveList.getConsultant());

        if (patientElectiveList.getElectiveList() != null && patientElectiveList.getElectiveList().getService() != null && patientElectiveList.getElectiveList().getService().getSpecialty() != null)
        {
            form.cmbSpecialty().newRow(patientElectiveList.getElectiveList().getService().getSpecialty(), patientElectiveList.getElectiveList().getService().getSpecialty().getText());
            form.cmbSpecialty().setValue(patientElectiveList.getElectiveList().getService().getSpecialty());
        }

        form.cmbMethod().setValue(MethodOfAdmission.BOOKED);
        form.cmbSource().setValue(null);
//      form.cmbPatientStatus().setValue(patientElectiveList.getPatientStatus());

        if (patientElectiveList.getTCIDetails() != null)
        {
            if (patientElectiveList.getTCIDetails().getTCITime() != null)
                form.dtimAdmit().setValue(new DateTime(patientElectiveList.getTCIDetails().getTCIDate(), patientElectiveList.getTCIDetails().getTCITime()));
            else
                form.dtimAdmit().setValue(new DateTime(patientElectiveList.getTCIDetails().getTCIDate(), new Time(0, 0, 0)));

            form.intAntStay().setValue(patientElectiveList.getAnticipatedStay());
            form.dteEstDischarge().setValue(calculateEstimateDischarge(patientElectiveList.getTCIDetails().getTCIDate(), patientElectiveList.getAnticipatedStay()));
            form.txtReason().setValue(patientElectiveList.getTCIDetails().getBedManagerComment());
        }

        form.cmbSourceOfReferral().setValue(null);
        form.ccReferringConsultant().setValue(null);
    }