zhengjie 1 year ago
parent
commit
4c1f36fd07

+ 7 - 2
Business/Local/LocalMobileOrderInfoProcess.cs

@@ -29,7 +29,7 @@ namespace PTMedicalInsurance.Business
             string feeType = JsonHelper.getDestValue(input, "insuAdmObj.feeType");
             string acctUsedFlag = JsonHelper.getDestValue(input, "insuAdmObj.acctUsedFlag");
 
-            Global.pat.name = JsonHelper.getDestValue(input, "insuAdmObj.name");
+            Global.pat.name = JsonHelper.getDestValue(input, "insuAdmObj.patName");
             Global.pat.mdtrtcertType = "02"; //身份证
             Global.pat.mdtrtcertNO = JsonHelper.getDestValue(input, "insuAdmObj.certNo");
 
@@ -87,6 +87,11 @@ namespace PTMedicalInsurance.Business
                 diag["vali_flag"] = "1";
             });
 
+            if (Global.pat.medType == "12") {
+                diseCodg = "*";
+                diseName = "预约挂号";
+            }
+
             joMdtrtinfo.Add("mdtrt_id", Global.pat.mdtrtID);
             //joMdtrtinfo.Add("psn_no", Global.pat.psn_no);          //人员编号
             joMdtrtinfo.Add("med_type", Global.pat.medType);          //医疗类别
@@ -114,7 +119,7 @@ namespace PTMedicalInsurance.Business
             joSetlInpar.Add("chrg_bchno", Global.pat.adm_Dr.ToString());
             joSetlInpar.Add("acct_used_flag", acctUsedFlag);//个人账户使用标志
             //joSetlInpar.Add("insutype", Global.pat.insuType);//险种类型
-            joSetlInpar.Add("pub_hosp_rfom_flag", "");
+            joSetlInpar.Add("pub_hosp_rfom_flag", "0");
             #endregion
 
             joReg.Add("data", joRegInpar);

+ 26 - 2
Business/Local/LocalMobilePayProcess.cs

@@ -26,18 +26,36 @@ namespace PTMedicalInsurance.Business
                 return Exception("转换HIS费用", outParam);
             }
 
+            Decimal total = 0;
             JArray jaFeeDetail = JArray.Parse(JsonHelper.getDestValue(JObject.Parse(outParam), "data"));
             jaFeeDetail.ToList().ForEach((fee) =>
             {
                 fee["chrg_bchno"] = Global.pat.adm_Dr.ToString();
                 fee["med_type"] = Global.pat.medType;
+                fee["med_list_spc"] = fee["spec"];
+                dynamic expContent = new JObject();
+                JProperty exp = fee.Children<JProperty>().FirstOrDefault(p => p.Name == "expContent");
+                if (exp != null)
+                {
+                    exp.Remove();
+                }
+                string item_sum = JsonHelper.getDestValue((JObject)fee, "det_item_fee_sumamt");
+                if (!string.IsNullOrEmpty(item_sum)) {
+                    total += Decimal.Parse(item_sum);
+                }
+
+                expContent.selfpay_prop = fee["SelfPayPercent"];
+                expContent.drord_no = fee["drord_no"];
+
+                fee["exp_content"] = expContent;
             });
 
             JObject joSettlement = (JObject)input["settlement"];
-            joSettlement["medfee_sumamt"] = joHisFee["total"];
+            joSettlement["medfee_sumamt"] = total;
+
 
             //合并参数
-            JObject joInput = new JObject();
+            dynamic joInput = new JObject();
             joInput.Add("feedetail", jaFeeDetail);
             joInput = mergeJson(joInput, (JObject)input["patInfo"]);
             joInput = mergeJson(joInput, (JObject)input["data"]);
@@ -46,6 +64,12 @@ namespace PTMedicalInsurance.Business
             joInput.Add("diseinfo_list",input["diseinfo"]);
             joInput.Add("feedetail_list", jaFeeDetail);
 
+            dynamic joExpContent = new JObject();
+            joExpContent.op_swssc_flag = "0";
+            joExpContent.itnt_hosp_flag = "0";
+            joExpContent.mulaid_flag = "0";
+            joInput.exp_content = joExpContent;
+
             outParam = JsonHelper.toJsonString(joInput);
 
             return Success();

+ 3 - 0
Business/Local/LocalMobilePayService.cs

@@ -1,4 +1,6 @@
 using Newtonsoft.Json.Linq;
+using PTMedicalInsurance.Helper;
+using PTMedicalInsurance.Variables;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -11,6 +13,7 @@ namespace PTMedicalInsurance.Business
     {
         public string Charge(string operationType, JObject joInput)
         {
+            Global.pat.insuType =JsonHelper.getDestValue(joInput, "insuAdmObj.grptype");
             //joInput 包括( data、mdtrtinfo、diseinfo、settlement)
             ProcessManager pManager = new ProcessManager()
             .Add(new LocalGetPatientInfoProcess())