SMMMO04900.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. /*
  2. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  3. 진료현황판 ( SMMMO04900_진료현황판.xrw - JScript )
  4. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  5. */
  6. /**
  7. * @desc : 화면 초기화
  8. * @
  9. * @param :
  10. * @return :
  11. * @author : 손은연
  12. * @---------------------------------------------------
  13. */
  14. function fInitialize_SMMMO04900(){
  15. model.setValue("/root/main/cond/orddd", getCurrentDate());
  16. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "A");
  17. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist", getUserInfo("dutplcecd"), "0330");
  18. addComboInstance("/root/init/userlist" , "userid^usernm" , "-^전체", "usercombo"); //의사콤보 전체항목 추가
  19. model.removeNodeset("/root/main/noticeinfo");
  20. model.removeNodeset("/root/patinfo/patinfolist");
  21. model.setValue("/root/main/cond/orddeptcd", getUserInfo("dutplcecd"));
  22. model.setValue("/root/main/cond/orddrid" , getUserInfo("userid"));
  23. fReqGetOrdStatBoardInfo(); //진료현황판 외래, 입원, 응급, 기타 환자현황수 조회
  24. fReqGetAftCertPatInfo(); //후인증대상 조회
  25. fGeqGetHealCareInfo(); //협력의뢰현황 조회(최근4개월) 20120405 이윤주
  26. model.refresh();
  27. if(fContainsHardCD("487", "Y")) { // 487 CVR 자동 팝업 여부
  28. if(parseInt(model.getValue("/root/main/disppatinfo/disppatcnt/cvrcnt"))> 0 ) {
  29. modal("SPMMO04901");
  30. }
  31. }
  32. if(parseInt(model.getValue("/root/main/disppatinfo/disppatcnt/tellprcpcnt"))> 0 ) { // 구두처방 자동 팝업
  33. modal("SPMMO00710");
  34. }
  35. }
  36. /**
  37. * @desc : 진료현황판 외래, 입원, 응급, 기타 환자현황수 조회
  38. * @
  39. * @param :
  40. * @return :
  41. * @author : 오지훈
  42. * @---------------------------------------------------
  43. */
  44. function fReqGetOrdStatBoardInfo(){
  45. model.removeNodeset("/root/send/reqdata");
  46. model.removeNodeset("/root/main/unprepinfo");
  47. model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/cond/orddeptcd"));
  48. model.makeValue("/root/send/reqdata/orddrid" , model.getValue("/root/main/cond/orddrid"));
  49. model.makeValue("/root/send/reqdata/stnddd" , model.getValue("/root/main/cond/orddd"));
  50. if(submit("TRMMO04906")){
  51. var recindxyn = model.getValue("/root/main/unprepinfo/unprepcnt/recindxyn");
  52. if(recindxyn == "Y"){
  53. cap_unpreptiltle.attribute("top") = "174px";
  54. cap_recindxpatcnt.attribute("visibility") = "visible";
  55. opt_recindxpatcnt.attribute("visibility") = "visible";
  56. img_recindxpatcnt.attribute("visibility") = "visible";
  57. btn_recindxpatcnt.attribute("visibility") = "visible";
  58. }else{
  59. cap_unpreptiltle.attribute("top") = "193px";
  60. cap_recindxpatcnt.attribute("visibility") = "hidden";
  61. opt_recindxpatcnt.attribute("visibility") = "hidden";
  62. img_recindxpatcnt.attribute("visibility") = "hidden";
  63. btn_recindxpatcnt.attribute("visibility") = "hidden";
  64. }
  65. }
  66. if(submit("TRMMO04905")){
  67. model.makeValue("/root/main/disppatinfo/disppatcnt/cosigncnt", model.getValue("/root/main/unprepinfo/unprepcnt/cosigncnt"));
  68. model.makeValue("/root/main/disppatinfo/disppatcnt/defetcnt", model.getValue("/root/main/unprepinfo/unprepcnt/defetcnt"));
  69. model.makeValue("/root/main/disppatinfo/disppatcnt/admpatcnt", model.getValue("/root/main/unprepinfo/unprepcnt/admpatcnt"));
  70. model.makeValue("/root/main/disppatinfo/disppatcnt/erunprepcnt", model.getValue("/root/main/unprepinfo/unprepcnt/ercnt"));
  71. model.makeValue("/root/main/disppatinfo/disppatcnt/recindxcnt", model.getValue("/root/main/unprepinfo/unprepcnt/recindxcnt"));
  72. model.makeValue("/root/main/disppatinfo/disppatcnt/recindxyn", model.getValue("/root/main/unprepinfo/unprepcnt/recindxyn"));
  73. model.removeNodeset("/root/main/unprepinfo");
  74. }
  75. }
  76. /**
  77. * @desc : 대상 및 긴급공지사항 조회
  78. * @
  79. * @param :
  80. * @return :
  81. * @author : 오지훈
  82. * @---------------------------------------------------
  83. */
  84. function fReqGetKeyTrgtList(){
  85. //공지사항등록그리드를 초기화
  86. model.removeNodeset("/root/main/noticeinfo");
  87. model.removeNodeset("/root/main/delivetrgt");
  88. //대상을 조회(전체, 진료과, 진료의사별)
  89. model.copyNode("/root/send/reqdata","/root/main/cond");
  90. if(submit("TRMMO04903")){
  91. model.copyNode("/root/send/reqdata","/root/main/delivetrgt/delivetrgt");
  92. model.copyNode("/root/send/savedata","/root/main/delivetrgt/delivedepttrgt");
  93. model.copyNode("/root/send/save2data","/root/main/delivetrgt/delivedrtrgt");
  94. //대상을 가지고 대상에 해당하는 공지사항을 조회
  95. if(submit("TRMMO04901")){
  96. //긴급 공지인 경우 글자색 변경
  97. var gridrows = grd_notice.rows - grd_notice.fixedRows;
  98. for(var i = 1; i <= gridrows ; i++){
  99. var deliveflag = model.getValue("/root/main/noticeinfo/noticelist[" + i + "]/deliveflag");
  100. if(deliveflag == '1'){
  101. grd_notice.rowstyle(i, "data", "color") = "#c0000ff";
  102. }
  103. }
  104. model.refresh();
  105. }
  106. }
  107. }
  108. /**
  109. * @desc : 후인증환자리스트 조회
  110. * @
  111. * @param :
  112. * @return :
  113. * @author : 오지훈
  114. * @---------------------------------------------------
  115. */
  116. function fReqGetAftCertPatList(){
  117. model.removeNodeset("/root/send/reqdata");
  118. model.makeValue("/root/send/reqdata/fromdd" , model.getValue("/root/main/cond/orddd"));
  119. model.makeValue("/root/send/reqdata/todd" , model.getValue("/root/main/cond/orddd"));
  120. model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/cond/orddeptcd"));
  121. model.makeValue("/root/send/reqdata/orddrid" , model.getValue("/root/main/cond/orddrid"));
  122. if(submit("TRMMO02702")){
  123. }
  124. }
  125. /*
  126. * @desc : 후인증 환자 정보 조회
  127. * @
  128. * @param :
  129. * @return :
  130. * @author : 오지훈
  131. * @---------------------------------------------------
  132. */
  133. function fReqGetAftCertPatInfo(){
  134. model.removeNodeset("/root/send/reqdata");
  135. //model.makeValue("/root/send/reqdata/fromdd" , model.getValue("/root/main/cond/orddd"));
  136. //model.makeValue("/root/send/reqdata/todd" , model.getValue("/root/main/cond/orddd"));
  137. model.makeValue("/root/send/reqdata/fromdd" , getNewDate().getAddDate(-60,"D").getDateFormat("YYYYMMDD"));
  138. model.makeValue("/root/send/reqdata/todd" , getCurrentDate());
  139. model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/cond/orddeptcd"));
  140. model.makeValue("/root/send/reqdata/orddrid" , model.getValue("/root/main/cond/orddrid"));
  141. model.makeValue("/root/send/reqdata/signyn" , "N");
  142. if(submit("TRMMO02702")){
  143. }
  144. }
  145. function fGeqGetHealCareInfo() {
  146. model.removeNodeset("/root/send/reqdata");
  147. var CurrentDate = getCurrentDate();
  148. var fromdd = CurrentDate.toDate().getAddDate(-4,"M").getDateFormat();
  149. model.makeValue("/root/send/reqdata/fromdd" , fromdd);
  150. model.makeValue("/root/send/reqdata/todd" , CurrentDate);
  151. model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/cond/orddeptcd"));
  152. model.makeValue("/root/send/reqdata/orddrid" , model.getValue("/root/main/cond/orddrid"));
  153. model.makeValue("/root/send/reqdata/replflag" , "P");
  154. model.makeValue("/root/send/reqdata/qreplflag" , "Y");
  155. model.makeValue("/root/send/reqdata/saveflag" , "N");
  156. model.makeValue("/root/send/reqdata/patflag" , "3");
  157. if ( getUserInfo("dutplceinstcd") == "031") {
  158. model.makeValue("/root/send/reqdata/hospgrade" , "CA");
  159. }
  160. if(submit("TRARC02601")){
  161. }
  162. }