using Newtonsoft.Json.Linq; using PTMedicalInsurance.Business; 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.Core.SelfServiceMachine.Process.ReadCard { class SetGlobalVariablesAfaterShowPatInfo : AbstractProcess { public override CallResult Process(JObject input) { JObject joPatInfo; try { joPatInfo = input; //基本信息 Global.pat.certNO = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.certno"); Global.pat.psn_no = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_no"); Global.pat.gend = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.gend"); Global.pat.brdy = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.brdy"); Global.pat.naty = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.naty"); Global.pat.age = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.age"); Global.pat.certType = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_cert_type"); //if (Global.Set.operationType != OperationType.RegisterOP) //{ // //校验HIS姓名与医保姓名是否一致 // if (hBus.checkName(Global.pat.name, out errMsg) != 0) // { // outParam = JsonHelper.setExceptionJson(-1, "校验HIS与医保姓名是否一致", errMsg).ToString(); // return Exception(-1, errMsg, outParam); // } //} Global.pat.name = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_name"); //选中的参保信息 Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.insuplc_admdvs"); Global.pat.psn_insu_date = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_insu_date"); Global.pat.cvlserv_flag = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.cvlserv_flag"); Global.pat.balc = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.balc"); Global.pat.emp_name = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.emp_name"); Global.pat.psn_type = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_type"); Global.pat.psn_insu_stas = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_insu_stas"); Global.pat.insuType = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.insutype"); Global.pat.paus_insu_date = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.paus_insu_date"); //【云南省】【昆明市】【就医地】[2203]门诊就诊信息上传:异地就医只能使用'普通门诊'或'药店购药'或'门慢门特'或'国家谈判药门诊'或'新冠门诊'或'急诊'或'透析'或'生育门诊'医疗类别! //if (Global.pat.insuplc_admdvs.Substring(0, 2) != Global.inf.areaCode.Substring(0, 2)) //{ // Global.pat.medType = "11"; //} //合肥居民医保默认大额门诊 if (Global.pat.insuType == "390") { Global.pat.medType = "990201"; } outParam = input.ToString(); //卡片信息 //Global.pat.cardSN = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.paus_insu_date"); //选中的身份信息 return Success(); } catch (Exception ex) { outParam = "获取患者信息发生异常:" + ex.Message; return Exception(-1,"",outParam); } } } }