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); }
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 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); }