/// <summary> /// 分诊 /// </summary> /// <param name="trans"></param> /// <param name="assign"></param> /// <param name="TrigeWhereFlag">分诊标志 1.分到队列 2.分到诊台</param> /// <param name="error"></param> /// <returns></returns> public static int Triage(Neusoft.HISFC.Models.Nurse.Assign assign, string TrigeWhereFlag, ref string error) { Neusoft.HISFC.BizLogic.Nurse.Assign assignMgr = new Neusoft.HISFC.BizLogic.Nurse.Assign(); Neusoft.HISFC.BizProcess.Integrate.Registration.Registration regMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration(); try { //assignMgr.SetTrans(trans.Trans); //regMgr.SetTrans(trans.Trans); //1、获取队列最大看诊序号 assign.SeeNO = assignMgr.Query((assign.Queue as Neusoft.FrameWork.Models.NeuObject)); if (assign.SeeNO == -1) { error = assignMgr.Err; return(-1); } assign.SeeNO = assign.SeeNO + 1; //专家的直接取 时间段内的看诊序号 // if(neusoft.neNeusoft.HISFC.Components.Function.NConvert.ToInt32(assign.Register.IsPre) == 1) if (assign.Register.DoctorInfo.Templet.Doct.ID != null && assign.Register.DoctorInfo.Templet.Doct.ID != "") { assign.SeeNO = assign.Register.DoctorInfo.SeeNO; } //2、插入分诊信息表 if (assignMgr.Insert(assign) == -1) { error = assignMgr.Err; return(-1); } //3、更新挂号信息表,置分诊标志 Neusoft.HISFC.BizLogic.Nurse.Assign a = new Neusoft.HISFC.BizLogic.Nurse.Assign(); //a.SetTrans(trans.Trans); if (regMgr.Update(assign.Register.ID, Neusoft.FrameWork.Management.Connection.Operator.ID, a.GetDateTimeFromSysDateTime() /*regMgr.GetDateTimeFromSysDateTime()*/) == -1) { error = regMgr.Err; return(-1); } //4.队列数量增加1 if (assignMgr.UpdateQueue(assign.Queue.ID, "1") == -1) { error = assignMgr.Err; return(-1); } } catch (Exception e) { error = e.Message; return(-1); } return(0); }
/// <summary> /// 查询患者信息 /// </summary> /// <param name="deptID">科室代码</param> /// <param name="roomID">诊台代码</param> /// <returns>分诊实体树祖</returns> public ArrayList QueryPatient(string deptID, string roomID) { this.SetDB(assignManager); return(assignManager.Query(deptID, roomID)); }