SPMRI01200.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. /**
  2. * @desc : 화면 초기화
  3. * @
  4. * @param :
  5. * @return :
  6. * @author : HIT EMR Team
  7. * @---------------------------------------------------
  8. */
  9. function fInitialize(){
  10. setParameter("SPMRI01300_openerid", "SPMRI01200");
  11. model.removeNodeset("/root/main/unprepbase");
  12. model.removeNodeset("/root/main/mainlist/medireclist");
  13. //fReqUnpr();
  14. //미비과 조회
  15. // zbcfGetDeptCodeList(getUserInfo("dutplceinstcd"), "orduseyn", "D", "/root/hidden/deptlist", "depthngnm", "asc");
  16. zbcfGetDeptCodeList("012", "orduseyn", "D", "/root/temp/deptlist", "depthngnm", "asc");
  17. zbcfGetDeptCodeList("012", "orduseyn", "W", "/root/temp/wardlist", "depthngnm", "asc");
  18. //reqGetDeptList("/root/send/reqdeptlist", "/root/init/deptlist", "", "012");
  19. copyNodeset("/root/temp/deptlist/dept", "/root/temp/templist","after");
  20. model.setValue("/root/send/cond/deptcd","ALL");
  21. model.setValue("/root/send/cond/fromdd", getCurrentDate());
  22. model.refresh();
  23. }
  24. /**
  25. * @desc : 미비정보 조회
  26. * @
  27. * @param :
  28. * @return :
  29. * @author : HIT EMR Team
  30. * @---------------------------------------------------
  31. */
  32. function fReqUnpr(){
  33. model.makeValue("/root/send/cond/pid","20433");
  34. model.makeValue("/root/send/cond/ioflag","O");
  35. model.makeValue("/root/send/cond/formrecdeptcd","ALL");
  36. model.makeValue("/root/send/cond/fromdd","20071030");
  37. submit("TRMRI01201");
  38. }
  39. /**
  40. * @desc : 과 선택
  41. * @
  42. * @param :
  43. * @return :
  44. * @author : HIT EMR Team
  45. * @---------------------------------------------------
  46. */
  47. function fDeptCDSelect(){
  48. submit("TRMRF03102");
  49. model.removeNodeset("/root/main/indxlist_d/item");
  50. copyNode(model, model, "/root/main/indxlist_d", "/root/main/indxlist");
  51. model.refresh();
  52. trv_indxlist_d.expand(0, true);
  53. }
  54. /**
  55. * @desc : 기록 리스트 조회
  56. * @
  57. * @param :
  58. * @return :
  59. * @author : HIT EMR Team
  60. * @---------------------------------------------------
  61. */
  62. function fSrchFormrec()
  63. {
  64. model.toggle("case1");
  65. btn_formrec.selected = "true";
  66. if( model.getValue("/root/send/cond/deptcd") == "-"){
  67. model.makeValue("/root/send/cond/formrecdeptcd","ALL");
  68. }else{
  69. model.makeValue("/root/send/cond/formrecdeptcd", model.getValue("/root/send/cond/deptcd"));
  70. }
  71. submit("TRMRI01201");
  72. }
  73. /**
  74. * @desc : 트리 선택
  75. * @
  76. * @param :
  77. * @return :
  78. * @author : HIT EMR Team
  79. * @---------------------------------------------------
  80. */
  81. function fSetTree()
  82. {
  83. var item = trv_indxlist_d.item(trv_indxlist_d.selectedIndex);
  84. var rows = item.index + 1;
  85. var linkflag = model.getValue("/root/main/indxlist_d/item["+ rows +"]/linkflag");
  86. if(linkflag == "N"){
  87. return;
  88. }
  89. var formcd = model.getValue("/root/main/indxlist_d/item["+ rows +"]/formcd");
  90. var indxnm = model.getValue("/root/main/indxlist_d/item["+ rows +"]/indxnm");
  91. //var pid = children.model.getValue("/root/main/indxlist_d/item["+ rows +"]/indxnm");
  92. var pid = model.getValue("/root/send/cond/pid");
  93. opener.model.makeValue("/root/temp/unprepmngtsub/formcd", formcd);
  94. opener.model.makeValue("/root/temp/unprepmngtsub/indxnm", indxnm);
  95. opener.model.makeValue("/root/temp/unprepmngtsub/formrecseq", 0 );
  96. opener.model.makeValue("/root/temp/unprepmngtsub/pid" , pid);
  97. //환자리스트에서 가져온 환자정보
  98. opener.model.makeValue("/root/temp/unprepmngtsub/pid", model.getValue("/root/temp/unpreprec/pid"));
  99. opener.model.makeValue("/root/temp/unprepmngtsub/ptnm", model.getValue("/root/temp/unpreprec/ptnm"));
  100. opener.model.makeValue("/root/temp/unprepmngtsub/dpdr", model.getValue("/root/temp/unpreprec/dpdr"));
  101. opener.model.makeValue("/root/temp/unprepmngtsub/chosflag", model.getValue("/root/temp/unpreprec/chosflag"));
  102. opener.model.makeValue("/root/temp/unprepmngtsub/orddd",model.getValue("/root/temp/unpreprec/orddd"));
  103. opener.model.makeValue("/root/temp/unprepmngtsub/cretno",model.getValue("/root/temp/unpreprec/cretno"));
  104. opener.model.makeValue("/root/temp/unprepmngtsub/instcd",model.getValue("/root/temp/unpreprec/instcd"));
  105. opener.model.makeValue("/root/temp/unprepmngtsub/orddeptcd", model.getValue("/root/temp/unpreprec/orddeptcd")); //
  106. opener.model.makeValue("/root/temp/unprepmngtsub/orddrid", model.getValue("/root/temp/unpreprec/orddrid")); //
  107. var chosflag = model.getValue("/root/temp/unpreprec/chosflag"); //구분
  108. var indschflag = model.getValue("/root/temp/unpreprec/indschflag"); //진료일자
  109. //퇴원일자이면 D ,나머지는 chosflag 대로..
  110. if("dschdd" == indschflag) { //진료일자
  111. opener.model.makeValue("/root/temp/unprepmngtsub/indschflag", "D"); //내원구분
  112. }else {
  113. opener.model.makeValue("/root/temp/unprepmngtsub/indschflag", chosflag); //내원구분
  114. }
  115. model.close();
  116. }
  117. /**
  118. * @desc : 그리드 선택
  119. * @
  120. * @param :
  121. * @return :
  122. * @author : HIT EMR Team
  123. * @---------------------------------------------------
  124. */
  125. function fSetGrid()
  126. {
  127. var rows = grd_medireclist.row - grd_medireclist.fixedRows + 1;
  128. var formcd = model.getValue("/root/main/mainlist/medireclist["+ rows +"]/formcd");
  129. var formnminfo = model.getValue("/root/main/mainlist/medireclist["+ rows +"]/formnminfo");
  130. var formrecseq = model.getValue("/root/main/mainlist/medireclist["+ rows +"]/formrecseq");
  131. var formrecdd = model.getValue("/root/main/mainlist/medireclist["+ rows +"]/formrecdd"); //기록일시
  132. var formrechm = model.getValue("/root/main/mainlist/medireclist["+ rows +"]/formrechm"); //기록과
  133. var pid = model.getValue("/root/send/cond/pid");
  134. opener.model.makeValue("/root/temp/unprepmngtsub/formcd", formcd);
  135. opener.model.makeValue("/root/temp/unprepmngtsub/indxnm", formnminfo);
  136. opener.model.makeValue("/root/temp/unprepmngtsub/formrecseq", formrecseq);
  137. opener.model.makeValue("/root/temp/unprepmngtsub/pid" , pid);
  138. opener.model.makeValue("/root/temp/unprepmngtsub/formrechm" , formrechm); //기록시간
  139. opener.model.makeValue("/root/temp/unprepmngtsub/formrecdd", formrecdd);
  140. //환자리스트에서 가져온 환자정보
  141. opener.model.makeValue("/root/temp/unprepmngtsub/pid", model.getValue("/root/temp/unpreprec/pid"));
  142. opener.model.makeValue("/root/temp/unprepmngtsub/ptnm", model.getValue("/root/temp/unpreprec/ptnm"));
  143. opener.model.makeValue("/root/temp/unprepmngtsub/dpdr", model.getValue("/root/temp/unpreprec/dpdr"));
  144. opener.model.makeValue("/root/temp/unprepmngtsub/chosflag", model.getValue("/root/temp/unpreprec/chosflag"));
  145. opener.model.makeValue("/root/temp/unprepmngtsub/orddd",model.getValue("/root/temp/unpreprec/orddd"));
  146. opener.model.makeValue("/root/temp/unprepmngtsub/cretno",model.getValue("/root/temp/unpreprec/cretno"));
  147. opener.model.makeValue("/root/temp/unprepmngtsub/instcd",model.getValue("/root/temp/unpreprec/instcd"));
  148. opener.model.makeValue("/root/temp/unprepmngtsub/orddeptcd", model.getValue("/root/temp/unpreprec/orddeptcd")); //
  149. opener.model.makeValue("/root/temp/unprepmngtsub/orddrid", model.getValue("/root/temp/unpreprec/orddrid")); //
  150. var chosflag = model.getValue("/root/temp/unpreprec/chosflag"); //구분
  151. var indschflag = model.getValue("/root/temp/unpreprec/indschflag"); //진료일자
  152. //퇴원일자이면 D ,나머지는 chosflag 대로..
  153. if("dschdd" == indschflag) { //진료일자
  154. opener.model.makeValue("/root/temp/unprepmngtsub/indschflag", "D"); //내원구분
  155. }else {
  156. opener.model.makeValue("/root/temp/unprepmngtsub/indschflag", chosflag); //내원구분
  157. }
  158. model.close();
  159. }