|
@@ -12,6 +12,19 @@ namespace PTMedicalInsurance.Business
|
|
|
{
|
|
|
class LocalMobilePayProcess : AbstractProcess
|
|
|
{
|
|
|
+ private Patients MPat;
|
|
|
+ public Settlements MSettl;
|
|
|
+
|
|
|
+ private JObject joParam;
|
|
|
+ private JObject joInsuAdmObj;
|
|
|
+ private JObject joResponse;
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 支付请求
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="input"></param>
|
|
|
+ /// <returns></returns>
|
|
|
public override CallResult Process(JObject input)
|
|
|
{
|
|
|
//调用HIS费用查询信息
|
|
@@ -83,5 +96,470 @@ namespace PTMedicalInsurance.Business
|
|
|
});
|
|
|
return source;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ private void init(JObject joInpar)
|
|
|
+ {
|
|
|
+ joParam = JObject.Parse(JsonHelper.getDestValue(joInpar, "params[0]"));
|
|
|
+ joInsuAdmObj = JObject.Parse(JsonHelper.getDestValue(joInpar, "insuAdmObj"));
|
|
|
+ string response = JsonHelper.getDestValue(joInpar, "responsecontent");
|
|
|
+ if(!string.IsNullOrEmpty(response))
|
|
|
+ {
|
|
|
+ joResponse = JObject.Parse(response);
|
|
|
+ }
|
|
|
+ setPatientByInPar();
|
|
|
+ setSettlementsByInPar();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSettlementsByInPar()
|
|
|
+ {
|
|
|
+ MSettl.clearingWay = JsonHelper.getDestValue(joInsuAdmObj, "psnSetlway");
|
|
|
+ MSettl.settlID = JsonHelper.getDestValue(joInsuAdmObj, "payOrdId");
|
|
|
+ MSettl.payOrdId = JsonHelper.getDestValue(joInsuAdmObj, "payOrdId");
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPatientByInPar()
|
|
|
+ {
|
|
|
+ MPat.adm_Dr = int.Parse(JsonHelper.getDestValue(joParam, "admID"));
|
|
|
+ Global.pat.adm_Dr = MPat.adm_Dr;
|
|
|
+ MPat.name = JsonHelper.getDestValue(joInsuAdmObj, "patName");
|
|
|
+ MPat.recordID = JsonHelper.getDestValue(joParam, "recordID");
|
|
|
+ MPat.billID = JsonHelper.getDestValue(joParam, "billID");
|
|
|
+ MPat.medType = JsonHelper.getDestValue(joInsuAdmObj, "medType");
|
|
|
+ MPat.certType = JsonHelper.getDestValue(joInsuAdmObj, "mdtrtCertType");
|
|
|
+ MPat.token = JsonHelper.getDestValue(joInsuAdmObj, "ecToken");
|
|
|
+ MPat.payAuthNo = JsonHelper.getDestValue(joInsuAdmObj, "payAuthNo");
|
|
|
+ MPat.uldLatlnt = JsonHelper.getDestValue(joInsuAdmObj, "uldLatlnt");
|
|
|
+ MPat.payOrdId = JsonHelper.getDestValue(joInsuAdmObj, "payOrdId");
|
|
|
+ MPat.mdtrtID = JsonHelper.getDestValue(joInsuAdmObj, "mdtrt_id");
|
|
|
+ if (string.IsNullOrEmpty(MPat.mdtrtID) && joResponse != null)
|
|
|
+ {
|
|
|
+ MPat.mdtrtID = JsonHelper.getDestValue(joResponse, "SETLINFO.mdtrt_id");
|
|
|
+ }
|
|
|
+ MPat.settlID = JsonHelper.getDestValue(joInsuAdmObj, "setl_id");
|
|
|
+ if (string.IsNullOrEmpty(MPat.settlID) && joResponse != null)
|
|
|
+ {
|
|
|
+ MPat.settlID = JsonHelper.getDestValue(joResponse, "SETLINFO.setl_id");
|
|
|
+ MPat.psn_no = JsonHelper.getDestValue(joResponse, "SETLINFO.psn_no");
|
|
|
+ MPat.payOrdId = MPat.settlID;
|
|
|
+ MPat.insuplc_admdvs = JsonHelper.getDestValue(joResponse, "insuplcAdmdvs");
|
|
|
+ }
|
|
|
+ Global.pat.mdtrtID = MPat.mdtrtID;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 交易确认
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="input"></param>
|
|
|
+ public CallResult Confirm(JObject input)
|
|
|
+ {
|
|
|
+ outParam = "";
|
|
|
+ string errMsg = "";
|
|
|
+ init(input);
|
|
|
+ // save
|
|
|
+ //设置
|
|
|
+ JObject joSettle = joResponse["SETLINFO"].ToObject<JObject>();
|
|
|
+ setSettlementsBy6202Rtn(joSettle);
|
|
|
+ MSettl.confirmFlag = 0;
|
|
|
+ //存入MI 结算表
|
|
|
+ if (saveSettlement(out errMsg) != 0)
|
|
|
+ {
|
|
|
+ outParam = errMsg;
|
|
|
+ return Exception(-1, "保存结算信息失败",errMsg);
|
|
|
+ }
|
|
|
+
|
|
|
+ MobilePayConfirmSettlement(joSettle,out outParam);
|
|
|
+ return IrisReturn("结算成功",null);
|
|
|
+ }
|
|
|
+
|
|
|
+ private int MobilePayConfirmSettlement(JObject joSettlInfo,out string outPar)
|
|
|
+ {
|
|
|
+ string errMsg;
|
|
|
+ outPar = "";
|
|
|
+ try
|
|
|
+ {
|
|
|
+ //设置
|
|
|
+ setSettlementsBy6301Rtn(joSettlInfo);
|
|
|
+
|
|
|
+ MSettl.confirmFlag = 1;
|
|
|
+ //存入MI 结算表
|
|
|
+ if (updateSettlement(out errMsg) != 0)
|
|
|
+ {
|
|
|
+ outPar = errMsg;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //返回给HIS前端
|
|
|
+ outPar = JsonHelper.setExceptionJson(0, "云医保平台", "确认成功!").ToString();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ outPar = ex.Message;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSettlementsBy6202Rtn(JObject jo)
|
|
|
+ {
|
|
|
+ MSettl.settlID = JsonHelper.getDestValue(jo, "setl_id");
|
|
|
+ MPat.payOrdId = MSettl.settlID;
|
|
|
+ MSettl.payOrdId = MSettl.settlID;
|
|
|
+ MSettl.ordStas = JsonHelper.getDestValue(jo, "ordStas");
|
|
|
+ MSettl.sumamt = getDecimalFee(jo, "medfee_sumamt");
|
|
|
+ MSettl.personCashPay = getDecimalFee(jo, "ownPayAmt");
|
|
|
+ MSettl.accountPaySumamt = getDecimalFee(jo, "acct_pay");
|
|
|
+ MSettl.fundPaySumamt = getDecimalFee(jo, "fund_pay_sumamt");
|
|
|
+ MSettl.deposit = getDecimalFee(jo, "deposit");
|
|
|
+ MSettl.clearingOrgan = JsonHelper.getDestValue(jo, "clr_optins");
|
|
|
+ MSettl.clearingType = JsonHelper.getDestValue(jo, "clr_type");
|
|
|
+ MSettl.clearingWay = JsonHelper.getDestValue(jo, "clr_way");
|
|
|
+ MSettl.civilserviceAllowancePay = getDecimalFee(jo, "cvlserv_pay");
|
|
|
+ MSettl.ownPayAmount = getDecimalFee(jo, "fulamt_ownpay_amt");
|
|
|
+ MSettl.overLimitAmountmt = getDecimalFee(jo, "overlmt_selfpay");
|
|
|
+ MSettl.preSelfPayAmount = getDecimalFee(jo, "preselfpay_amt");
|
|
|
+ MSettl.inPolicyRangeAmount = getDecimalFee(jo, "inscp_scp_amt");
|
|
|
+ MSettl.actualPayDeductible = getDecimalFee(jo, "act_pay_dedc");
|
|
|
+ MSettl.healthInsurancePay = getDecimalFee(jo, "hifp_pay");
|
|
|
+ MSettl.healthInsuranceRatio = getDecimalFee(jo, "pool_prop_selfpay");
|
|
|
+ MSettl.enterpriseSupplementPay = getDecimalFee(jo, "hifes_pay");
|
|
|
+ MSettl.seriousIllnessPay = getDecimalFee(jo, "hifmi_pay");
|
|
|
+ MSettl.largeExpensesSupplementPay = getDecimalFee(jo, "hifob_pay");
|
|
|
+ MSettl.medicalAssistPay = getDecimalFee(jo, "maf_pay");
|
|
|
+ MSettl.hospitalPartAmount = getDecimalFee(jo, "hosp_part_amt");
|
|
|
+ MSettl.otherPay = getDecimalFee(jo, "oth_pay");
|
|
|
+ MSettl.personPaySumamt = getDecimalFee(jo, "psn_part_amt");
|
|
|
+ MSettl.balance = getDecimalFee(jo, "balc");
|
|
|
+ MSettl.accountMutualAidAmount = getDecimalFee(jo, "acct_mulaid_pay");
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 插入结算信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="joSettlement"></param>
|
|
|
+ /// <param name="outParam"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public int saveSettlement(out string outParam)
|
|
|
+ {
|
|
|
+ JObject joTmp = new JObject();
|
|
|
+ string errMsg = "";
|
|
|
+ try
|
|
|
+ {
|
|
|
+ JObject joSetlinfo = new JObject();
|
|
|
+ joSetlinfo.Add("HospitalDr", Global.inf.hospitalDr);
|
|
|
+ joSetlinfo.Add("admID", MPat.adm_Dr);
|
|
|
+ joSetlinfo.Add("mdtrt_id", MPat.mdtrtID);
|
|
|
+ joSetlinfo.Add("setl_id", MSettl.settlID);//
|
|
|
+ joSetlinfo.Add("pay_ord_id", MSettl.payOrdId);
|
|
|
+ joSetlinfo.Add("psn_no", MPat.psn_no);
|
|
|
+ joSetlinfo.Add("psn_name", MPat.name);
|
|
|
+ //joSetlinfo.Add("mdtrt_cert_type", JsonHelper.getDestValue(joRtnSetlinfo, "mdtrt_cert_type"));
|
|
|
+ joSetlinfo.Add("certno", MPat.certNO);
|
|
|
+ joSetlinfo.Add("gend", MPat.gend);
|
|
|
+ joSetlinfo.Add("naty", MPat.naty);
|
|
|
+ joSetlinfo.Add("brdy", MPat.brdy);
|
|
|
+ joSetlinfo.Add("age", MPat.age);
|
|
|
+ joSetlinfo.Add("insutype", MPat.insuType);
|
|
|
+ joSetlinfo.Add("psn_type", MPat.psn_type);
|
|
|
+ joSetlinfo.Add("cvlserv_flag", "");
|
|
|
+ joSetlinfo.Add("setl_time", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ joSetlinfo.Add("mdtrt_cert_type", MPat.mdtrtcertType);
|
|
|
+ joSetlinfo.Add("med_type", MPat.medType);
|
|
|
+ joSetlinfo.Add("medfee_sumamt", MSettl.sumamt);//总费用
|
|
|
+ joSetlinfo.Add("fulamt_ownpay_amt", MSettl.ownPayAmount);//全自费金额
|
|
|
+ joSetlinfo.Add("overlmt_selfpay", MSettl.overLimitAmountmt);//超限价自费费用
|
|
|
+ joSetlinfo.Add("preselfpay_amt", MSettl.preSelfPayAmount);//先行自付金额
|
|
|
+ joSetlinfo.Add("inscp_scp_amt", MSettl.inPolicyRangeAmount);//符合政策范围金额
|
|
|
+ joSetlinfo.Add("act_pay_dedc", MSettl.actualPayDeductible);//实际支付起付线
|
|
|
+ joSetlinfo.Add("hifp_pay", MSettl.healthInsurancePay);//基本医疗保险统筹基金支出
|
|
|
+ joSetlinfo.Add("pool_prop_selfpay", MSettl.healthInsuranceRatio);//基本医疗保险统筹基金支付比例
|
|
|
+ joSetlinfo.Add("cvlserv_pay", MSettl.civilserviceAllowancePay);//公务员医疗补助资金支出
|
|
|
+ joSetlinfo.Add("hifes_pay", MSettl.enterpriseSupplementPay);//企业支付 占用 大病报销金额
|
|
|
+ joSetlinfo.Add("hifmi_pay", MSettl.seriousIllnessPay);// 居民大病保险资金支出
|
|
|
+ joSetlinfo.Add("hifob_pay", MSettl.largeExpensesSupplementPay);//职工大额医疗费用补助基金支出
|
|
|
+ joSetlinfo.Add("maf_pay", MSettl.medicalAssistPay);//医疗救助基金支出
|
|
|
+ joSetlinfo.Add("hosp_part_amt", MSettl.hospitalPartAmount);//医院负担金额
|
|
|
+ joSetlinfo.Add("oth_pay", MSettl.otherPay);//其他支出
|
|
|
+ joSetlinfo.Add("fund_pay_sumamt", MSettl.fundPaySumamt);//基金支付总额
|
|
|
+ joSetlinfo.Add("psn_part_amt", MSettl.personPaySumamt);//个人负担总金额
|
|
|
+ joSetlinfo.Add("acct_pay", MSettl.accountPaySumamt);//个人账户支出
|
|
|
+ joSetlinfo.Add("psn_cash_pay", MSettl.personCashPay);//个人现金支出
|
|
|
+ joSetlinfo.Add("balc", MSettl.balance);// 余额
|
|
|
+ joSetlinfo.Add("acct_mulaid_pay", "");//个人账户共济支付金额
|
|
|
+ joSetlinfo.Add("medins_setl_id", "");//医药机构结算ID
|
|
|
+ joSetlinfo.Add("clr_optins", MSettl.clearingOrgan);//清算经办机构
|
|
|
+ joSetlinfo.Add("clr_way", MSettl.clearingWay);//清算方式
|
|
|
+ joSetlinfo.Add("clr_type", MSettl.clearingType);//清算类别
|
|
|
+ joSetlinfo.Add("ValidFlag", 1);
|
|
|
+ joSetlinfo.Add("BillType", 1);
|
|
|
+ joSetlinfo.Add("msgid", Global.curEvt.msgid);
|
|
|
+ joSetlinfo.Add("admType", "3");
|
|
|
+ joSetlinfo.Add("billID", MPat.billID);
|
|
|
+ joSetlinfo.Add("recordID", MPat.recordID);
|
|
|
+ joSetlinfo.Add("interfaceDr", Global.inf.interfaceDr);
|
|
|
+ joSetlinfo.Add("insuplc_admdvs", MPat.insuplc_admdvs);
|
|
|
+ joSetlinfo.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ joSetlinfo.Add("HospitalizationsDays", MSettl.hospitalizationsDays);
|
|
|
+ joSetlinfo.Add("HospitalizationsTimes", MSettl.hospitalizationsTimes);
|
|
|
+ joSetlinfo.Add("HISAdmTime", MSettl.hisAdmTime);
|
|
|
+ joSetlinfo.Add("HISDischargeTime", MSettl.hisDischargeTime);
|
|
|
+ joSetlinfo.Add("updateUserID", Global.user.ID);
|
|
|
+ joSetlinfo.Add("ConfirmFlag", MSettl.confirmFlag);
|
|
|
+
|
|
|
+ JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010051", joSetlinfo).ToString(), "插入结算信息");
|
|
|
+ if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
|
|
|
+ {
|
|
|
+ outParam = errMsg;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ outParam = joSetlinfo.ToString();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ outParam = "插入结算信息:" + ex.Message;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSettlementsBy6301Rtn(JObject jo)
|
|
|
+ {
|
|
|
+ MSettl.settlID = MPat.payOrdId;
|
|
|
+ MPat.psn_no = JsonHelper.getDestValue(jo, "psn_no");
|
|
|
+ MPat.naty = JsonHelper.getDestValue(jo, "naty");
|
|
|
+ //MPat.name = JsonHelper.getDestValue(jo, "name");
|
|
|
+ MPat.age = JsonHelper.getDestValue(jo, "age");
|
|
|
+ MPat.gend = JsonHelper.getDestValue(jo, "gend");
|
|
|
+ MPat.certNO = JsonHelper.getDestValue(jo, "certno");
|
|
|
+ MPat.brdy = JsonHelper.getDestValue(jo, "brdy");
|
|
|
+ MPat.insuType = JsonHelper.getDestValue(jo, "insutype");
|
|
|
+ MPat.psn_type = JsonHelper.getDestValue(jo, "psn_type");
|
|
|
+ MPat.mdtrtcertType = JsonHelper.getDestValue(jo, "mdtrt_cert_type");
|
|
|
+ MPat.medType = JsonHelper.getDestValue(jo, "med_type");
|
|
|
+ //MPat.insuplc_admdvs = JsonHelper.getDestValue(jo, "insuplc_admdvs");
|
|
|
+ //MPat.payOrdId = JsonHelper.getDestValue(jo, "payOrdId");
|
|
|
+ MSettl.ordStas = JsonHelper.getDestValue(jo, "ordStas");
|
|
|
+ MSettl.sumamt = getDecimalFee(jo, "medfee_sumamt");
|
|
|
+ MSettl.personCashPay = getDecimalFee(jo, "psn_cash_pay");
|
|
|
+ MSettl.accountPaySumamt = getDecimalFee(jo, "acct_pay");
|
|
|
+ MSettl.fundPaySumamt = getDecimalFee(jo, "fund_pay_sumamt");
|
|
|
+ //MSettl.deposit = getDecimalFee(jo, "deposit");
|
|
|
+ MSettl.clearingOrgan = JsonHelper.getDestValue(jo, "clr_optins");
|
|
|
+ MSettl.clearingType = JsonHelper.getDestValue(jo, "clr_type");
|
|
|
+ MSettl.clearingWay = JsonHelper.getDestValue(jo, "clr_way");
|
|
|
+ MSettl.civilserviceAllowancePay = getDecimalFee(jo, "cvlserv_pay");
|
|
|
+ MSettl.ownPayAmount = getDecimalFee(jo, "fulamt_ownpay_amt");
|
|
|
+ MSettl.overLimitAmountmt = getDecimalFee(jo, "overlmt_selfpay");
|
|
|
+ MSettl.preSelfPayAmount = getDecimalFee(jo, "preselfpay_amt");
|
|
|
+ MSettl.inPolicyRangeAmount = getDecimalFee(jo, "inscp_scp_amt");
|
|
|
+ MSettl.actualPayDeductible = getDecimalFee(jo, "act_pay_dedc");
|
|
|
+ MSettl.healthInsurancePay = getDecimalFee(jo, "hifp_pay");
|
|
|
+ MSettl.healthInsuranceRatio = getDecimalFee(jo, "pool_prop_selfpay");
|
|
|
+ MSettl.enterpriseSupplementPay = getDecimalFee(jo, "hifes_pay");
|
|
|
+ MSettl.seriousIllnessPay = getDecimalFee(jo, "hifmi_pay");
|
|
|
+ MSettl.largeExpensesSupplementPay = getDecimalFee(jo, "hifob_pay");
|
|
|
+ MSettl.medicalAssistPay = getDecimalFee(jo, "maf_pay");
|
|
|
+ MSettl.hospitalPartAmount = getDecimalFee(jo, "hosp_part_amt");
|
|
|
+ MSettl.otherPay = getDecimalFee(jo, "oth_pay");
|
|
|
+ MSettl.personPaySumamt = getDecimalFee(jo, "psn_part_amt");
|
|
|
+ MSettl.balance = getDecimalFee(jo, "balc");
|
|
|
+ MSettl.accountMutualAidAmount = getDecimalFee(jo, "acct_mulaid_pay");
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 获取结算费用的封装
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="jo"></param>
|
|
|
+ /// <param name="path"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ private decimal getDecimalFee(JObject jo, string path)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ string temp = JsonHelper.getDestValue(jo, path);
|
|
|
+ if (temp == "")
|
|
|
+ {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return decimal.Parse(temp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Global.writeLog("getFee异常:" + ex.Message);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public int updateSettlement(out string outParam)
|
|
|
+ {
|
|
|
+ JObject joTmp = new JObject();
|
|
|
+ string errMsg = "";
|
|
|
+ try
|
|
|
+ {
|
|
|
+ JObject joSetlinfo = new JObject();
|
|
|
+ joSetlinfo.Add("HospitalDr", Global.inf.hospitalDr);
|
|
|
+ joSetlinfo.Add("AdmDr", MPat.adm_Dr);
|
|
|
+ joSetlinfo.Add("MdtrtID", MPat.mdtrtID);
|
|
|
+ joSetlinfo.Add("SettlementID", MSettl.settlID);//
|
|
|
+ joSetlinfo.Add("PayOrdID", MSettl.payOrdId);
|
|
|
+ joSetlinfo.Add("PersonnelNO", MPat.psn_no);
|
|
|
+ joSetlinfo.Add("PatientName", MPat.name);
|
|
|
+ //joSetlinfo.Add("CertificateType", JsonHelper.getDestValue(joRtnSetlinfo, "mdtrt_cert_type"));
|
|
|
+ joSetlinfo.Add("CertificateNO", MPat.certNO);
|
|
|
+ joSetlinfo.Add("Gender", MPat.gend);
|
|
|
+ joSetlinfo.Add("Nation", MPat.naty);
|
|
|
+ joSetlinfo.Add("BirthDay", MPat.brdy);
|
|
|
+ joSetlinfo.Add("Age", MPat.age);
|
|
|
+ joSetlinfo.Add("InsuranceType", MPat.insuType);
|
|
|
+ joSetlinfo.Add("PersonType", MPat.psn_type);
|
|
|
+ joSetlinfo.Add("CivilserviceFlag", "");
|
|
|
+ joSetlinfo.Add("SettlementDateTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ joSetlinfo.Add("MdtrtCertType", MPat.mdtrtcertType);
|
|
|
+ joSetlinfo.Add("MedicalType", MPat.medType);
|
|
|
+ joSetlinfo.Add("Sumamt", MSettl.sumamt);//总费用
|
|
|
+ joSetlinfo.Add("OwnPayAmount", MSettl.ownPayAmount);//全自费金额
|
|
|
+ joSetlinfo.Add("OverLimitAmount", MSettl.overLimitAmountmt);//超限价自费费用
|
|
|
+ joSetlinfo.Add("PreSelfPayAmount", MSettl.preSelfPayAmount);//先行自付金额
|
|
|
+ joSetlinfo.Add("InPolicyRangeAmount", MSettl.inPolicyRangeAmount);//符合政策范围金额
|
|
|
+ joSetlinfo.Add("ActualPayDeductible", MSettl.actualPayDeductible);//实际支付起付线
|
|
|
+ joSetlinfo.Add("HealthInsurancePay", MSettl.healthInsurancePay);//基本医疗保险统筹基金支出
|
|
|
+ joSetlinfo.Add("HealthInsuranceRatio", MSettl.healthInsuranceRatio);//基本医疗保险统筹基金支付比例
|
|
|
+ joSetlinfo.Add("CivilserviceAllowancePay", MSettl.civilserviceAllowancePay);//公务员医疗补助资金支出
|
|
|
+ joSetlinfo.Add("EnterpriseSupplementPay", MSettl.enterpriseSupplementPay);//企业支付
|
|
|
+ joSetlinfo.Add("SeriousIllnessPay", MSettl.seriousIllnessPay);// 居民大病保险资金支出
|
|
|
+ joSetlinfo.Add("LargeExpensesSupplementPay", MSettl.largeExpensesSupplementPay);//职工大额医疗费用补助基金支出
|
|
|
+ joSetlinfo.Add("MedicalAssistPay", MSettl.medicalAssistPay);//医疗救助基金支出
|
|
|
+ joSetlinfo.Add("HospitalPartAmount", MSettl.hospitalPartAmount);//医院负担金额
|
|
|
+ joSetlinfo.Add("OtherPay", MSettl.otherPay);//其他支出
|
|
|
+ joSetlinfo.Add("FundPaySumamt", MSettl.fundPaySumamt);//基金支付总额
|
|
|
+ joSetlinfo.Add("PersonPaySumamt", MSettl.personPaySumamt);//个人负担总金额
|
|
|
+ joSetlinfo.Add("AccountPaySumamt", MSettl.accountPaySumamt);//个人账户支出
|
|
|
+ joSetlinfo.Add("PersonCashPay", MSettl.personCashPay);//个人现金支出
|
|
|
+ joSetlinfo.Add("Balance", MSettl.balance);// 余额
|
|
|
+ joSetlinfo.Add("AccountMutualAidAmount", "");//个人账户共济支付金额
|
|
|
+ joSetlinfo.Add("OrganSettlementID", "");//医药机构结算ID
|
|
|
+ joSetlinfo.Add("ClearingOrgan", MSettl.clearingOrgan);//清算经办机构
|
|
|
+ joSetlinfo.Add("ClearingWay", MSettl.clearingWay);//清算方式
|
|
|
+ joSetlinfo.Add("ClearingType", MSettl.clearingType);//清算类别
|
|
|
+ joSetlinfo.Add("ValidFlag", 1);
|
|
|
+ joSetlinfo.Add("BillType", 1);
|
|
|
+ joSetlinfo.Add("ConfirmFlag", MSettl.confirmFlag);
|
|
|
+ joSetlinfo.Add("MSGID", Global.curEvt.msgid);
|
|
|
+ joSetlinfo.Add("AdmType", "3");
|
|
|
+ joSetlinfo.Add("BillID", MPat.billID);
|
|
|
+ joSetlinfo.Add("RecordID", MPat.recordID);
|
|
|
+ joSetlinfo.Add("InterfaceDr", Global.inf.interfaceDr);
|
|
|
+ joSetlinfo.Add("InsuranceAreaCode", MPat.insuplc_admdvs);
|
|
|
+ joSetlinfo.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ joSetlinfo.Add("HospitalizationsDays", MSettl.hospitalizationsDays);
|
|
|
+ joSetlinfo.Add("HospitalizationsTimes", MSettl.hospitalizationsTimes);
|
|
|
+ joSetlinfo.Add("HISAdmTime", MSettl.hisAdmTime);
|
|
|
+ joSetlinfo.Add("HISDischargeTime", MSettl.hisDischargeTime);
|
|
|
+ joSetlinfo.Add("updateUserID", Global.user.ID);
|
|
|
+
|
|
|
+ JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010089", joSetlinfo).ToString(), "通过订单号更新结算信息");
|
|
|
+ if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
|
|
|
+ {
|
|
|
+ outParam = errMsg;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ outParam = joSetlinfo.ToString();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ outParam = "插入结算信息:" + ex.Message;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPatientByMiRegInfo(JObject jo)
|
|
|
+ {
|
|
|
+ MPat.name = JsonHelper.getDestValue(jo, "data.PatientName");
|
|
|
+ MPat.psn_no = JsonHelper.getDestValue(jo, "data.PersonalNO");
|
|
|
+ MPat.certNO = JsonHelper.getDestValue(jo, "data.CertificateNO");
|
|
|
+ MPat.IDNO = MPat.certNO;
|
|
|
+ MPat.certType = JsonHelper.getDestValue(jo, "data.CertificateType");
|
|
|
+ MPat.payToken = JsonHelper.getDestValue(jo, "data.payToken");
|
|
|
+ MPat.insuplc_admdvs = JsonHelper.getDestValue(jo, "data.InsuranceAreaCode");
|
|
|
+ }
|
|
|
+
|
|
|
+ //获取入参,入参基本为类局部变量
|
|
|
+ public int Get6301Inpar(out string outparam)
|
|
|
+ {
|
|
|
+ outparam = "";
|
|
|
+ try
|
|
|
+ {
|
|
|
+ string errMsg;
|
|
|
+ //查询登记信息
|
|
|
+ if (mIS.queryRegisterInfo(4, out errMsg) != 0)
|
|
|
+ {
|
|
|
+ outparam = errMsg;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ setPatientByMiRegInfo(JObject.Parse(errMsg));
|
|
|
+ //获取其他入参
|
|
|
+ JObject joInpar = new JObject();
|
|
|
+ joInpar.Add("payOrdId", MPat.payOrdId);//待支付订单号
|
|
|
+ joInpar.Add("payToken", MPat.payToken);//支付订单对应的token
|
|
|
+ joInpar.Add("orgCodg", Global.inf.hospitalNO);//定点机构编码
|
|
|
+ joInpar.Add("idNo", MPat.IDNO);//业务流水号 前端传入
|
|
|
+ joInpar.Add("userName", MPat.name);
|
|
|
+ joInpar.Add("idType", "01");
|
|
|
+ joInpar.Add("expData", "");
|
|
|
+
|
|
|
+ //JObject joData = new JObject();
|
|
|
+ //joData.Add("data", joInpar);
|
|
|
+ outparam = joInpar.ToString();
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ outparam = "Get6301Inpar:" + ex.Message;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ finally
|
|
|
+ {
|
|
|
+ Global.writeLog("Get6301Inpar", "", outparam);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private int MobilePayQuery(out string outPar)
|
|
|
+ {
|
|
|
+ string errMsg, M6301Inpar;
|
|
|
+ outPar = "";
|
|
|
+
|
|
|
+ //6301查询具体明细信息
|
|
|
+ if (Get6301Inpar(out errMsg) != 0)
|
|
|
+ {
|
|
|
+ outPar = errMsg;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ M6301Inpar = errMsg;
|
|
|
+ JObject joM6301Rtn = invoker.invokeMPService("6301", M6301Inpar);
|
|
|
+ if (JsonHelper.parseMPRtnValue(joM6301Rtn, out errMsg) != 0)
|
|
|
+ {
|
|
|
+ outPar = errMsg;
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+
|
|
|
+ outPar = joM6301Rtn.ToString();
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|