/// <summary> /// 获取午别 /// </summary> /// <param name="current"></param> /// <returns></returns> public static string GetNoon(DateTime current) { Neusoft.HISFC.BizProcess.Integrate.Registration.Registration schemaMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration(); ArrayList alNoon = schemaMgr.Query(); if (alNoon == null) { return(""); } /* * 实际午别为医生出诊时间段,上午可能为08~11:30,下午为14~17:30 * 所以挂号员如果不在这个时间段挂号,就有可能提示午别未维护 * 所以改为根据传人时间所在的午别例如:9:30在06~12之间,那么就判断是否有午别在 * 06~12之间,全包含就说明9:30是那个午别代码 */ int[,] zones = new int[, ] { { 0, 120000 }, { 120000, 180000 }, { 180000, 235959 } }; int time = int.Parse(current.ToString("HHmmss")); int begin = 0, end = 0; for (int i = 0; i < 3; i++) { if (zones[i, 0] <= time && zones[i, 1] > time) { begin = zones[i, 0]; end = zones[i, 1]; break; } } foreach (Neusoft.HISFC.Models.Registration.Noon obj in alNoon) { if (int.Parse(obj.BeginTime.ToString("HHmmss")) >= begin && int.Parse(obj.EndTime.ToString("HHmmss")) <= end) { return(obj.ID); } } return(""); }
protected void query() { this.Err = ""; this.alSeeNo.Clear(); #region 门诊号查 if (this.inputtype == 0) { if (isICCard)//{18DEBFA3-0364-4730-8416-ECA87F3235FF} { Neusoft.HISFC.Models.Account.AccountCard acObj = new Neusoft.HISFC.Models.Account.AccountCard(); if (this.feeIntegrate.ValidMarkNO(this.Text.ToString(), ref acObj) != -1) { if (acObj != null) { this.Text = acObj.Patient.PID.CardNO; } else { MessageBox.Show("没有查找到该患者的挂号信息"); return; } } } else { this.Text = this.formatInputCode(this.Text).Trim(); //格式化 } try { //this.alSeeNo = this.orderManagement.QuerySeeNoListByCardNo(this.Text); DateTime dtNow = this.orderManagement.GetDateTimeFromSysDateTime(); ArrayList alReg = patient.Query(this.Text, dtNow.AddDays(-this.validDays)); if (alReg == null || alReg.Count <= 0) { MessageBox.Show("没有查找到该患者在有效时间内的挂号信息"); return; } else { for (int i = 0; i < alReg.Count; i++) { Neusoft.HISFC.Models.Registration.Register obj = alReg[i] as Neusoft.HISFC.Models.Registration.Register; this.myRegister = obj;//在控件外面重新获得挂号信息 Neusoft.FrameWork.Models.NeuObject o = new Neusoft.FrameWork.Models.NeuObject(); if (obj.DoctorInfo.SeeDate.Date == dtNow.Date) { o.ID = "新"; o.Memo = "今天"; } else { o.ID = ""; o.Memo = obj.DoctorInfo.SeeDate.ToString("yyyy年MM月dd日"); } o.Name = obj.Name + "(" + obj.InvoiceNO + ")"; //添加了处方号,方便医生确认 o.User02 = obj.DoctorInfo.Templet.Dept.Name; o.User03 = obj.ID; //门诊流水号 o.User01 = ((Neusoft.HISFC.Models.Base.Employee) this.orderManagement.Operator).Dept.ID; this.alSeeNo.Insert(0, o); } } if (this.alSeeNo == null) { this.Err = "未查找到该门诊号!"; return; } if (this.alSeeNo.Count == 1) { this.strSeeNo = ((Neusoft.FrameWork.Models.NeuObject) this.alSeeNo[0]).ID; this.clinicCode = ((Neusoft.FrameWork.Models.NeuObject) this.alSeeNo[0]).User03; this.Register.ID = ((Neusoft.FrameWork.Models.NeuObject) this.alSeeNo[0]).User03; } else if (this.alSeeNo.Count <= 0) { this.Err = "未查找到该门诊号!"; this.strSeeNo = ""; NoInfo(); } else { this.strSeeNo = ((Neusoft.FrameWork.Models.NeuObject) this.alSeeNo[0]).ID; this.SelectPatient(); return; } } catch (Exception ex) { this.Err = ex.Message; NoInfo(); } try { if (this.listform != null) { this.listform.Close(); } } catch { } try { this.myEvents(); } catch { } } #endregion }