/// <summary>
        /// 门诊预登记
        /// </summary>
        /// <param name="root"></param>
        /// <returns></returns>
        public ResultClass MZ_PreviewRegister(SiInterfaceDll sDll, Reg.root root)
        {
            ResultClass resultClass = new ResultClass();

            try
            {
                resultClass = iface.OpenDevice(sDll);
                if (resultClass.bSucess)
                {
                    resultClass = 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);
        }
예제 #2
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);
        }
예제 #3
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);
        }
예제 #4
0
        public override ResultClass MZ_PreviewRegister(InputClass inputClass)
        {
            ResultClass resultClass;

            Reg.root root = PreviewRegisterToInput((MI_Register)inputClass.SInput[InputType.MI_Register]);
            resultClass = ybInterfaceDao.MZ_PreviewRegister(sDll, root);
            resultClass = hisDao.MZ_PreviewRegister(null);
            return(resultClass);
        }
예제 #5
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);
        }
예제 #6
0
        /// <summary>
        /// 分解费用
        /// </summary>
        /// <param name="sDll"></param>
        /// <returns></returns>
        public ResultClass Divide(SiInterfaceDll sDll, Reg.root root)
        {
            string sMome = "";
            bool   bRet  = false;
            string sOut;
            string sIn = XmlUtil.SerializeToXml(root, typeof(Reg.root));

            sDll.Divide(sIn, out sOut);

            AddLog("分解输出数据:");
            AddLog(sOut);
            DivideResult.root divideResult = (DivideResult.root)(XmlUtil.DeserializeFromXml(sOut, typeof(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);
        }