medirecorddetail.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. "use strict";
  2. /**
  3. * mplus_modal_medicalrecordrslt
  4. */
  5. var mplus_modal_medicalrecorddetail = function(){
  6. // 상속
  7. mplus_common.call(this);
  8. // 상위 객체 생성
  9. //var mplusPatient = new mplus_mobile_patient();
  10. //var mplusNursing = new mplus_nursing();
  11. //super
  12. var self = this;
  13. //==== 변수 { ====
  14. //==== 변수 } ====
  15. /**
  16. * 초기화
  17. */
  18. this.init = function(param){ //여기서 모든화면 콤보박스데이터를 집어넣자!!! 그래야지 화면이동할때 속도가 오래걸리지않음!!!
  19. //초기화
  20. initEmptyData();
  21. // 초기 화면 조건 구성
  22. // 각 init에서 처리
  23. //initCondition(param);
  24. // 이벤트 초기화
  25. addEvent();
  26. };
  27. this.initList = function(param){ //여기서 모든화면 콤보박스데이터를 집어넣자!!! 그래야지 화면이동할때 속도가 오래걸리지않음!!!
  28. this.init();
  29. initConditionList(param);
  30. };
  31. this.initContents = function(param){ //여기서 모든화면 콤보박스데이터를 집어넣자!!! 그래야지 화면이동할때 속도가 오래걸리지않음!!!
  32. this.init();
  33. initConditionContents(param);
  34. };
  35. var initEmptyData = function(){
  36. $("#divMedicalRecordResult").empty();
  37. }
  38. //==== 초기화 설정 { ====
  39. var initCondition = function(param){
  40. };
  41. var initConditionList = function(param){
  42. // 초기 화면 조건 구성
  43. if(param != null){
  44. //상단정보
  45. if(param.medicalRecordFormNm != undefined){
  46. $("#spanMedicalRecordRsltExamNm").text(param.medicalRecordFormNm);
  47. }
  48. //진료 기록 상세 조회
  49. var sendParam = {
  50. userId:param.userId,
  51. patientId:param.patientId,
  52. deptCd:param.deptCd,
  53. searchCls:param.searchCls,
  54. medicalRecordSeq:param.medicalRecordSeq
  55. };
  56. //console.log(JSON.stringify(sendParam));
  57. self.medical.getMediRecordDetail(sendParam, processMedicalRecordResult);
  58. }
  59. };
  60. var initConditionContents = function(param){
  61. // 초기 화면 조건 구성
  62. if(param != null){
  63. //상단정보
  64. if(param.medicalRecordFormNm != undefined){
  65. $("#spanMedicalRecordRsltExamNm").text(param.medicalRecordFormNm);
  66. }
  67. //진료 기록 내용 상세 조회
  68. var sendParam = {
  69. userId:param.userId,
  70. patientId:param.patientId,
  71. deptCd:param.deptCd,
  72. startDt:param.startDt,
  73. endDt:param.endDt,
  74. personalRecordYn:param.personalRecordYn,
  75. medicalRecordFormCd:param.medicalRecordFormCd,
  76. searchCls:param.searchCls
  77. };
  78. //console.log(JSON.stringify(sendParam));
  79. self.medical.getMediRecordContentDetail(sendParam, processMedicalRecordResult);
  80. }
  81. };
  82. var processMedicalRecordResult = function(lists){
  83. if(lists[0].url != null && lists !== undefined){
  84. $("#divMedicalRecordResult").append(lists[0].url); // element 추가
  85. }else{
  86. self.alert("데이터 오류입니다. 관리자에게 문의하세요.");
  87. }
  88. };
  89. //==== 초기화 설정 } ====
  90. //==== 이벤트 설정 { ====
  91. var addEvent = function(){
  92. //$("#btnLogout").on("click", function(){
  93. // logout();
  94. //});
  95. eventColumnClick();
  96. eventRowClick();
  97. };
  98. var eventColumnClick = function(){
  99. };
  100. var eventRowClick = function(){
  101. };
  102. //==== 이벤트 설정 } ====
  103. //==== 서비스 실행 { ====
  104. //==== 서비스 실행 { ====
  105. };