private void DeleteDiagnose() { if (this.isUpdate) { if (MessageBox.Show("您确定删除所选的记录么?", "警告", MessageBoxButtons.YesNo) == DialogResult.No) { return; } if (iType == "1")//ICD10 { Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes ot = Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC; if (this.operType == "1")//医生站 { ot = Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC; } else//病案室 { ot = Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS; } if (this.diagnoseMgr.DeleteDiagnoseSingle(this.ucQueryInpatientNo.InpatientNo, this.happenNo, ot) == -1) { MessageBox.Show(Language.Msg("删除失败!")); return; } } else//ICDMEDICARE { if (this.diagnoseMgrMc.DeleteDiagnoseMedicare(this.ucQueryInpatientNo.InpatientNo, this.happenNo) == -1) { MessageBox.Show(Language.Msg("删除失败!")); return; } } this.QueryDiagnose(); MessageBox.Show(Language.Msg("删除成功!")); this.ClearAfterSave(); } else { MessageBox.Show(Language.Msg("请选择一条记录!")); return; } return; }
/// <summary> /// 检索某个住院流水号下的 手术信息 operType 如果是 "DOC" 查询的是医生站录入的手术信息 如果输入的是“CAS”,则查询病案师录入的手术信息 /// Creator: [email protected] /// </summary> /// <param name="operType">类型</param> /// <returns>成功返回符合条件的数组,失败或出现异常错误 返回</returns> public ArrayList QueryOperation(Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes operType, string InpatientNo) { string OperType = ""; if (operType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC) { OperType = "1"; } else if (operType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS) { OperType = "2"; } else { this.Err = "没有指定插入的类型 DOC 或 CAS"; return(null); } ArrayList List = null; string MainSql = QueryOperationSql(); if (MainSql == null) { return(null); } string strSql = ""; if (this.Sql.GetSql("Case.Operationdetail.Select", ref strSql) == -1) { return(null); } strSql = MainSql + strSql; try { //查询 strSql = string.Format(strSql, InpatientNo, OperType); return(myQuery(strSql)); } catch (Exception ee) { this.Err = ee.Message; List = null; } return(List); }
/// <summary> /// 插入某条手术信息 operType 如果是 "DOC" 插入的是医生站录入的手术信息 如果输入的是“CAS”,则 插入病案师录入的手术信息 /// Creator: [email protected] /// </summary> /// <param name="OperType">标识</param> /// <param name="info"></param> /// <returns>成功返回 1 失败返回 -1 </returns> public int Insert(Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes OperType, Neusoft.HISFC.Models.HealthRecord.OperationDetail info) { string strSql = ""; //手术类别 判断是医生输入还是病案室输入 if (OperType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC) { info.OperType = "1"; } else if (OperType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS) { info.OperType = "2"; } else { this.Err = "没有指定插入的类型 DOC 或 CAS"; return(-1); } int intHappenNo = GetNewOperationNo(info.InpatientNO, info.OperType); //发生序号 info.HappenNO = intHappenNo.ToString(); if (this.Sql.GetSql("Case.Operationdetail.Insert", ref strSql) == -1) { return(-1); } try { //参数数组 string[] str = Getinfo(info); strSql = string.Format(strSql, str); } catch (Exception ee) { this.Err = ee.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 删除某条手术信息 operType 如果是 "DOC" 删除的是医生站录入的手术信息 如果输入的是“CAS”,则 删除病案师录入的手术信息 /// Creator :[email protected] /// </summary> /// <param name="OperType"></param> /// <param name="info"></param> /// <returns>成功返回1 失败返回-1</returns> public int delete(Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes OperType, Neusoft.HISFC.Models.HealthRecord.OperationDetail info) { //手术类别 判断是医生输入还是病案室输入 if (OperType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC) { info.OperType = "1"; } else if (OperType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS) { info.OperType = "2"; } else { this.Err = "没有指定插入的类型 DOC 或 CAS"; return(-1); } string strSql = ""; if (this.Sql.GetSql("Case.Operationdetail.delete", ref strSql) == -1) { return(-1); } try { //参数数组 string[] str = Getinfo(info); strSql = string.Format(strSql, str); } catch (Exception ee) { this.Err = ee.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
public ArrayList Select(Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes operType, string InpatientNo) { string OperType = ""; if (operType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC) { OperType = "1"; } else if (operType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS) { OperType = "2"; } else { this.Err = "没有指定插入的类型 DOC 或 CAS"; return(null); } ArrayList List = null; string MainSql = QueryOperationSql(); if (MainSql == null) { return(null); } string strSql = ""; if (this.Sql.GetSql("Case.Operationdetail.Select", ref strSql) == -1) { return(null); } strSql = MainSql + strSql; try { //查询 strSql = string.Format(strSql, InpatientNo, OperType); this.ExecQuery(strSql); Neusoft.HISFC.Models.HealthRecord.OperationDetail info = null; List = new ArrayList(); while (this.Reader.Read()) { info = new Neusoft.HISFC.Models.HealthRecord.OperationDetail(); info.OperationDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(Reader[0]); //手术日期 info.OperationInfo.ID = Reader[1].ToString(); //手术代码 info.OperationInfo.Name = Reader[2].ToString(); //手术名称 info.OperationKind = Reader[3].ToString(); //手术种类 info.MarcKind = Reader[4].ToString(); //麻醉方式 info.NickKind = Reader[5].ToString(); //切口种类 info.CicaKind = Reader[6].ToString(); //愈合种类 info.FirDoctInfo.ID = Reader[7].ToString(); //手术医师编码 info.FirDoctInfo.Name = Reader[8].ToString(); //手术医师名称 info.SecDoctInfo.ID = Reader[9].ToString(); //I助代码 info.SecDoctInfo.Name = Reader[10].ToString(); //I助名称 info.ThrDoctInfo.ID = Reader[11].ToString(); //II助代码 info.ThrDoctInfo.Name = Reader[12].ToString(); //II助名称 info.NarcDoctInfo.ID = Reader[13].ToString(); //麻醉医师代码 info.NarcDoctInfo.Name = Reader[14].ToString(); //麻醉医师名称 // info.OperationInfo.Name = Reader[15].ToString();//手术日期 info.OpbOpa = Reader[15].ToString(); //术前_后符合术前_后符合 info.BeforeOperDays = Neusoft.FrameWork.Function.NConvert.ToInt32(Reader[16]); //术前住院天数 info.StatFlag = Reader[17].ToString(); //统计标志 info.InDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(Reader[18]); //入科日期 info.OutDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(Reader[19]); //出院日期 info.DeatDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(Reader[20]); //死亡日期 info.OperationDeptInfo.ID = Reader[21].ToString(); //手术科室 info.OutDeptInfo.ID = Reader[22].ToString(); //出院病房 info.OutICDInfo.ID = Reader[23].ToString(); //出院主诊断ICD info.SYNDFlag = Reader[24].ToString(); //是否合并症 // info.OperDate = Reader[25].ToString(); //操作员 // info. Reader[26].ToString(); 操作时间 info.OperType = Reader[27].ToString(); //类别 1 医生站手术明细 2 病案室手术明细 info.FourDoctInfo.ID = Reader[28].ToString(); //手术医师编码2 info.FourDoctInfo.Name = Reader[29].ToString(); //手术医师名称2 info.InpatientNO = InpatientNo; //住院流水号 info.HappenNO = Reader[30].ToString(); //发生序号 List.Add(info); info = null; } this.Reader.Close(); } catch (Exception ee) { this.Err = ee.Message; if (!this.Reader.IsClosed) { this.Reader.Close(); } List = null; } return(List); }
/// <summary> /// 获取第一手术 /// </summary> /// <param name="InpatientNo"></param> /// <param name="frmType"></param> /// <returns></returns> public Neusoft.HISFC.Models.HealthRecord.OperationDetail GetFirstOperation(string InpatientNo, Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes frmType) { Neusoft.HISFC.Models.HealthRecord.OperationDetail info = new Neusoft.HISFC.Models.HealthRecord.OperationDetail(); ArrayList list = QueryOperation(frmType, InpatientNo); if (list == null) { return(null); } if (list.Count > 0) { info = (Neusoft.HISFC.Models.HealthRecord.OperationDetail)list[0]; } return(info); }