private HIS_Entity.MIManage.Common.Reg.root RegisterToInput(MI_Register register) { HIS_Entity.MIManage.Common.Reg.root root = new HIS_Entity.MIManage.Common.Reg.root(); HIS_Entity.MIManage.Common.Reg.input input = new HIS_Entity.MIManage.Common.Reg.input(); root.input = input; HIS_Entity.MIManage.Common.Reg.tradeinfo tradeinfo = new HIS_Entity.MIManage.Common.Reg.tradeinfo(); tradeinfo.curetype = "11"; tradeinfo.billtype = "0"; tradeinfo.feeno = "0"; tradeinfo.operator1 = register.StaffName; input.tradeinfo = tradeinfo; HIS_Entity.MIManage.Common.Reg.recipearray recipearray = new HIS_Entity.MIManage.Common.Reg.recipearray(); HIS_Entity.MIManage.Common.Reg.recipe recipe = new HIS_Entity.MIManage.Common.Reg.recipe(); recipe.hissectionname = register.DeptName; recipe.drid = register.DiagnDocID; recipe.drname = register.Doctor; recipe.registertradeno = register.SerialNO.ToString(); recipe.billstype = "1"; HIS_Entity.MIManage.Common.Reg.recipe[] recipes = { recipe }; recipearray.recipe = recipes; input.recipearray = recipearray; HIS_Entity.MIManage.Common.Reg.feeitemarray feeitemarray = new HIS_Entity.MIManage.Common.Reg.feeitemarray(); input.feeitemarray = feeitemarray; return(root); }
private HIS_Entity.MIManage.Common.Reg.root TradeDataToInput(TradeData tradeData) { HIS_Entity.MIManage.Common.Reg.root root = new HIS_Entity.MIManage.Common.Reg.root(); HIS_Entity.MIManage.Common.Reg.input input = new HIS_Entity.MIManage.Common.Reg.input(); root.input = input; #region tradeinfo 交易信息 curetype/billtype 必填 HIS_Entity.MIManage.Common.Reg.tradeinfo tradeinfo = new HIS_Entity.MIManage.Common.Reg.tradeinfo(); tradeinfo.curetype = ((int)tradeData.tradeinfo.tradeType).ToString(); tradeinfo.billtype = tradeData.tradeinfo.billtype; tradeinfo.feeno = "0"; tradeinfo.operator1 = ""; input.tradeinfo = tradeinfo; #endregion #region 处方信息 diagnoseno/recipeno/recipedate/recipetype/helpmedicineflag 必填 HIS_Entity.MIManage.Common.Reg.recipearray recipearray = new HIS_Entity.MIManage.Common.Reg.recipearray(); HIS_Entity.MIManage.Common.Reg.recipe[] recipes = new HIS_Entity.MIManage.Common.Reg.recipe[tradeData.recipeList.recipes.Count]; for (int i = 0; i < tradeData.recipeList.recipes.Count; i++) { HIS_Entity.MIManage.Common.Reg.recipe recipe = new HIS_Entity.MIManage.Common.Reg.recipe(); recipe.diagnoseno = tradeData.recipeList.recipes[i].diagnoseno; recipe.recipeno = tradeData.recipeList.recipes[i].recipeno; recipe.recipedate = tradeData.recipeList.recipes[i].recipedate; recipe.recipetype = tradeData.recipeList.recipes[i].recipetype; recipe.helpmedicineflag = tradeData.recipeList.recipes[i].helpmedicineflag; recipe.billstype = "1"; recipes[i] = recipe; } recipearray.recipe = recipes; input.recipearray = recipearray; #endregion #region 明细信息 itemno/recipeno/hiscode/itemname/itemtype/unitprice/count/fee/babyflag 必填 HIS_Entity.MIManage.Common.Reg.feeitemarray feeitemarray = new HIS_Entity.MIManage.Common.Reg.feeitemarray(); HIS_Entity.MIManage.Common.Reg.feeitem[] feeitems = new HIS_Entity.MIManage.Common.Reg.feeitem[tradeData.feeitemList.feeitems.Count]; for (int i = 0; i < tradeData.feeitemList.feeitems.Count; i++) { HIS_Entity.MIManage.Common.Reg.feeitem feeitem = new HIS_Entity.MIManage.Common.Reg.feeitem(); feeitem.itemno = tradeData.feeitemList.feeitems[i].itemno; feeitem.recipeno = tradeData.feeitemList.feeitems[i].recipeno; feeitem.hiscode = tradeData.feeitemList.feeitems[i].hiscode; feeitem.itemname = tradeData.feeitemList.feeitems[i].itemname; feeitem.itemtype = tradeData.feeitemList.feeitems[i].itemtype; feeitem.unitprice = tradeData.feeitemList.feeitems[i].unitprice; feeitem.count = tradeData.feeitemList.feeitems[i].count; feeitem.fee = tradeData.feeitemList.feeitems[i].fee; feeitem.babyflag = "0"; feeitems[i] = feeitem; } feeitemarray.feeitem = feeitems; input.feeitemarray = feeitemarray; #endregion return(root); }
/// <summary> /// 分解费用 /// </summary> /// <param name="sDll"></param> /// <returns></returns> public ResultClass Divide(SiInterfaceDll sDll, HIS_Entity.MIManage.Common.Reg.root root) { string sMome = ""; bool bRet = false; string sOut; string sIn = XmlUtil.SerializeToXml(root, typeof(HIS_Entity.MIManage.Common.Reg.root)); string sOut1; sDll.Divide(sIn, out sOut); AddLog("分解输出数据:"); AddLog(sOut); HIS_Entity.MIManage.Common.DivideResult.root divideResult = (HIS_Entity.MIManage.Common.DivideResult.root)(XmlUtil.DeserializeFromXml(sOut, typeof(HIS_Entity.MIManage.Common.DivideResult.root))); XmlDocument xmlDoc = GetXmlDoc(sOut); CheckOutputState(xmlDoc, out bRet, out sMome); ResultClass resultClassTemp = new ResultClass(); resultClassTemp.bSucess = bRet; resultClassTemp.sRemarks = sMome; resultClassTemp.oResult = divideResult; return(resultClassTemp); }
/// <summary> /// 预算 /// </summary> /// <param name="b"></param> /// <param name="s"></param> /// <param name="dt"></param> public ResultClass MZ_PreviewCharge(HIS_Entity.MIManage.Common.Reg.root root) { ResultClass resultClass = new ResultClass(); try { SiInterfaceDll sDll = new SiInterfaceDll(); resultClass = iface.OpenDevice(sDll); if (resultClass.bSucess) { iface.GetPersonInfo(sDll, _cardNo); resultClass = iface.Divide(sDll, root); iface.CloseDevice(sDll); } else { resultClass.oResult = null; } sDll = null; } catch (Exception e) { resultClass.bSucess = false; resultClass.sRemarks = e.Message; resultClass.oResult = null; } return(resultClass); }
private HIS_Entity.MIManage.Common.Reg.root PreviewRegisterToInput(MI_Register register) { HIS_Entity.MIManage.Common.Reg.root root = new HIS_Entity.MIManage.Common.Reg.root(); HIS_Entity.MIManage.Common.Reg.input input = new HIS_Entity.MIManage.Common.Reg.input(); root.input = input; #region tradeinfo 交易信息 curetype/billtype 必填 HIS_Entity.MIManage.Common.Reg.tradeinfo tradeinfo = new HIS_Entity.MIManage.Common.Reg.tradeinfo(); tradeinfo.curetype = "17"; tradeinfo.billtype = "0"; tradeinfo.feeno = "0"; tradeinfo.operator1 = register.StaffName; input.tradeinfo = tradeinfo; #endregion #region 处方信息 diagnoseno/recipeno/recipedate/recipetype/helpmedicineflag 必填 HIS_Entity.MIManage.Common.Reg.recipearray recipearray = new HIS_Entity.MIManage.Common.Reg.recipearray(); HIS_Entity.MIManage.Common.Reg.recipe recipe = new HIS_Entity.MIManage.Common.Reg.recipe(); recipe.diagnoseno = "1"; recipe.recipeno = "1"; recipe.recipedate = System.DateTime.Now.ToString("yyyyMMdd hhmmss"); recipe.recipetype = "1"; recipe.helpmedicineflag = "0"; recipe.hissectionname = register.DeptName; recipe.drid = register.DiagnDocID; recipe.drname = register.Doctor; recipe.registertradeno = register.SerialNO.ToString(); recipe.billstype = "1"; HIS_Entity.MIManage.Common.Reg.recipe[] recipes = { recipe }; recipearray.recipe = recipes; input.recipearray = recipearray; #endregion #region 明细信息 itemno/recipeno/hiscode/itemname/itemtype/unitprice/count/fee/babyflag 必填 HIS_Entity.MIManage.Common.Reg.feeitemarray feeitemarray = new HIS_Entity.MIManage.Common.Reg.feeitemarray(); HIS_Entity.MIManage.Common.Reg.feeitem feeitem = new HIS_Entity.MIManage.Common.Reg.feeitem(); feeitem.itemno = "1"; feeitem.recipeno = "1"; feeitem.hiscode = System.DateTime.Now.ToString("yyyyMMdd hhmmss"); feeitem.itemname = "1"; feeitem.itemtype = "0"; feeitem.unitprice = register.DeptName; feeitem.count = register.DiagnDocID; feeitem.fee = register.Doctor; feeitem.babyflag = "0"; HIS_Entity.MIManage.Common.Reg.feeitem[] feeitems = { feeitem }; recipearray.recipe = recipes; input.feeitemarray = feeitemarray; #endregion return(root); }