ReadPatientProcess.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. using System.Windows.Forms;
  10. namespace PTMedicalInsurance.Business
  11. {
  12. class ReadPatientProcess : AbstractProcess
  13. {
  14. public override CallResult Process(JObject input)
  15. {
  16. string patInfo = "";
  17. string errMsg = "";
  18. PatientService patientService = new PatientService();
  19. // 显示病人基本信息
  20. // 返回 baseinfo、insuinfo、selectedIdInfo、selectedInsuInfo
  21. int ret = patientService.readPatientInfo(out patInfo);
  22. if (ret != 0)
  23. {
  24. return Exception(ret,"获取基本信息",patInfo);
  25. }
  26. if ("RegisterOP".Equals(Global.operationType))
  27. {
  28. // 门诊挂号(医疗类别/统筹类别)
  29. Global.pat.medType = "12";
  30. }
  31. //Global.writeLog("医疗类别:" + Global.pat.medType);
  32. // 返回:data、mdtrtinfo、diseinfo、settlement
  33. ////事前分析
  34. if (Global.curEvt.ext.isOpenAnalysis)
  35. {
  36. if (hBus.PreAnalysis("2", "", out errMsg) != 0) //事前事中:门诊挂号1 门诊收费登记2 住院登记3 住院收费登记4 住院执行医嘱5 门诊结算6 门诊预结算7 住院结算8 住院预结算9 购药划卡10
  37. {
  38. //rtnResult = JsonHelper.setExceptionJson(-1, "事前分析", errMsg).ToString();
  39. //return rtnResult;
  40. DialogResult dr = MessageBox.Show("【3101】医保明细审核事前分析服务医保中心返回结果:" + errMsg + "!是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
  41. if (dr != DialogResult.OK)
  42. {
  43. return Exception(-1, "获取基本信息", JsonHelper.setExceptionJson(-1, "【3102】医保明细审核事前分析服务调用失败:", errMsg).ToString()); ;
  44. }
  45. }
  46. }
  47. if (hBus.showOutPatRegisterForm(patInfo, out outParam) != 0)
  48. {
  49. return Exception(-1, "显示登记面板", outParam);
  50. }
  51. //用于没有返回病人信息时增加
  52. JObject joInput = JObject.Parse(outParam);
  53. JObject joPatInfo = JObject.Parse(patInfo);
  54. joInput["patInfo"] = joPatInfo;
  55. outParam = joInput.ToString();
  56. return Success();
  57. }
  58. }
  59. }