SetGlobalVariablesAfaterShowPatInfo.cs 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using Newtonsoft.Json.Linq;
  2. using PTMedicalInsurance.Business;
  3. using PTMedicalInsurance.Helper;
  4. using PTMedicalInsurance.Variables;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace PTMedicalInsurance.Business.Core.SelfServiceMachine.Process.ReadCard
  11. {
  12. class SetGlobalVariablesAfaterShowPatInfo : AbstractProcess
  13. {
  14. public override CallResult Process(JObject input)
  15. {
  16. JObject joPatInfo;
  17. try
  18. {
  19. joPatInfo = input;
  20. //基本信息
  21. Global.pat.certNO = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.certno");
  22. Global.pat.psn_no = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_no");
  23. Global.pat.gend = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.gend");
  24. Global.pat.brdy = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.brdy");
  25. Global.pat.naty = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.naty");
  26. Global.pat.age = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.age");
  27. Global.pat.certType = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_cert_type");
  28. //if (Global.Set.operationType != OperationType.RegisterOP)
  29. //{
  30. // //校验HIS姓名与医保姓名是否一致
  31. // if (hBus.checkName(Global.pat.name, out errMsg) != 0)
  32. // {
  33. // outParam = JsonHelper.setExceptionJson(-1, "校验HIS与医保姓名是否一致", errMsg).ToString();
  34. // return Exception(-1, errMsg, outParam);
  35. // }
  36. //}
  37. Global.pat.name = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_name");
  38. //选中的参保信息
  39. Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.insuplc_admdvs");
  40. Global.pat.psn_insu_date = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_insu_date");
  41. Global.pat.cvlserv_flag = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.cvlserv_flag");
  42. Global.pat.balc = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.balc");
  43. Global.pat.emp_name = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.emp_name");
  44. Global.pat.psn_type = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_type");
  45. Global.pat.psn_insu_stas = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_insu_stas");
  46. Global.pat.insuType = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.insutype");
  47. Global.pat.paus_insu_date = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.paus_insu_date");
  48. //【云南省】【昆明市】【就医地】[2203]门诊就诊信息上传:异地就医只能使用'普通门诊'或'药店购药'或'门慢门特'或'国家谈判药门诊'或'新冠门诊'或'急诊'或'透析'或'生育门诊'医疗类别!
  49. //if (Global.pat.insuplc_admdvs.Substring(0, 2) != Global.inf.areaCode.Substring(0, 2))
  50. //{
  51. // Global.pat.medType = "11";
  52. //}
  53. //合肥居民医保默认大额门诊
  54. if (Global.pat.insuType == "390")
  55. {
  56. Global.pat.medType = "990201";
  57. }
  58. outParam = input.ToString();
  59. //卡片信息
  60. //Global.pat.cardSN = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.paus_insu_date");
  61. //选中的身份信息
  62. return Success();
  63. }
  64. catch (Exception ex)
  65. {
  66. outParam = "获取患者信息发生异常:" + ex.Message;
  67. return Exception(-1,"",outParam);
  68. }
  69. }
  70. }
  71. }