Exemple #1
0
        private Reg.root RegisterToInput(MI_Register register)
        {
            Reg.root  root  = new Reg.root();
            Reg.input input = new Reg.input();
            root.input = input;

            Reg.tradeinfo tradeinfo = new Reg.tradeinfo();
            tradeinfo.curetype  = "11";
            tradeinfo.billtype  = "0";
            tradeinfo.feeno     = "0";
            tradeinfo.operator1 = register.StaffName;
            input.tradeinfo     = tradeinfo;

            Reg.recipearray recipearray = new Reg.recipearray();
            Reg.recipe      recipe      = new Reg.recipe();
            recipe.hissectionname  = register.DeptName;
            recipe.drid            = register.DiagnDocID;
            recipe.drname          = register.Doctor;
            recipe.registertradeno = register.SerialNO.ToString();
            recipe.billstype       = "1";
            Reg.recipe[] recipes = { recipe };
            recipearray.recipe = recipes;

            input.recipearray = recipearray;

            Reg.feeitemarray feeitemarray = new Reg.feeitemarray();
            input.feeitemarray = feeitemarray;

            return(root);
        }
Exemple #2
0
        private Reg.root TradeDataToInput(TradeData tradeData)
        {
            Reg.root  root  = new Reg.root();
            Reg.input input = new Reg.input();
            root.input = input;

            #region tradeinfo 交易信息 curetype/billtype 必填
            Reg.tradeinfo tradeinfo = new 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 必填
            Reg.recipearray recipearray = new Reg.recipearray();
            Reg.recipe[]    recipes     = new Reg.recipe[tradeData.recipeList.recipes.Count];
            for (int i = 0; i < tradeData.recipeList.recipes.Count; i++)
            {
                Reg.recipe recipe = new 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 必填
            Reg.feeitemarray feeitemarray = new Reg.feeitemarray();
            Reg.feeitem[]    feeitems     = new Reg.feeitem[tradeData.feeitemList.feeitems.Count];
            for (int i = 0; i < tradeData.feeitemList.feeitems.Count; i++)
            {
                Reg.feeitem feeitem = new 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);
        }
Exemple #3
0
        private Reg.root PreviewRegisterToInput(MI_Register register)
        {
            Reg.root  root  = new Reg.root();
            Reg.input input = new Reg.input();
            root.input = input;
            #region tradeinfo 交易信息 curetype/billtype 必填
            Reg.tradeinfo tradeinfo = new 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 必填
            Reg.recipearray recipearray = new Reg.recipearray();
            Reg.recipe      recipe      = new 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";
            Reg.recipe[] recipes = { recipe };
            recipearray.recipe = recipes;

            input.recipearray = recipearray;
            #endregion

            #region 明细信息 itemno/recipeno/hiscode/itemname/itemtype/unitprice/count/fee/babyflag 必填
            Reg.feeitemarray feeitemarray = new Reg.feeitemarray();
            Reg.feeitem      feeitem      = new 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";

            Reg.feeitem[] feeitems = { feeitem };
            recipearray.recipe = recipes;

            input.feeitemarray = feeitemarray;
            #endregion
            return(root);
        }