public void GetRegMedicareCaculate() { try { //调用医保读卡和试算接口,算出医保金额 PatientInfo miPatInfo = MIOPInterface.ReadMediaCard(); if (!MIOPInterface.PatCheck(ifrmRegister.CurPatlist.PatName, ifrmRegister.CurPatlist.MedicareCard, ifrmRegister.CurPatlist.IDNumber, miPatInfo)) { return; } ifrmRegister.MedicardReadInfo = miPatInfo.ShowMiPatInfo; Action <ClientRequestData> requestAction1 = ((ClientRequestData request) => { request.AddData(ifrmRegister.CurPatlist.RegTypeID); }); ServiceResponseData retdata1 = InvokeWcfService("OPProject.Service", "RegisterController", "GetRegInfoByRegId", requestAction1); DataTable dtRegInfo = retdata1.GetData <DataTable>(0); Dictionary <string, string> dic = MIOPInterface.MiRegBuget(ifrmRegPayMentInfo.SocialCard, LoginUserInfo.EmpName, LoginUserInfo.EmpId, ifrmRegister.CurPatlist, ifrmRegPayMentInfo.RegTotalFee, dtRegInfo, ifrmRegPayMentInfo.InvoiceNO, ifrmRegPayMentInfo.IdentityNum); ifrmRegPayMentInfo.MedicarePay = Convert.ToDecimal(dic["MedicarePay"]); // ifrmRegPayMentInfo.RegTotalFee;//假数据 ifrmRegPayMentInfo.MedicareMIPay = Convert.ToDecimal(dic["MedicareMIPay"]); // ifrmRegPayMentInfo.RegTotalFee;//假数据 ifrmRegPayMentInfo.MedicarePersPay = Convert.ToDecimal(dic["MedicarePersPay"]); // ifrmRegPayMentInfo.RegTotalFee;//假数据 ifrmRegPayMentInfo.SetMedicardInfo = dic["MedicardInfo"].ToString(); // "43625436"; ifrmRegPayMentInfo.MIBudgetID = Convert.ToInt32(dic["ID"]); //医保预结算ID } catch (Exception err) { MessageBoxShow(err.Message, MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); } }
/// <summary> /// 挂号支付界面初始化 /// </summary> /// <returns>返回初始化是否成功</returns> private bool RegPayDataInit() { try { OP_PatList curPatlist = ifrmRegister.CurPatlist; Action <ClientRequestData> requestAction = ((ClientRequestData request) => { request.AddData(LoginUserInfo.EmpId); //人员ID request.AddData(curPatlist.RegTypeID); //挂号类别ID request.AddData(curPatlist.PatTypeID); //病人类型ID }); ServiceResponseData retdata = InvokeWcfService("OPProject.Service", "RegisterController", "RegPayMentInit", requestAction); string invoiceNO = retdata.GetData <string>(0); //票据号 decimal regFee = retdata.GetData <decimal>(1); //挂号费 DataTable dtPayMent = retdata.GetData <DataTable>(2); bool isMedicardPat = retdata.GetData <bool>(3); ifrmRegPayMentInfo.RegDeptName = curPatlist.RegDeptName; ifrmRegPayMentInfo.MedicarePay = 0; ifrmRegPayMentInfo.MedicareMIPay = 0; ifrmRegPayMentInfo.MedicarePersPay = 0; ifrmRegPayMentInfo.PromFee = 0; ifrmRegPayMentInfo.GetRegPayment(dtPayMent); ifrmRegPayMentInfo.RegTotalFee = Convert.ToDecimal(regFee.ToString("0.00")); ifrmRegPayMentInfo.InvoiceNO = invoiceNO; ifrmRegPayMentInfo.ActPay = ifrmRegPayMentInfo.RegTotalFee; //如果病人类型是医保类型,则直接调用医保挂号预算接口,算出医保预算支付金额 if (isMedicardPat == true) { if (string.IsNullOrEmpty(ifrmRegister.MedicardReadInfo)) { PatientInfo miPatInfo = MIOPInterface.ReadMediaCard(); if (!MIOPInterface.PatCheck(curPatlist.PatName, curPatlist.MedicareCard, curPatlist.IDNumber, miPatInfo)) { return(false); } string medicareCardNO = miPatInfo.CardNo; ifrmRegPayMentInfo.SocialCard = miPatInfo.CardNo; ifrmRegPayMentInfo.IdentityNum = miPatInfo.IcNo; curPatlist.MedicareCard = miPatInfo.CardNo; ifrmRegister.MedicardReadInfo = miPatInfo.ShowMiPatInfo; //PatientInfo miPatInfo = MIOPInterface.ReadMediaCard(); //string MedicareCardNO = miPatInfo.CardNo;// "12345678900987654"; //string MedicardInfo = "卡号:" + miPatInfo.CardNo + " 姓名:" + miPatInfo.PersonName + " 医保类别:" + miPatInfo.PersonType + " 身份证号码:" + miPatInfo.IdNo + " 余额:" + miPatInfo.PersonCount; //"12345678900987654"; //ifrmRegister.MedicardReadInfo = MedicardInfo; //curPatlist.MedicareCard = miPatInfo.CardNo; } Action <ClientRequestData> requestAction1 = ((ClientRequestData request) => { request.AddData(curPatlist.RegTypeID); }); ServiceResponseData retdata1 = InvokeWcfService("OPProject.Service", "RegisterController", "GetRegInfoByRegId", requestAction1); DataTable dtRegInfo = retdata1.GetData <DataTable>(0); //医保预算 Dictionary <string, string> dic = MIOPInterface.MiRegBuget(ifrmRegPayMentInfo.SocialCard, LoginUserInfo.EmpName, LoginUserInfo.EmpId, curPatlist, regFee, dtRegInfo, ifrmRegPayMentInfo.InvoiceNO, ifrmRegPayMentInfo.IdentityNum); decimal dMedicarePay = Convert.ToDecimal(dic["MedicarePay"].ToString()); // ifrmRegPayMentInfo.RegTotalFee;//假数据 ifrmRegPayMentInfo.MedicarePay = dMedicarePay; decimal dMedicareMIPay = Convert.ToDecimal(dic["MedicareMIPay"].ToString()); // ifrmRegPayMentInfo.RegTotalFee;//假数据 ifrmRegPayMentInfo.MedicareMIPay = dMedicareMIPay; // ifrmRegPayMentInfo.RegTotalFee;//假数据 decimal dMedicarePersPay = Convert.ToDecimal(dic["MedicarePersPay"].ToString()); // ifrmRegPayMentInfo.RegTotalFee;//假数据 ifrmRegPayMentInfo.MedicarePersPay = dMedicarePersPay; ifrmRegPayMentInfo.SetMedicardInfo = dic["MedicardInfo"].ToString(); // "43625436"; ifrmRegPayMentInfo.MIBudgetID = Convert.ToInt32(dic["ID"]); //医保预结算ID } else { ifrmRegPayMentInfo.ShoudPay = Convert.ToDecimal(regFee.ToString("0.00")) - Convert.ToDecimal(ifrmRegPayMentInfo.MedicarePay);//应付金额 } ifrmRegPayMentInfo.ReadMedicareEnabled = isMedicardPat; ifrmRegPayMentInfo.ExpMedicardInfoVisible = isMedicardPat; return(true); } catch (Exception err) { MessageBoxShow(err.Message, MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); return(false); } }