SMMNB012.xjs 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/*
  3. 24시간 업무보고 (SMMNB01200.xrw - JScript )
  4. - Version :
  5. 1) : Ver.1.00.01
  6. */
  7. var GRD_INPTLIST_FIXCOL = 15;
  8. var dutplcecd = sysf_getUserInfo("dutplcecd");
  9. var deptcd = "";
  10. var erdeptflag =""; //칠곡에는 null으로 고정. 값 셋팅해주는 곳 없음.
  11. var erdeptcd="";
  12. var erdeptnm="";
  13. var cnt = 0;
  14. var formPath;
  15. /**
  16. * @group :
  17. * @ver : 2007.08.13
  18. * @by : 하재륜
  19. * @---------------------------------------------------
  20. * @type : function
  21. * @access : public
  22. * @desc : 외래진료 현황
  23. * @param :
  24. * @return :
  25. * @---------------------------------------------------
  26. */
  27. function fSearch_otptlist(){ // 통합통계 외래환자수 서브미션 태움 수정 by 박영우 20091215
  28. ds_main_outpatinfo_outpatlist.clearData();
  29. //messageBox("개발중","I009");
  30. if ( utlf_isNull(ds_temp.getColumn(0, "srchdd")) ){
  31. sysf_messageBox("기간","I003");//필수입력입니다
  32. return;
  33. }
  34. ds_send_reqdata.setColumn(0, "srchdd", ds_temp.getColumn(0, "srchdd") );
  35. ds_send_reqdata.setColumn(0, "menu", "SUM");
  36. if ( !utlf_isNull( ds_temp.getColumn(0, "orddeptcd") ) && ds_temp.getColumn(0, "orddeptcd") != "%") {
  37. ds_send_reqdata.setColumn(0, "orddeptcd", ds_temp.getColumn(0, "orddeptcd"));
  38. }
  39. if ( !utlf_isNull( ds_temp.getColumn(0, "orddrid") ) && ds_temp.getColumn(0, "orddrid") != "%") {
  40. ds_send_reqdata.setColumn(0, "orddrid", ds_temp.getColumn(0, "orddrid"));
  41. }else{
  42. ds_send_reqdata.setColumn(0, "orddrid", "");
  43. }
  44. ds_send.setColumn(0, "orddd",group2.ipt_orddd.value); //보고일자
  45. var oParam = {};
  46. oParam.id = "TRSNO00101";
  47. oParam.service = "stsenrapp.StsOutMngt";
  48. oParam.method = "reqGetOutPatlist";
  49. oParam.inds = "req=ds_send_reqdata";
  50. oParam.outds = "ds_main_outpatinfo_outpatlist=outpatlist";
  51. oParam.async = false;
  52. //oParam.callback = "cf_TRSNO00101";
  53. tranf_submit(oParam);
  54. ds_main_outpatinfo_outpatlist.rowposition = -1;
  55. for( var i=0 ; i<ds_main_outpatinfo_outpatlist.rowcount ; i++ ){
  56. ds_main_outpatinfo_outpatlist.setColumn(i, "fsabsntrsrvrate", ds_main_outpatinfo_outpatlist.getColumn(i, "fsabsntrsrvrate").replace("%", ""));
  57. ds_main_outpatinfo_outpatlist.setColumn(i, "secabsntrsrvrate", ds_main_outpatinfo_outpatlist.getColumn(i, "secabsntrsrvrate").replace("%", ""));
  58. ds_main_outpatinfo_outpatlist.setColumn(i, "sltotptrate", ds_main_outpatinfo_outpatlist.getColumn(i, "sltotptrate").replace("%", ""));
  59. ds_main_outpatinfo_outpatlist.setColumn(i, "genotptrate", ds_main_outpatinfo_outpatlist.getColumn(i, "genotptrate").replace("%", ""));
  60. ds_main_outpatinfo_outpatlist.setColumn(i, "absntrsrvrate", ds_main_outpatinfo_outpatlist.getColumn(i, "absntrsrvrate").replace("%", ""));
  61. ds_main_outpatinfo_outpatlist.setColumn(i, "deptrate", ds_main_outpatinfo_outpatlist.getColumn(i, "deptrate").replace("%", ""));
  62. }
  63. }
  64. /**
  65. * @group :
  66. * @ver : 2007.08.13
  67. * @by : 하재륜
  68. * @---------------------------------------------------
  69. * @type : function
  70. * @access : public
  71. * @desc : Unit별 현황
  72. * @param :
  73. * @return :
  74. * @---------------------------------------------------
  75. */
  76. function fSearch_inptlist(){
  77. for(var i = 1 ; i <= 99 ; i++){
  78. group2.switch2.case5.grd_inptlist.setFormatColProperty(GRD_INPTLIST_FIXCOL+i, "size", 0);
  79. //group2.switch2.case5.grd_inptlist.setRealColSize(GRD_INPTLIST_FIXCOL+i, 0);
  80. }
  81. ds_main_inpt_dept_deptlist.clearData();
  82. ds_main_inpt_inptlist.clearData();
  83. ds_send.setColumn(0, "orddd",group2.ipt_orddd.value); //보고일자
  84. var oParam = {};
  85. oParam.id = "TRMNB01203";
  86. oParam.service = "wardcareapp.WardBizMngt";
  87. oParam.method = "reqGetDeptList";
  88. oParam.inds = "req=ds_send";
  89. oParam.outds = "ds_main_inpt_dept_deptlist=deptlist";
  90. oParam.async = false;
  91. //oParam.callback = "cf_TRMNB01203";
  92. tranf_submit(oParam);
  93. ds_send.setColumn(0, "orddd",group2.ipt_orddd.value); //보고일자
  94. var oParam = {};
  95. oParam.id = "TRMNB01202";
  96. oParam.service = "wardcareapp.WardBizMngt";
  97. oParam.method = "reqGetInptList";
  98. oParam.inds = "req=ds_send";
  99. oParam.outds = "ds_main_inpt_inptlist=inptlist";
  100. oParam.async = false;
  101. //oParam.callback = "cf_TRMNB01202";
  102. tranf_submit(oParam);
  103. ds_main_inpt_inptlist.rowposition = -1;
  104. }
  105. /**
  106. * @group :
  107. * @ver : 2007.08.13
  108. * @by : 하재륜
  109. * @---------------------------------------------------
  110. * @type : function
  111. * @access : public
  112. * @desc : 보고 행추가
  113. * @param :
  114. * @return :
  115. * @---------------------------------------------------
  116. */
  117. function fAdd_Reptrows(grdflg){
  118. var wardcd = dutplcecd; //세션에서 받아처리
  119. var plandd = utlf_getCurrentDate();
  120. var plandt = utlf_getCurrentDate()+utlf_getCurrentTime().substring(0,4);
  121. if(grdflg == "psnlist"){
  122. if(group2.switch1.case1.grd_psnlist.rowcount < 1){
  123. ds_main_inpt_reptdata_psnlist.addRow();
  124. }else{
  125. ds_main_inpt_reptdata_psnlist.insertRow(0);
  126. }
  127. ds_main_inpt_reptdata_psnlist.enableevent = false;
  128. ds_main_inpt_reptdata_psnlist.updatecontrol = false;
  129. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "staiud","insert");
  130. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "wardcd",wardcd);
  131. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "plandd",plandd);
  132. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "plandt",plandt);
  133. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "usernm",sysf_getUserName());
  134. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "posdeptnm",sysf_getUserInfo("dutplcenm"));
  135. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "userid",sysf_getUserId());
  136. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "deliveflagcd","01");
  137. //grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  138. ds_main_inpt_reptdata_psnlist.updatecontrol = true;
  139. ds_main_inpt_reptdata_psnlist.enableevent = true;
  140. }else if(grdflg == "wardlist"){
  141. if(formPath.grd_wardlist.rowcount < 1){
  142. ds_main_inpt_reptdata_wardlist.addRow();
  143. }else{
  144. ds_main_inpt_reptdata_wardlist.insertRow(0);
  145. }
  146. ds_main_inpt_reptdata_wardlist.enableevent = false;
  147. ds_main_inpt_reptdata_wardlist.updatecontrol = false;
  148. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "staiud","insert");
  149. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "plandd",plandd);
  150. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "plandt",plandt);
  151. var strTmp = ds_temp.getColumn(0, "duty");
  152. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "duty", strTmp == "4" ? "1" : strTmp);
  153. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "usernm",sysf_getUserName());
  154. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "userid",sysf_getUserId());
  155. if(erdeptflag == "Y") {
  156. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "wardcd", erdeptcd);
  157. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "posdeptnm", erdeptnm);
  158. } else {
  159. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "wardcd", wardcd);
  160. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "posdeptnm", sysf_getUserInfo("dutplcenm"));
  161. }
  162. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "deliveflagcd","02");
  163. ds_main_inpt_reptdata_wardlist.updatecontrol = true;
  164. ds_main_inpt_reptdata_wardlist.enableevent = true;
  165. }else if(grdflg == "edulist"){
  166. if(group2.switch1.case3.grd_edulist.rowcount < 1){
  167. ds_main_inpt_reptdata_edulist.addRow();
  168. }else{
  169. ds_main_inpt_reptdata_edulist.insertRow(0);
  170. }
  171. ds_main_inpt_reptdata_edulist.enableevent = false;
  172. ds_main_inpt_reptdata_edulist.updatecontrol = false;
  173. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "staiud","insert");
  174. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "wardcd",wardcd);
  175. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "plandd",plandd);
  176. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "plandt",plandt);
  177. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "usernm",sysf_getUserName());
  178. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "posdeptnm",sysf_getUserInfo("dutplcenm"));
  179. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "userid",sysf_getUserId());
  180. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "deliveflagcd","03");
  181. //grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  182. ds_main_inpt_reptdata_edulist.updatecontrol = true;
  183. ds_main_inpt_reptdata_edulist.enableevent = true;
  184. }else if(grdflg == "etclist"){
  185. if(group2.switch1.case4.grd_etclist.rowcount < 1){
  186. ds_main_inpt_reptdata_etclist.addRow();
  187. }else{
  188. ds_main_inpt_reptdata_etclist.insertRow(0);
  189. }
  190. ds_main_inpt_reptdata_etclist.enableevent = false;
  191. ds_main_inpt_reptdata_etclist.updatecontrol = false;
  192. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "staiud","insert");
  193. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "wardcd",wardcd);
  194. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "plandd",plandd);
  195. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "plandt",plandt);
  196. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "usernm",sysf_getUserName());
  197. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "userid",sysf_getUserId());
  198. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "deliveflagcd","04");
  199. //grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  200. ds_main_inpt_reptdata_etclist.updatecontrol = true;
  201. ds_main_inpt_reptdata_etclist.enableevent = true;
  202. }else if(grdflg == "notilist"){
  203. if(group2.switch1.case14.grd_noti.rowcount < 1){
  204. ds_main_inpt_reptdata_notilist.addRow();
  205. }else{
  206. ds_main_inpt_reptdata_notilist.insertRow(0);
  207. }
  208. ds_main_inpt_reptdata_notilist.enableevent = false;
  209. ds_main_inpt_reptdata_notilist.updatecontrol = false;
  210. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "staiud","insert");
  211. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "wardcd",wardcd);
  212. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "plandd",plandd);
  213. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "plandt",plandt);
  214. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "usernm",sysf_getUserName());
  215. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "userid",sysf_getUserId());
  216. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "deliveflagcd","05");
  217. //grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  218. ds_main_inpt_reptdata_notilist.updatecontrol = true;
  219. ds_main_inpt_reptdata_notilist.enableevent = true;
  220. }
  221. }
  222. /**
  223. * @group :
  224. * @ver : 2007.08.13
  225. * @by : 하재륜
  226. * @---------------------------------------------------
  227. * @type : function
  228. * @access : public
  229. * @desc : 보고 행수정
  230. * @param :
  231. * @return :
  232. * @---------------------------------------------------
  233. */
  234. function fUpt_Reptrows(grdflg){
  235. var wardcd = dutplcecd; //세션에서 받아처리
  236. var plandd = group2.ipt_orddd2.value;
  237. var plandt = utlf_getCurrentDate()+utlf_getCurrentTime().substring(0,4);
  238. if(grdflg == "psnlist"){
  239. var staiud = ds_main_inpt_reptdata_psnlist.getColumn(ds_main_inpt_reptdata_psnlist.rowposition, "staiud");
  240. if( (staiud =="insert") || (staiud =="delete") ){
  241. return;
  242. }
  243. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "staiud","update");
  244. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "wardcd",wardcd);
  245. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "usernm",sysf_getUserName());
  246. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "posdeptnm",sysf_getUserInfo("dutplcenm"));
  247. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "userid",sysf_getUserId());
  248. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "deliveflagcd","01");
  249. //grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  250. }else if(grdflg == "wardlist"){
  251. var staiud = ds_main_inpt_reptdata_wardlist.getColumn(ds_main_inpt_reptdata_wardlist.rowposition, "staiud");
  252. if( (staiud =="insert") || (staiud =="delete") ){
  253. return;
  254. }
  255. var dt = ds_main_inpt_reptdata_wardlist.getColumn(ds_main_inpt_reptdata_wardlist.rowposition, "plandt");
  256. if(utlf_isNull(dt)) {
  257. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "plandd",plandd);
  258. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "plandt",plandt);
  259. }
  260. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "staiud","update");
  261. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "usernm",sysf_getUserName());
  262. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "userid",sysf_getUserId());
  263. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "deliveflagcd","02");
  264. }else if(grdflg == "edulist"){
  265. var staiud = ds_main_inpt_reptdata_edulist.getColumn(ds_main_inpt_reptdata_edulist.rowposition, "staiud");
  266. if( (staiud =="insert") || (staiud =="delete") ){
  267. return;
  268. }
  269. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "staiud","update");
  270. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "wardcd",wardcd);
  271. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "usernm",sysf_getUserName());
  272. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "posdeptnm",sysf_getUserInfo("dutplcenm"));
  273. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "userid",sysf_getUserId());
  274. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "deliveflagcd","03");
  275. //grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  276. }else if(grdflg == "etclist"){
  277. var staiud = ds_main_inpt_reptdata_etclist.getColumn(ds_main_inpt_reptdata_etclist.rowposition, "staiud");
  278. if( (staiud =="insert") || (staiud =="delete") ){
  279. return;
  280. }
  281. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "staiud","update");
  282. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "wardcd",wardcd);
  283. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "usernm",sysf_getUserName());
  284. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "userid",sysf_getUserId());
  285. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "deliveflagcd","04");
  286. //grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  287. }else if(grdflg == "notilist"){
  288. var staiud = ds_main_inpt_reptdata_notilist.getColumn(ds_main_inpt_reptdata_notilist.rowposition, "staiud");
  289. if( (staiud =="insert") || (staiud =="delete") ){
  290. return;
  291. }
  292. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "staiud","update");
  293. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "wardcd",wardcd);
  294. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "usernm",sysf_getUserName());
  295. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "userid",sysf_getUserId());
  296. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "deliveflagcd","05");
  297. //grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  298. }
  299. }
  300. /**
  301. * @group :
  302. * @ver : 2007.08.13
  303. * @by : 하재륜
  304. * @---------------------------------------------------
  305. * @type : function
  306. * @access : public
  307. * @desc : 보고 행삭제
  308. * @param :
  309. * @return :
  310. * @---------------------------------------------------
  311. */
  312. function fDel_Reptrows(grdflg){
  313. var reptcnt;
  314. if(grdflg == "psnlist"){
  315. reptcnt = group2.switch1.case1.grd_psnlist.rowcount;
  316. }else if(grdflg == "wardlist"){
  317. reptcnt = formPath.grd_wardlist.rowcount;
  318. }else if(grdflg == "edulist"){
  319. reptcnt = group2.switch1.case3.grd_edulist.rowcount;
  320. }else if(grdflg == "etclist"){
  321. reptcnt = group2.switch1.case4.grd_etclist.rowcount;
  322. }else if(grdflg == "notilist"){
  323. reptcnt = group2.switch1.case14.grd_noti.rowcount;
  324. }
  325. if(reptcnt < 1){
  326. sysf_messageBox("삭제 할 자료가 ","I004");
  327. return;
  328. }
  329. if(grdflg == "psnlist"){
  330. ds_main_inpt_reptdata_psnlist.enableevent = false;
  331. ds_main_inpt_reptdata_psnlist.updatecontrol = false;
  332. ds_main_inpt_reptdata_psnlist.setColumn(ds_main_inpt_reptdata_psnlist.rowposition, "staiud","delete");
  333. ds_main_inpt_reptdata_psnlist.setRowType(ds_main_inpt_reptdata_psnlist.rowposition, 8);
  334. //grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  335. ds_main_inpt_reptdata_psnlist.updatecontrol = true;
  336. ds_main_inpt_reptdata_psnlist.enableevent = true;
  337. }else if(grdflg == "wardlist"){
  338. ds_main_inpt_reptdata_wardlist.enableevent = false;
  339. ds_main_inpt_reptdata_wardlist.updatecontrol = false;
  340. ds_main_inpt_reptdata_wardlist.setColumn(ds_main_inpt_reptdata_wardlist.rowposition, "staiud","delete");
  341. ds_main_inpt_reptdata_wardlist.setRowType(ds_main_inpt_reptdata_wardlist.rowposition, 8);
  342. ds_main_inpt_reptdata_wardlist.updatecontrol = true;
  343. ds_main_inpt_reptdata_wardlist.enableevent = true;
  344. }else if(grdflg == "edulist"){
  345. ds_main_inpt_reptdata_edulist.enableevent = false;
  346. ds_main_inpt_reptdata_edulist.updatecontrol = false;
  347. ds_main_inpt_reptdata_edulist.setColumn(ds_main_inpt_reptdata_edulist.rowposition, "staiud","delete");
  348. ds_main_inpt_reptdata_edulist.setRowType(ds_main_inpt_reptdata_edulist.rowposition, 8);
  349. //grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  350. ds_main_inpt_reptdata_edulist.updatecontrol = true;
  351. ds_main_inpt_reptdata_edulist.enableevent = true;
  352. }else if(grdflg == "etclist"){
  353. ds_main_inpt_reptdata_etclist.enableevent = false;
  354. ds_main_inpt_reptdata_etclist.updatecontrol = false;
  355. ds_main_inpt_reptdata_etclist.setColumn(ds_main_inpt_reptdata_etclist.rowposition, "staiud","delete");
  356. ds_main_inpt_reptdata_etclist.setRowType(ds_main_inpt_reptdata_etclist.rowposition, 8);
  357. //grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  358. ds_main_inpt_reptdata_etclist.updatecontrol = true;
  359. ds_main_inpt_reptdata_etclist.enableevent = true;
  360. }else if(grdflg == "notilist"){
  361. ds_main_inpt_reptdata_notilist.enableevent = false;
  362. ds_main_inpt_reptdata_notilist.updatecontrol = false;
  363. ds_main_inpt_reptdata_notilist.setColumn(ds_main_inpt_reptdata_notilist.rowposition, "staiud","delete");
  364. ds_main_inpt_reptdata_notilist.setRowType(ds_main_inpt_reptdata_notilist.rowposition, 8);
  365. //grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  366. ds_main_inpt_reptdata_notilist.updatecontrol = true;
  367. ds_main_inpt_reptdata_notilist.enableevent = true;
  368. }
  369. }
  370. /**
  371. * @group :
  372. * @ver : 2007.08.13
  373. * @by : 하재륜
  374. * @---------------------------------------------------
  375. * @type : function
  376. * @access : public
  377. * @desc : 외래진료 현황
  378. * @param :
  379. * @return :
  380. * @---------------------------------------------------
  381. */
  382. function fCaseChange(){
  383. if(unitflg == 1){
  384. fSearch_inptlist();
  385. fSearch_specnurs();
  386. }else if(unitflg == 2){
  387. fSearch_otptlist();
  388. }
  389. }
  390. /**
  391. * @group :
  392. * @ver : 2008.06.05
  393. * @by : 하재륜
  394. * @---------------------------------------------------
  395. * @type : function
  396. * @access : public
  397. * @desc : 수술,응급,분만,신생아,HD,APU,주사 각각 조회
  398. * @param :
  399. * @return :
  400. * @---------------------------------------------------
  401. */
  402. function fSearch_specnurs(){
  403. ds_main_inpt_specnurs_oprsinfo.clearData(); // 수술 (정규,응급,통원,전체)
  404. ds_main_inpt_specnurs_oprsdetl.clearData(); // 수술 (종류,구분,건수)
  405. ds_main_inpt_specnurs_ernurs.clearData(); // 응급
  406. ds_main_inpt_specnurs_partrtn.clearData(); // 분만
  407. ds_main_inpt_specnurs_nbabycare.clearData(); // 신생아
  408. ds_main_inpt_specnurs_hdroom.clearData(); // HD
  409. ds_main_inpt_specnurs_apuroom.clearData(); // APU
  410. ds_main_inpt_specnurs_injction.clearData(); // 주사
  411. ds_send.setColumn(0, "plandd",group2.ipt_orddd.value); //업무일자
  412. ds_send.setColumn(0, "deptflg",deptflg); //특수간호
  413. ds_send.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd")); // 기관코드
  414. var oParam = {};
  415. oParam.id = "TRMNB01206";
  416. oParam.service = "wardcareapp.WardBizMngt";
  417. oParam.method = "reqGetSpecnurs";
  418. oParam.inds = "req=ds_send";
  419. oParam.outds = "ds_main_inpt_specnurs_oprsdetl=oprsdetl ds_main_inpt_specnurs_ernurs=ernurs ds_main_inpt_specnurs_partrtn=partrtn ds_main_inpt_specnurs_hdroom=hdroom ds_main_inpt_specnurs_apuroom=apuroom ds_main_inpt_specnurs_injction=injction";
  420. oParam.async = false;
  421. //oParam.callback = "cf_TRMNB01206";
  422. tranf_submit(oParam);
  423. ds_main_inpt_specnurs_oprsdetl.rowposition = -1;
  424. ds_main_inpt_specnurs_ernurs.rowposition = -1;
  425. ds_main_inpt_specnurs_partrtn.rowposition = -1;
  426. ds_main_inpt_specnurs_hdroom.rowposition = -1;
  427. ds_main_inpt_specnurs_apuroom.rowposition = -1;
  428. ds_main_inpt_specnurs_injction.rowposition = -1;
  429. }
  430. /**
  431. * @group :
  432. * @ver : 2007.08.13
  433. * @by : 하재륜
  434. * @---------------------------------------------------
  435. * @type : function
  436. * @access : public
  437. * @desc : 보고 저장
  438. * @param :
  439. * @return :
  440. * @---------------------------------------------------
  441. */
  442. function fSave_Reptrows(grdflg){
  443. if(sysf_messageBox("","Q002") != 6) return;
  444. var xReptPath;
  445. var reptcnt;
  446. var num = "";
  447. if(grdflg == "psnlist"){
  448. xReptPath = ds_main_inpt_reptdata_psnlist;
  449. reptcnt = group2.switch1.case1.grd_psnlist.rowcount;
  450. }else if(grdflg == "wardlist"){
  451. xReptPath = ds_main_inpt_reptdata_wardlist;
  452. reptcnt = group2.switch1.case2.grd_wardlist.rowcount;
  453. }else if(grdflg == "edulist"){
  454. xReptPath = ds_main_inpt_reptdata_edulist;
  455. reptcnt = group2.switch1.case3.grd_edulist.rowcount;
  456. }else if(grdflg == "etclist"){
  457. xReptPath = ds_main_inpt_reptdata_etclist;
  458. reptcnt = group2.switch1.case4.grd_etclist.rowcount;
  459. }else if(grdflg == "notilist"){
  460. xReptPath = ds_main_inpt_reptdata_notilist;
  461. reptcnt = group2.switch1.case14.grd_noti.rowcount;
  462. }
  463. for(var i=0; i<reptcnt; i++){
  464. var state = xReptPath.getColumn(i, "staiud");
  465. if (state == "insert" || state == "update" || state == "delete"){
  466. num = "";
  467. break;
  468. }else{
  469. num = "1";
  470. }
  471. }
  472. if(reptcnt < 1 || num == "1" ){
  473. sysf_messageBox("저장할 자료가 존재하지 않습니다.","I");
  474. return;
  475. }
  476. if(grdflg == "wardlist") {
  477. ds_send_sReptPath.assign(grdf_getGridUpdateData(group2.switch1.case2.grd_wardlist, "all"));
  478. } else {
  479. var sReptPath =
  480. "wardcd" //01병동코드
  481. + "▦plandd" //02계획일자
  482. + "▦plandt" //03계획시간
  483. + "▦deliveflagcd" //04전달구분
  484. + "▦delivecnts" //05내용
  485. + "▦userid" //06작성자
  486. + "▦staiud" //07상태
  487. + "▦seqno" //08시퀀스번호
  488. + "▦duty" //09todolist
  489. + "▦filenm" //파일명
  490. + "▦filesize" //파일크기
  491. + "▦filetype" //파일형식
  492. + "▦filepath" //ftp파일경로
  493. + "▩" ;
  494. var plandd = "";
  495. var seqno = "";
  496. for (var i=0;i < reptcnt; i++ ) {
  497. seqno = xReptPath.getColumn(i, "seqno");
  498. if(utlf_isNull(seqno)) {
  499. plandd = utlf_getCurrentDate();
  500. } else {
  501. plandd = utlf_transNullToEmpty(xReptPath.getColumn(i, "plandd"));
  502. }
  503. sReptPath += utlf_transNullToEmpty(xReptPath.getColumn(i, "wardcd" )) //01병동코드
  504. + "▦" + plandd //02계획일자
  505. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "plandt" )) //03계획시간
  506. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "deliveflagcd")) //04전달구분
  507. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "delivecnts" )) //05내용
  508. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "userid" )) //06작성자
  509. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "staiud" )) //07상태
  510. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "seqno" )) //08시퀀스번호
  511. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "duty" )) //09todolist
  512. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "filenm" )) //파일명
  513. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "filesize" )) //파일크기
  514. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "filetype" )) //파일형식
  515. + "▦" + utlf_transNullToEmpty(xReptPath.getColumn(i, "filepath" )) //ftp파일경로
  516. + "▩" ;
  517. }
  518. dsf_setCSVToDs("ds_send_sReptPath", sReptPath);
  519. }
  520. var oParam = {};
  521. oParam.id = "TXMNB01201";
  522. oParam.service = "wardcareapp.WardBizMngt";
  523. oParam.method = "reqExeSetRept";
  524. oParam.inds = "attach=ds_send_attach reqExeSetRept=ds_send_sReptPath:A";
  525. oParam.outds = "";
  526. oParam.async = false;
  527. //oParam.callback = "cf_TXMNB01201";
  528. tranf_submit(oParam);
  529. if(grdflg == "psnlist"){
  530. // for(i= 1 ; i <= grd_psnlist.rows ; i++){
  531. // grd_psnlist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  532. // }
  533. group2.switch1.tabindex = 1;
  534. }else if(grdflg == "wardlist"){
  535. // for(i= 1 ; i <= grd_wardlist.rows ; i++){
  536. // //grd_wardlist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  537. // }
  538. group2.switch1.tabindex = 0;
  539. }else if(grdflg == "edulist"){
  540. // for(i= 1 ; i <= grd_edulist.rows ; i++){
  541. // grd_edulist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  542. // }
  543. group2.switch1.tabindex = 2;
  544. }else if(grdflg == "etclist"){
  545. // for(i= 1 ; i <= grd_etclist.rows ; i++){
  546. // grd_etclist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  547. // }
  548. group2.switch1.tabindex = 3;
  549. }else if(grdflg == "notilist"){
  550. // for(i= 1 ; i <= grd_noti.rows ; i++){
  551. // grd_noti.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
  552. // }
  553. group2.switch1.tabindex = 4;
  554. }
  555. cnt = 2;
  556. //group2.btn_srch2.click();
  557. frmf_inputEnterKey("group2.btn_srch2", "onclick", new ClickEventInfo);//MIS DB링크로 인해..조회가 바로되지않아서 2번태움.
  558. cnt = 0;
  559. //group2.btn_srch2.click();
  560. frmf_inputEnterKey("group2.btn_srch2", "onclick", new ClickEventInfo);//MIS DB링크로 인해..조회가 바로되지않아서 2번태움.
  561. }
  562. /**
  563. * @group :
  564. * @ver : 2007.08.13
  565. * @by : 하재륜
  566. * @---------------------------------------------------
  567. * @type : function
  568. * @access : public
  569. * @desc : 화면 로드시
  570. * @param :
  571. * @return : 입력한날짜 + 날자
  572. * @---------------------------------------------------
  573. */
  574. function getAddDay(inputday,addend){
  575. var backDate ="";
  576. var rt = 0;
  577. var yyyy = inputday.substring(0,4) +"";
  578. var mm = inputday.substring(4,6) +"";
  579. var dd = inputday.substring(6,8) +"";
  580. var startDate = new Date(yyyy,(eval(mm)-1),dd);
  581. startDate.setTime(startDate.getTime()+(86400000*addend));
  582. NowYear = startDate.getYear();// 년
  583. NowMonth = startDate.getMonth()+1;// 월
  584. NowDay = startDate.getDate(); // 일
  585. backDate += NowYear ; //년도
  586. if (NowMonth < 10 ) backDate += "0" + NowMonth ;
  587. else backDate += (startDate.getMonth() + 1);
  588. if (NowDay < 10 ) backDate += "0" + NowDay ;
  589. else backDate += (startDate.getDate());
  590. return backDate ;
  591. }
  592. /**
  593. * @group :
  594. * @ver : 2007.08.13
  595. * @by : 하재륜
  596. * @---------------------------------------------------
  597. * @type : function
  598. * @access : public
  599. * @desc : 보고 조회
  600. * @param :
  601. * @return :
  602. * @---------------------------------------------------
  603. */
  604. function fSearch_reptlist(){
  605. var wardcd = dutplcecd; //세션에서 받아처리
  606. var jobrespcd = sysf_getUserInfo("jobrespcd");
  607. var jobkindcd = sysf_getUserInfo("jobkindcd");
  608. var jobposcd = sysf_getUserInfo("jobposcd");
  609. var fstdeptnm="";
  610. var deptnm ="";
  611. ds_main_inpt_reptdata_psnlist.clearData();
  612. ds_main_inpt_reptdata_wardlist.clearData();
  613. ds_main_inpt_reptdata_edulist.clearData();
  614. ds_main_inpt_reptdata_etclist.clearData();
  615. ds_main_inpt_reptdata_notilist.clearData();
  616. ds_send_attach.clearData();
  617. opt_certnm.value = "";
  618. opt_certdt.value = "";
  619. if( jobkindcd == "1140" && (jobposcd == "41" || (jobposcd == "84" && dutplcecd != "3080000000") || jobposcd == "41-1" || jobposcd == "89" || sysf_getUserInfo("userid") == "ENR" || dutplcecd == ds_codelist.lookupExpr("cdgrupid=='I11' && cdid=='"+dutplcecd+"'", "cdid") || sysf_getUserInfo("userid") == ds_codelist.lookupExpr("cdgrupid=='I10' && cdid=='"+sysf_getUserInfo("userid")+"'", "cdid")) ){//간호부와 간호행정교육팀도 전체 조회 --> 간호부장과 팀장만 전체로 보도록. 이원희 선생님경우 전부되도록.
  620. ds_send.setColumn(0, "wardcd","%"); //병동코드
  621. ds_send.setColumn(0, "authallyn","Y"); //전부서조회
  622. } else {
  623. ds_send.setColumn(0, "wardcd",wardcd); //병동코드
  624. ds_send.setColumn(0, "authallyn","N"); //전부서조회
  625. if(erdeptflag == "Y") {
  626. ds_send.setColumn(0, "authallyn", "E");
  627. }
  628. }
  629. ds_send.setColumn(0, "plandd",group2.ipt_orddd2.value); //계획일자
  630. ds_send.setColumn(0, "duty", "4"); //todo "4":All 20111018_KNUH_Start 무조건 All로 조회되도록 수정.
  631. ds_send.setColumn(0, "deliveflagcd",reptflg); //전달구분
  632. ds_send.setColumn(0, "deptflag", formPath.rdo_deptflag.value);
  633. /*if(cnt == 2) {*/
  634. var oParam = {};
  635. oParam.id = "TRMNB01204";
  636. oParam.service = "wardcareapp.WardBizMngt";
  637. oParam.method = "reqGetReptList";
  638. oParam.inds = "req=ds_send";
  639. oParam.outds = "ds_main_inpt_reptdata_psnlist=psnlist ds_main_inpt_reptdata_wardlist=wardlist ds_main_inpt_reptdata_edulist=edulist ds_main_inpt_reptdata_etclist=etclist ds_main_inpt_reptdata_notilist=notilist";
  640. oParam.async = false;
  641. //oParam.callback = "cf_TRMNB01204";
  642. tranf_submit(oParam);
  643. // } else {
  644. // var oParam = {};
  645. // oParam.id = "TRMNB01204";
  646. // oParam.service = "wardcareapp.WardBizMngt";
  647. // oParam.method = "reqGetReptList";
  648. // oParam.inds = "req=ds_send";
  649. // oParam.outds = "ds_main_inpt_reptdata_psnlist=psnlist ds_main_inpt_reptdata_wardlist=wardlist ds_main_inpt_reptdata_edulist=edulist ds_main_inpt_reptdata_etclist=etclist ds_main_inpt_reptdata_notilist=notilist";
  650. // oParam.async = false;
  651. // //oParam.callback = "cf_TRMNB01204";
  652. //
  653. // tranf_submit(oParam);
  654. // }
  655. if( utlf_isNull(ds_main_inpt_reptdata_wardlist.getColumnInfo("staiud")) ){
  656. ds_main_inpt_reptdata_wardlist.addColumn("staiud", "string");
  657. }
  658. if( utlf_isNull(ds_main_inpt_reptdata_wardlist.getColumnInfo("userid")) ){
  659. ds_main_inpt_reptdata_wardlist.addColumn("userid", "string");
  660. }
  661. if( utlf_isNull(ds_main_inpt_reptdata_psnlist.getColumnInfo("filenm")) ){
  662. ds_main_inpt_reptdata_psnlist.addColumn("filenm", "string");
  663. }
  664. if( utlf_isNull(ds_main_inpt_reptdata_psnlist.getColumnInfo("filesize")) ){
  665. ds_main_inpt_reptdata_psnlist.addColumn("filesize", "string");
  666. }
  667. if( utlf_isNull(ds_main_inpt_reptdata_psnlist.getColumnInfo("filetype")) ){
  668. ds_main_inpt_reptdata_psnlist.addColumn("filetype", "string");
  669. }
  670. if( utlf_isNull(ds_main_inpt_reptdata_psnlist.getColumnInfo("filepath")) ){
  671. ds_main_inpt_reptdata_psnlist.addColumn("filepath", "string");
  672. }
  673. if( utlf_isNull(ds_main_inpt_reptdata_edulist.getColumnInfo("filenm")) ){
  674. ds_main_inpt_reptdata_edulist.addColumn("filenm", "string");
  675. }
  676. if( utlf_isNull(ds_main_inpt_reptdata_edulist.getColumnInfo("filesize")) ){
  677. ds_main_inpt_reptdata_edulist.addColumn("filesize", "string");
  678. }
  679. if( utlf_isNull(ds_main_inpt_reptdata_edulist.getColumnInfo("filetype")) ){
  680. ds_main_inpt_reptdata_edulist.addColumn("filetype", "string");
  681. }
  682. if( utlf_isNull(ds_main_inpt_reptdata_edulist.getColumnInfo("filepath")) ){
  683. ds_main_inpt_reptdata_edulist.addColumn("filepath", "string");
  684. }
  685. if( utlf_isNull(ds_main_inpt_reptdata_etclist.getColumnInfo("filenm")) ){
  686. ds_main_inpt_reptdata_etclist.addColumn("filenm", "string");
  687. }
  688. if( utlf_isNull(ds_main_inpt_reptdata_etclist.getColumnInfo("filesize")) ){
  689. ds_main_inpt_reptdata_etclist.addColumn("filesize", "string");
  690. }
  691. if( utlf_isNull(ds_main_inpt_reptdata_etclist.getColumnInfo("filetype")) ){
  692. ds_main_inpt_reptdata_etclist.addColumn("filetype", "string");
  693. }
  694. if( utlf_isNull(ds_main_inpt_reptdata_etclist.getColumnInfo("filepath")) ){
  695. ds_main_inpt_reptdata_etclist.addColumn("filepath", "string");
  696. }
  697. ds_main_inpt_reptdata_psnlist.rowposition = -1;
  698. ds_main_inpt_reptdata_wardlist.rowposition = -1;
  699. ds_main_inpt_reptdata_edulist.rowposition = -1;
  700. ds_main_inpt_reptdata_etclist.rowposition = -1;
  701. ds_main_inpt_reptdata_notilist.rowposition = -1;
  702. if(formPath.grd_wardlist.rowcount > 0) {
  703. fstdeptnm = ds_main_inpt_reptdata_wardlist.getColumn(0, "posdeptnm");
  704. }
  705. var sExprLine = "EXPR(";
  706. for(var i = 0; i < formPath.grd_wardlist.rowcount; i++){
  707. deptnm = ds_main_inpt_reptdata_wardlist.getColumn(i, "posdeptnm");
  708. if(fstdeptnm != deptnm) {
  709. fstdeptnm = deptnm;
  710. sExprLine += "currow == "+(i-1)+" ? '1 solid #808080ff,1 solid #808080ff,1 solid #ff0000ff,1 solid #808080ff' : ";
  711. // grd_wardlist.rowStyle(i-1, "data", "border-bottom-color") = "#ff0000";
  712. // grd_wardlist.rowStyle(i-1, "data", "border-top-width") = "3";
  713. } else {
  714. sExprLine += "currow == "+(i-1)+" ? '1 solid #808080ff,1 solid #808080ff,1 solid #b0b0b0ff,1 solid #808080ff' : ";
  715. // grd_wardlist.rowStyle(i-1, "data", "border-bottom-color") = "#b0b0b0";
  716. // grd_wardlist.rowStyle(i-1, "data", "border-top-width") = "3";
  717. }
  718. }
  719. sExprLine += "'')";
  720. for( var i=3 ; i<formPath.grd_wardlist.getCellCount("Body") ; i++ ){
  721. formPath.grd_wardlist.setCellProperty("Body", i, "line", sExprLine);
  722. }
  723. }
  724. /**
  725. * @group :
  726. * @ver : 2007.08.21
  727. * @by : 하재륜
  728. * @---------------------------------------------------
  729. * @type : function
  730. * @access : public
  731. * @desc : 공지사항 저장
  732. * @param :
  733. * @return :
  734. * @---------------------------------------------------
  735. */
  736. function fSave_board(){
  737. if(sysf_messageBox("","Q002") != 6) return;
  738. var wardcd = "9999999999"; // 병동코드 모든부서가 보이게 임의로 부여.
  739. var plandd = group2.ipt_orddd2.value; //업무일자->보고일자수정
  740. var plandt = group2.ipt_orddd.value+"0000"; //계획시간 하루에 1개이기때문에 임의로 부여.
  741. var deliveflagcd = "00";
  742. var staiud;
  743. if(ds_main_inpt_board_boarddetl.getColumn(0, "staiud")=="update"){
  744. staiud = "update";
  745. }else{
  746. staiud = "insert";
  747. }
  748. ds_send.setColumn(0, "wardcd" , wardcd );
  749. ds_send.setColumn(0, "plandd" , plandd );
  750. ds_send.setColumn(0, "plandt" , plandt );
  751. ds_send.setColumn(0, "deliveflagcd" , deliveflagcd );
  752. ds_send.setColumn(0, "delivecnts" ,ds_main_inpt_board_boarddetl.getColumn(0, "delivecnts") );
  753. ds_send.setColumn(0, "staiud" ,staiud );
  754. ds_send.setColumn(0, "seqno" ,ds_main_inpt_board_boarddetl.getColumn(0, "seqno") );
  755. var oParam = {};
  756. oParam.id = "TXMNB01202";
  757. oParam.service = "wardcareapp.WardBizMngt";
  758. oParam.method = "reqExeSetRept";
  759. oParam.inds = "reqExeSetRept=ds_send";
  760. oParam.outds = "";
  761. oParam.async = false;
  762. //oParam.callback = "cf_TXMNB01202";
  763. tranf_submit(oParam);
  764. fSearch_board();
  765. }
  766. /**
  767. * @group :
  768. * @ver : 2007.08.13
  769. * @by : 하재륜
  770. * @---------------------------------------------------
  771. * @type : function
  772. * @access : public
  773. * @desc : 공지사항 조회
  774. * @param :
  775. * @return :
  776. * @---------------------------------------------------
  777. */
  778. function fSearch_board(){
  779. var wardcd = "9999999999"; //임의로 지정.
  780. // model.makeValue("/root/main/inpt/board/boarddetl/delivecnts","");
  781. // model.makeValue("/root/main/inpt/board/boarddetl/staiud","");
  782. //model.refresh();
  783. ds_main_inpt_board_boarddetl.clearData();
  784. ds_send.setColumn(0, "wardcd",wardcd); //병동코드
  785. ds_send.setColumn(0, "plandd",group2.ipt_orddd2.value); //업무일자->보고일자로수정
  786. var oParam = {};
  787. oParam.id = "TRMNB01205";
  788. oParam.service = "wardcareapp.WardBizMngt";
  789. oParam.method = "reqGetReptDetl";
  790. oParam.inds = "req=ds_send";
  791. oParam.outds = "ds_main_inpt_board_boarddetl=boarddetl";
  792. oParam.async = false;
  793. //oParam.callback = "cf_TRMNB01205";
  794. tranf_submit(oParam);
  795. if( ds_main_inpt_board_boarddetl.rowcount < 1 ){
  796. ds_main_inpt_board_boarddetl.addRow();
  797. }
  798. if ( utlf_isNull(ds_main_inpt_board_boarddetl.getColumn(0, "delivecnts")) ){
  799. ds_main_inpt_board_boarddetl.setColumn(0, "delivecnts","");
  800. ds_main_inpt_board_boarddetl.setColumn(0, "staiud","");
  801. ds_main_inpt_board_boarddetl.setColumn(0, "seqno","");
  802. }
  803. /*
  804. if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") {
  805. model.copyNode("/root/main/inpt/board","/root/temp/board");
  806. }
  807. //model.refresh();
  808. */
  809. }
  810. function fSearch_DataList(){
  811. //병동별 과별
  812. model.removenodeset("/root/main/inpt/dept/deptlist");
  813. model.removenodeset("/root/main/inpt/inptlist");
  814. //특수파트
  815. model.removenodeset("/root/main/inpt/specnurs/oprsinfo"); // 수술 (정규,응급,통원,전체)
  816. model.removenodeset("/root/main/inpt/specnurs/oprsdetl"); // 수술 (종류,구분,건수)
  817. model.removenodeset("/root/main/inpt/specnurs/ernurs"); // 응급
  818. model.removenodeset("/root/main/inpt/specnurs/partrtn"); // 분만
  819. model.removenodeset("/root/main/inpt/specnurs/nbabycare"); // 신생아
  820. model.removenodeset("/root/main/inpt/specnurs/hdroom"); // HD
  821. model.removenodeset("/root/main/inpt/specnurs/apuroom"); // APU
  822. model.removenodeset("/root/main/inpt/specnurs/injction"); // 주사
  823. //보고
  824. var wardcd = dutplcecd; //세션에서 받아처리
  825. model.removenodeset("/root/main/inpt/reptdata/psnlist");
  826. model.removenodeset("/root/main/inpt/reptdata/wardlist");
  827. model.removenodeset("/root/main/inpt/reptdata/edulist");
  828. model.removenodeset("/root/main/inpt/reptdata/etclist");
  829. //공지사항
  830. model.removenodeset("/root/main/inpt/board/boarddetl");
  831. model.removenodeset("/root/send");
  832. ds_send.setColumn(0, "orddd",ipt_orddd.value); //보고일자
  833. ds_send.setColumn(0, "plandd",ipt_orddd.value); //업무일자
  834. ds_send.setColumn(0, "deptflg",deptflg); //특수간호
  835. ds_send.setColumn(0, "wardcd",wardcd); //병동코드
  836. ds_send.setColumn(0, "deliveflagcd",reptflg); //전달구분
  837. submit("TRMNB01207");
  838. model.refresh();
  839. var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
  840. var deptengabbr = "";
  841. for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){
  842. grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false;
  843. deptengabbr = ds_main_inpt_dept_deptlist.getColumn(i, "deptengabbr");
  844. inpttitle = inpttitle +"^"+ deptengabbr;
  845. }
  846. grd_inptlist.caption = inpttitle;
  847. if(ds_main_inpt_board_boarddetl.getColumn(0, "staiud")!= "update") {
  848. model.copyNode("/root/main/inpt/board","/root/temp/board");
  849. }
  850. model.refresh();
  851. }
  852. function fSearch_InptDataList(){
  853. // fSearch_inptlist();
  854. fCaseChange();
  855. fSearch_board();
  856. var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
  857. var deptengabbr = "";
  858. for(var i = 0 ; i < group2.switch2.case5.grd_deptlist.rowcount ; i++){
  859. group2.switch2.case5.grd_inptlist.setFormatColProperty(GRD_INPTLIST_FIXCOL+i+1, "size", 35);
  860. deptengabbr = utlf_transNullToEmpty(ds_main_inpt_dept_deptlist.getColumn(i, "deptengabbr"));
  861. inpttitle = inpttitle +"^"+ deptengabbr;
  862. group2.switch2.case5.grd_inptlist.setCellProperty("Head", GRD_INPTLIST_FIXCOL+i+1, "text", deptengabbr);
  863. }
  864. //grd_inptlist.caption = inpttitle;
  865. // if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") {
  866. // model.copyNode("/root/main/inpt/board","/root/temp/board");
  867. // }
  868. // "계"항목 수술건수 포함
  869. var optotal = 0;
  870. for(var i=0; i<group2.switch2.case5.grd_inptlist.rowcount; i++){
  871. optotal += Number(ds_main_inpt_inptlist.getColumn(i, "opcnfmdd"));
  872. }
  873. ds_main_inpt_inptlist.setColumn(ds_main_inpt_inptlist.rowcount-1, "opcnfmdd", optotal);
  874. }
  875. /**
  876. * @group :
  877. * @ver :
  878. * @by : 김기용
  879. * @---------------------------------------------------
  880. * @type : function
  881. * @access : public
  882. * @desc : 그리드 별 엑셀저장
  883. * @param :
  884. * @return :
  885. * @---------------------------------------------------
  886. */
  887. function saveExcelAll(){
  888. var paramLen = saveExcelAll.arguments.length;
  889. // 마지막 인자가 Boolean일 경우 처리
  890. var extendsCaptionBool;
  891. if( typeof(saveExcelAll.arguments[paramLen - 1]) == "boolean" ) {
  892. extendsCaptionBool = saveExcelAll.arguments[paramLen - 1];
  893. paramLen = paramLen - 1;
  894. }
  895. else{
  896. extendsCaptionBool = false;
  897. }
  898. var tmpParamArray = new Array();
  899. if( extendsCaptionBool ) {
  900. for( var i = 0; i < paramLen; i++ ) {
  901. tmpParamArray[i] = saveExcelAll.arguments[i];
  902. }
  903. saveExcelAllWithCaption(tmpParamArray);
  904. }
  905. else{
  906. for( var i = 0; i < paramLen; i++ ) {
  907. tmpParamArray[i] = saveExcelAll.arguments[i];
  908. }
  909. saveExcelAllWithNotCaption(tmpParamArray);
  910. }
  911. }
  912. function saveExcelAllWithCaption( sheetArray ) {
  913. // alert(gridCaptionArray);
  914. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
  915. if( fileName == "" )
  916. return;
  917. // var sheetArray = new Array("grd_bizprescondstats|업무현황", "grd_patprescondstats|환자현황", "grd_hdstatsinfo|혈액투석현황", "grd_pdstatsinfo|복막투석현황", "grd_pdbizstatsinfo|복막투석업무현황");
  918. var sheetArrayLen = sheetArray.length;
  919. var gridId;
  920. var gridObj;
  921. for( var i = 0; i < sheetArray.length; i++ ) {
  922. gridId = sheetArray[i].split("|")[0];
  923. gridObj = document.all.item(gridId);
  924. // saveText() 함수는 Caption저장이 불가능 하여 SaveExcel()을 이용한다.
  925. gridObj.saveExcel("C:\\Temp\\tmp_TFExcel_" + i +".xls");
  926. }
  927. // excel application 실행함
  928. tfexcel.launchnewinstance(0);
  929. //실행된 excel application에서 새로운 workbook을 생성
  930. tfexcel.createworkbook();
  931. tfexcel.activatesheet(1);
  932. var sheetName;
  933. var nResult;
  934. for( var i = 0; i < sheetArrayLen; i++ )
  935. {
  936. sheetName = sheetArray[i].split("|")[1];
  937. if( i > 1 ) {
  938. nResult = tfexcel.activatesheet(i+1);
  939. tfexcel.sheetname(i+1) = sheetName;
  940. }
  941. else {
  942. nResult = tfexcel.addsheet(i+1, sheetName);
  943. }
  944. if( nResult < 0 ) {
  945. sysf_messageBox(sheetName + " 저장을", "E009");
  946. // alert(sheetName + " 오류발생");
  947. return;
  948. }
  949. tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel_" + i + ".xls");
  950. }
  951. //tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel.xls");
  952. //workbook을 저장.
  953. tfexcel.save(fileName);
  954. //excel application을 종료. excel application 생성 후 반드시 close해야함.
  955. tfexcel.close();
  956. var fso = new ActiveXObject("Scripting.FileSystemObject");
  957. for( var i = 0; i < sheetArrayLen; i++ ) {
  958. fso.DeleteFile("C:\\Temp\\tmp_TFExcel_" + i + ".xls");
  959. }
  960. var rmsg = sysf_messageBox("저장된 Excel을", "Q004");
  961. // var rmsg = window.alert("저장된 Excel을 실행하시겠습니까?", "알림", 36);
  962. if( rmsg == 6 )
  963. window.exec("excel.exe", '\"' + fileName + '\"');
  964. }
  965. // 지표관리 조회
  966. function fSearch_idctlist(){
  967. var dept = ""
  968. ds_main_idct_idctdlist.clearData();
  969. ds_main_idct_idctelist.clearData();
  970. ds_main_idct_idctnlist.clearData();
  971. ds_main_idct_rptlist.clearData();
  972. if ( utlf_isNull(ds_temp.getColumn(0, "recdd")) ){
  973. sysf_messageBox("작성일자","I003");//필수입력입니다
  974. return;
  975. }
  976. if(utlf_isNull(ds_temp.getColumn(0, "deptcd"))){
  977. dept = dutplcecd;
  978. }else{
  979. dept = ds_temp.getColumn(0, "deptcd");
  980. }
  981. ds_send_reqdata.setColumn(0, "deptcd", dept );
  982. ds_send_reqdata.setColumn(0, "recdd", ds_temp.getColumn(0, "recdd") );
  983. var oParam = {};
  984. oParam.id = "TRMNB01211";
  985. oParam.service = "wardcareapp.WardBizMngt";
  986. oParam.method = "reqGetIdctList";
  987. oParam.inds = "reqdata=ds_send_reqdata";
  988. oParam.outds = "ds_main_idct_idctdlist=idctdlist ds_main_idct_idctelist=idctelist ds_main_idct_idctnlist=idctnlist ds_main_idct_rptlist=rptlist";
  989. oParam.async = false;
  990. //oParam.callback = "cf_TRMNB01211";
  991. tranf_submit(oParam);
  992. ds_main_idct_idctdlist.rowposition = -1;
  993. ds_main_idct_idctelist.rowposition = -1;
  994. ds_main_idct_idctnlist.rowposition = -1;
  995. ds_main_idct_rptlist.rowposition = -1;
  996. }
  997. // 지표관리 저장
  998. function fSave_Idctrows(grdflg){
  999. if(sysf_messageBox("","Q002") != 6) return;
  1000. var xIdctPath;
  1001. var idctgrd;
  1002. var updtdata = "Y";
  1003. var duty = "";
  1004. var recdt = utlf_getCurrentDate()+utlf_getCurrentTime().substring(0,4);
  1005. var dept = "";
  1006. if(grdflg == "idctdlist"){
  1007. xIdctPath = ds_main_idct_idctdlist;
  1008. idctgrd = group3.grd_idctdlist;
  1009. duty = 1;
  1010. }else if(grdflg == "idctelist"){
  1011. xIdctPath = ds_main_idct_idctelist;
  1012. idctgrd = group3.grd_idctelist;
  1013. duty = 2;
  1014. }else if(grdflg == "idctnlist"){
  1015. xIdctPath = ds_main_idct_idctnlist;
  1016. idctgrd = group3.grd_idctnlist;
  1017. duty = 3;
  1018. }
  1019. if(utlf_isNull(ds_temp.getColumn(0, "deptcd"))){
  1020. dept = dutplcecd;
  1021. }else{
  1022. dept = ds_temp.getColumn(0, "deptcd");
  1023. }
  1024. xIdctPath.enableebent = false;
  1025. xIdctPath.updatecontrol = false;
  1026. grdf_setStatusColumn(xIdctPath, "status");
  1027. ds_send_savedata_idctinfo.clearData();
  1028. for (var i = 0 ; i < idctgrd.rowcount; i++) {
  1029. if( xIdctPath.getRowType(i) == 2 || xIdctPath.getRowType(i) == 4 || xIdctPath.getRowType(i) == 8 ){
  1030. var nRow = ds_send_savedata_idctinfo.addRow();
  1031. ds_send_savedata_idctinfo.copyRow(nRow, xIdctPath, i);
  1032. ds_send_savedata_idctinfo.setColumn(nRow, "deptcd",dept);
  1033. ds_send_savedata_idctinfo.setColumn(nRow, "duty", duty);
  1034. ds_send_savedata_idctinfo.setColumn(nRow, "recdd", ds_temp.getColumn(0, "recdd"));
  1035. ds_send_savedata_idctinfo.setColumn(nRow, "recdt", recdt);
  1036. }
  1037. }
  1038. xIdctPath.updatecontrol = true;
  1039. xIdctPath.enableebent = true;
  1040. var oParam = {};
  1041. oParam.id = "TXMNB01211";
  1042. oParam.service = "wardcareapp.WardBizMngt";
  1043. oParam.method = "reqExeSetIdct";
  1044. oParam.inds = "savedata=ds_send_savedata_idctinfo";
  1045. oParam.outds = "";
  1046. oParam.async = false;
  1047. //oParam.callback = "cf_TXMNB01211";
  1048. tranf_submit(oParam);
  1049. group3.btn_idct.click();
  1050. }
  1051. // 지표관리 삭제
  1052. function fDel_Idctrows(grdflg){
  1053. var idctchk;
  1054. var idctgrd;
  1055. var xIdctPath;
  1056. if(grdflg == "idctdlist"){
  1057. idctchk = group3.grd_idctdlist.currentrow;
  1058. idctgrd = group3.grd_idctdlist;
  1059. xIdctPath = ds_main_idct_idctdlist;
  1060. }else if(grdflg == "idctelist"){
  1061. idctchk = group3.grd_idctelist.currentrow;
  1062. idctgrd = group3.grd_idctelist;
  1063. xIdctPath = ds_main_idct_idctelist;
  1064. }else if(grdflg == "idctnlist"){
  1065. idctchk = group3.grd_idctnlist.currentrow;
  1066. idctgrd = group3.grd_idctnlist;
  1067. xIdctPath = ds_main_idct_idctnlist;
  1068. }
  1069. xIdctPath.enableevent = false;
  1070. xIdctPath.updatecontrol = false;
  1071. if(grdflg == "idctdlist"){
  1072. if ( !utlf_isNull(xIdctPath.getColumn(idctchk, "seqno")) ) {
  1073. xIdctPath.setRowType(xIdctPath.rowposition, 8);
  1074. }else{
  1075. sysf_messageBox("삭제 할 자료가 ","I004");
  1076. return;
  1077. }
  1078. }else if(grdflg == "idctelist"){
  1079. if ( !utlf_isNull(xIdctPath.getColumn(idctchk, "seqno")) ) {
  1080. xIdctPath.setRowType(xIdctPath.rowposition, 8);
  1081. }else{
  1082. sysf_messageBox("삭제 할 자료가 ","I004");
  1083. return;
  1084. }
  1085. }else if(grdflg == "idctnlist"){
  1086. if ( !utlf_isNull(xIdctPath.getColumn(idctchk, "seqno")) ) {
  1087. xIdctPath.setRowType(xIdctPath.rowposition, 8);
  1088. }else{
  1089. sysf_messageBox("삭제 할 자료가 ","I004");
  1090. return;
  1091. }
  1092. }
  1093. xIdctPath.updatecontrol = true;
  1094. xIdctPath.enableevent = true;
  1095. }
  1096. // 본원 NEW 24시간 업무보고 저장
  1097. function fSave_Reptrows2(){
  1098. if(sysf_messageBox("","Q002") != 6) return;
  1099. var updtdata = grdf_getGridUpdateData(formPath.grd_wardlist, "all") ;
  1100. ds_send_sReptPath.assign(updtdata);
  1101. if(utlf_isNull(updtdata) || updtdata.rowcount < 1){
  1102. sysf_messageBox("저장할 자료가 존재하지 않습니다.","I");
  1103. return;
  1104. }
  1105. var oParam = {};
  1106. oParam.id = "TXMNB01201";
  1107. oParam.service = "wardcareapp.WardBizMngt";
  1108. oParam.method = "reqExeSetRept";
  1109. oParam.inds = "attach=ds_send_attach reqExeSetRept=ds_send_sReptPath:A";
  1110. oParam.outds = "";
  1111. oParam.async = false;
  1112. //oParam.callback = "cf_TXMNB01201";
  1113. tranf_submit(oParam);
  1114. fSearch_reptlist();
  1115. }
  1116. // 본원 NEW 일별 부서 현황 조회
  1117. function fSearch_InptDataList2(){
  1118. fCaseChange();
  1119. //fSearch_board();
  1120. var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
  1121. var deptengabbr = "";
  1122. for(var i = 0 ; i < group2.switch2.case5.grd_deptlist.rowcount ; i++){
  1123. group2.switch2.case5.grd_inptlist.setFormatColProperty(GRD_INPTLIST_FIXCOL+i+1, "size", 35);
  1124. deptengabbr = utlf_transNullToEmpty(ds_main_inpt_dept_deptlist.getColumn(i, "deptengabbr"));
  1125. inpttitle = inpttitle +"^"+ deptengabbr;
  1126. group2.switch2.case5.grd_inptlist.setCellProperty("Head", GRD_INPTLIST_FIXCOL+i+1, "text", deptengabbr);
  1127. }
  1128. //grd_inptlist.caption = inpttitle;
  1129. // "계"항목 수술건수 포함
  1130. var optotal = 0;
  1131. for(var i=0; i<group2.switch2.case5.grd_inptlist.rowcount; i++){
  1132. optotal += Number(ds_main_inpt_inptlist.getColumn(i, "opcnfmdd"));
  1133. }
  1134. //model.makeValue("/root/main/inpt/inptlist["+(grd_inptlist.rows-1)+"]/opcnfmdd", optotal);
  1135. }
  1136. ]]></Script>