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

项目:AvoinApotti    文件:Logic.java   
private void search() 
{
    String[] errors = validateSearchUIRules();
    if (errors!=null && errors.length>0)
    {
        engine.showErrors(errors);
        return;
    }

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

    RecentDischargesFilterVo voFilter = new RecentDischargesFilterVo();

    if (form.txtIDNum().getValue() != null
        && form.cmbIDType().getValue() == null)
    {
        engine.showErrors(new String[]{"Please enter both an Identifier type as well as its value."});
        return;
    }

    voFilter.setHospNum(form.txtIDNum().getValue());
    voFilter.setIDType(form.cmbIDType().getValue());

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

    voFilter.setDischDestination(form.cmbDischargeDestination().getValue());
    voFilter.setForename(form.txtForeName().getValue());
    voFilter.setSurname(form.txtSurname().getValue());
    voFilter.setConsultant(form.qmbHCP().getValue());
    voFilter.setFromDate(form.dteFrom().getValue());
    voFilter.setToDate(form.dteTo().getValue());

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


    form.getGlobalContext().STHK.setRecentDischargesListFilter(voFilter);

    DischargedEpisodeVoCollection voColl;

    if ((voFilter.countFieldsWithValue() == 1 && voFilter.getIDType() == null) || voFilter.countFieldsWithValue() > 1)
    {
        voColl = domain.listRecentDischarges(voFilter);
    }
    else
    {
        engine.showMessage("Please enter some search criteria.", "Invalid search criteria", MessageButtons.OK, MessageIcon.ERROR);
        return;
    }

    if (voColl == null || voColl.size() == 0)
    {
        engine.showMessage("No Recent Discharge records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING);
        return;
    }
    if (voColl != null)
        form.lblTotal().setValue("Total : " + String.valueOf(voColl.size()));


    if (voColl!=null)
        populateGrid(voColl);
}
项目:openMAXIMS    文件:Logic.java   
private void search() 
{
    String[] errors = validateSearchUIRules();
    if (errors!=null && errors.length>0)
    {
        engine.showErrors(errors);
        return;
    }

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

    RecentDischargesFilterVo voFilter = new RecentDischargesFilterVo();

    if (form.txtIDNum().getValue() != null
        && form.cmbIDType().getValue() == null)
    {
        engine.showErrors(new String[]{"Please enter both an Identifier type as well as its value."});
        return;
    }

    voFilter.setHospNum(form.txtIDNum().getValue());
    voFilter.setIDType(form.cmbIDType().getValue());

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

    voFilter.setDischDestination(form.cmbDischargeDestination().getValue());
    voFilter.setForename(form.txtForeName().getValue());
    voFilter.setSurname(form.txtSurname().getValue());
    voFilter.setConsultant(form.qmbHCP().getValue());
    voFilter.setFromDate(form.dteFrom().getValue());
    voFilter.setToDate(form.dteTo().getValue());

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


    form.getGlobalContext().STHK.setRecentDischargesListFilter(voFilter);

    DischargedEpisodeVoCollection voColl;

    if ((voFilter.countFieldsWithValue() == 1 && voFilter.getIDType() == null) || voFilter.countFieldsWithValue() > 1)
    {
        voColl = domain.listRecentDischarges(voFilter);
    }
    else
    {
        engine.showMessage("Please enter some search criteria.", "Invalid search criteria", MessageButtons.OK, MessageIcon.ERROR);
        return;
    }

    if (voColl == null || voColl.size() == 0)
    {
        engine.showMessage("No Recent Discharge records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING);
        return;
    }
    if (voColl != null)
        form.lblTotal().setValue("Total : " + String.valueOf(voColl.size()));


    if (voColl!=null)
        populateGrid(voColl);
}
项目:openmaxims-linux    文件:Logic.java   
private void search() 
{
    String[] errors = validateSearchUIRules();
    if (errors!=null && errors.length>0)
    {
        engine.showErrors(errors);
        return;
    }

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

    RecentDischargesFilterVo voFilter = new RecentDischargesFilterVo();

    if (form.txtIDNum().getValue() != null
        && form.cmbIDType().getValue() == null)
    {
        engine.showErrors(new String[]{"Please enter both an Identifier type as well as its value."});
        return;
    }

    voFilter.setHospNum(form.txtIDNum().getValue());
    voFilter.setIDType(form.cmbIDType().getValue());

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

    voFilter.setDischDestination(form.cmbDischargeDestination().getValue());
    voFilter.setForename(form.txtForeName().getValue());
    voFilter.setSurname(form.txtSurname().getValue());
    voFilter.setConsultant(form.qmbHCP().getValue());
    voFilter.setFromDate(form.dteFrom().getValue());
    voFilter.setToDate(form.dteTo().getValue());

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


    form.getGlobalContext().STHK.setRecentDischargesListFilter(voFilter);

    DischargedEpisodeVoCollection voColl;

    if ((voFilter.countFieldsWithValue() == 1 && voFilter.getIDType() == null) || voFilter.countFieldsWithValue() > 1)
    {
        voColl = domain.listRecentDischarges(voFilter);
    }
    else
    {
        engine.showMessage("Please enter some search criteria.", "Invalid search criteria", MessageButtons.OK, MessageIcon.ERROR);
        return;
    }

    if (voColl == null || voColl.size() == 0)
    {
        engine.showMessage("No Recent Discharge records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING);
        return;
    }
    if (voColl != null)
        form.lblTotal().setValue("Total : " + String.valueOf(voColl.size()));


    if (voColl!=null)
        populateGrid(voColl);
}
项目:openMAXIMS    文件:Logic.java   
private void search() 
{
    String[] errors = validateSearchUIRules();
    if (errors!=null && errors.length>0)
    {
        engine.showErrors(errors);
        return;
    }

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

    RecentDischargesFilterVo voFilter = new RecentDischargesFilterVo();

    if (form.txtIDNum().getValue() != null
        && form.cmbIDType().getValue() == null)
    {
        engine.showErrors(new String[]{"Please enter both an Identifier type as well as its value."});
        return;
    }

    voFilter.setHospNum(form.txtIDNum().getValue());
    voFilter.setIDType(form.cmbIDType().getValue());

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

    voFilter.setDischDestination(form.cmbDischargeDestination().getValue());
    voFilter.setForename(form.txtForeName().getValue());
    voFilter.setSurname(form.txtSurname().getValue());
    voFilter.setConsultant(form.qmbHCP().getValue());
    voFilter.setFromDate(form.dteFrom().getValue());
    voFilter.setToDate(form.dteTo().getValue());

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


    form.getGlobalContext().STHK.setRecentDischargesListFilter(voFilter);

    DischargedEpisodeVoCollection voColl;

    if ((voFilter.countFieldsWithValue() == 1 && voFilter.getIDType() == null) || voFilter.countFieldsWithValue() > 1)
    {
        voColl = domain.listRecentDischarges(voFilter);
    }
    else
    {
        engine.showMessage("Please enter some search criteria.", "Invalid search criteria", MessageButtons.OK, MessageIcon.ERROR);
        return;
    }

    if (voColl == null || voColl.size() == 0)
    {
        engine.showMessage("No Recent Discharge records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING);
        return;
    }
    if (voColl != null)
        form.lblTotal().setValue("Total: " + String.valueOf(voColl.size()));


    if (voColl!=null)
        populateGrid(voColl);
}