SPMMO09000.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /*
  2. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  3. 입원의뢰서조회 ( SPMMO09000_입원예약조회.xrw - JScript )
  4. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  5. */
  6. var sINREQHISTLIST_PATH = "/root/main/inreqhistinfo/inreqhistlist";
  7. var sINREQDIALIST_PATH = "/root/main/inreqdiaglist/inreqdiaglist";
  8. /**
  9. * @desc : 입원의뢰서조회 화면 초기화
  10. * @
  11. * @param :
  12. * @return :
  13. * @author : 오지훈
  14. * @---------------------------------------------------
  15. */
  16. function fInitialize_SPMMO09000(){
  17. model.removeNodeset(sINREQHISTLIST_PATH);
  18. model.removeNodeset(sINREQDIALIST_PATH);
  19. model.setValue("/root/main/cond/fromdd", getCurrentDate());
  20. var todd = (getCurrentDate().toDate()).getAddDate(30);
  21. model.setValue("/root/main/cond/todd", todd.getDateFormat());
  22. //param instance 구조 year▦month▦orddeptcd▦orddrid▦pid ex)2008▦08▦▦▦▦
  23. var param = opener.javascript.getParameter("SPMMO09000_param");
  24. if(param.length > 1){ //파라미터가 있는 경우
  25. param = param.split("▦");
  26. var year = param[0];
  27. var month = param[1];
  28. var orddeptcd= param[2];
  29. var orddrid = param[3];
  30. var pid = param[4];
  31. var assgward = "";
  32. if(year == ""){year = getCurrentDate().substr(0, 4);}
  33. if(month == ""){month = getCurrentDate().substr(4, 2);}
  34. if(orddeptcd == ""){orddeptcd = getUserInfo("dutplcecd");}
  35. if(orddrid == ""){orddrid = getUserInfo("userid");}
  36. if(assgward == ""){assgward = getUserInfo("dutplcecd");}
  37. }else{ //파라미터가 없는 경우
  38. var year = getCurrentDate().substr(0, 4);
  39. var month = getCurrentDate().substr(4, 2);
  40. var orddeptcd = getUserInfo("dutplcecd");
  41. var orddrid = getUserInfo("userid");
  42. var pid = getPatientInfo("pid");
  43. var hngnm = getPatientInfo("pname");
  44. var assgward = getUserInfo("dutplcecd");
  45. }
  46. //zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/init/orddept", "depthngnm"); //부서코드 콤보 조회
  47. //zsufGetUserInfoCombo(orddeptcd, "/root/init/userlist", "_D"); //사용자 콤보 조회
  48. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "A"); //진료과 콤보
  49. mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/warddept", "W"); //병동코드 콤보
  50. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , getUserInfo("dutplcecd"), "0330", "", "M", "", "", "P"); //진료과 의사콤보 조회
  51. //2012/07/25 Start
  52. //zbcfGetCodeList(new Array("P0017"), new Array("/root/init/P0017")); //입원의뢰서 구분, 환자등급, 병실정보
  53. zbcfGetCodeList(new Array("P0017", "P0039", "M0700", "M0710"), new Array("/root/init/P0017", "/root/init/P0039", "/root/init/patgrade", "/root/init/bedkind")); //입원의뢰서 구분, 환자등급, 병실정보
  54. addComboInstance("/root/init/patgrade", "cdid^cdnm", "^", "M0700"); //환자등급
  55. //2012/07/25 End
  56. mmbfGetHardCodeInfoNm("/root/send/reqdata", "/root/init/erreglyn", 90); //입원장 입원구분
  57. model.setValue("/root/main/cond/year" , year); //year
  58. model.setValue("/root/main/cond/month" , month); //month
  59. model.setValue("/root/main/cond/orddeptcd", orddeptcd);
  60. model.setValue("/root/main/cond/orddrid" , orddrid);
  61. model.setValue("/root/main/cond/assgward" , assgward);
  62. model.setValue("/root/main/cond/pid" , pid);
  63. model.setValue("/root/main/cond/hngnm" , hngnm);
  64. //var dutplcecd = model.getValue("/root/main/cond/orddeptcd[orddeptcd='" + orddeptcd + "']");
  65. //var userid = model.getValue("/root/main/cond/orddrid[orddrid='" + orddrid + "']");
  66. addComboInstance("/root/init/orddept" , "deptcd^depthngnm", "-^전체", "dept"); //진료과 combo 전체항목 추가
  67. addComboInstance("/root/init/userlist", "userid^usernm" , "-^전체", "usercombo"); //진료의 combo 전체항목 추가
  68. addComboInstance("/root/init/warddept" , "deptcd^depthngnm", "-^전체", "dept"); //병동 combo 전체항목 추가
  69. addComboInstance("/root/init/erreglyn" , "hardcd^hardcdnm", "-^전체", "hardcd"); //입원경로 combo 전체항목 추가
  70. addComboInstance("/root/init/P0039" , "cdid^cdnm", "-^전체", "P0039"); //입원상태 combo 전체항목 추가
  71. addComboInstance("/root/init/bedkind" , "cdid^cdnm", "-^전체", "M0710"); //병실정보 combo 전체항목 추가
  72. if(cmb_orddept.label == "") {model.setValue("/root/main/cond/orddeptcd", "-");} //진료과가 없는 경우, 전체로 설정
  73. if(cmb_orddrid.label == "") {model.setValue("/root/main/cond/orddrid", "-");} //진료의가 없는 경우, 전체로 설정
  74. if(cmd_assgward.label == ""){model.setValue("/root/main/cond/assgward", "-");} //병동이 없는 경우, 전체로 설정
  75. if(cmd_erreglyn.label == ""){model.setValue("/root/main/cond/erreglyn", "-");} //입원경로 없는 경우, 전체로 설정
  76. if(cmd_inflag.label == "") {model.setValue("/root/main/cond/inflag", "-");} //입원상태 없는 경우, 전체로 설정
  77. if(cmd_bedkind.label == "") {model.setValue("/root/main/cond/bedkind", "-");} //병실정보 없는 경우, 전체로 설정
  78. model.refresh();
  79. var pid = getPatientInfo("pid");
  80. model.setValue("/root/main/cond/pid", pid);
  81. //20130605 화면 디폴트값 설정
  82. model.setValue("/root/main/cond/erreglyn","I");
  83. model.setValue("/root/main/cond/inflag","G");
  84. model.refresh();
  85. fReqInReqHist(); //입원의뢰서 조회
  86. }
  87. /**
  88. * @desc : 입원의뢰서 내역 조회
  89. * @
  90. * @param :
  91. * @return :
  92. * @author : 오지훈
  93. * @---------------------------------------------------
  94. */
  95. function fReqInReqHist(){
  96. model.removeNodeset("/root/send/reqdata");
  97. model.makeNode("/root/send/reqdata");
  98. model.copyNode("/root/send/reqdata", "/root/main/cond");
  99. if(submit("TRMMO09001")){
  100. }
  101. grd_inreqhistlist.autoResize = true;
  102. }
  103. /**
  104. * @desc : 입원의뢰서 진단수술 리스트
  105. * @
  106. * @param :
  107. * @return :
  108. * @author : 오지훈
  109. * @---------------------------------------------------
  110. */
  111. function fReqInReqDiagOpList(){
  112. var row = grd_inreqhistlist.row;
  113. var pid = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/pid");
  114. var orddd = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/inrsrvacptdd");
  115. var orddeptcd = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/orddeptcd");
  116. var orddrid = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/orddrid");
  117. model.removeNodeset("/root/send/reqdata");
  118. model.makeValue("/root/send/reqdata/pid" , pid);
  119. model.makeValue("/root/send/reqdata/orddd" , orddd);
  120. model.makeValue("/root/send/reqdata/orddeptcd", orddeptcd);
  121. model.makeValue("/root/send/reqdata/orddrid" , orddrid);
  122. if(submit("TRMMO09002")){
  123. }
  124. grd_inreqdiaglist.autoResize = true;
  125. }
  126. /**
  127. * @desc : 입원의뢰서 그리드 클릭
  128. * @ : 진단명, 수술명 컬럼 클릭시 전체 진단 화면에 display
  129. * @param :
  130. * @return :
  131. * @author : 오지훈
  132. * @---------------------------------------------------
  133. */
  134. function fClkInReqGrid(){
  135. var height = 99; //그리드의 기본 높이
  136. var row = grd_inreqhistlist.row;
  137. var col = grd_inreqhistlist.col;
  138. for(var i = 0; i < row; i++){
  139. height += grd_inreqhistlist.rowheight(i);
  140. }
  141. if(height > 483){height = 483;} //펼쳐지는 진단내역 그리드의 y좌표가 483을 넘지 못하게 한다.
  142. if(col == grd_inreqhistlist.colref("termengnm") ||
  143. col == grd_inreqhistlist.colref("opengnm")){
  144. group1.attribute("top") = height;
  145. group1.visible = true;
  146. }
  147. model.refresh();
  148. }
  149. /**
  150. * @desc : 입원의뢰서 더블 클릭
  151. * @
  152. * @param :
  153. * @return :
  154. * @author : 오지훈
  155. * @---------------------------------------------------
  156. */
  157. function fDbClkInReqGrid(){
  158. var row = grd_inreqhistlist.row;
  159. var pid = model.getValue(sINREQHISTLIST_PATH + "[" + row + "]/pid");
  160. clearParameter("SPMMO00100_pid");
  161. setParameter("SPMMO00100_pid", pid);
  162. var curInReqObj = window.javascript.getOpenWindow("SPMMO00100"); //활성화된 입원의뢰서 화면 object loading
  163. if(curInReqObj == null){ //활성화된 입원의뢰서이 없는 경우, 신규화면을 오픈
  164. window.javascript.open("SPMMO00100", null, null, null, "SPMMO00100", "", "", "", false);
  165. } else { // 기존화면 재로딩
  166. curInReqObj.javascript.fInitialize_SPMMO00100();
  167. }
  168. }
  169. /**
  170. * @desc : 날짜 변경 버튼 클릭
  171. * @ :
  172. * @param :
  173. * @return :
  174. * @author : 오지훈
  175. * @---------------------------------------------------
  176. */
  177. function fClkBtnDateChng(){
  178. }