/// <summary> /// 门诊联网结算 /// </summary> /// <param name="inPara">门诊接口入参</param> /// <returns></returns> public void OutNetworkSettle(OutPayParameter para) { try { Dictionary <string, string> MFYYInfo = new Dictionary <string, string>(); InterfaceInit(); outReimPara = para; //当姓名不一致时提示 if (outReimPara.PatInfo.PatName != dicPatInfo["xm"]) { if (MessageBox.Show(" 医保登记姓名为:【" + dicPatInfo["xm"].ToString() + "】 患者姓名为:【" + outReimPara.PatInfo.PatName + "】 是否继续 ", "提示", MessageBoxButtons.YesNo) == DialogResult.No) { throw new Exception("姓名不一致,操作员取消操作!"); } } string notMatchedCharge = ""; foreach (var item in outReimPara.Details) { if (item.NetworkItemCode.ToString().Trim().Length == 0 || "0000".Equals(item.NetworkItemCode)) { notMatchedCharge += "编码:" + item.ChargeCode + "," + "名称:" + item.ChargeName + ";"; } } if (notMatchedCharge.Trim().Length > 0) { throw new Exception("有以下项目未对应:\n" + notMatchedCharge + "取消上传费用"); } //获取免费用药余额 MFYYInfo = handelModel.HqMfyyXx(outReimPara.RegInfo.CantonCode, outReimPara.RegInfo.IdNo, outReimPara.RegInfo.NetRegSerial); string MFYYSM = MFYYInfo["mfyysm"]; //获取疾病信息 Dialog.MfyyJblr frm = new MfyyJblr(MFYYSM); frm.ShowDialog(); string Mfyybm = frm.MfyyJbbm; string ylzbh = ""; string syzhlx = "5"; if (CARD_Y_N == "1") { ylzbh = outReimPara.RegInfo.CardNo; syzhlx = "0"; } //门诊初始化 handelModel.InitMFYY(outReimPara.RegInfo.CantonCode, "6", outReimPara.RegInfo.MemberNo, outReimPara.PatInfo.PatName, dicPatInfo["xb"], outReimPara.CommPara.OutNetworkSettleId.ToString(), DateTime.Now.ToString("yyyy-MM-dd"),//"001", PayAPIConfig.Operator.UserSysId, Mfyybm, syzhlx, ylzbh); //handelModel.SaveOutItemsMZ(outReimPara.Details); handelModel.SaveOutItems(outReimPara); //门诊结算 dicSettleInfo = handelModel.SettleMFYY(dicPatInfo["sbjglx"]); //---------------------------------------------低保结算 if (Convert.ToDecimal(dicSettleInfo["brfdje"]) - Convert.ToDecimal(dicSettleInfo["grzhzf"]) > 0) //如果自负金额大于0弹出是否低保结算提示 { if (outReimPara.RegInfo.Memo2 == "低保") { dicSettleInfoDibao.Clear(); PayAPIInstance.Dareway.JiNan.Dialog.DiBaoJS_Confirm diBaoJS = new PayAPIInstance.Dareway.JiNan.Dialog.DiBaoJS_Confirm(outReimPara, dicSettleInfo, dicSettleInfoDibao, hosId); diBaoJS.ShowDialog(); } } //------------------------------------------------ //保存门诊结算明细 // SaveOutSettleMain("MZ"); SaveOutSettleMain(); GC.KeepAlive(handelModel); GC.Collect(); } catch (Exception e) { throw new Exception(e.Message); } }
/// <summary> /// 门诊联网结算 /// </summary> /// <param name="inPara">门诊接口入参</param> /// <returns></returns> public void OutNetworkSettle(OutPayParameter para) { Dictionary <string, string> MFYYInfo = new Dictionary <string, string>(); InterfaceInit(); outReimPara = para; //当姓名不一致时提示 if (outReimPara.PatInfo.PatName != dicPatInfo["xm"]) { if (MessageBox.Show(" 医保卡姓名为:【" + dicPatInfo["xm"].ToString() + "】 HIS患者姓名为:【" + outReimPara.PatInfo.PatName + "】 是否继续 ", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) != DialogResult.Yes) { throw new Exception("姓名不一致,操作员取消操作!"); } } //获取免费用药余额 MFYYInfo = handelModel.HqMfyyXx(outReimPara.RegInfo.CantonCode, outReimPara.RegInfo.IdNo, outReimPara.RegInfo.NetRegSerial); string MFYYSM = MFYYInfo["mfyysm"]; //获取疾病信息 Dialog.MfyyJblr frm = new MfyyJblr(MFYYSM, this); frm.ShowDialog(); if (frm.isCancel) { throw new Exception("取消操作"); } string Mfyybm = frm.MfyyJbbm; string ylzbh = ""; if (CARD_Y_N == "1") { ylzbh = outReimPara.RegInfo.CardNo; } //门诊初始化 handelModel.InitMFYY(outReimPara.RegInfo.CantonCode, "6", outReimPara.RegInfo.MemberNo, outReimPara.PatInfo.PatName, dicPatInfo["xb"], outReimPara.CommPara.OutNetworkSettleId.ToString(), DateTime.Now.ToString("yyyy-MM-dd"),//"001", handelModel.GetNetWorkDocCode(handelModel.getMzysbh(outReimPara.PatInfo.OutPatId.ToString(), outReimPara.CommPara.TradeId.ToString())), Mfyybm, P_syzhlx, ylzbh); //handelModel.SaveOutItemsMZ(outReimPara.Details); handelModel.SaveOutItems(outReimPara.Details); //门诊结算 dicSettleInfo = handelModel.SettleMFYY(dicPatInfo["sbjglx"]); //---------------------------------------------低保结算 if (Convert.ToDecimal(dicSettleInfo["brfdje"]) - Convert.ToDecimal(dicSettleInfo["grzhzf"]) > 0) //如果自负金额大于0弹出是否低保结算提示 { if (outReimPara.RegInfo.Memo2 == "低保") { dicSettleInfoDibao.Clear(); DiBaoJS_Confirm diBaoJS = new DiBaoJS_Confirm(outReimPara, dicSettleInfo, dicSettleInfoDibao); diBaoJS.ShowDialog(); } } //------------------------------------------------ //保存门诊结算明细 SaveOutSettleMain(); GC.KeepAlive(handelModel); GC.Collect(); }