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

项目:AvoinApotti    文件:Logic.java   
/**
 * WDEV-13136
 * Function used to sort discharge records
 */
private void sortDischargeRecords(int column)
{
    // Get discharge records from grid
    InpatientEpisodeForPendingDischargesVoCollection records = form.grdDischarges().getValues();
    // Toggle sort order for column
    sortOrderToggle(column);

    // Determine column - sort records after it
    if (COL_AGE == column)
    {
        records.sort(InpatientEpisodeForPendingDischargesVo.getAgeComparator(form.getLocalContext().getSortOrderAge()));
    }
    else if (COL_ESTIMATED_DISCHAGE_DATETIME == column)
    {
        records.sort(InpatientEpisodeForPendingDischargesVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));
    }

    // Get selection
    InpatientEpisodeForPendingDischargesVo selectedValue = form.grdDischarges().getValue();
    // Re-populate grid
    form.grdDischarges().getRows().clear();//wdev-14522
    populateGrid(records, null);
    // Update selection
    form.grdDischarges().setValue(selectedValue);
}
项目:openMAXIMS    文件:Logic.java   
private Color getRowColor(InpatientEpisodeForPendingDischargesVo item)
{
    if (item == null)
        return null;

    ColorBean darkOrangeBean = new ColorBean();
    darkOrangeBean.setName("Dark Orange");
    darkOrangeBean.setValue(INTENSE_ORANGE_COLOR_HEXA_CODE);
    Color darkOrange = new Color(darkOrangeBean);

    if (isPatientOnTrackingMovement(item)) //WDEV-22309
        return Color.RoyalBlue;     
    if (Boolean.TRUE.equals(item.getIsOnHomeLeave()))
        return Color.LightGray;
    if (item.isDischargeDueWithin24Hrs())
        return Boolean.TRUE.equals(item.getIsConfirmedDischarge()) ? Color.Red : darkOrange;        

    return null;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object o1, Object o2)
{
    PartialDate pdate1 = null;
    PartialDate pdate2 = null;

    if (o1 instanceof InpatientEpisodeForPendingDischargesVo && o2 instanceof InpatientEpisodeForPendingDischargesVo)
    {
        InpatientEpisodeForPendingDischargesVo ps1 = (InpatientEpisodeForPendingDischargesVo)o1;
        pdate1 = ps1.getPasEventIsNotNull()  && ps1.getPasEvent().getPatientIsNotNull() ? ps1.getPasEvent().getPatient().getDob() : null;
        InpatientEpisodeForPendingDischargesVo ps2 = (InpatientEpisodeForPendingDischargesVo)o2;
        pdate2 = ps2.getPasEventIsNotNull() && ps2.getPasEvent().getPatientIsNotNull()  ? ps2.getPasEvent().getPatient().getDob() : null;
    }



    if (pdate1 != null && pdate2 != null)
        return  pdate1.compareTo(pdate2)*direction;
    if (pdate1 != null)
        return direction;
    if (pdate2 != null)
        return -1*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private void setGCOnMenuAction(int menuAction)
{
    InpatientEpisodeForPendingDischargesVo selectedGridVal = form.grdDischarges().getValue();
    if (selectedGridVal == null)
        return;

    if (selectedGridVal.getBedIsNotNull())
    {   
        form.getGlobalContext().Core.setSelectedBedSpaceState(domain.getBedSpaceStateForInpatient(selectedGridVal.getBed()));
        if (GenForm.ContextMenus.CoreNamespace.PendingDischarges.DISCHARGE == menuAction)
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEPENDINGPATIENT);
    }
    else
    {   
        form.getGlobalContext().Core.setSelectedWaitingAreaPatient(domain.getWaitingAreaPatient(selectedGridVal));
        if (GenForm.ContextMenus.CoreNamespace.PendingDischarges.DISCHARGE == menuAction)
            form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.DISCHARGEPENDINGPATIENT);

    }
    if (form.getGlobalContext().Core.getBedInfoAction() == null)
        form.getGlobalContext().Core.setBedInfoAction(BedInfoAction.EDIT_READY_FOR_DISCHARGE);
    engine.open(form.getForms().Core.BedInfoDialog);
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-13136
 * Function used to sort discharge records
 */
private void sortDischargeRecords(int column)
{
    // Get discharge records from grid
    InpatientEpisodeForPendingDischargesVoCollection records = form.grdDischarges().getValues();
    // Toggle sort order for column
    sortOrderToggle(column);

    // Determine column - sort records after it
    if (COL_AGE == column)
    {
        records.sort(InpatientEpisodeForPendingDischargesVo.getAgeComparator(form.getLocalContext().getSortOrderAge()));
    }
    else if (COL_ESTIMATED_DISCHAGE_DATETIME == column)
    {
        records.sort(InpatientEpisodeForPendingDischargesVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));
    }

    // Get selection
    InpatientEpisodeForPendingDischargesVo selectedValue = form.grdDischarges().getValue();
    // Re-populate grid
    form.grdDischarges().getRows().clear();//wdev-14522
    populateGrid(records, null);
    // Update selection
    form.grdDischarges().setValue(selectedValue);
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * WDEV-13136
 * Function used to sort discharge records
 */
private void sortDischargeRecords(int column)
{
    // Get discharge records from grid
    InpatientEpisodeForPendingDischargesVoCollection records = form.grdDischarges().getValues();
    // Toggle sort order for column
    sortOrderToggle(column);

    // Determine column - sort records after it
    if (COL_AGE == column)
    {
        records.sort(InpatientEpisodeForPendingDischargesVo.getAgeComparator(form.getLocalContext().getSortOrderAge()));
    }
    else if (COL_ESTIMATED_DISCHAGE_DATETIME == column)
    {
        records.sort(InpatientEpisodeForPendingDischargesVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));
    }

    // Get selection
    InpatientEpisodeForPendingDischargesVo selectedValue = form.grdDischarges().getValue();
    // Re-populate grid
    form.grdDischarges().getRows().clear();//wdev-14522
    populateGrid(records, null);
    // Update selection
    form.grdDischarges().setValue(selectedValue);
}
项目:openMAXIMS    文件:Logic.java   
private boolean isPatientOnTrackingMovement(InpatientEpisodeForPendingDischargesVo record)
{
    if (record == null || record.getCurrentTrackingMovement() == null)
        return false;

    if (Boolean.TRUE.equals(record.getCurrentTrackingMovement().getPatientReturned()))
        return false;

    return true;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-13136
 * Function used to sort discharge records
 */
private void sortDischargeRecords(int column)
{
    // Get discharge records from grid
    InpatientEpisodeForPendingDischargesVoCollection records = form.grdDischarges().getValues();

    //no need to sort less than 2 records

    if (records.size() < 2) //WDEV-20835
        return;

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

    // Determine column - sort records after it
    if (COL_AGE == column)
    {
        //records.sort(InpatientEpisodeForPendingDischargesVo.getAgeComparator(form.getLocalContext().getSortOrderAge()));
        records.sort(new AgeDOBComparator(form.getLocalContext().getSortOrderAge()));   //wdev-21464
    }
    else if (COL_ESTIMATED_DISCHAGE_DATETIME == column)
    {
        records.sort(InpatientEpisodeForPendingDischargesVo.getDateTimeComparator(form.getLocalContext().getSortOrder()));
    }

    // Get selection
    InpatientEpisodeForPendingDischargesVo selectedValue = form.grdDischarges().getValue();
    // Re-populate grid
    form.grdDischarges().getRows().clear();//wdev-14522
    populateGrid(records, null);
    // Update selection
    form.grdDischarges().setValue(selectedValue);
}
项目:openMAXIMS    文件:Logic.java   
private void setGCOnSelection()
{
    clearGCSelection(true);

    InpatientEpisodeForPendingDischargesVo selectedGridVal = form.grdDischarges().getValue();
    if (selectedGridVal == null)
        return;

    form.getGlobalContext().Core.setCurrentCareContext(selectedGridVal.getPasEvent() != null ? domain.getCurrentCareContext(selectedGridVal.getPasEvent()) : null);
    if (form.getGlobalContext().Core.getCurrentCareContext() == null)
        form.getGlobalContext().Core.setPatientShort(selectedGridVal.getPasEvent().getPatient());       
}
项目:AvoinApotti    文件:Logic.java   
private void populateGrid(InpatientEpisodeForPendingDischargesVoCollection discharges, InpatientEpisodeForPendingDischargesVo voToFind) 
{

    for (InpatientEpisodeForPendingDischargesVo item : discharges) 
    {
        grdDischargesRow row = form.grdDischarges().getRows().newRow();
        row.setValue(item);
        if(item.getPasEventIsNotNull())
            if (item.getPasEvent().getPatientIsNotNull())
            {
                item.getPasEvent().getPatient().calculateAge();

                row.setColHOSNUM(item.getPasEvent().getPatient().getHospnum().getValue());
                if (item.getPasEvent().getPatient().getAgeIsNotNull())
                    row.setcolAge(item.getPasEvent().getPatient().getAge().toString());
                if (item.getPasEvent().getPatient().getSexIsNotNull())
                    row.setColPatSex(item.getPasEvent().getPatient().getSex().getText());
                if (item.getPasEvent().getPatient().getNameIsNotNull())
                    if (item.getPasEvent().getPatient().getName().getSurnameIsNotNull())
                        row.setColSurname(item.getPasEvent().getPatient().getName().getSurname());
                    if (item.getPasEvent().getPatient().getName().getForenameIsNotNull())
                        row.setColForename(item.getPasEvent().getPatient().getName().getForename());


            }
        if (item.getPasEvent().getConsultantIsNotNull())
            if (item.getPasEvent().getConsultant().getMosIsNotNull())
                if (item.getPasEvent().getConsultant().getMos().getNameIsNotNull())
                    row.setColConsultant(item.getPasEvent().getConsultant().getMos().getName().toString());
        if (item.getPasEvent().getLocationIsNotNull())
            if (item.getPasEvent().getLocation().getNameIsNotNull())
                row.setColWard(item.getPasEvent().getLocation().getName());
        if (item.getBedIsNotNull())
            if (item.getBed().getBedSpaceIsNotNull())
                if (item.getBed().getBedSpace().getBedSpaceTypeIsNotNull())
                    row.setColLocation(item.getBed().getBedSpace().getBedSpaceType().getText());
        if (item.getEstDischargeDateIsNotNull())
            row.setColDateTime(item.getEstDischargeDate().toString());

        if(item.isDischargeDueWithin24Hrs())
        {
            if(item.getIsConfirmedDischarge() == null || item.getIsConfirmedDischarge().equals(false))
                row.setBackColor(Color.Orange);
            else if(item.getIsConfirmedDischargeIsNotNull() && item.getIsConfirmedDischarge().equals(true))
                row.setBackColor(Color.Red);
        }   

        if (voToFind != null 
            && voToFind.equals(item))
            form.grdDischarges().setValue(voToFind);

    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrid(InpatientEpisodeForPendingDischargesVoCollection discharges, InpatientEpisodeForPendingDischargesVo voToFind) 
{

    for (InpatientEpisodeForPendingDischargesVo item : discharges) 
    {
        grdDischargesRow row = form.grdDischarges().getRows().newRow();
        row.setValue(item);
        if(item.getPasEventIsNotNull())
            if (item.getPasEvent().getPatientIsNotNull())
            {
                item.getPasEvent().getPatient().calculateAge();

                row.setColHOSNUM(item.getPasEvent().getPatient().getHospnum().getValue());
                if (item.getPasEvent().getPatient().getAgeIsNotNull())
                    row.setcolAge(item.getPasEvent().getPatient().getAge().toString());
                if (item.getPasEvent().getPatient().getSexIsNotNull())
                    row.setColPatSex(item.getPasEvent().getPatient().getSex().getText());
                if (item.getPasEvent().getPatient().getNameIsNotNull())
                    if (item.getPasEvent().getPatient().getName().getSurnameIsNotNull())
                        row.setColSurname(item.getPasEvent().getPatient().getName().getSurname());
                    if (item.getPasEvent().getPatient().getName().getForenameIsNotNull())
                        row.setColForename(item.getPasEvent().getPatient().getName().getForename());


            }
        if (item.getPasEvent().getConsultantIsNotNull())
            if (item.getPasEvent().getConsultant().getMosIsNotNull())
                if (item.getPasEvent().getConsultant().getMos().getNameIsNotNull())
                    row.setColConsultant(item.getPasEvent().getConsultant().getMos().getName().toString());
        if (item.getPasEvent().getLocationIsNotNull())
            if (item.getPasEvent().getLocation().getNameIsNotNull())
                row.setColWard(item.getPasEvent().getLocation().getName());
        if (item.getBedIsNotNull())
            if (item.getBed().getBedSpaceIsNotNull())
                if (item.getBed().getBedSpace().getBedSpaceTypeIsNotNull())
                    row.setColLocation(item.getBed().getBedSpace().getBedSpaceType().getText());
        if (item.getEstDischargeDateIsNotNull())
            row.setColDateTime(item.getEstDischargeDate().toString());

        if(item.isDischargeDueWithin24Hrs())
        {
            if(item.getIsConfirmedDischarge() == null || item.getIsConfirmedDischarge().equals(false))
                row.setBackColor(Color.Orange);
            else if(item.getIsConfirmedDischargeIsNotNull() && item.getIsConfirmedDischarge().equals(true))
                row.setBackColor(Color.Red);
        }   

        if (voToFind != null 
            && voToFind.equals(item))
            form.grdDischarges().setValue(voToFind);

    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateGrid(InpatientEpisodeForPendingDischargesVoCollection discharges, InpatientEpisodeForPendingDischargesVo voToFind) 
{

    for (InpatientEpisodeForPendingDischargesVo item : discharges) 
    {
        grdDischargesRow row = form.grdDischarges().getRows().newRow();
        row.setValue(item);
        if(item.getPasEventIsNotNull())
            if (item.getPasEvent().getPatientIsNotNull())
            {
                item.getPasEvent().getPatient().calculateAge();

                row.setColHOSNUM(item.getPasEvent().getPatient().getHospnum().getValue());
                if (item.getPasEvent().getPatient().getAgeIsNotNull())
                    row.setcolAge(item.getPasEvent().getPatient().getAge().toString());
                if (item.getPasEvent().getPatient().getSexIsNotNull())
                    row.setColPatSex(item.getPasEvent().getPatient().getSex().getText());
                if (item.getPasEvent().getPatient().getNameIsNotNull())
                    if (item.getPasEvent().getPatient().getName().getSurnameIsNotNull())
                        row.setColSurname(item.getPasEvent().getPatient().getName().getSurname());
                    if (item.getPasEvent().getPatient().getName().getForenameIsNotNull())
                        row.setColForename(item.getPasEvent().getPatient().getName().getForename());


            }
        if (item.getPasEvent().getConsultantIsNotNull())
            if (item.getPasEvent().getConsultant().getMosIsNotNull())
                if (item.getPasEvent().getConsultant().getMos().getNameIsNotNull())
                    row.setColConsultant(item.getPasEvent().getConsultant().getMos().getName().toString());
        if (item.getPasEvent().getLocationIsNotNull())
            if (item.getPasEvent().getLocation().getNameIsNotNull())
                row.setColWard(item.getPasEvent().getLocation().getName());
        if (item.getBedIsNotNull())
            if (item.getBed().getBedSpaceIsNotNull())
                if (item.getBed().getBedSpace().getBedSpaceTypeIsNotNull())
                    row.setColLocation(item.getBed().getBedSpace().getBedSpaceType().getText());
        if (item.getEstDischargeDateIsNotNull())
            row.setColDateTime(item.getEstDischargeDate().toString());

        if(item.isDischargeDueWithin24Hrs())
        {
            if(item.getIsConfirmedDischarge() == null || item.getIsConfirmedDischarge().equals(false))
                row.setBackColor(Color.Orange);
            else if(item.getIsConfirmedDischargeIsNotNull() && item.getIsConfirmedDischarge().equals(true))
                row.setBackColor(Color.Red);
        }   

        if (voToFind != null 
            && voToFind.equals(item))
            form.grdDischarges().setValue(voToFind);

    }
}