/// <summary> /// 获得非药品组合项目的实体属性数组 /// </summary> /// <param name="undrugComb">非药品组合项目实体</param> /// <returns>非药品组合项目的实体属性数组</returns> private string[] GetUndrugCombParams(Neusoft.HISFC.Object.Fee.Item.UndrugComb undrugComb) { string[] args = { undrugComb.Package.ID, undrugComb.Package.Name, undrugComb.SysClass.ID.ToString(), undrugComb.SpellCode, undrugComb.WBCode, undrugComb.UserCode, undrugComb.ExecDept, undrugComb.SortID.ToString(), NConvert.ToInt32(undrugComb.IsNeedConfirm).ToString(), undrugComb.ValidState, undrugComb.User01, undrugComb.User02, undrugComb.Memo, undrugComb.Mark1, undrugComb.Mark2, undrugComb.Mark3, undrugComb.Mark4 }; return(args); }
public ArrayList GetValidUndrugzt() { ArrayList List = null; string strSql = ""; if (this.Sql.GetSql("Fee.undrugzt.GetUndrugzt.Valid", ref strSql) == -1) { return(null); } try { // SELECT PACKAGE_CODE,PACKAGE_NAME,SYS_CLASS,SPELL_CODE,WB_CODE ,INPUT_CODE,DEPT_CODE ,SORT_ID ,CONFIRM_FLAG,VALID_STATE,EXT_FLAG,EXT1_FLAG FROM fin_com_undrugzt where parent_code = '[父级编码]' and current_code ='[本级编码]' if (this.ExecQuery(strSql) == -1) { return(null); } Neusoft.HISFC.Object.Fee.Item.UndrugComb info = null; List = new ArrayList(); while (this.Reader.Read()) { //有效的复合项目 if (Reader[9].ToString() == "0") { info = new Neusoft.HISFC.Object.Fee.Item.UndrugComb(); info.ID = Reader[0].ToString(); info.Name = Reader[1].ToString(); info.SysClass.ID = Reader[2].ToString(); info.SpellCode = Reader[3].ToString(); info.WBCode = Reader[4].ToString(); info.UserCode = Reader[5].ToString(); info.ExecDept = Reader[6].ToString(); if (Reader[7] != DBNull.Value) { info.SortID = Convert.ToInt32(Reader[7].ToString()); } info.IsNeedConfirm = Neusoft.NFC.Function.NConvert.ToBoolean(this.Reader[8].ToString()); info.ValidState = Reader[9].ToString(); info.User01 = Reader[10].ToString(); info.User02 = Reader[11].ToString(); info.Memo = Reader[12].ToString(); //备注 info.Mark1 = Reader[13].ToString(); //病史及检查(开立检查申请单时使用) info.Mark2 = Reader[14].ToString(); //检查要求(开立检查申请单时使用) info.Mark3 = Reader[15].ToString(); // 注意事项(开立检查申请单时使用) info.Mark4 = Reader[16].ToString(); //检查申请单名称 List.Add(info); } } this.Reader.Close(); } catch (Exception ee) { this.Err = ee.Message; List = null; } return(List); }
public Neusoft.HISFC.Object.Fee.Item.UndrugComb GetSingleUndrugzt(string ztID) { string sql = ""; if (this.Sql.GetSql("Fee.undrugzt.GetSingleUndrugzt.1", ref sql) == -1) { return(null); } Neusoft.HISFC.Object.Fee.Item.UndrugComb info = new Neusoft.HISFC.Object.Fee.Item.UndrugComb(); try { sql = string.Format(sql, ztID); if (this.ExecQuery(sql) == -1) { return(null); } while (this.Reader.Read()) { //有效的复合项目 info = new Neusoft.HISFC.Object.Fee.Item.UndrugComb(); info.ID = Reader[0].ToString(); info.Name = Reader[1].ToString(); info.SysClass.ID = Reader[2].ToString(); info.SpellCode = Reader[3].ToString(); info.WBCode = Reader[4].ToString(); info.UserCode = Reader[5].ToString(); info.ExecDept = Reader[6].ToString(); if (Reader[7] != DBNull.Value) { info.SortID = Convert.ToInt32(Reader[7].ToString()); } info.IsNeedConfirm = Neusoft.NFC.Function.NConvert.ToBoolean(Reader[8].ToString()); info.ValidState = Reader[9].ToString(); info.User01 = Reader[10].ToString(); info.User02 = Reader[11].ToString(); info.Memo = Reader[12].ToString(); //备注 info.Mark1 = Reader[13].ToString(); //病史及检查(开立检查申请单时使用) info.Mark2 = Reader[14].ToString(); //检查要求(开立检查申请单时使用) info.Mark3 = Reader[15].ToString(); // 注意事项(开立检查申请单时使用) info.Mark4 = Reader[16].ToString(); //检查申请单名称 } this.Reader.Close(); } catch (Exception ee) { this.Err = "[Fee.undrugzt.GetUndrugzt.1]" + ee.Message; this.ErrCode = ee.Message; if (this.Reader.IsClosed == false) { this.Reader.Close(); } return(null); } return(info); }
/// <summary> /// 非药品组套明细表 /// </summary> /// <param name="packageCode"></param> /// <returns></returns> public ArrayList QueryUndrugPackagesBypackageCode(string packageCode) { ArrayList List = null; string strSql = ""; if (this.Sql.GetSql("Fee.undrugzt.GetUndrugztinfo", ref strSql) == -1) { return(null); } try { if (packageCode != "") { List = new ArrayList(); // select package_code ,decode (substr(fee_code,1,1),'F',(select item_name from fin_com_undruginfo where parent_code = '[父级编码]' and current_code ='[本级编码]' and item_code =fin_com_undrugztinfo.ITEM_CODE),'Y', (select trade_name from pha_com_baseinfo t where parent_code = '[父级编码]' and current_code ='[本级编码]' and t.drug_code = fin_com_undrugztinfo.ITEM_CODE )) ,item_code ,sort_id from fin_com_undrugztinfo where package_code ='{0}'and parent_code = '[父级编码]' and current_code ='[本级编码]' strSql = string.Format(strSql, packageCode); this.ExecQuery(strSql); Neusoft.HISFC.Object.Fee.Item.UndrugComb info = null; while (this.Reader.Read()) { info = new Neusoft.HISFC.Object.Fee.Item.UndrugComb(); info.Package.ID = Reader[0].ToString(); //组套编码 info.Name = Reader[1].ToString(); //非药品名称 info.ID = Reader[2].ToString(); //非药品编码 if (Reader[3] != DBNull.Value) { info.SortID = Convert.ToInt32(Reader[3]); //顺序号 } else { info.SortID = 0; } info.SpellCode = Reader[4].ToString(); //取拼音码 info.WBCode = Reader[5].ToString(); //取五笔码 info.UserCode = Reader[6].ToString(); //输入码 info.User01 = Reader[7].ToString(); //标志 info.User02 = Reader[8].ToString(); // 是否特殊医疗项目 0 否 1 是 info.Qty = Neusoft.NFC.Function.NConvert.ToDecimal(Reader[9].ToString()); //数量 List.Add(info); info = null; } this.Reader.Close(); } } catch (Exception ee) { this.Err = ee.Message; List = null; } return(List); }
/// <summary> /// 通过SQL语句获得组合项目信息 /// </summary> /// <param name="sql">SQL语句</param> /// <param name="args">参数</param> /// <returns>成功:组合项目信息集合 失败: null</returns> private ArrayList QueryUndrugCombsBySql(string sql, params string[] args) { if (this.ExecQuery(sql, args) == -1) { return(null); } ArrayList undrugCombs = new ArrayList(); //组合项目集合 Neusoft.HISFC.Object.Fee.Item.UndrugComb undrugComb = new Neusoft.HISFC.Object.Fee.Item.UndrugComb(); //组合项目实体 try { while (this.Reader.Read()) { undrugComb = new Neusoft.HISFC.Object.Fee.Item.UndrugComb(); undrugComb.Package.ID = this.Reader[0].ToString(); undrugComb.Package.Name = this.Reader[1].ToString(); undrugComb.SysClass.ID = this.Reader[2].ToString(); undrugComb.SpellCode = this.Reader[3].ToString(); undrugComb.WBCode = this.Reader[4].ToString(); undrugComb.UserCode = this.Reader[5].ToString(); undrugComb.ExecDept = this.Reader[6].ToString(); undrugComb.SortID = NConvert.ToInt32(this.Reader[7].ToString()); undrugComb.IsNeedConfirm = NConvert.ToBoolean(this.Reader[8].ToString()); undrugComb.ValidState = this.Reader[9].ToString(); undrugComb.User01 = this.Reader[10].ToString(); //是否特殊医疗项目 undrugComb.Memo = this.Reader[11].ToString(); //备注 undrugComb.Mark1 = this.Reader[12].ToString(); //病史及检查(开立检查申请单时使用) undrugComb.Mark2 = this.Reader[13].ToString(); //检查要求(开立检查申请单时使用) undrugComb.Mark3 = this.Reader[14].ToString(); // 注意事项(开立检查申请单时使用) undrugComb.Mark4 = this.Reader[15].ToString(); //检查申请单名称 undrugCombs.Add(undrugComb); } this.Reader.Close(); return(undrugCombs); } catch (Exception e) { this.Err = e.Message; if (this.Reader != null && !this.Reader.IsClosed) { this.Reader.Close(); } return(null); } }
/// <summary> /// 根据SQL语句查询组套明细 /// </summary> /// <param name="sql">SQL语句</param> /// <param name="args">参数</param> /// <returns>成功: 组套明细 失败: null</returns> private ArrayList QueryUndrugCombDetailsBySql(string sql, params string[] args) { if (this.ExecQuery(sql, args) == -1) { return(null); } ArrayList undrugCombs = new ArrayList(); //组合项目集合 Neusoft.HISFC.Object.Fee.Item.UndrugComb undrugComb = new Neusoft.HISFC.Object.Fee.Item.UndrugComb(); //组合项目实体 try { while (this.Reader.Read()) { undrugComb = new Neusoft.HISFC.Object.Fee.Item.UndrugComb(); undrugComb.Package.ID = this.Reader[0].ToString(); //组套编码 undrugComb.Name = this.Reader[1].ToString(); //非药品名称 undrugComb.ID = this.Reader[2].ToString(); //非药品编码 undrugComb.SortID = NConvert.ToInt32(this.Reader[3].ToString()); undrugComb.SpellCode = Reader[4].ToString(); //取拼音码 undrugComb.WBCode = Reader[5].ToString(); //取五笔码 undrugComb.UserCode = Reader[6].ToString(); //输入码 undrugComb.User01 = Reader[7].ToString(); //标志 undrugComb.User02 = Reader[8].ToString(); // 是否特殊医疗项目 0 否 1 是 undrugComb.Qty = NConvert.ToDecimal(Reader[9].ToString()); //数量 undrugCombs.Add(undrugComb); } this.Reader.Close(); return(undrugCombs); } catch (Exception e) { this.Err = e.Message; if (this.Reader != null && !this.Reader.IsClosed) { this.Reader.Close(); } return(null); } }
/// <summary> /// 删除一条新的记录 /// </summary> /// <param name="info"></param> /// <returns></returns> public int DeleteUndrugztinfo(Neusoft.HISFC.Object.Fee.Item.UndrugComb info) { string strSql = ""; if (this.Sql.GetSql("Fee.undrugzt.DeleteUndrugztinfo", ref strSql) == -1) { return(-1); } try { // delete fin_com_undrugztinfo where PACKAGE_CODE = '{0}' and ITEM_CODE ='{1}' and parent_code = '[父级编码]' and current_code ='[本级编码]' strSql = string.Format(strSql, info.Package.ID, info.ID); } catch (Exception ee) { this.Err = ee.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 更新一条记录 /// </summary> /// <param name="info"></param> /// <returns></returns> public int UpdateUndrugztinfo(Neusoft.HISFC.Object.Fee.Item.UndrugComb info) { string strSql = ""; if (this.Sql.GetSql("Fee.undrugzt.UpdateUndrugztinfo", ref strSql) == -1) { return(-1); } try { // update fin_com_undrugztinfo set SORT_ID='{2}' where PACKAGE_CODE ='{0}'and ITEM_CODE ='{1}' and parent_code = '[父级编码]' and current_code ='[本级编码]' strSql = string.Format(strSql, info.Package.ID, info.ID, info.SortID, info.SpellCode, info.WBCode, info.UserCode, info.User01, info.Qty); } catch (Exception ee) { this.Err = ee.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 插入一条新的记录 /// </summary> /// <param name="info"></param> /// <returns></returns> public int InsertUndruaztinfo(Neusoft.HISFC.Object.Fee.Item.UndrugComb info) { string strSql = ""; if (this.Sql.GetSql("Fee.undrugzt.InsertUndruaztinfo", ref strSql) == -1) { return(-1); } try { string OperId = this.Operator.ID; // insert into fin_com_undrugztinfo (PACKAGE_CODE,ITEM_CODE,SORT_ID,OPER_CODE,OPER_DATE) values ('{0},'{1}','{2}','{3}',sysdate) strSql = string.Format(strSql, info.Package.ID, info.ID, info.SortID, OperId, info.SpellCode, info.WBCode, info.UserCode, info.User01, info.Qty); } catch (Exception ee) { this.Err = ee.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 插入非药品组合项目 /// </summary> /// <param name="undrugComb">非药品组合项目实体</param> /// <returns>成功: 1 失败 : -1 没有插入数据 0</returns> public int InsertUndrugComb(Neusoft.HISFC.Object.Fee.Item.UndrugComb undrugComb) { return(this.UpdateSingleTable("Fee.undrugzt.insertUndrugzt", this.GetUndrugCombParams(undrugComb))); }
/// <summary> /// 删除非药品组合项目 /// </summary> /// <param name="undrugComb">非药品组合项目实体</param> /// <returns>成功: 1 失败 : -1 没有删除到数据 0</returns> public int DeleteUndrugComb(Neusoft.HISFC.Object.Fee.Item.UndrugComb undrugComb) { return(this.UpdateSingleTable("Fee.undrugzt.DeleteUndrugzt", undrugComb.ID)); }