SPMMR08100.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. /**
  2. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  3. 의료정보 - 간암 환자관리 ( SPMMR08100간암.xrw - JScript )
  4. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  5. **/
  6. function fInitialize(){
  7. model.toggle("case1");
  8. // 화면 열리면서 모든 환자를 로딩(recflag:3 간질환 환자)
  9. //model.makeValue("root/send/reqdata/recflag", "3");
  10. model.makeValue("root/send/search/recflag", "3");
  11. //submit("TRMMR08100");
  12. model.setValue("/root/send/search/sdate", getCurrentDate());
  13. model.setValue("/root/send/search/tdate", getCurrentDate());
  14. model.setValue("/root/send/search/ioflag", "O");
  15. model.refresh();
  16. }
  17. // 환자목록에서 더블 클릭시 환자 정보를 가져와서 상세보기에 뿌려줌
  18. function fDetailPat(){
  19. if(grd_liver.isCell(event.target) && grd_liver.mouserow >= grd_liver.fixedrows){
  20. var pid = grd_liver.valueMatrix(grd_liver.row, grd_liver.colRef("pid"));
  21. if(pid!=""){
  22. model.removeNode("/root/patdetail");
  23. model.makeValue("/root/send/reqdata/pid", pid);
  24. submit("TRMMR08103");
  25. model.makeValue("/root/patdetail/comments", grd_liver.valueMatrix(grd_liver.row, grd_liver.colRef("comments")));
  26. btn_sw2.selected=true;
  27. model.toggle("case2");
  28. model.refresh();
  29. }
  30. }
  31. }
  32. //그리드 늘리기
  33. var grd_status;
  34. function fExpandGrid(){
  35. var grd_name=getParameter("grd_name");
  36. if(grd_name=="grd_testresult1" && grd_testresult1.row >= grd_testresult1.fixedrows){
  37. grd_testresult1.attribute("top") = 0;
  38. grd_testresult1.attribute("height") = 125;
  39. grd_testresult2.attribute("top") = 125;
  40. grd_testresult2.attribute("height") = 0;
  41. grd_testresult3.attribute("top") = 170;
  42. grd_testresult3.attribute("height") = 0;
  43. grd_status="grd_testresult1"; //현재 상태값을 설정
  44. }else if(grd_name=="grd_testresult2" && grd_testresult2.row >= grd_testresult2.fixedrows){
  45. grd_testresult1.attribute("top") = 0;
  46. grd_testresult1.attribute("height") = 0;
  47. grd_testresult2.attribute("top") = 0;
  48. grd_testresult2.attribute("height") = 125;
  49. grd_testresult3.attribute("top") = 0;
  50. grd_testresult3.attribute("height") = 0;
  51. grd_status="grd_testresult2";
  52. }else if(grd_name=="grd_testresult3" && grd_testresult3.row >= grd_testresult3.fixedrows){
  53. grd_testresult1.attribute("top") = 0;
  54. grd_testresult1.attribute("height") = 0;
  55. grd_testresult2.attribute("top") = 0;
  56. grd_testresult2.attribute("height") = 0;
  57. grd_testresult3.attribute("top") = 0;
  58. grd_testresult3.attribute("height") = 125
  59. grd_status="grd_testresult3";
  60. }
  61. }
  62. //그리드 줄이기
  63. function fShortenGrid(){
  64. var grd_name=getParameter("grd_name");
  65. if(grd_status==grd_name && grd_name=="grd_testresult1" && grd_testresult1.row >= grd_testresult1.fixedrows){
  66. grd_testresult1.attribute("top") = 0;
  67. grd_testresult1.attribute("height") = 45;
  68. grd_testresult2.attribute("top") = 45;
  69. grd_testresult2.attribute("height") = 45;
  70. grd_testresult3.attribute("top") = 90;
  71. grd_testresult3.attribute("height") = 45;
  72. }else if(grd_status==grd_name && grd_name=="grd_testresult2" && grd_testresult2.row >= grd_testresult2.fixedrows){
  73. grd_testresult1.attribute("top") = 0;
  74. grd_testresult1.attribute("height") = 45;
  75. grd_testresult2.attribute("top") = 45;
  76. grd_testresult2.attribute("height") = 45;
  77. grd_testresult3.attribute("top") = 90;
  78. grd_testresult3.attribute("height") = 45;
  79. }else if(grd_status==grd_name && grd_name=="grd_testresult3" && grd_testresult3.row >= grd_testresult3.fixedrows){
  80. grd_testresult1.attribute("top") = 0;
  81. grd_testresult1.attribute("height") = 45;
  82. grd_testresult2.attribute("top") = 45;
  83. grd_testresult2.attribute("height") = 45;
  84. grd_testresult3.attribute("top") = 90;
  85. grd_testresult3.attribute("height") = 45;
  86. }
  87. }
  88. //화면 초기화
  89. function fGrid_init(){
  90. grd_testresult1.attribute("top") = 0;
  91. grd_testresult1.attribute("height") = 45;
  92. grd_testresult2.attribute("top") = 45;
  93. grd_testresult2.attribute("height") = 45;
  94. grd_testresult3.attribute("top") = 90;
  95. grd_testresult3.attribute("height") = 45;
  96. }
  97. //투약관리 LMC 및 항암제LMC 저장하기
  98. function fSave(btn_nm){
  99. if(btn_nm=="btn_prcp"){
  100. var rowcnt=grd_prcpinfo.rows;
  101. var savedata = "instcd▦pid▦orddd▦cretno▦chosflag▦recflag▦itemcd▦itemval1▦fstrgstrid▦lastupdtrid▩";
  102. var datastring="";
  103. for(i=1; i<rowcnt; i++){
  104. var lmc=grd_prcpinfo.valueMatrix(i, grd_prcpinfo.colRef("lmc"));
  105. datastring=datastring+model.getValue("/root/patdetail/patinfo/instcd") +"▦" +
  106. model.getValue("/root/patdetail/patinfo/pid") +"▦" +
  107. model.getValue("/root/patdetail/patinfo/orddd") +"▦" +
  108. model.getValue("/root/patdetail/patinfo/cretno") +"▦" +
  109. model.getValue("/root/patdetail/patinfo/chosflag") +"▦" +
  110. "3▦" +
  111. model.getValue("/root/patdetail/prcpinfo["+i+"]/prcpcd") +"▦" +
  112. lmc +"▦" +
  113. getUserInfo("userid")+"▦" +
  114. getUserInfo("userid") +"▩";
  115. }
  116. model.removenode("/root/send/savedata");
  117. model.makeValue("/root/send/savedata", savedata + datastring);
  118. submit("TXMMO08102");
  119. }else if(btn_nm=="btn_anticancer"){
  120. var rowcnt=grd_anticancer.rows;
  121. var savedata = "instcd▦pid▦orddd▦cretno▦chosflag▦recflag▦itemcd▦itemval1▦fstrgstrid▦lastupdtrid▩";
  122. var datastring="";
  123. for(i=1; i<rowcnt; i++){
  124. var lmc=grd_anticancer.valueMatrix(i, grd_anticancer.colRef("lmc"));
  125. datastring=datastring+model.getValue("/root/patdetail/patinfo/instcd") +"▦" +
  126. model.getValue("/root/patdetail/patinfo/pid") +"▦" +
  127. model.getValue("/root/patdetail/patinfo/orddd") +"▦" +
  128. model.getValue("/root/patdetail/patinfo/cretno") +"▦" +
  129. model.getValue("/root/patdetail/patinfo/chosflag") +"▦" +
  130. "3▦" +
  131. model.getValue("/root/patdetail/anticancerinfo["+i+"]/prcpcd") +"▦" +
  132. lmc +"▦" +
  133. getUserInfo("userid")+"▦" +
  134. getUserInfo("userid") +"▩";
  135. }
  136. model.removenode("/root/send/savedata");
  137. model.makeValue("/root/send/savedata", savedata + datastring);
  138. submit("TXMMO08102");
  139. }else if(btn_nm=="btn_comment"){
  140. var savedata = "instcd▦pid▦orddd▦cretno▦chosflag▦recflag▦itemcd▦itemval1▦fstrgstrid▦lastupdtrid▩";
  141. var datastring="";
  142. if(model.getValue("/root/patdetail/comments")!=""){
  143. datastring=datastring+model.getValue("/root/patdetail/patinfo/instcd") +"▦" +
  144. model.getValue("/root/patdetail/patinfo/pid") +"▦" +
  145. model.getValue("/root/patdetail/patinfo/orddd") +"▦" +
  146. model.getValue("/root/patdetail/patinfo/cretno") +"▦" +
  147. model.getValue("/root/patdetail/patinfo/chosflag") +"▦" +
  148. "3▦" +
  149. "comments" +"▦" +
  150. model.getValue("/root/patdetail/comments") +"▦" +
  151. getUserInfo("userid")+"▦" +
  152. getUserInfo("userid") +"▩";
  153. }
  154. model.removenode("/root/send/savedata");
  155. model.makeValue("/root/send/savedata", savedata + datastring);
  156. submit("TXMMO08102");
  157. }
  158. }
  159. //환자삭제하기
  160. function fdeletepat(){
  161. if(grd_liver.row >= grd_liver.fixedrows){
  162. var chk=messageBox("해당 환자를 삭제하시겠습니까? ", "S001", ""); //예:6 아니오:7 취소:2
  163. if(chk=="6"){
  164. var pid=grd_liver.valueMatrix(grd_liver.row, grd_liver.colRef("pid"));
  165. model.removeNode("/root/send/reqdata");
  166. model.makeValue("/root/send/reqdata/pid", pid);
  167. model.makeValue("/root/send/reqdata/recflag", 3);
  168. model.makeValue("/root/send/reqdata/lastupdtrid", getUserInfo("userid"));
  169. submit("TXMMO08103");
  170. model.removeNode("/root/patdetail");
  171. fInitialize();
  172. }
  173. }
  174. }
  175. //검색조건 체크
  176. function fCheck(){
  177. var pid=model.getValue("/root/send/search/pid");
  178. var ioflag=model.getValue("/root/send/search/ioflag");
  179. var mdiag=model.getValue("/root/send/search/mdiag");
  180. var sdiag=model.getValue("/root/send/search/sdiag");
  181. var sdate=model.getValue("/root/send/search/sdate");
  182. var tdate=model.getValue("/root/send/search/tdate");
  183. if(pid=="" && ioflag=="" && mdiag=="" && sdiag=="" && sdate=="" && tdate==""){
  184. return true;
  185. }else if(sdate !="" && tdate =="" || sdate =="" && tdate !=""){
  186. return true;
  187. }else{
  188. return false;
  189. }
  190. }