/// <summary>
        /// 读卡
        /// </summary>
        /// <returns></returns>
        public NetworkPatInfo NetworkReadCard()
        {
            //(意外处理)强制门规退费
            //  chexiaomg();



            InterfaceInit();
            NetworkPatInfo networkPatInfo = new NetworkPatInfo();

            IsOutReadCard = false;

            // frmCARD frmCard = new frmCARD();

            string quickIDnumber = "";

            if (inReimPara != null && outReimPara != null)
            {
                quickIDnumber = inReimPara.PatInfo.IDNo;
            }
            else
            {
                quickIDnumber = inReimPara == null ? outReimPara.PatInfo.IDNo : inReimPara.PatInfo.IDNo;
            }
            frmCARD frmCard = new frmCARD(quickIDnumber);

            frmCard.ShowDialog();
            if (frmCard.iscard == "1")
            {
                CARD_Y_N = "1";
                P_syzhlx = "3";
                patInfo  = handelModel.ReadCardMG();
            }
            else if (frmCard.iscard == "0")
            {
                CARD_Y_N = "0";
                P_syzhlx = "5";
                patInfo  = handelModel.QueryBasicInfo(frmCard.IDNo, "", "4", "");//*医疗统筹类别(1,住院,4 门规)
            }
            else
            {
                throw new Exception("操作员取消本次操作");
            }
            IsOutReadCard = true;
            dicPatInfo    = patInfo;

            networkPatInfo.MedicalNo       = patInfo["ylzbh"];                 //医疗卡号
            networkPatInfo.PatName         = patInfo["xm"];                    //姓名
            networkPatInfo.Sex             = patInfo["xb"] == "1" ? "男" : "女"; //性别
            networkPatInfo.IDNo            = patInfo["shbzhm"];                //身份证号码
            networkPatInfo.MedicalTypeName = patInfo["ylrylb"];
            networkPatInfo.MedicalType     = patInfo["ylrylb"];                //医疗人员类别
            networkPatInfo.ICAmount        = Convert.ToDecimal(patInfo["ye"]); //账户余额
            networkPatInfo.ICNo            = "";                               //社会保障卡卡号
            networkPatInfo.CompanyNo       = "";                               //单位编号
            networkPatInfo.CompanyName     = patInfo["dwmc"];                  //单位名称
            //networkPatInfo.Birthday = Convert.ToDateTime(patInfo["csrq"].Substring(0, 4) + "-" + patInfo["csrq"].Substring(4, 2) + "-" + patInfo["csrq"].Substring(6, 2));                    //出生日期
            networkPatInfo.MedicalType = patInfo["ylrylb"];
            return(networkPatInfo);
        }
Beispiel #2
0
        public NetworkPatInfo NetworkReadCard()
        {
            frmCARD frmcard = new frmCARD(this);

            frmcard.TopMost = true;
            frmcard.ShowDialog();
            if (frmcard.isCancel)
            {
                throw new Exception("取消操作");
            }
            return(networkPatInfo);
        }
        /// <summary>
        /// 读卡
        /// </summary>
        /// <returns></returns>
        public NetworkPatInfo NetworkReadCard()
        {
            InterfaceInit();
            NetworkPatInfo networkPatInfo = new NetworkPatInfo();



            frmCARD frmCard = new frmCARD();

            frmCard.ShowDialog();
            if (frmCard.iscard == "1")
            {
                CARD_Y_N = "1";
                P_syzhlx = "3";
                try
                {
                    patInfo = handelModel.ReadCardMZ();
                }
                catch (Exception ex)
                {
                    patInfo = handelModel.ReadCardMZ();
                }
            }
            else if (frmCard.iscard == "0")
            {
                CARD_Y_N = "0";
                P_syzhlx = "5";
                patInfo  = handelModel.QueryBasicInfo(frmCard.IDNo, "", "6", "");//*医疗统筹类别(1,住院,4 门规)
            }
            else
            {
                throw new Exception("操作员取消本次操作");
            }

            dicPatInfo = patInfo;
            networkPatInfo.MedicalNo       = patInfo["ylzbh"];                 //医疗卡号
            networkPatInfo.PatName         = patInfo["xm"];                    //姓名
            networkPatInfo.Sex             = patInfo["xb"] == "1" ? "男" : "女"; //性别
            networkPatInfo.IDNo            = patInfo["shbzhm"];                //patInfo["sfzhm"];                        //身份证号码shbzhm
            networkPatInfo.MedicalTypeName = patInfo["ylrylb"];
            networkPatInfo.MedicalType     = patInfo["ylrylb"];                //医疗人员类别
            networkPatInfo.ICAmount        = Convert.ToDecimal(patInfo["ye"]); //账户余额
            networkPatInfo.ICNo            = "";                               //patInfo["kh"];                           //社会保障卡卡号
            networkPatInfo.CompanyNo       = patInfo["sbjbm"];                 //单位编号sbjbm
            networkPatInfo.CompanyName     = patInfo["dwmc"];                  //单位名称
            //networkPatInfo.Birthday = Convert.ToDateTime(patInfo["csrq"].Substring(0, 4) + "-" + patInfo["csrq"].Substring(4, 2) + "-" + patInfo["csrq"].Substring(6, 2));                    //出生日期
            networkPatInfo.MedicalType = patInfo["ylrylb"];
            return(networkPatInfo);
        }
        /// <summary>
        /// 住院读卡
        /// </summary>
        /// <returns></returns>
        public void InNetWorkReadCard(InPayParameter para)
        {
            NetworkPatInfo networkPatInfo       = new NetworkPatInfo();
            Dictionary <string, string> patInfo = new Dictionary <string, string>();
            //判断有卡无卡
            frmCARD frmCard = new frmCARD();

            frmCard.ShowDialog();
            if (frmCard.iscard == "1")
            {
                CARD_Y_N = "1";
                patInfo  = handelModel.ReadCardZY();
            }
            else if (frmCard.iscard == "0")
            {
                CARD_Y_N = "0";
                patInfo  = handelModel.QueryBasicInfo(frmCard.IDNo, "", "1", "");//*医疗统筹类别(1,住院,4 门规)
            }
            else
            {
                throw new Exception("操作员取消本次操作");
            }
            dicPatInfo = patInfo;

            if (dicPatInfo["zhzybz"] == "1")
            {
                MessageBox.Show(dicPatInfo["zhzysm"]);
            }

            dicPatInfo = patInfo;
            inReimPara.RegInfo.CardNo       = patInfo["ylzbh"];                 //医疗卡号
            inReimPara.RegInfo.NetRegSerial = patInfo["sbjglx"];                //卡序列号
            inReimPara.RegInfo.CantonCode   = patInfo["sbjbm"];                 //行政区号
            inReimPara.RegInfo.MemberNo     = patInfo["ylzbh"];                 //成员编码
            inReimPara.RegInfo.CompanyName  = patInfo["dwmc"];                  //单位名称
            inReimPara.RegInfo.PatAddress   = patInfo["dwmc"];                  //住址
            inReimPara.RegInfo.IdNo         = patInfo["shbzhm"];                //身份证号
            inReimPara.RegInfo.NetPatType   = patInfo["ylrylb"];                //人员类别
            inReimPara.RegInfo.Memo1        = patInfo["xb"] == "1" ? "男" : "女"; //性别
            string rqlb = "";

            if (dicPatInfo["sbjglx"] == "A")
            {
                rqlb = "职工";
            }
            else if (dicPatInfo["sbjglx"] == "B")
            {
                rqlb = "居民";
            }
            inReimPara.RegInfo.NetPatType = rqlb;            //人员
            inReimPara.RegInfo.NetType    = "1";
            inReimPara.RegInfo.NetPatName = patInfo["xm"];   //姓名
            //return networkPatInfo;
            //当姓名不一致时提示
            if (inReimPara.PatInfo.InPatName != patInfo["xm"])
            {
                if (MessageBox.Show(" 医保登记姓名为:【" + patInfo["xm"].ToString() + "】     患者姓名为:【" + inReimPara.PatInfo.InPatName + "】 是否继续 ", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    throw new Exception("姓名不一致,操作员取消操作!");
                }
            }

            if (patInfo["ylrylb"].Contains("职工"))
            {
                MessageBox.Show("提示:该患者人员类别属于职工,但住院信息中费别为居民,请取消操作并调整患者费别!");
            }

            //显示个人信息
            PersonInfoDialog perDialog = new PersonInfoDialog(patInfo);

            perDialog.ShowDialog();
        }
        /// <summary>
        /// 住院读卡
        /// </summary>
        /// <returns></returns>
        public void InNetWorkReadCard(InPayParameter para)
        {
            Dictionary <string, string> patInfo = new Dictionary <string, string>();
            //判断有卡无卡
            frmCARD frmCard = new frmCARD();

            frmCard.lblzylb.Visible = true;
            frmCard.cbType.Visible  = true;
            frmCard.ShowDialog();
            if (frmCard.iscard == "1")
            {
                CARD_Y_N = "1";
                P_syzhlx = "3";
                patInfo  = handelModel.ReadCardZY();
            }
            else if (frmCard.iscard == "0")
            {
                CARD_Y_N = "0";
                P_syzhlx = "5";
                patInfo  = handelModel.QueryBasicInfo(frmCard.IDNo, "", "1", "");//*医疗统筹类别(1,住院,4 门规)
            }
            else
            {
                throw new Exception("操作员取消本次操作");
            }
            p_yltclb   = frmCard.cbType.SelectedValue.ToString();
            dicPatInfo = patInfo;

            if (dicPatInfo["zhzybz"] == "1")
            {
                MessageBox.Show(dicPatInfo["zhzysm"]);
            }

            inReimPara.RegInfo.CardNo       = patInfo["ylzbh"];                 //医疗卡号
            inReimPara.RegInfo.NetRegSerial = patInfo["sbjglx"];                //卡序列号
            inReimPara.RegInfo.CantonCode   = patInfo["sbjbm"];                 //行政区号
            inReimPara.RegInfo.MemberNo     = patInfo["ylzbh"];                 //成员编码
            inReimPara.RegInfo.CompanyName  = patInfo["dwmc"];                  //单位名称
            inReimPara.RegInfo.PatAddress   = patInfo["dwmc"];                  //住址
            inReimPara.RegInfo.IdNo         = patInfo["shbzhm"];                //身份证号
            inReimPara.RegInfo.NetPatType   = patInfo["ylrylb"];                //人员类别
            inReimPara.RegInfo.Memo1        = patInfo["xb"] == "1" ? "男" : "女"; //性别
            inReimPara.RegInfo.Memo2        = CARD_Y_N;                         // 有卡,无卡
            inReimPara.RegInfo.NetPatName   = patInfo["xm"];                    //姓名
            string rqlb = "";

            if (dicPatInfo["sbjglx"] == "A")
            {
                rqlb = "职工";
            }
            else if (dicPatInfo["sbjglx"] == "B")
            {
                rqlb = "居民";
            }
            inReimPara.RegInfo.NetPatType     = rqlb;                                          //人员
            inReimPara.RegInfo.NetType        = "1";
            inReimPara.RegInfo.PatInHosSerial = inReimPara.PatInfo.PatInHosCode;
            //当姓名不一致时提示
            if (inReimPara.PatInfo.InPatName != patInfo["xm"])
            {
                if (MessageBox.Show(" 医保卡姓名为:【" + patInfo["xm"].ToString() + "】     HIS患者姓名为:【" + inReimPara.PatInfo.InPatName + "】 是否继续 ", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) != DialogResult.Yes)
                {
                    throw new Exception("姓名不一致,操作员取消操作!");
                }
            }

            //inReimPara.RegInfo.NetPatName = patInfo["xm"];                  //姓名

            //if (patInfo["ylrylb"].Contains("居民"))
            //    MessageBox.Show("提示:该患者人员类别属于居民,但住院信息中费别为职工,请取消操作并调整患者费别!");

            //显示个人信息
            PersonInfoDialog perDialog = new PersonInfoDialog(patInfo);

            perDialog.ShowDialog();
        }