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

项目:openMAXIMS    文件:Logic.java   
private ConsultantStayVo getCurrentConsultantStay(ConsultantStayVoCollection consultantStays)
{
    if(consultantStays == null)
        return null;

    for(ConsultantStayVo cs : consultantStays)
    {
        if(cs != null && cs.getEndDateTime() == null)
            return cs;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private String checkForOverLappingConsultantStay(WardConsultantSpecialtyTransferVo wardConsultantSpecialtyTransferVo,ConsultantStayVoCollection stays)
{
    if(stays!=null)
    {
        for (ConsultantStayVo stayVo : stays) {
            if(stayVo!=null&&stayVo.getID_ConsultantStay()!=null
                    &&form.getLocalContext().getWardStayIsNotNull()&&form.getLocalContext().getWardStay()!=null
                    &&stayVo.getID_ConsultantStay()!=form.getLocalContext().getWardStay().getID_WardStay())
            {
                if(stayVo.getTransferDateTimeIsNotNull()&&stayVo.getEndDateTimeIsNotNull()
                        &&wardConsultantSpecialtyTransferVo.getDateFromIsNotNull()
                        &&wardConsultantSpecialtyTransferVo.getDateFrom().isGreaterThan(stayVo.getTransferDateTime())
                        &&wardConsultantSpecialtyTransferVo.getDateFrom().isLessThan(stayVo.getEndDateTime()))
                {
                    return "From Date overlaps with existing stay";
                }
                if(stayVo.getTransferDateTimeIsNotNull()&&stayVo.getEndDateTimeIsNotNull()
                        &&wardConsultantSpecialtyTransferVo.getDateToIsNotNull()
                        &&wardConsultantSpecialtyTransferVo.getDateTo().isGreaterThan(stayVo.getTransferDateTime())
                        &&wardConsultantSpecialtyTransferVo.getDateTo().isLessThan(stayVo.getEndDateTime()))

                {
                    return "To Date overlaps with existing stay";
                }
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:ADTImpl.java   
private ConsultantStayLiteVo getConsultantStayForAdmission(InpatientEpisodeVo inpatientEpisode)
{       
    ConsultantStayVoCollection conStays = inpatientEpisode.getConsultantStays();
    if (conStays == null)
        return null;
    for (int i=0;i<conStays.size();i++)
    {
        if (conStays.get(i) == null)
            continue;
        if (conStays.get(i).getTransferDateTime() != null && conStays.get(i).getTransferDateTime().equals(inpatientEpisode.getAdmissionDateTime()))
            return conStays.get(i);
    }
    return null;
}