ReadPatientProcess.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using Newtonsoft.Json.Linq;
  2. using PTMedicalInsurance.Helper;
  3. using PTMedicalInsurance.Variables;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace PTMedicalInsurance.Business
  10. {
  11. class ReadPatientProcess : AbstractProcess
  12. {
  13. public override CallResult Process(JObject input)
  14. {
  15. string patInfo = ""; Global.pat.iRes_Chronic = 1;
  16. PatientService patientService = new PatientService();
  17. // 显示病人基本信息
  18. // 返回 baseinfo、insuinfo、selectedIdInfo、selectedInsuInfo
  19. int ret = patientService.readPatientInfo(out patInfo);
  20. if (ret != 0)
  21. {
  22. return Exception(ret,"获取基本信息",patInfo);
  23. }
  24. // 本地-医疗类别默认 门诊统筹
  25. Global.pat.medType = "110104";
  26. //异地-医疗类别默认 普通门诊
  27. if (Global.pat.insuplc_admdvs.Substring(0, 4) != "3212")
  28. Global.pat.medType = "11";
  29. //门诊慢特病-医疗类别默认-门诊慢特病
  30. if (Global.pat.iRes_Chronic == 0)
  31. Global.pat.medType = "140104";
  32. //泰兴地区 居民门诊医疗类别传11普通门诊
  33. if ((Global.inf.hospitalDr == 53) && (Global.pat.insuType.Substring(0, 2) == "39"))
  34. Global.pat.medType = "11";
  35. // 返回:data、mdtrtinfo、diseinfo、settlement
  36. if (hBus.showOutPatRegisterForm(patInfo, out outParam) != 0)
  37. {
  38. return Exception(-1, "显示登记面板", outParam);
  39. }
  40. //用于没有返回病人信息时增加
  41. JObject joInput = JObject.Parse(outParam);
  42. JObject joPatInfo = JObject.Parse(patInfo);
  43. joInput["patInfo"] = joPatInfo;
  44. outParam = joInput.ToString();
  45. return Success();
  46. }
  47. }
  48. }