/// <summary> /// 得到选中的ICD信息 /// </summary> /// <returns></returns> private int GetICDInfo() { try { Neusoft.HISFC.Models.HealthRecord.ICDMedicare item = null; if (this.ucDiagnose1.GetItemMc(ref item) == -1) { return(-1); } if (item == null) { return(-1); } //ICD诊断名称 this.diagnosisCode.Text = item.ID; //ICD诊断编码 this.diagnosis.Text = item.Name; //ICD拼音码 this.icdSpell = item.SpellCode; //ICD类别 1 ICD10; 2 市医保; 3省医保 this.iType = item.IcdType; this.ucDiagnose1.Visible = false; } catch (Exception ex) { MessageBox.Show(ex.Message); } return(0); }
/// <summary> /// 从Reader 中读取数据 /// </summary> /// <returns>出现未处理的错误返回 null 有记录list.Count >1 没有记录 list.Count =0</returns> private ArrayList ICDReaderInfo() { //定义 动态数组, 用来存储读出的信息 ArrayList list = new ArrayList(); try { Neusoft.HISFC.Models.HealthRecord.ICDMedicare icdM = null; while (this.Reader.Read()) { icdM = new Neusoft.HISFC.Models.HealthRecord.ICDMedicare(); icdM.SeqID = Reader[0].ToString(); //序列号 icdM.ID = Reader[1].ToString(); //医保诊断代码 icdM.Name = Reader[2].ToString(); //医保诊断名称 icdM.SpellCode = Reader[3].ToString(); //医保诊断拼音 icdM.IcdType = Reader[4].ToString(); //1 ICD10,2 市医保,3 省医保 //将ICD填入列表 list.Add(icdM); } this.Reader.Close(); //关闭reade } catch (Exception ex) { this.Err = ex.Message; if (!this.Reader.IsClosed) // 判断是否关闭了Reader { this.Reader.Close(); //没有关闭则先关闭 } return(null); //出现错误返回null } return(list); }
/// <summary> /// 返回选择项(医保) /// </summary> /// <param name="item"></param> /// <returns></returns> public int GetItemMc(ref Neusoft.HISFC.Models.HealthRecord.ICDMedicare item) { int row = fpSpread1_Sheet1.ActiveRowIndex; if (row < 0 || fpSpread1_Sheet1.RowCount == 0) { item = null; return(-1); } string IcdCode = fpSpread1_Sheet1.GetText(row, 0);//项目代码 string IcdName = fpSpread1_Sheet1.GetText(row, 1); foreach (Neusoft.HISFC.Models.HealthRecord.ICDMedicare icd in almc) { if (icd.ID == IcdCode && icd.Name == IcdName) { item = icd; return(0); } } item = null; return(-1); }