ReadPatientProcess.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 = "";
  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. Global.writeLog($"patInfo:{patInfo}");
  25. if ("RegisterOP".Equals(Global.operationType))
  26. {
  27. // 门诊挂号(医疗类别/统筹类别)
  28. Global.pat.medType = "12";
  29. }
  30. //Global.writeLog("医疗类别:" + Global.pat.medType);
  31. // 返回:data、mdtrtinfo、diseinfo、settlement
  32. if (hBus.showOutPatRegisterForm(patInfo, out outParam) != 0)
  33. {
  34. return Exception(-1, "显示登记面板", outParam);
  35. }
  36. Global.writeLog($"showOutPatRegisterForm-outParam:{outParam}");
  37. //用于没有返回病人信息时增加
  38. JObject joInput = JObject.Parse(outParam);
  39. JObject joPatInfo = JObject.Parse(patInfo);
  40. joInput["patInfo"] = joPatInfo;
  41. Global.writeLog($"joInput:{joInput}");
  42. outParam = joInput.ToString();
  43. return Success();
  44. }
  45. }
  46. }