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

项目: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);
}
项目: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);
}
项目:AvoinApotti    文件:Logic.java   
/**
 * WDEV-13136
 * Function used to sort admissions by column
 */
private void sortAdmissions(int column)
{
    // Get records from grid
    PendingEmergencyAdmissionLiteVoCollection records = form.grdAdmissions().getValues();

    // Toggle sort mode for column
    sortOrderToggle(column);

    // Determine the column - sort records after it
    if (column == COL_AGE)
    {
        records.sort(new AgeComparator(form.getLocalContext().getSortOrderAge()));
    }
    else if (column == COL_DATE_DECISION_TO_ADMIT)
    {
        records.sort(PendingEmergencyAdmissionLiteVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));
    }

    //WDEV-18011 
    else if (column == COL_ALERT)
    {
        records.sort(new AlertComparator(form.getLocalContext().getSortOrderAlert()));
    }

    // Get selection
    PendingEmergencyAdmissionLiteVo selectedValue = form.grdAdmissions().getValue();
    // Re-populate grid
    populateGrid(records);
    // Update selection
    form.grdAdmissions().setValue(selectedValue);
    // Call code for new selection
    updateGlobalContextOnSelection(form.grdAdmissions().getValue());
}
项目: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    文件:Logic.java   
/**
 * WDEV-13136
 * Function used to sort admissions by column
 */
private void sortAdmissions(int column)
{
    // Get records from grid
    PendingEmergencyAdmissionLiteVoCollection records = form.grdAdmissions().getValues();

    // Toggle sort mode for column
    sortOrderToggle(column);

    // Determine the column - sort records after it
    if (column == COL_AGE)
    {
        records.sort(new AgeComparator(form.getLocalContext().getSortOrderAge()));
    }
    else if (column == COL_DATE_DECISION_TO_ADMIT)
    {
        records.sort(PendingEmergencyAdmissionLiteVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));
    }

    //WDEV-18011 
    else if (column == COL_ALERT)
    {
        records.sort(new AlertComparator(form.getLocalContext().getSortOrderAlert()));
    }

    // Get selection
    PendingEmergencyAdmissionLiteVo selectedValue = form.grdAdmissions().getValue();
    // Re-populate grid
    populateGrid(records);
    // Update selection
    form.grdAdmissions().setValue(selectedValue);
    // Call code for new selection
    updateGlobalContextOnSelection(form.grdAdmissions().getValue());
}
项目: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-linux    文件:Logic.java   
/**
 * WDEV-13136
 * Function used to sort admissions by column
 */
private void sortAdmissions(int column)
{
    // Get records from grid
    PendingEmergencyAdmissionLiteVoCollection records = form.grdAdmissions().getValues();

    // Toggle sort mode for column
    sortOrderToggle(column);

    // Determine the column - sort records after it
    if (column == COL_AGE)
    {
        records.sort(new AgeComparator(form.getLocalContext().getSortOrderAge()));
    }
    else if (column == COL_DATE_DECISION_TO_ADMIT)
    {
        records.sort(PendingEmergencyAdmissionLiteVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));
    }

    //WDEV-18011 
    else if (column == COL_ALERT)
    {
        records.sort(new AlertComparator(form.getLocalContext().getSortOrderAlert()));
    }

    // Get selection
    PendingEmergencyAdmissionLiteVo selectedValue = form.grdAdmissions().getValue();
    // Re-populate grid
    populateGrid(records);
    // Update selection
    form.grdAdmissions().setValue(selectedValue);
    // Call code for new selection
    updateGlobalContextOnSelection(form.grdAdmissions().getValue());
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-13136
 * Function used to sort admissions by column
 */
private void sortAdmissions(int column)
{
    // Get records from grid
    PendingEmergencyAdmissionLiteVoCollection records = form.grdAdmissions().getValues();

    //no need to sort 1 record
    if (records.size() < 2)
        return;

    // Toggle sort mode for column
    sortOrderToggle(column);

    // Determine the column - sort records after it
    if (column == COL_AGE)
    {
        //records.sort(new AgeComparator(form.getLocalContext().getSortOrderAge()));
        records.sort(new AgeDOBComparator(form.getLocalContext().getSortOrderAge()));   //wdev-21464

    }
    else if (column == COL_DATE_DECISION_TO_ADMIT)
    {
        records.sort(PendingEmergencyAdmissionLiteVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));
    }

    //WDEV-18011 
    else if (column == COL_ALERT)
    {
        records.sort(new AlertComparator(form.getLocalContext().getSortOrderAlert()));
    }

    //WDEV-22426 
    else if (column == COL_BED_AVAILABILITY)
    {
        records.sort(new BedAvailabilityStatusComparator(form.getLocalContext().getSortOrderBedAvailability()));
    }

    // Get selection
    PendingEmergencyAdmissionLiteVo selectedValue = form.grdAdmissions().getValue();
    // Re-populate grid
    populateGrid(records);
    // Update selection
    form.grdAdmissions().setValue(selectedValue);
    // Call code for new selection
    updateGlobalContextOnSelection(form.grdAdmissions().getValue());
}