Java 类ims.clinical.vo.DementialManualClassAssemblyVo 实例源码

项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2)
{
    String cons1 = null;
    String cons2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        cons1 = dem1.getConsultantSortIsNotNull() ? dem1.getConsultantSort() : null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
            cons2 = dem2.getConsultantSortIsNotNull() ? dem2.getConsultantSort() : null;
    }
    if (cons1 != null && cons2!=null)
        return cons1.compareTo(cons2) * direction;
    if (cons1 == null)
        return (-1) * direction;
    if (cons2==null)
        return direction;
    return 0;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PartialDate pdate1 = null;
    PartialDate pdate2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        pdate1 = dem1.getPatientDOBIsNotNull()?dem1.getPatientDOB():null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        pdate2 = dem2.getPatientDOBIsNotNull()?dem2.getPatientDOB():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2)
{
    String cons1 = null;
    String cons2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        cons1 = dem1.getConsultantSortIsNotNull() ? dem1.getConsultantSort() : null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
            cons2 = dem2.getConsultantSortIsNotNull() ? dem2.getConsultantSort() : null;
    }
    if (cons1 != null && cons2!=null)
        return cons1.compareTo(cons2) * direction;
    if (cons1 == null)
        return (-1) * direction;
    if (cons2==null)
        return direction;
    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PartialDate pdate1 = null;
    PartialDate pdate2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        pdate1 = dem1.getPatientDOBIsNotNull()?dem1.getPatientDOB():null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        pdate2 = dem2.getPatientDOBIsNotNull()?dem2.getPatientDOB():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2)
{
    String cons1 = null;
    String cons2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        cons1 = dem1.getConsultantSortIsNotNull() ? dem1.getConsultantSort() : null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
            cons2 = dem2.getConsultantSortIsNotNull() ? dem2.getConsultantSort() : null;
    }
    if (cons1 != null && cons2!=null)
        return cons1.compareTo(cons2) * direction;
    if (cons1 == null)
        return (-1) * direction;
    if (cons2==null)
        return direction;
    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PartialDate pdate1 = null;
    PartialDate pdate2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        pdate1 = dem1.getPatientDOBIsNotNull()?dem1.getPatientDOB():null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        pdate2 = dem2.getPatientDOBIsNotNull()?dem2.getPatientDOB():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2)
{
    String cons1 = null;
    String cons2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        cons1 = dem1.getConsultantSortIsNotNull() ? dem1.getConsultantSort() : null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
            cons2 = dem2.getConsultantSortIsNotNull() ? dem2.getConsultantSort() : null;
    }
    if (cons1 != null && cons2!=null)
        return cons1.compareTo(cons2) * direction;
    if (cons1 == null)
        return (-1) * direction;
    if (cons2==null)
        return direction;
    return 0;
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    PartialDate pdate1 = null;
    PartialDate pdate2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        pdate1 = dem1.getPatientDOBIsNotNull()?dem1.getPatientDOB():null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        pdate2 = dem2.getPatientDOBIsNotNull()?dem2.getPatientDOB():null;
    }
    if(pdate1 != null )
        return  pdate1.compareTo(pdate2)*direction;
    if(pdate2 != null)
        return (-1)*direction;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdPatientsRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
    form.getGlobalContext().Core.setPatientShort(null);

    DementiaForWorklistVo voDementia = null;
    if (form.dyngrdPatients().getValue() != null && form.dyngrdPatients().getValue() instanceof DementialManualClassAssemblyVo)
        voDementia = domain.getDementiaForWorklist(new DementiaRefVo(((DementialManualClassAssemblyVo) form.dyngrdPatients().getValue()).getDementiaId(),0));
    else
        voDementia = domain.getDementiaForWorklist((DementiaForWorklistVo)form.dyngrdPatients().getValue());

    if (voDementia == null) // This record could have been RIE'ed and so no longer exists for the worklist
    {
        engine.showErrors(new String[]{ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()});
        doSearch();
        return;
    }

//  row.setValue(voDementia);
//  DementiaForWorklistVo rowValue = (DementiaForWorklistVo) form.dyngrdPatients().getValue();

    if (voDementia.getPatientIsNotNull())
    {
        form.getGlobalContext().Core.setPatientShort(domain.getPatient(voDementia.getPatient()));
    }
    form.getLocalContext().setSelectedInstance(voDementia);
    updateControlsState();
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime pdate1 = null;
    DateTime pdate2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        pdate1 = dem1.getDischargeDateTimeIsNotNull()?dem1.getDischargeDateTime():null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        pdate2 = dem2.getDischargeDateTimeIsNotNull()?dem2.getDischargeDateTime():null;
    }

    if (pdate1 == null && pdate2 != null)
    {
        return -1 * direction;
    }

    if (pdate1 != null && pdate2 == null)
    {
        return direction;
    }

    if (pdate1 != null && pdate2 != null)
        return direction * pdate1.compareTo(pdate2);
    else
        return 0;
//  if(pdate1 != null )
//      return  pdate1.compareTo(pdate2)*direction;
//  if(pdate2 != null)
//      return (-1)*direction;
//  
//  return 0;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Integer hoursToBreach1 = null;
    Integer hoursToBreach2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        if (dem1.getDischargeDateTime()==null && dem1.getCurrentStatusIsNotNull() && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(dem1.getCurrentStatus()) && dem1.getBreachDateTimeIsNotNull())
        {
            hoursToBreach1 = calculateDateDiffInMinutes(new DateTime(), dem1.getBreachDateTime())/60;
        }
        else
        {
            //hoursToBreach1=Integer.MIN_VALUE;
            hoursToBreach1=null;
        }
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        if (dem2.getDischargeDateTime()==null && dem2.getCurrentStatusIsNotNull() && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(dem2.getCurrentStatus()) && dem2.getBreachDateTimeIsNotNull())
        {
            hoursToBreach2 = calculateDateDiffInMinutes(new DateTime(), dem2.getBreachDateTime())/60;
        }
        else
        {
            //hoursToBreach2=Integer.MIN_VALUE;
            hoursToBreach2=null;
        }

    }
    if(hoursToBreach1 != null && hoursToBreach2 != null)
        return  hoursToBreach1.compareTo(hoursToBreach2)*direction;
    if(hoursToBreach1 == null && hoursToBreach2!=null)
        return 1;
    if (hoursToBreach2==null && hoursToBreach1 != null)
        return -1;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Integer icon1 = null;
    Integer icon2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        if (dem1.getDementiaConfirmedIsNotNull() && dem1.getDementiaConfirmed())
        {
            icon1=2;
        }
        else if (dem1.getDeliriumConfirmedIsNotNull() && dem1.getDeliriumConfirmed())
        {
            icon1=1;
        }
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        if (dem2.getDementiaConfirmedIsNotNull() && dem2.getDementiaConfirmed())
        {
            icon2=2;
        }
        else if (dem2.getDeliriumConfirmedIsNotNull() && dem2.getDeliriumConfirmed())
        {
            icon2=1;
        }

    }

    if (icon1 != null && icon2!=null)
        return icon1.compareTo(icon2) * direction;
    if (icon1 == null)
        return (-1) * direction;
    if (icon2==null)
        return direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdPatientsRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
    form.getGlobalContext().Core.setPatientShort(null);

    DementiaForWorklistVo voDementia = null;
    if (form.dyngrdPatients().getValue() != null && form.dyngrdPatients().getValue() instanceof DementialManualClassAssemblyVo)
        voDementia = domain.getDementiaForWorklist(new DementiaRefVo(((DementialManualClassAssemblyVo) form.dyngrdPatients().getValue()).getDementiaId(),0));
    else
        voDementia = domain.getDementiaForWorklist((DementiaForWorklistVo)form.dyngrdPatients().getValue());

    if (voDementia == null) // This record could have been RIE'ed and so no longer exists for the worklist
    {
        engine.showErrors(new String[]{ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()});
        doSearch();
        return;
    }

//  row.setValue(voDementia);
//  DementiaForWorklistVo rowValue = (DementiaForWorklistVo) form.dyngrdPatients().getValue();

    if (voDementia.getPatientIsNotNull())
    {
        form.getGlobalContext().Core.setPatientShort(domain.getPatient(voDementia.getPatient()));
    }
    form.getLocalContext().setSelectedInstance(voDementia);
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime pdate1 = null;
    DateTime pdate2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        pdate1 = dem1.getDischargeDateTimeIsNotNull()?dem1.getDischargeDateTime():null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        pdate2 = dem2.getDischargeDateTimeIsNotNull()?dem2.getDischargeDateTime():null;
    }

    if (pdate1 == null && pdate2 != null)
    {
        return -1 * direction;
    }

    if (pdate1 != null && pdate2 == null)
    {
        return direction;
    }

    if (pdate1 != null && pdate2 != null)
        return direction * pdate1.compareTo(pdate2);
    else
        return 0;
//  if(pdate1 != null )
//      return  pdate1.compareTo(pdate2)*direction;
//  if(pdate2 != null)
//      return (-1)*direction;
//  
//  return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Integer hoursToBreach1 = null;
    Integer hoursToBreach2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        if (dem1.getDischargeDateTime()==null && dem1.getCurrentStatusIsNotNull() && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(dem1.getCurrentStatus()) && dem1.getBreachDateTimeIsNotNull())
        {
            hoursToBreach1 = calculateDateDiffInMinutes(new DateTime(), dem1.getBreachDateTime())/60;
        }
        else
        {
            //hoursToBreach1=Integer.MIN_VALUE;
            hoursToBreach1=null;
        }
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        if (dem2.getDischargeDateTime()==null && dem2.getCurrentStatusIsNotNull() && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(dem2.getCurrentStatus()) && dem2.getBreachDateTimeIsNotNull())
        {
            hoursToBreach2 = calculateDateDiffInMinutes(new DateTime(), dem2.getBreachDateTime())/60;
        }
        else
        {
            //hoursToBreach2=Integer.MIN_VALUE;
            hoursToBreach2=null;
        }

    }
    if(hoursToBreach1 != null && hoursToBreach2 != null)
        return  hoursToBreach1.compareTo(hoursToBreach2)*direction;
    if(hoursToBreach1 == null && hoursToBreach2!=null)
        return 1;
    if (hoursToBreach2==null && hoursToBreach1 != null)
        return -1;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Integer icon1 = null;
    Integer icon2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        if (dem1.getDementiaConfirmedIsNotNull() && dem1.getDementiaConfirmed())
        {
            icon1=2;
        }
        else if (dem1.getDeliriumConfirmedIsNotNull() && dem1.getDeliriumConfirmed())
        {
            icon1=1;
        }
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        if (dem2.getDementiaConfirmedIsNotNull() && dem2.getDementiaConfirmed())
        {
            icon2=2;
        }
        else if (dem2.getDeliriumConfirmedIsNotNull() && dem2.getDeliriumConfirmed())
        {
            icon2=1;
        }

    }

    if (icon1 != null && icon2!=null)
        return icon1.compareTo(icon2) * direction;
    if (icon1 == null)
        return (-1) * direction;
    if (icon2==null)
        return direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdPatientsRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
    form.getGlobalContext().Core.setPatientShort(null);

    DementiaForWorklistVo voDementia = null;
    if (form.dyngrdPatients().getValue() != null && form.dyngrdPatients().getValue() instanceof DementialManualClassAssemblyVo)
        voDementia = domain.getDementiaForWorklist(new DementiaRefVo(((DementialManualClassAssemblyVo) form.dyngrdPatients().getValue()).getDementiaId(),0));
    else
        voDementia = domain.getDementiaForWorklist((DementiaForWorklistVo)form.dyngrdPatients().getValue());

    if (voDementia == null) // This record could have been RIE'ed and so no longer exists for the worklist
    {
        engine.showErrors(new String[]{ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()});
        doSearch();
        return;
    }

//  row.setValue(voDementia);
//  DementiaForWorklistVo rowValue = (DementiaForWorklistVo) form.dyngrdPatients().getValue();

    if (voDementia.getPatientIsNotNull())
    {
        form.getGlobalContext().Core.setPatientShort(domain.getPatient(voDementia.getPatient()));
    }
    form.getLocalContext().setSelectedInstance(voDementia);
    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime pdate1 = null;
    DateTime pdate2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        pdate1 = dem1.getDischargeDateTimeIsNotNull()?dem1.getDischargeDateTime():null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        pdate2 = dem2.getDischargeDateTimeIsNotNull()?dem2.getDischargeDateTime():null;
    }

    if (pdate1 == null && pdate2 != null)
    {
        return -1 * direction;
    }

    if (pdate1 != null && pdate2 == null)
    {
        return direction;
    }

    if (pdate1 != null && pdate2 != null)
        return direction * pdate1.compareTo(pdate2);
    else
        return 0;
//  if(pdate1 != null )
//      return  pdate1.compareTo(pdate2)*direction;
//  if(pdate2 != null)
//      return (-1)*direction;
//  
//  return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Integer hoursToBreach1 = null;
    Integer hoursToBreach2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        if (dem1.getDischargeDateTime()==null && dem1.getCurrentStatusIsNotNull() && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(dem1.getCurrentStatus()) && dem1.getBreachDateTimeIsNotNull())
        {
            hoursToBreach1 = calculateDateDiffInMinutes(new DateTime(), dem1.getBreachDateTime())/60;
        }
        else
        {
            //hoursToBreach1=Integer.MIN_VALUE;
            hoursToBreach1=null;
        }
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        if (dem2.getDischargeDateTime()==null && dem2.getCurrentStatusIsNotNull() && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(dem2.getCurrentStatus()) && dem2.getBreachDateTimeIsNotNull())
        {
            hoursToBreach2 = calculateDateDiffInMinutes(new DateTime(), dem2.getBreachDateTime())/60;
        }
        else
        {
            //hoursToBreach2=Integer.MIN_VALUE;
            hoursToBreach2=null;
        }

    }
    if(hoursToBreach1 != null && hoursToBreach2 != null)
        return  hoursToBreach1.compareTo(hoursToBreach2)*direction;
    if(hoursToBreach1 == null && hoursToBreach2!=null)
        return 1;
    if (hoursToBreach2==null && hoursToBreach1 != null)
        return -1;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Integer icon1 = null;
    Integer icon2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        if (dem1.getDementiaConfirmedIsNotNull() && dem1.getDementiaConfirmed())
        {
            icon1=2;
        }
        else if (dem1.getDeliriumConfirmedIsNotNull() && dem1.getDeliriumConfirmed())
        {
            icon1=1;
        }
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        if (dem2.getDementiaConfirmedIsNotNull() && dem2.getDementiaConfirmed())
        {
            icon2=2;
        }
        else if (dem2.getDeliriumConfirmedIsNotNull() && dem2.getDeliriumConfirmed())
        {
            icon2=1;
        }

    }

    if (icon1 != null && icon2!=null)
        return icon1.compareTo(icon2) * direction;
    if (icon1 == null)
        return (-1) * direction;
    if (icon2==null)
        return direction;

    return 0;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onDyngrdPatientsRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
    form.getGlobalContext().Core.setPatientShort(null);

    DementiaForWorklistVo voDementia = null;
    if (form.dyngrdPatients().getValue() != null && form.dyngrdPatients().getValue() instanceof DementialManualClassAssemblyVo)
        voDementia = domain.getDementiaForWorklist(new DementiaRefVo(((DementialManualClassAssemblyVo) form.dyngrdPatients().getValue()).getDementiaId(),0));
    else
        voDementia = domain.getDementiaForWorklist((DementiaForWorklistVo)form.dyngrdPatients().getValue());

    if (voDementia == null) // This record could have been RIE'ed and so no longer exists for the worklist
    {
        engine.showErrors(new String[]{ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()});
        doSearch();
        return;
    }

//  row.setValue(voDementia);
//  DementiaForWorklistVo rowValue = (DementiaForWorklistVo) form.dyngrdPatients().getValue();

    if (voDementia.getPatientIsNotNull())
    {
        form.getGlobalContext().Core.setPatientShort(domain.getPatient(voDementia.getPatient()));
    }
    form.getLocalContext().setSelectedInstance(voDementia);
    updateControlsState();
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime pdate1 = null;
    DateTime pdate2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        pdate1 = dem1.getDischargeDateTimeIsNotNull()?dem1.getDischargeDateTime():null;
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        pdate2 = dem2.getDischargeDateTimeIsNotNull()?dem2.getDischargeDateTime():null;
    }

    if (pdate1 == null && pdate2 != null)
    {
        return -1 * direction;
    }

    if (pdate1 != null && pdate2 == null)
    {
        return direction;
    }

    if (pdate1 != null && pdate2 != null)
        return direction * pdate1.compareTo(pdate2);
    else
        return 0;
//  if(pdate1 != null )
//      return  pdate1.compareTo(pdate2)*direction;
//  if(pdate2 != null)
//      return (-1)*direction;
//  
//  return 0;
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Integer hoursToBreach1 = null;
    Integer hoursToBreach2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        if (dem1.getDischargeDateTime()==null && dem1.getCurrentStatusIsNotNull() && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(dem1.getCurrentStatus()) && dem1.getBreachDateTimeIsNotNull())
        {
            hoursToBreach1 = calculateDateDiffInMinutes(new DateTime(), dem1.getBreachDateTime())/60;
        }
        else
        {
            //hoursToBreach1=Integer.MIN_VALUE;
            hoursToBreach1=null;
        }
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        if (dem2.getDischargeDateTime()==null && dem2.getCurrentStatusIsNotNull() && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(dem2.getCurrentStatus()) && dem2.getBreachDateTimeIsNotNull())
        {
            hoursToBreach2 = calculateDateDiffInMinutes(new DateTime(), dem2.getBreachDateTime())/60;
        }
        else
        {
            //hoursToBreach2=Integer.MIN_VALUE;
            hoursToBreach2=null;
        }

    }
    if(hoursToBreach1 != null && hoursToBreach2 != null)
        return  hoursToBreach1.compareTo(hoursToBreach2)*direction;
    if(hoursToBreach1 == null && hoursToBreach2!=null)
        return 1;
    if (hoursToBreach2==null && hoursToBreach1 != null)
        return -1;

    return 0;
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    Integer icon1 = null;
    Integer icon2 = null;
    if (ob1 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem1=(DementialManualClassAssemblyVo)ob1;
        if (dem1.getDementiaConfirmedIsNotNull() && dem1.getDementiaConfirmed())
        {
            icon1=2;
        }
        else if (dem1.getDeliriumConfirmedIsNotNull() && dem1.getDeliriumConfirmed())
        {
            icon1=1;
        }
    }
    if (ob2 instanceof DementialManualClassAssemblyVo)
    {
        DementialManualClassAssemblyVo dem2=(DementialManualClassAssemblyVo)ob2;
        if (dem2.getDementiaConfirmedIsNotNull() && dem2.getDementiaConfirmed())
        {
            icon2=2;
        }
        else if (dem2.getDeliriumConfirmedIsNotNull() && dem2.getDeliriumConfirmed())
        {
            icon2=1;
        }

    }

    if (icon1 != null && icon2!=null)
        return icon1.compareTo(icon2) * direction;
    if (icon1 == null)
        return (-1) * direction;
    if (icon2==null)
        return direction;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState()
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    DementialManualClassAssemblyVo selectedRowValue = (DementialManualClassAssemblyVo) form.dyngrdPatients().getValue();

    //WDEV-16247
    Object hcp = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteUser=null;
    if (hcp != null)
        hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

    DementiaVo voDementia = (selectedRowValue!=null ? domain.getDementia(new DementiaRefVo(((DementialManualClassAssemblyVo) selectedRowValue).getDementiaId(),0)) : null);

    DementiaFindVo voStep1Find = (voDementia!=null?voDementia.getStepOneFind():null);
    DementiaAssessAndInvestigateVo voStep2AMTS = (voDementia!=null?voDementia.getStepTwoAssess():null);

    Integer hours = (voDementia!=null && voDementia.getAdmissionDateTime()!=null?calculateDateDiffInMinutes(voDementia.getAdmissionDateTime(),new DateTime())/60:null);

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dteFrom().setEnabled(enableControls);
    form.dteTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkExclude().setEnabled(enableControls);
    form.chkDelirum().setEnabled(enableControls);
    form.chkDementiaConfirmed().setEnabled(enableControls);
    form.chkInpatientOnly().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllDementiaWorklistMenuMenuItems();
    form.getContextMenus().Clinical.getDementiaWorklistMenuVIEWItem().setVisible(selectedRowValue != null && voDementia.getStepOneFindIsNotNull());
    //EDIT Context Menu 
    form.getContextMenus().Clinical.getDementiaWorklistMenuEDITItem().setVisible(hcpLiteUser!=null && selectedRowValue != null && (voStep1Find!=null || voStep2AMTS!=null)
                                &&((voStep1Find!=null  && voStep1Find.getAuthoringInformationIsNotNull() &&voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() &&  voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || (voStep2AMTS!=null && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)));   
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP1Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus()));
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP2Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
            && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus())));
    form.getContextMenus().Clinical.getDementiaWorklistMenuRECORD_FOLLOWUP_AMTSItem().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null && voDementia.getStepTwoAssessIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuEXCLUDE_FROM_DEMENTIA_SCREENINGItem().setVisible(selectedRowValue != null 
            && selectedRowValue.getIsExcludedFromWorklist()==null 
            && (hours!=null && hours>form.getGlobalContext().Admin.getDementiaConfiguration().getRemoveTimePeriod())
            && ! DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())
            && ! DementiaWorklistStatus.FOR_REFERRAL.equals(voDementia.getCurrentWorklistStatus().getStatus()) );
    form.getContextMenus().Clinical.getDementiaWorklistMenuCONFIRM_PATIENTItem().setVisible(selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
                    && DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())) 
                    && (Boolean.TRUE.equals(selectedRowValue.getDementiaConfirmed())) 
                    && voDementia.getConfirmedPatientPutOnDementiaPathway()==null);
    form.getContextMenus().Clinical.getDementiaWorklistMenuRIE_REMOVE_FROM_WORKLISTItem().setVisible(selectedRowValue != null 
            && engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA) );   
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP1Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP2Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull() && voDementia.getStepTwoAssessIsNotNull());


}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdPatientsColumnHeaderClicked(DynamicGridColumn column)
{
    DementialManualClassAssemblyVoCollection values = new DementialManualClassAssemblyVoCollection();
    for (int i=0;i<form.dyngrdPatients().getRows().size();i++)
    {
        values.add((DementialManualClassAssemblyVo) form.dyngrdPatients().getRows().get(i).getValue());
    }

    if (values==null || values.size()<=1)
        return;

    switch((Integer)column.getIdentifier())
    {
        case COL_CONSULTANT:
            form.getLocalContext().setConsultantSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getConsultantSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new ConsultantComparator(form.getLocalContext().getConsultantSortOrder()));
        break;

        case COL_DOB:
            form.getLocalContext().setDOBSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDOBSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new DobComparator(form.getLocalContext().getDOBSortOrder()));
        break;

        case COL_HOURSTOBREACH:
            form.getLocalContext().setHoursToBreachSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getHoursToBreachSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new HoursToBreachComparator(form.getLocalContext().getHoursToBreachSortOrder()));
        break;
        case COL_ICON:
            form.getLocalContext().setIconSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getIconSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new IconComparator(form.getLocalContext().getIconSortOrder()));
        break;
        case COL_DISCHARGEDATE:
            form.getLocalContext().setDDSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDDSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new DischargeDateComparator(form.getLocalContext().getDDSortOrder()));
        break;


    }

    populateScreenFromData(values);

}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    DementialManualClassAssemblyVo selectedRowValue = (DementialManualClassAssemblyVo) form.dyngrdPatients().getValue();

    //WDEV-16247
    Object hcp = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteUser=null;
    if (hcp != null)
        hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

    DementiaVo voDementia = (selectedRowValue!=null ? domain.getDementia(new DementiaRefVo(((DementialManualClassAssemblyVo) selectedRowValue).getDementiaId(),0)) : null);

    DementiaFindVo voStep1Find = (voDementia!=null?voDementia.getStepOneFind():null);
    DementiaAssessAndInvestigateVo voStep2AMTS = (voDementia!=null?voDementia.getStepTwoAssess():null);

    Integer hours = (voDementia!=null && voDementia.getAdmissionDateTime()!=null?calculateDateDiffInMinutes(voDementia.getAdmissionDateTime(),new DateTime())/60:null);

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dteFrom().setEnabled(enableControls);
    form.dteTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkExclude().setEnabled(enableControls);
    form.chkDelirum().setEnabled(enableControls);
    form.chkDementiaConfirmed().setEnabled(enableControls);
    form.chkInpatientOnly().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllDementiaWorklistMenuMenuItems();
    form.getContextMenus().Clinical.getDementiaWorklistMenuVIEWItem().setVisible(selectedRowValue != null && voDementia.getStepOneFindIsNotNull());
    //EDIT Context Menu 
    form.getContextMenus().Clinical.getDementiaWorklistMenuEDITItem().setVisible(hcpLiteUser!=null && selectedRowValue != null && (voStep1Find!=null || voStep2AMTS!=null)
                                &&((voStep1Find!=null  && voStep1Find.getAuthoringInformationIsNotNull() &&voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() &&  voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || (voStep2AMTS!=null && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)));   
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP1Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus()));
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP2Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
            && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus())));
    form.getContextMenus().Clinical.getDementiaWorklistMenuRECORD_FOLLOWUP_AMTSItem().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null && voDementia.getStepTwoAssessIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuEXCLUDE_FROM_DEMENTIA_SCREENINGItem().setVisible(selectedRowValue != null 
            && selectedRowValue.getIsExcludedFromWorklist()==null 
            && (hours!=null && hours>form.getGlobalContext().Admin.getDementiaConfiguration().getRemoveTimePeriod())
            && ! DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())
            && ! DementiaWorklistStatus.FOR_REFERRAL.equals(voDementia.getCurrentWorklistStatus().getStatus()) );
    form.getContextMenus().Clinical.getDementiaWorklistMenuCONFIRM_PATIENTItem().setVisible(selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
                    && DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())) 
                    && (Boolean.TRUE.equals(selectedRowValue.getDementiaConfirmed())) 
                    && voDementia.getConfirmedPatientPutOnDementiaPathway()==null);
    form.getContextMenus().Clinical.getDementiaWorklistMenuRIE_REMOVE_FROM_WORKLISTItem().setVisible(selectedRowValue != null 
            && engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA) );   
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP1Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP2Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull() && voDementia.getStepTwoAssessIsNotNull());


}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdPatientsColumnHeaderClicked(DynamicGridColumn column)
{
    DementialManualClassAssemblyVoCollection values = new DementialManualClassAssemblyVoCollection();
    for (int i=0;i<form.dyngrdPatients().getRows().size();i++)
    {
        values.add((DementialManualClassAssemblyVo) form.dyngrdPatients().getRows().get(i).getValue());
    }

    if (values==null || values.size()<=1)
        return;

    switch((Integer)column.getIdentifier())
    {
        case COL_CONSULTANT:
            form.getLocalContext().setConsultantSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getConsultantSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new ConsultantComparator(form.getLocalContext().getConsultantSortOrder()));
        break;

        case COL_DOB:
            form.getLocalContext().setDOBSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDOBSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new DobComparator(form.getLocalContext().getDOBSortOrder()));
        break;

        case COL_HOURSTOBREACH:
            form.getLocalContext().setHoursToBreachSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getHoursToBreachSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new HoursToBreachComparator(form.getLocalContext().getHoursToBreachSortOrder()));
        break;
        case COL_ICON:
            form.getLocalContext().setIconSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getIconSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new IconComparator(form.getLocalContext().getIconSortOrder()));
        break;
        case COL_DISCHARGEDATE:
            form.getLocalContext().setDDSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDDSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new DischargeDateComparator(form.getLocalContext().getDDSortOrder()));
        break;


    }

    populateScreenFromData(values);

}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    DementialManualClassAssemblyVo selectedRowValue = (DementialManualClassAssemblyVo) form.dyngrdPatients().getValue();

    //WDEV-16247
    Object hcp = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteUser=null;
    if (hcp != null)
        hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

    DementiaVo voDementia = (selectedRowValue!=null ? domain.getDementia(new DementiaRefVo(((DementialManualClassAssemblyVo) selectedRowValue).getDementiaId(),0)) : null);

    DementiaFindVo voStep1Find = (voDementia!=null?voDementia.getStepOneFind():null);
    DementiaAssessAndInvestigateVo voStep2AMTS = (voDementia!=null?voDementia.getStepTwoAssess():null);

    Integer hours = (voDementia!=null && voDementia.getAdmissionDateTime()!=null?calculateDateDiffInMinutes(voDementia.getAdmissionDateTime(),new DateTime())/60:null);

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dteFrom().setEnabled(enableControls);
    form.dteTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkExclude().setEnabled(enableControls);
    form.chkDelirum().setEnabled(enableControls);
    form.chkDementiaConfirmed().setEnabled(enableControls);
    form.chkInpatientOnly().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllDementiaWorklistMenuMenuItems();
    form.getContextMenus().Clinical.getDementiaWorklistMenuVIEWItem().setVisible(selectedRowValue != null && voDementia.getStepOneFindIsNotNull());
    //EDIT Context Menu 
    form.getContextMenus().Clinical.getDementiaWorklistMenuEDITItem().setVisible(hcpLiteUser!=null && selectedRowValue != null && (voStep1Find!=null || voStep2AMTS!=null)
                                &&((voStep1Find!=null  && voStep1Find.getAuthoringInformationIsNotNull() &&voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() &&  voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || (voStep2AMTS!=null && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)));   
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP1Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus()));
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP2Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
            && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus())));
    form.getContextMenus().Clinical.getDementiaWorklistMenuRECORD_FOLLOWUP_AMTSItem().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null && voDementia.getStepTwoAssessIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuEXCLUDE_FROM_DEMENTIA_SCREENINGItem().setVisible(selectedRowValue != null 
            && selectedRowValue.getIsExcludedFromWorklist()==null 
            && (hours!=null && hours>form.getGlobalContext().Admin.getDementiaConfiguration().getRemoveTimePeriod())
            && ! DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())
            && ! DementiaWorklistStatus.FOR_REFERRAL.equals(voDementia.getCurrentWorklistStatus().getStatus()) );
    form.getContextMenus().Clinical.getDementiaWorklistMenuCONFIRM_PATIENTItem().setVisible(selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
                    && DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())) 
                    && (Boolean.TRUE.equals(selectedRowValue.getDementiaConfirmed())) 
                    && voDementia.getConfirmedPatientPutOnDementiaPathway()==null);
    form.getContextMenus().Clinical.getDementiaWorklistMenuRIE_REMOVE_FROM_WORKLISTItem().setVisible(selectedRowValue != null 
            && engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA) );   
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP1Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP2Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull() && voDementia.getStepTwoAssessIsNotNull());


}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onDyngrdPatientsColumnHeaderClicked(DynamicGridColumn column)
{
    DementialManualClassAssemblyVoCollection values = new DementialManualClassAssemblyVoCollection();
    for (int i=0;i<form.dyngrdPatients().getRows().size();i++)
    {
        values.add((DementialManualClassAssemblyVo) form.dyngrdPatients().getRows().get(i).getValue());
    }

    if (values==null || values.size()<=1)
        return;

    switch((Integer)column.getIdentifier())
    {
        case COL_CONSULTANT:
            form.getLocalContext().setConsultantSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getConsultantSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new ConsultantComparator(form.getLocalContext().getConsultantSortOrder()));
        break;

        case COL_DOB:
            form.getLocalContext().setDOBSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDOBSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new DobComparator(form.getLocalContext().getDOBSortOrder()));
        break;

        case COL_HOURSTOBREACH:
            form.getLocalContext().setHoursToBreachSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getHoursToBreachSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new HoursToBreachComparator(form.getLocalContext().getHoursToBreachSortOrder()));
        break;
        case COL_ICON:
            form.getLocalContext().setIconSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getIconSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new IconComparator(form.getLocalContext().getIconSortOrder()));
        break;
        case COL_DISCHARGEDATE:
            form.getLocalContext().setDDSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDDSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new DischargeDateComparator(form.getLocalContext().getDDSortOrder()));
        break;


    }

    populateScreenFromData(values);

}
项目:openmaxims-linux    文件:Logic.java   
private void updateControlsState()
{
    boolean enableControls = !form.getTimers().gettimerRefresh().isEnabled();

    DementialManualClassAssemblyVo selectedRowValue = (DementialManualClassAssemblyVo) form.dyngrdPatients().getValue();

    //WDEV-16247
    Object hcp = domain.getHcpLiteUser();
    HcpLiteVo hcpLiteUser=null;
    if (hcp != null)
        hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser());

    DementiaVo voDementia = (selectedRowValue!=null ? domain.getDementia(new DementiaRefVo(((DementialManualClassAssemblyVo) selectedRowValue).getDementiaId(),0)) : null);

    DementiaFindVo voStep1Find = (voDementia!=null?voDementia.getStepOneFind():null);
    DementiaAssessAndInvestigateVo voStep2AMTS = (voDementia!=null?voDementia.getStepTwoAssess():null);

    Integer hours = (voDementia!=null && voDementia.getAdmissionDateTime()!=null?calculateDateDiffInMinutes(voDementia.getAdmissionDateTime(),new DateTime())/60:null);

    form.cmbHospital().setEnabled(enableControls);
    form.qmbWard().setEnabled(form.cmbHospital().getValue() != null && enableControls);

    form.dteFrom().setEnabled(enableControls);
    form.dteTo().setEnabled(enableControls);

    form.ccConsultant().setEnabled(enableControls);
    form.cmbSpecialty().setEnabled(enableControls);
    form.cmbStatus().setEnabled(enableControls);

    form.txtSurname().setEnabled(enableControls);
    form.txtForename().setEnabled(enableControls);
    form.cmbIDType().setEnabled(enableControls);
    form.txtIDValue().setEnabled(enableControls);
    form.pdtDOB().setEnabled(enableControls);
    form.chkExclude().setEnabled(enableControls);
    form.chkDelirum().setEnabled(enableControls);
    form.chkDementiaConfirmed().setEnabled(enableControls);
    form.chkInpatientOnly().setEnabled(enableControls);

    form.imbSearch().setEnabled(enableControls);
    form.imbClear().setEnabled(enableControls);

    form.getContextMenus().Clinical.hideAllDementiaWorklistMenuMenuItems();
    form.getContextMenus().Clinical.getDementiaWorklistMenuVIEWItem().setVisible(selectedRowValue != null && voDementia.getStepOneFindIsNotNull());
    //EDIT Context Menu 
    form.getContextMenus().Clinical.getDementiaWorklistMenuEDITItem().setVisible(hcpLiteUser!=null && selectedRowValue != null && (voStep1Find!=null || voStep2AMTS!=null)
                                &&((voStep1Find!=null  && voStep1Find.getAuthoringInformationIsNotNull() &&voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() &&  voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || (voStep2AMTS!=null && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser))
                                    || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)));   
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP1Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && DementiaWorklistStatus.STEP_ONE_FIND_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus()));
    form.getContextMenus().Clinical.getDementiaWorklistMenuSTEP2Item().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
            && DementiaWorklistStatus.STEP_TWO_ASSESS_INVESTIGATE_OUTSTANDING.equals(voDementia.getCurrentWorklistStatus().getStatus())));
    form.getContextMenus().Clinical.getDementiaWorklistMenuRECORD_FOLLOWUP_AMTSItem().setVisible(hcpLiteUser!=null 
            && selectedRowValue != null && voDementia.getStepTwoAssessIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuEXCLUDE_FROM_DEMENTIA_SCREENINGItem().setVisible(selectedRowValue != null 
            && selectedRowValue.getIsExcludedFromWorklist()==null 
            && (hours!=null && hours>form.getGlobalContext().Admin.getDementiaConfiguration().getRemoveTimePeriod())
            && ! DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())
            && ! DementiaWorklistStatus.FOR_REFERRAL.equals(voDementia.getCurrentWorklistStatus().getStatus()) );
    form.getContextMenus().Clinical.getDementiaWorklistMenuCONFIRM_PATIENTItem().setVisible(selectedRowValue != null 
            && (voDementia.getCurrentWorklistStatusIsNotNull() 
                    && DementiaWorklistStatus.COMPLETED.equals(voDementia.getCurrentWorklistStatus().getStatus())) 
                    && (Boolean.TRUE.equals(selectedRowValue.getDementiaConfirmed())) 
                    && voDementia.getConfirmedPatientPutOnDementiaPathway()==null);
    form.getContextMenus().Clinical.getDementiaWorklistMenuRIE_REMOVE_FROM_WORKLISTItem().setVisible(selectedRowValue != null 
            && engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA) );   
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP1Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull());
    form.getContextMenus().Clinical.getDementiaWorklistMenuCORRECT_CCOMPLETION_DATE_STEP2Item().setVisible(selectedRowValue != null 
            && voDementia.getStepOneFindIsNotNull() && voDementia.getStepTwoAssessIsNotNull());


}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onDyngrdPatientsColumnHeaderClicked(DynamicGridColumn column)
{
    DementialManualClassAssemblyVoCollection values = new DementialManualClassAssemblyVoCollection();
    for (int i=0;i<form.dyngrdPatients().getRows().size();i++)
    {
        values.add((DementialManualClassAssemblyVo) form.dyngrdPatients().getRows().get(i).getValue());
    }

    if (values==null || values.size()<=1)
        return;

    switch((Integer)column.getIdentifier())
    {
        case COL_CONSULTANT:
            form.getLocalContext().setConsultantSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getConsultantSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new ConsultantComparator(form.getLocalContext().getConsultantSortOrder()));
        break;

        case COL_DOB:
            form.getLocalContext().setDOBSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDOBSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new DobComparator(form.getLocalContext().getDOBSortOrder()));
        break;

        case COL_HOURSTOBREACH:
            form.getLocalContext().setHoursToBreachSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getHoursToBreachSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new HoursToBreachComparator(form.getLocalContext().getHoursToBreachSortOrder()));
        break;
        case COL_ICON:
            form.getLocalContext().setIconSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getIconSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new IconComparator(form.getLocalContext().getIconSortOrder()));
        break;
        case COL_DISCHARGEDATE:
            form.getLocalContext().setDDSortOrder(SortOrder.ASCENDING.equals(form.getLocalContext().getDDSortOrder())? SortOrder.DESCENDING : SortOrder.ASCENDING);
            values.sort(new DischargeDateComparator(form.getLocalContext().getDDSortOrder()));
        break;


    }

    populateScreenFromData(values);

}