SMMND04800.js 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. /*
  2. 감염 리스트조회(SMMND04800.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. /**
  7. * @group :
  8. * @ver : 2011.05.06
  9. * @by : 권영애
  10. * @---------------------------------------------------------------------------------
  11. * @type : function
  12. * @access : public
  13. * @desc : 화면 초기화
  14. * @param :
  15. * @return :
  16. * @---------------------------------------------------------------------------------
  17. */
  18. /**
  19. * creat : 20101012
  20. * author : 최원돈
  21. * desc : 초기화
  22. */
  23. function fInitialize(){
  24. //조회조건 default 세팅
  25. model.removenode('/root/main/cond');
  26. model.makeValue('/root/main/cond/srchfromdd' , getCurrentDate().toDate().getAddDate(-1, "M").getDateFormat()); //처방시작일
  27. model.makeValue('/root/main/cond/srchtodd' , getCurrentDate()); //처방종료일
  28. //그리드 노드 초기화
  29. model.removenode('/root/main/infclist');
  30. model.makenode('/root/main/infclist');
  31. //**공통코드 가져오기**//
  32. zbcfGetCodeList( new Array ( "M0145" // 감염종류
  33. , "M0146" // 원인균
  34. , "M0147" // 예후
  35. )
  36. , new Array ( "/root/init/M0145list" // 감염종류
  37. , "/root/init/M0146list" // 원인균
  38. , "/root/init/M0147list" // 예후
  39. )
  40. );
  41. model.refresh();
  42. }
  43. /**
  44. * @group :
  45. * @ver : 2008.06.24
  46. * @by : 김진아
  47. * @---------------------------------------------------------------------------------
  48. * @type : function
  49. * @access : public
  50. * @desc : 구분별 조회조건 설정
  51. * @param : optflag : 구분종류
  52. * @return :
  53. * @---------------------------------------------------------------------------------
  54. */
  55. function setSrchOpt(optflag){
  56. //** 환자 별 구분에 따른 조회조건 설정 **//
  57. if(optflag == "patsrchflag"){
  58. if(model.getValue("/root/main/cond/patsrchflag") == "2"){ // 환자 별
  59. rdo_dialsrchflag.visible = false; // 투석종류별 숨기기
  60. rdo_termsrchflag.visible = false; // 기간별 숨기기
  61. ipt_srchfromdd.visible = false; // 조회시작일자
  62. ipt_srchtodd.visible = false; // 조회종료일자
  63. cpt_term.visible = false; // "~"
  64. cpt_pid.visible = true; // 등록번호 캡션
  65. ipt_pid.visible = true; // 등록번호 input
  66. btn_patpopup.visible = true; // 돋보기 버튼
  67. opt_hngnm.visible = true; // 환자명 output
  68. cpt_bar.visible = true; // "-"
  69. opt_rrgstno1.visible = true; // 주민번호앞자리 output
  70. opt_rrgstno2.visible = true; // 주민번호뒷자리 output
  71. model.setValue("/root/main/cond/dialsrchflag", ""); // 투석종류별 초기화
  72. model.setValue("/root/main/cond/termsrchflag", ""); // 기간별 초기화
  73. }else if(model.getValue("/root/main/cond/patsrchflag") == "1"){ // 전체
  74. rdo_dialsrchflag.visible = true; // 투석종류별 숨기기
  75. rdo_termsrchflag.visible = true; // 기간별 숨기기
  76. ipt_srchfromdd.visible = true; // 조회시작일자
  77. ipt_srchtodd.visible = true; // 조회종료일자
  78. cpt_term.visible = true; // "~"
  79. cpt_pid.visible = false; // 등록번호 캡션
  80. ipt_pid.visible = false; // 등록번호 input
  81. btn_patpopup.visible = false; // 돋보기 버튼
  82. opt_hngnm.visible = false; // 환자명 output
  83. cpt_bar.visible = false; // "-"
  84. opt_rrgstno1.visible = false; // 주민번호앞자리 output
  85. opt_rrgstno2.visible = false; // 주민번호뒷자리 output
  86. model.setValue("/root/main/cond/dialsrchflag" , "A"); // 투석종류별(전체)
  87. model.setValue("/root/main/cond/termsrchflag" , "1"); // 기간별 (최근4회)
  88. model.setValue("/root/main/cond/pid" , "" ); // 등록번호
  89. model.setValue("/root/main/patbaseinfo/hngnm" , "" ); // 환자명
  90. model.setValue("/root/main/patbaseinfo/rrgstno1", "" ); // 주민번호1
  91. model.setValue("/root/main/patbaseinfo/rrgstno2", "" ); // 주민번호2
  92. rdo_dialsrchflag.refresh();
  93. rdo_termsrchflag.refresh();
  94. ipt_pid.refresh();
  95. opt_hngnm.refresh();
  96. opt_rrgstno1.refresh();
  97. opt_rrgstno2.refresh();
  98. }
  99. }
  100. //** 기간별 구분에 따른 조회조건 설정 **//
  101. if(optflag=="termsrchflag"){
  102. if(model.getValue("/root/main/cond/termsrchflag") == "3"){ // 조회기간 설정
  103. ipt_srchfromdd.disabled = false; // 조회시작일자
  104. ipt_srchtodd.disabled = false; // 조회종료일자
  105. model.setValue("/root/main/cond/srchfromdd", getCurrentDate());// 조회시작일자
  106. model.setValue("/root/main/cond/srchtodd" , getCurrentDate());// 조회종료일자
  107. }else{ // 최근 4회, 최종회
  108. ipt_srchfromdd.disabled = true; // 조회시작일자
  109. ipt_srchtodd.disabled = true; // 조회종료일자
  110. model.setValue("/root/main/cond/srchfromdd", ""); // 조회시작일자
  111. model.setValue("/root/main/cond/srchtodd" , ""); // 조회종료일자
  112. }
  113. ipt_srchfromdd.refresh();
  114. ipt_srchtodd.refresh();
  115. }
  116. }
  117. /**
  118. * @group :
  119. * @ver : 2011.05.09
  120. * @by : 권영애
  121. * @---------------------------------------------------------------------------------
  122. * @type : function
  123. * @access : public
  124. * @desc : 감염 조회
  125. * @param :
  126. * @return :
  127. * @---------------------------------------------------------------------------------
  128. */
  129. function fSrchInfcList(){
  130. model.removenode("/root/send");
  131. model.makeNode ("/root/send");
  132. model.makeValue ("/root/send/reqdata/srchfromdd" , model.getValue("/root/main/cond/srchfromdd" )); // 조회시작일자
  133. model.makeValue ("/root/send/reqdata/srchtodd" , model.getValue("/root/main/cond/srchtodd" )); // 조회종료일자
  134. model.removeNodeset("/root/main/infclist");
  135. //submit 호출
  136. if(!submit('TRMND04801')){
  137. messageBox('조회를 실패하였습니다.', 'E999');
  138. return;
  139. }
  140. model.refresh();
  141. }
  142. /**
  143. * @group :
  144. * @ver : 2008.06.24
  145. * @by : 김진아
  146. * @---------------------------------------------------------------------------------
  147. * @type : function
  148. * @access : public
  149. * @desc : KT/V List 엑셀저장
  150. * @param :
  151. * @return :
  152. * @---------------------------------------------------------------------------------
  153. */
  154. function fSaveExcel() {
  155. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  156. if (fileName != ""){
  157. grd_ktvrsltinfo.saveExcel(fileName, "SheetName", true, true, "", "", false);
  158. }
  159. }
  160. /**
  161. * @group
  162. * @ver : 2008.06.24
  163. * @by : 김진아
  164. * @---------------------------------------------------
  165. * @type : function
  166. * @access : public
  167. * @desc : 출력기능
  168. * @param :
  169. * @return :
  170. * @---------------------------------------------------
  171. */
  172. function fExecPrint(){
  173. model.removenode("/root/rexreptinfo");
  174. //** 조회조건 설정 **//
  175. var srchfromdd = ipt_srchfromdd.label // 발생시작일자
  176. , srchtodd = ipt_srchtodd.label // 발생종료일자
  177. model.makeValue ("/root/rexreptinfo/infclist/srchfromdd", srchfromdd);
  178. model.makeValue ("/root/rexreptinfo/infclist/srchtodd", srchtodd);
  179. for(var i = 1; i < grd_ktvrsltinfo.rows ; i++ ){
  180. model.makeNode("/root/rexreptinfo/infclist/item["+ i +"]");
  181. model.copyNode("/root/rexreptinfo/infclist/item["+ i +"]","/root/main/infclist/infcinfo["+ i +"]");
  182. model.makeValue("/root/rexreptinfo/infclist/item["+ i +"]/infckindnm", grd_ktvrsltinfo.labelMatrix(i, grd_ktvrsltinfo.colRef("infckindflag")));
  183. model.makeValue("/root/rexreptinfo/infclist/item["+ i +"]/casbacnm", grd_ktvrsltinfo.labelMatrix(i, grd_ktvrsltinfo.colRef("casbacflag")));
  184. model.makeValue("/root/rexreptinfo/infclist/item["+ i +"]/afternm", grd_ktvrsltinfo.labelMatrix(i, grd_ktvrsltinfo.colRef("afterflag")));
  185. }
  186. exeReportPreview("RPMND04801", "XMLSTR");
  187. }