SPMRT01000.js 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /*
  2. 상병선택Help 관리(SPMRT01000.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var xCondPath = "/root/hidden/condition";
  7. var xIndxListPath = "/root/main/indxlist/item";
  8. var xTermListPath = "/root/main/termlist/terminfo";
  9. /**
  10. * @group :
  11. * @ver : 2007.04.13
  12. * @by : 이은영
  13. * @---------------------------------------------------
  14. * @type : function
  15. * @access : public
  16. * @desc : 초기화
  17. * @param :
  18. * @return :
  19. * @---------------------------------------------------
  20. */
  21. function fInitalize(){
  22. var indxflag = opener.javascript.getParameter("indxflag");
  23. // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
  24. //model.setValue(xCondPath+"/basedd", getDate());
  25. model.setValue(xCondPath+"/basedd", getCurrentDate());
  26. model.setValue(xCondPath+"/indxflag", indxflag); // 0 : 진단, 9 : 수술, 2 : 주호소
  27. switch(indxflag){
  28. case "0" : // 진단
  29. model.toggle("case_diagindx");
  30. model.toggle("case_diagterminfo");
  31. break;
  32. case "9" : // 수술
  33. model.toggle("case_opindx");
  34. model.toggle("case_opterminfo");
  35. break;
  36. case "2" : // 조호소
  37. model.toggle("case_ccindx");
  38. model.toggle("case_ccterminfo");
  39. break;
  40. }
  41. model.removenodeset(xIndxListPath);
  42. model.removenodeset(xTermListPath);
  43. model.refresh();
  44. model.makeValue("/root/send/indxflag", indxflag);
  45. submit("TRMRT01001");
  46. }
  47. /**
  48. * @group :
  49. * @ver : 2007.04.13
  50. * @by : 이은영
  51. * @---------------------------------------------------
  52. * @type : function
  53. * @access : public
  54. * @desc : 용어 조회
  55. * @param :
  56. * @return :
  57. * @---------------------------------------------------
  58. */
  59. function fSearchTermInfo(flag){
  60. // 색인선택 없이 조회 요청 2008-09-15 박정옥
  61. /* if(model.getValue(xCondPath+"/indxcd") == ""){
  62. messageBox("색인을 먼저","C002");
  63. return;
  64. } */
  65. model.removenode("/root/send");
  66. if(flag == "index"){
  67. model.makeValue("/root/send/srchflag", "");
  68. model.makeValue("/root/send/srchnm", "");
  69. } else {
  70. model.makeValue("/root/send/srchflag", model.getValue(xCondPath+"/srchflag"));
  71. model.makeValue("/root/send/srchnm", model.getValue(xCondPath+"/srchnm"));
  72. }
  73. model.makeValue("/root/send/indxflag", model.getValue(xCondPath+"/indxflag"));
  74. model.makeValue("/root/send/indxcd", model.getValue(xCondPath+"/indxcd"));
  75. model.makeValue("/root/send/basedd", model.getValue(xCondPath+"/basedd"));
  76. submit("TRMRT01002");
  77. }
  78. /**
  79. * @group :
  80. * @ver : 2007.04.13
  81. * @by : 이은영
  82. * @---------------------------------------------------
  83. * @type : function
  84. * @access : public
  85. * @desc : 선택된 용어 등록
  86. * @param :
  87. * @return :
  88. * @---------------------------------------------------
  89. */
  90. function fSendTermInfo(){
  91. var indxflag = model.getValue(xCondPath+"/indxflag"); // 0 : 진단, 9 : 수술
  92. var sRowCnt = 0;
  93. var iSrchDiagRow = 0;
  94. var sTermCd = "";
  95. switch(indxflag){
  96. case "0" : // 진단
  97. sRowCnt = grd_diaginfo.rows - grd_diaginfo.fixedrows;
  98. var sSrchDiagObj = opener.document.controls("grd_srcheddiaginfo");
  99. var sSrchDiagListPath = "/root/main/srcheddiagcdlist/srcheddiagcdinfo";
  100. for(var iRow=1; iRow <= sRowCnt; iRow++){
  101. if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){
  102. sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd");
  103. if(opener.model.getValue(sSrchDiagListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){
  104. sSrchDiagObj.addItem();
  105. iSrchDiagRow = sSrchDiagObj.rows - sSrchDiagObj.fixedrows;
  106. opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termcd",sTermCd);
  107. opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm"));
  108. opener.model.setValue(sSrchDiagListPath+"["+iSrchDiagRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm"));
  109. }
  110. }
  111. }
  112. sSrchDiagObj.rebuild();
  113. break;
  114. case "9" : // 수술
  115. sRowCnt = grd_opinfo.rows - grd_opinfo.fixedrows;
  116. var sSrchOpObj = opener.document.controls("grd_srchedopinfo");
  117. var sSrchOpListPath = "/root/main/srchedopcdlist/srchedopcdinfo";
  118. var iSrchOpRow = 0;
  119. for(var iRow=1; iRow <= sRowCnt; iRow++){
  120. if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){
  121. sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd");
  122. if(opener.model.getValue(sSrchOpListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){
  123. sSrchOpObj.addItem();
  124. iSrchOpRow = sSrchOpObj.rows - sSrchOpObj.fixedrows;
  125. opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termcd",sTermCd);
  126. opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm"));
  127. opener.model.setValue(sSrchOpListPath+"["+iSrchOpRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm"));
  128. }
  129. }
  130. }
  131. sSrchOpObj.rebuild();
  132. break;
  133. case "2" : // 주호소
  134. sRowCnt = grd_ccinfo.rows - grd_ccinfo.fixedrows;
  135. var sSrchCCObj = opener.document.controls("grd_srchedccinfo");
  136. var sSrchCCListPath = "/root/main/srchedcccdlist/srchedcccdinfo";
  137. var iSrchCCRow = 0;
  138. for(var iRow=1; iRow <= sRowCnt; iRow++){
  139. if(model.getValue(xTermListPath+"["+iRow+"]/check") == "true"){
  140. sTermCd = model.getValue(xTermListPath+"["+iRow+"]/termcd");
  141. if(opener.model.getValue(sSrchCCListPath+"[termcd = '"+sTermCd+"']/termcd") == ""){
  142. sSrchCCObj.addItem();
  143. iSrchCCRow = sSrchCCObj.rows - sSrchCCObj.fixedrows;
  144. opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termcd",sTermCd);
  145. opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termengnm",model.getValue(xTermListPath+"["+iRow+"]/termengnm"));
  146. opener.model.setValue(sSrchCCListPath+"["+iSrchCCRow+"]/termhngnm",model.getValue(xTermListPath+"["+iRow+"]/termhngnm"));
  147. }
  148. }
  149. }
  150. sSrchCCObj.rebuild();
  151. break;
  152. }
  153. }