|
@@ -0,0 +1,66 @@
|
|
|
+using Newtonsoft.Json.Linq;
|
|
|
+using PTMedicalInsurance.Helper;
|
|
|
+using PTMedicalInsurance.Variables;
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Linq;
|
|
|
+using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
+
|
|
|
+namespace PTMedicalInsurance.Business
|
|
|
+{
|
|
|
+ class LocalMobilePayProcess : AbstractProcess
|
|
|
+ {
|
|
|
+ public override CallResult Process(JObject input)
|
|
|
+ {
|
|
|
+ string errMsg = "";
|
|
|
+
|
|
|
+ if (mIS.queryRegisterInfo(1, out outParam) != 0)
|
|
|
+ {
|
|
|
+ return Exception("查询患者云平台登记信息", outParam);
|
|
|
+ }
|
|
|
+ JObject joReg = JObject.Parse(outParam);
|
|
|
+ Global.pat.medType = JsonHelper.getDestValue(joReg, "data.MedicalType");
|
|
|
+ Global.pat.insuType = JsonHelper.getDestValue(joReg, "data.InsuType");
|
|
|
+
|
|
|
+ cBus.cancleFeeUpload(TradeEnum.InpatientFeeCancel, out errMsg);
|
|
|
+
|
|
|
+ mIS.deleteFee(out errMsg);
|
|
|
+
|
|
|
+ #region【住院费用上传前调用3101事前服务】
|
|
|
+
|
|
|
+ if (Global.curEvt.ext.isOpenAnalysis)
|
|
|
+ {
|
|
|
+ if (hBus.PreAnalysis("4", "", out errMsg) != 0)
|
|
|
+ {
|
|
|
+ return Exception("事前分析", errMsg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (hIS.getHisFee(Global.pat, out outParam) != 0)
|
|
|
+ {
|
|
|
+ return Exception("获取HIS费用", outParam);
|
|
|
+ }
|
|
|
+
|
|
|
+ JObject joHisFee = JObject.Parse(outParam);
|
|
|
+ if (mIS.convertHisFeeWithInsuCode(joHisFee, out outParam) != 0)
|
|
|
+ {
|
|
|
+ return Exception("转换HIS费用", outParam);
|
|
|
+ }
|
|
|
+
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+
|
|
|
+ outParam = JsonHelper.toJsonString(jaFeeDetail);
|
|
|
+
|
|
|
+ return Success();
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|