SetGlobalVariablesAfaterShowPatInfo.cs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.pat.name != JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_name"))
  29. //{
  30. // errMsg = "患者姓名(" + Global.pat.name + ")与参保人姓名(" + JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_name") + ")不一致,请检查!";
  31. // return -1;
  32. //}
  33. Global.pat.name = JsonHelper.getDestValue(joPatInfo, "output.baseinfo.psn_name");
  34. //选中的参保信息
  35. Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.insuplc_admdvs");
  36. Global.pat.psn_insu_date = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_insu_date");
  37. Global.pat.cvlserv_flag = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.cvlserv_flag");
  38. Global.pat.balc = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.balc");
  39. Global.pat.emp_name = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.emp_name");
  40. Global.pat.psn_type = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_type");
  41. Global.pat.psn_insu_stas = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.psn_insu_stas");
  42. Global.pat.insuType = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.insutype");
  43. Global.pat.paus_insu_date = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.paus_insu_date");
  44. outParam = input.ToString();
  45. //卡片信息
  46. //Global.pat.cardSN = JsonHelper.getDestValue(joPatInfo, "selectedInsuInfo.paus_insu_date");
  47. //选中的身份信息
  48. return Success();
  49. }
  50. catch (Exception ex)
  51. {
  52. outParam = "获取患者信息发生异常:" + ex.Message;
  53. return Exception(-1,"",outParam);
  54. }
  55. }
  56. }
  57. }