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

项目:AvoinApotti    文件:Logic.java   
private PendingEmergencyAdmissionsDataVo populateDataFromScreen()
{
    PendingEmergencyAdmissionsDataVo admission = new PendingEmergencyAdmissionsDataVo();
    admission.setIDNumber(form.txtIDNum().getValue());
    admission.setIDType(form.cmbIDType().getValue());

    //WDEV-13065 -- if (form.txtIDNum().getValue() == null)

    admission.setHospital(form.cmbHospital().getValue());
    admission.setAlert(form.cmbAlert().getValue());
    admission.setAllocatedWard(form.qmbWard().getValue());
    admission.setHcp(form.qmbHCP().getValue());
    admission.setPatientForename(form.txtForeName().getValue());
    admission.setPatientSurname(form.txtSurname().getValue());
    admission.setAdmissionStatus(form.cmbStatus().getValue());

    return admission;
}
项目:openMAXIMS    文件:Logic.java   
private boolean validateSearchCriteria(boolean showErrors)
{
    PendingEmergencyAdmissionsDataVo voFilter = populateDataFromScreen();

    if (voFilter.getIDNumberIsNotNull() && voFilter.getIDType() == null)
    {
        if (showErrors)
            engine.showErrors("Invalid search criteria",new String[]{"Please enter both an Identifier type as well as its value."}); //WDEV-22298 
        return false;
    }

    if (voFilter.countFieldsWithValue() == 1 && (voFilter.getIDTypeIsNotNull() || voFilter.getIDNumberIsNotNull()))
    {
        if (showErrors)
            engine.showErrors("Invalid search criteria", new String[] {"Please enter some valid search criteria."}); //WDEV-22298 
        return false;
    }

    form.getGlobalContext().STHK.setPendingEmergencyAdmissionsFilter(voFilter);
    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void search(Boolean fromSearchBtn, Boolean timerCalled) //WDEV-19286
{
    PendingEmergencyAdmissionLiteVoCollection voColl = null;

    form.grdAdmissions().getRows().clear();
    form.lblTotal().setValue("Total: 0"); //WDEV-18099 

    PendingEmergencyAdmissionsDataVo searchFilter = form.getGlobalContext().STHK.getPendingEmergencyAdmissionsFilter() == null ? populateDataFromScreen() : form.getGlobalContext().STHK.getPendingEmergencyAdmissionsFilter(); //WDEV-19286
    voColl = domain.listPendingEmergencyAdmissions(searchFilter);

    if (voColl == null || voColl.size() == 0)
    {
        if (fromSearchBtn && !timerCalled)
            engine.showMessage("No matching records found.");
        return;
    }
    if (voColl != null)
        form.lblTotal().setValue("Total: " + String.valueOf(voColl.size()));

    if (voColl != null)
        populateGrid(voColl);
}
项目:openMAXIMS    文件:Logic.java   
private PendingEmergencyAdmissionsDataVo populateDataFromScreen()
{
    PendingEmergencyAdmissionsDataVo admission = new PendingEmergencyAdmissionsDataVo();
    admission.setIDNumber(form.txtIDNum().getValue());
    admission.setIDType(form.cmbIDType().getValue());

    //WDEV-13065 -- if (form.txtIDNum().getValue() == null)

    admission.setHospital(form.cmbHospital().getValue());
    admission.setAlert(form.cmbAlert().getValue());
    admission.setAllocatedWard(form.qmbWard().getValue());
    admission.setAdmissionStatus(form.cmbStatus().getValue());
    if (EmergencyAdmissionStatus.ADMITTED.equals(admission.getAdmissionStatus()))
        admission.setHcp(form.qmbHCP().getValue());
    admission.setPatientForename(form.txtForeName().getValue());
    admission.setPatientSurname(form.txtSurname().getValue());      
    admission.setWasTimerOn(form.getLocalContext().getbTimerOn());

    return admission;
}
项目:openMAXIMS    文件:Logic.java   
private PendingEmergencyAdmissionsDataVo populateDataFromScreen()
{
    PendingEmergencyAdmissionsDataVo admission = new PendingEmergencyAdmissionsDataVo();
    admission.setIDNumber(form.txtIDNum().getValue());
    admission.setIDType(form.cmbIDType().getValue());

    //WDEV-13065 -- if (form.txtIDNum().getValue() == null)

    admission.setHospital(form.cmbHospital().getValue());
    admission.setAlert(form.cmbAlert().getValue());
    admission.setAllocatedWard(form.qmbWard().getValue());
    admission.setHcp(form.qmbHCP().getValue());
    admission.setPatientForename(form.txtForeName().getValue());
    admission.setPatientSurname(form.txtSurname().getValue());
    admission.setAdmissionStatus(form.cmbStatus().getValue());

    return admission;
}
项目:openmaxims-linux    文件:Logic.java   
private PendingEmergencyAdmissionsDataVo populateDataFromScreen()
{
    PendingEmergencyAdmissionsDataVo admission = new PendingEmergencyAdmissionsDataVo();
    admission.setIDNumber(form.txtIDNum().getValue());
    admission.setIDType(form.cmbIDType().getValue());

    //WDEV-13065 -- if (form.txtIDNum().getValue() == null)

    admission.setHospital(form.cmbHospital().getValue());
    admission.setAlert(form.cmbAlert().getValue());
    admission.setAllocatedWard(form.qmbWard().getValue());
    admission.setHcp(form.qmbHCP().getValue());
    admission.setPatientForename(form.txtForeName().getValue());
    admission.setPatientSurname(form.txtSurname().getValue());
    admission.setAdmissionStatus(form.cmbStatus().getValue());

    return admission;
}
项目:AvoinApotti    文件:Logic.java   
private void search(Boolean timerCalled)
{
    PendingEmergencyAdmissionLiteVoCollection voColl = null;

    PendingEmergencyAdmissionsDataVo voFilter = populateDataFromScreen();
    form.grdAdmissions().getRows().clear();
    form.lblTotal().setValue("Total : 0"); //WDEV-18099 
    form.getGlobalContext().STHK.setPendingEmergencyAdmissionsFilter(voFilter);

    if (voFilter.countFieldsWithValue() == 1 && voFilter.getIDTypeIsNotNull())
    {
        engine.showMessage("Please enter some valid search criteria.", "Invalid search cirteria", MessageButtons.OK, MessageIcon.ERROR);
        enableAutoRefeshStart(false);
        return;
    }

    if ((voFilter.countFieldsWithValue() == 1 && voFilter.getIDType() == null) || voFilter.countFieldsWithValue() > 1)
    {
        voColl = domain.listPendingEmergencyAdmissions(voFilter);
    }
    else
    {
        engine.showErrors(new String[]{"Please enter some search criteria."});
        return;
    }

    if (voColl == null || voColl.size() == 0)
    {
        if(!timerCalled)
            engine.showMessage("No matching records found");
        return;
    }
    if (voColl != null)
        form.lblTotal().setValue("Total : " + String.valueOf(voColl.size()));

    if (voColl != null)
        populateGrid(voColl);
}
项目:openMAXIMS    文件:Logic.java   
private void search(Boolean timerCalled)
{
    PendingEmergencyAdmissionLiteVoCollection voColl = null;

    PendingEmergencyAdmissionsDataVo voFilter = populateDataFromScreen();
    form.grdAdmissions().getRows().clear();
    form.lblTotal().setValue("Total : 0"); //WDEV-18099 
    form.getGlobalContext().STHK.setPendingEmergencyAdmissionsFilter(voFilter);

    if (voFilter.countFieldsWithValue() == 1 && voFilter.getIDTypeIsNotNull())
    {
        engine.showMessage("Please enter some valid search criteria.", "Invalid search cirteria", MessageButtons.OK, MessageIcon.ERROR);
        enableAutoRefeshStart(false);
        return;
    }

    if ((voFilter.countFieldsWithValue() == 1 && voFilter.getIDType() == null) || voFilter.countFieldsWithValue() > 1)
    {
        voColl = domain.listPendingEmergencyAdmissions(voFilter);
    }
    else
    {
        engine.showErrors(new String[]{"Please enter some search criteria."});
        return;
    }

    if (voColl == null || voColl.size() == 0)
    {
        if(!timerCalled)
            engine.showMessage("No matching records found");
        return;
    }
    if (voColl != null)
        form.lblTotal().setValue("Total : " + String.valueOf(voColl.size()));

    if (voColl != null)
        populateGrid(voColl);
}
项目:openmaxims-linux    文件:Logic.java   
private void search(Boolean timerCalled)
{
    PendingEmergencyAdmissionLiteVoCollection voColl = null;

    PendingEmergencyAdmissionsDataVo voFilter = populateDataFromScreen();
    form.grdAdmissions().getRows().clear();
    form.lblTotal().setValue("Total : 0"); //WDEV-18099 
    form.getGlobalContext().STHK.setPendingEmergencyAdmissionsFilter(voFilter);

    if (voFilter.countFieldsWithValue() == 1 && voFilter.getIDTypeIsNotNull())
    {
        engine.showMessage("Please enter some valid search criteria.", "Invalid search cirteria", MessageButtons.OK, MessageIcon.ERROR);
        enableAutoRefeshStart(false);
        return;
    }

    if ((voFilter.countFieldsWithValue() == 1 && voFilter.getIDType() == null) || voFilter.countFieldsWithValue() > 1)
    {
        voColl = domain.listPendingEmergencyAdmissions(voFilter);
    }
    else
    {
        engine.showErrors(new String[]{"Please enter some search criteria."});
        return;
    }

    if (voColl == null || voColl.size() == 0)
    {
        if(!timerCalled)
            engine.showMessage("No matching records found");
        return;
    }
    if (voColl != null)
        form.lblTotal().setValue("Total : " + String.valueOf(voColl.size()));

    if (voColl != null)
        populateGrid(voColl);
}
项目:openMAXIMS    文件:Logic.java   
private void refreshSearchCriteria(PendingEmergencyAdmissionsDataVo voFilter, Boolean timerCalled)
{
        form.txtIDNum().setValue(voFilter.getIDNumber());
        form.cmbIDType().setValue(voFilter.getIDType());
        form.txtSurname().setValue(voFilter.getPatientSurname());
        form.txtForeName().setValue(voFilter.getPatientForename());

        form.cmbHospital().setValue(null);
        for (int i = 0; voFilter.getHospitalIsNotNull() && i < form.cmbHospital().getValues().size(); i++)
        {
            LocationLiteVo voHosp = (LocationLiteVo) form.cmbHospital().getValues().get(i);
            if (voHosp.getID_Location().equals(voFilter.getHospital().getID_Location()))
                form.cmbHospital().setValue((LocationLiteVo) form.cmbHospital().getValues().get(i));
        }
        if (form.cmbHospital().getValue() == null && voFilter.getHospitalIsNotNull())
        {               
            form.cmbHospital().newRow(voFilter.getHospital(), voFilter.getHospital().getName());
            form.cmbHospital().setValue(voFilter.getHospital());
        }
        form.cmbStatus().setValue(voFilter.getAdmissionStatus());
        for (int i = 0; voFilter.getHcpIsNotNull() && i < form.qmbHCP().getValues().size(); i++)
        {
            HcpLiteVo voHCP = (HcpLiteVo) form.qmbHCP().getValues().get(i);
            if (voHCP.getID_Hcp().equals(voFilter.getHcp().getID_Hcp()))
                form.qmbHCP().setValue((HcpLiteVo) form.qmbHCP().getValues().get(i));
        }
        if (form.qmbHCP().getValue() == null && voFilter.getHcpIsNotNull())
        {
            form.qmbHCP().newRow(voFilter.getHcp(), voFilter.getHcp().getIMosName());
            form.qmbHCP().setValue(voFilter.getHcp());
        }

        form.qmbWard().setValue(null);
        for (int i = 0; voFilter.getAllocatedWardIsNotNull() && i < form.qmbWard().getValues().size(); i++)
        {
            LocationLiteVo voWard = (LocationLiteVo) form.qmbWard().getValues().get(i);
            if (voWard.getID_Location().equals(voFilter.getAllocatedWard().getID_Location()))
                form.qmbWard().setValue((LocationLiteVo) form.qmbWard().getValues().get(i));
        }
        if (form.qmbWard().getValue() == null && voFilter.getAllocatedWardIsNotNull())
        {               
            form.qmbWard().newRow(voFilter.getAllocatedWard(), voFilter.getAllocatedWard().getName());
            form.qmbWard().setValue(voFilter.getAllocatedWard());
        }
        form.cmbAlert().setValue(voFilter.getAlert());          
        //enableAutoRefreshStart(true);
}