/// <summary> /// 返回排队信息 /// </summary> /// <param name="queueID"></param> /// <returns></returns> public LineUpData GetLineupInfo(string lineupId) { SQL sql = CreateSQL("查询排队信息", "select 排队ID,申请ID,患者ID,队列ID,科室ID,排队日期,队列名称,科室名称,检查房间,患者姓名,排队号码,排队序号,号码前缀,附加信息,排队状态" + " from 影像排队信息" + " where 排队ID=:排队ID "); sql.AddParameter("排队ID", lineupId); DataTable dtLinuup = sql.ExecuteSql(); if (dtLinuup == null || dtLinuup.Rows.Count <= 0) { return(null); } LineUpData lineupInfo = new LineUpData(); lineupInfo.BindRowData(dtLinuup.Rows[0]); return(lineupInfo); }
public LineUpData HasApply(string applyId, string departmentId) { SQL sql = CreateSQL("查询申请是否已经存在", "Select 排队ID,申请ID,患者ID,队列ID,科室ID,排队日期,队列名称,科室名称,检查房间,患者姓名,排队号码,排队序号,号码前缀,附加信息,排队状态 " + " From 影像排队信息 Where 申请ID=:申请ID And 科室ID=:科室ID"); sql.AddParameter("申请ID", applyId); sql.AddParameter("科室ID", departmentId); DataTable dtData = sql.ExecuteSql(); if (dtData == null || dtData.Rows.Count <= 0) { return(null); } LineUpData lineupInfo = new LineUpData(); lineupInfo.BindRowData(dtData.Rows[0]); return(lineupInfo); }
/// <summary> /// 返回顺呼的排队信息 /// </summary> /// <param name="queueID"></param> /// <returns></returns> public LineUpData GetOrderCallLineup(string queueID) { SQL sql = CreateSQL("查询待呼叫排队信息", "select 排队ID,申请ID,患者ID,队列ID,科室ID,排队日期,队列名称,科室名称,检查房间,患者姓名,排队号码,排队序号,号码前缀,附加信息,排队状态" + " from 影像排队信息 a, " + " (select nvl(min(排队序号), 0) as 最小序号 from 影像排队信息 where 队列ID=:队列ID and 排队日期=Trunc(sysdate) and 排队状态=0) b" + " where a.队列ID=:队列ID and a.排队日期=TRUNC(sysdate) and a.排队状态= 0 and a.排队序号=b.最小序号 "); sql.AddParameter("队列ID", queueID); DataTable dtLinuup = sql.ExecuteSql(); if (dtLinuup == null || dtLinuup.Rows.Count <= 0) { return(null); } LineUpData lineupInfo = new LineUpData(); lineupInfo.BindRowData(dtLinuup.Rows[0]); return(lineupInfo); }