/** * ÆÄ ÀÏ ¸í : SMADT10200.js * ¼³ ¸í : º´µ¿ ó¹æÀü/¶óº§ Ãâ·Â, º´µ¿ ¸¶°¨ Javascript * ¼³ °è ÀÚ : °øµÎ°æ * ÀÛ ¼º ÀÚ : °øµÎ°æ * ¼öÁ¤ÀÌ·Â : 2006.6.28 / ¼öÁ¤ÀÛ¼º / °øµÎ°æ */ //Á¶È¸Á¶°Ç¿¡ ¸Â´Â µ¥ÀÌÅͰ¡ ÀÖ´ÂÁö¸¦ chk var chk_drugno = 0; var chk_wardcd = 0; var chk_pid = 0; var chk_prnt_count = 0; var chk_sum_count = 0; var chk_count = 0; var gTimer = null; var gTimer2 = null; var gT1 = null; var sleepTime= 1000; var chk_cnt = 0; /** * ÃʱâÈ­ */ function fInit() { if (model.getValue("/root/hidden/prcpsrch/prcpdd") == "") { // ³¯Â¥ ÃʱâÈ­ model.makeValue("/root/hidden/srchinfo/prcpdd", getCurrentDate()); } //󹿱¸ºÐ ÃʱâÈ­ model.makeValue("/root/hidden/srchinfo/prcpflag", "A"); //¾àÁֻ籸ºÐ ÃʱâÈ­ model.makeValue("/root/hidden/srchinfo/drugkind", "T"); //¶óº§ üũ ÃʱâÈ­ model.makeValue("/root/hidden/srchinfo/lblyn", "Y"); fChkLBL_YN(); //ó¹æÀü üũ ÃʱâÈ­ model.makeValue("/root/hidden/srchinfo/mpsflag", "P"); //±âŸÁ¶È¸±¸ºÐ ÃʱâÈ­ model.makeValue("/root/hidden/srchinfo/etcflag", "T"); cbx_etcdescflag.disabled = true; //¸¶°¨½Ã instcd Àû¿ëÀ» À§ÇØ instcd ÃʱâÈ­ // model.setValue("/root/hidden/srchinfo/instcd", getUserInfo("posinstcd")); var dutplceinstcd = getUserInfo("dutplceinstcd"); if(dutplceinstcd == ""){ dutplceinstcd = "012"; } model.makeValue("/root/hidden/srchinfo/instcd", dutplceinstcd); //makeReportPreview(0,270,820,700); //º´µ¿ Combo Á¶È¸ model.setValue("/root/send/deptinfo/deptflag", "W"); submit("TRADT10203"); astfAddCombo("/root/hidden/deptlist", "ward", "wardcd,wardnm", "T,Àüü"); //ÀÚµ¿Ãâ·Â±¸ºÐ ÃʱâÈ­ btn_autoprnt_start.disabled = false; btn_autoprnt_end.disabled = true; //model.setValue("/root/hidden/srchinfo/auto_selflag", "1"); //chk_auto_big.disabled = false; //chk_auto_small.disabled = true; //model.setValue("/root/hidden/srchinfo/auto_bigflag", "E|L|G"); //model.setValue("/root/hidden/srchinfo/auto_smallflag", ""); //20100412 Ȳ¼¼¿ø ¼öÁ¤ º´½ÇÄ÷³ submit("TRADT10213"); if(model.getValue("init/roomyn/roomyn/roomyn")=="Y") { grd_patlist.colHidden(5) = false; model.makeValue("/root/hidden/srchinfo/atc3", "Y"); } else { model.makeValue("/root/hidden/srchinfo/atc3", "N"); grd_patlist.colHidden(5) = true; } model.refresh(); /*/ º´½ÇÄ÷³ if(dutplceinstcd == "013") { grd_patlist.colHidden(5) = false; model.makeValue("/root/hidden/srchinfo/atc3", "Y"); } else { model.makeValue("/root/hidden/srchinfo/atc3", "N"); grd_patlist.colHidden(5) = true; } model.refresh(); */ //¸¶°¨½Ã°£±¸ºÐ model.makeValue("/root/send/sumlistinfo/prcpflag", "A"); submit("TRADT10206"); cmb_sumtmflag.select(0); //ó¹æÀü °¨»çÈ­¸é¿¡¼­ ÆË¾÷À¸·Î ¿­¶§ µ¥ÀÌÅÍ Á¶È¸ if(model.getValue("/root/hidden/popupinfo/drugno") != ""){ model.setValue("/root/hidden/srchinfo/prcpdd", model.getValue("/root/hidden/popupinfo/prcpdd")); model.setValue("/root/hidden/srchinfo/fst_drugno", model.getValue("/root/hidden/popupinfo/drugno")); model.setValue("/root/hidden/srchinfo/pid", model.getValue("/root/hidden/popupinfo/pid")); //model.setValue("/root/hidden/srchinfo/ward", model.getValue("/root/hidden/popupinfo/ward")); model.refresh(); fInSumList(); } //¹ÙÄÚµåÇÁ¸°Åͼ³Á¤ ÃʱâÈ­ model.setValue("/root/send/scrnid", getScreenID()); submit("TRLLC90101"); var comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm"); var prntkind = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind"); if(comm == "2") { model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm", "1"); } if(prntkind == "1") { model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind", "5"); } //Ãß°¡¸¶°¨½Ã admission°ú º´µ¿ÀÀ±ÞÀ» ÇÔ²² ¸¶°¨ÇÒÁö ¿©ºÎ Á¶È¸ , ATC¼øÀ¸·Î Á¤·Ä üũ ¿©ºÎ submit("TRADT10207"); if(model.getValue("/root/init/sumprcpflagyn/flagyn/orderbyatc") == "Y") { model.setValue("/root/hidden/srchinfo/orderbyatc", "Y"); model.refresh(); } //¶óº§ Ãâ·Â Çü½Ä ¿É¼Ç submit("TRADT10208"); if(model.getValue("/root/init/lbltype/item2/lbltype") == "Y") { button4.visible = true; button6.visible = true; //checkbox8.visible = true; 20090812 ÁÖ¼®Ã³¸® ÃßÈÄÇùÈñÈÄ ¼öÁ¤ } else { button4.visible = false; button6.visible = false; //checkbox8.visible = false; 20090812 ÁÖ¼®Ã³¸® ÃßÈÄÇùÈñÈÄ ¼öÁ¤ } // Ãâ°íºÎ¼­ Á¶È¸, ¼³Á¤ 2009.09.07 pymi submit("TRADT01106"); if((dutplceinstcd == "013") || (dutplceinstcd == "014") || (dutplceinstcd == "017")) { combo1.select(0); } else if(dutplceinstcd == "012") { combo1.select(2); } else { combo1.select(1); } chk_cnt ++; model.setValue("/root/temp/stocdeptcd", model.getValue("/root/hidden/srchinfo/stocdeptcd")); combo1.refresh(); // (e) } /** * ¶óº§ º¯°æ½Ã ó¸® */ function fChkLBL_YN() { var chk = model.getValue("/root/hidden/srchinfo/lblyn"); var sLbl_Drug = "D|DT|DX|DE|DH"; var sLbl_Inj = "I|IO|IX|IE|IH"; if(chk == "Y"){ model.makeValue("/root/hidden/srchinfo/lbl_drug", sLbl_Drug); model.makeValue("/root/hidden/srchinfo/lbl_inj", sLbl_Inj); model.makeValue("/root/hidden/srchinfo/drugall", "Y"); model.makeValue("/root/hidden/srchinfo/injall", "Y"); } else { model.makeValue("/root/hidden/srchinfo/lbl_drug", ""); model.makeValue("/root/hidden/srchinfo/lbl_inj", ""); model.makeValue("/root/hidden/srchinfo/drugall", ""); model.makeValue("/root/hidden/srchinfo/injall", ""); } model.refresh(); } /** * ¸¶°¨¸®½ºÆ® Á¶È¸ */ function fInSumList() { chk_ward.visible = false; if(model.getValue("/root/hidden/srchinfo/autoprntflag") == "" && model.getValue("/root/hidden/srchinfo/prcpflag") == ""){ messageBox("󹿱¸ºÐÀ»", "C001") return; } model.copyNode("/root/send/sumlistinfo", "/root/hidden/srchinfo"); submit("TRADT10201"); grd_sumlist.isSelected(grd_sumlist.fixedRows) = true; grd_sumlist.row = grd_sumlist.fixedRows; if(grd_sumlist.Rows > 1){ fPrntPatList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·ÂȯÀÚµ¥ÀÌÅÍ Á¶È¸ } else { model.removeNodeset("/root/main/patlist/patlist"); model.refresh(); } } /** * º´µ¿ ¸¶°¨ */ function fHosInSum(chk) { var prcpflag = model.getValue("/root/hidden/srchinfo/prcpflag"); var prcpdd = model.getValue("/root/hidden/srchinfo/prcpdd"); var instcd = model.getValue("/root/hidden/srchinfo/instcd"); var pid = model.getValue("/root/hidden/srchinfo/pid"); var drugkind = model.getValue("/root/hidden/srchinfo/drugkind"); var onlyantis = model.getValue("/root/hidden/srchinfo/onlyantis"); var prcpflagnm = rdo_prcp.label; var chkret = 0; var fromddflag = ""; var fromdd = ""; var fromtm = ""; var toddflag = ""; var todd = ""; var totm = ""; if(chk == "Y") { fromddflag = model.getValue("/root/hidden/srchinfo/fromddflag"); fromtm = model.getValue("/root/hidden/srchinfo/fromtm"); toddflag = model.getValue("/root/hidden/srchinfo/toddflag"); totm = model.getValue("/root/hidden/srchinfo/totm"); if ( prcpflag =="R" || prcpflag =="A" ){ if( fromddflag == "" || fromtm == "" || toddflag == "" || totm == "" || fromtm.length != 4 || totm.length != 4) { messageBox("¸¶°¨±¸ºÐÀÌ À߸ø", "E005"); return; } else { if(fromddflag == "0") { fromdd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ; } else { fromdd = prcpdd ; } if(toddflag == "0") { todd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ; } else { todd = prcpdd ; } fromtm = fromtm + "00"; totm = totm + "59"; } } else { fromdd = "" ; todd = "" ; fromtm =""; totm =""; } chkret = messageBox(prcpflagnm + "¸¶°¨À»", "Q004"); } else { chkret = 6; } if(chkret == 6){ if(chk == "Y") { model.setValue("/root/send/suminfo/fromdd", fromdd); model.setValue("/root/send/suminfo/fromtm", fromtm); model.setValue("/root/send/suminfo/todd", todd); model.setValue("/root/send/suminfo/totm", totm); } else { model.setValue("/root/send/suminfo/fromdd", ""); model.setValue("/root/send/suminfo/fromtm", ""); model.setValue("/root/send/suminfo/todd", ""); model.setValue("/root/send/suminfo/totm", ""); } model.setValue("/root/send/suminfo/sumdt", getCurrentDateTime().replace(" ", "")); model.setValue("/root/send/suminfo/prcpdd", prcpdd); model.setValue("/root/send/suminfo/prcpflag", prcpflag); model.setValue("/root/send/suminfo/instcd", instcd); model.setValue("/root/send/suminfo/pid", pid); model.setValue("/root/send/suminfo/sumdrugkind", drugkind); model.setValue("/root/send/suminfo/onlyantis", onlyantis); model.setValue("/root/send/suminfo/mstocdeptcd", model.getValue("/root/hidden/srchinfo/stocdeptcd")); // 2009.09.11 pymi model.setValue("/root/send/suminfo/ioflag", "I"); model.makeValue("/root/send/suminfo/multiyn", model.getValue("/root/hidden/srchinfo/multiyn")); //multi day ó¹æ Æ÷ÇÔ ¿©ºÎ submit("TXADT10201"); for(var i = 0 ; i < 15; i++) { submit("TXADT10201"); } //Ãß°¡¸¶°¨½Ã flayn=YÀ̸é admission°ú º´µ¿ÀÀ±Þµµ ¸¶°¨À» ÇÑ´Ù. if(chk == "Y" && prcpflag == "A" && model.getValue("/root/init/sumprcpflagyn/flagyn/flagyn") == "Y") { model.setValue("/root/send/suminfo/prcpflag", "M"); for(var i = 0 ; i < 5; i++) { submit("TXADT10201"); } model.setValue("/root/send/suminfo/prcpflag", "W"); for(var i = 0 ; i < 5; i++) { submit("TXADT10201"); } } if (model.getValue("/root/hidden/srchinfo/prcpflag")=="L" || model.getValue("/root/hidden/srchinfo/prcpflag")=="G") { model.setValue("/root/send/suminfo/prcpdd", prcpdd); model.setValue("/root/send/suminfo/prcpflag", prcpflag); model.setValue("/root/send/suminfo/instcd", instcd); model.setValue("/root/send/suminfo/pid", pid); model.setValue("/root/send/suminfo/ioflag", "O"); for(var i = 0 ; i < 5; i++) { submit("TXADT10201"); } } } } /** * ¸¶°¨¸®½ºÆ® ´õºíŬ¸¯½Ã Ãâ·ÂÇÒ È¯ÀÚ¸®½ºÆ® Á¶È¸ */ function fPrntPatList() { grd_patlist.rebuildStyle(); if(model.getValue("/root/main/sumlist/sumlist["+grd_sumlist.row+"]/sumdt") != ""){ model.copyNode("/root/send/patlistinfo","/root/main/sumlist/sumlist["+grd_sumlist.row+"]"); model.makeValue("/root/send/patlistinfo/prcpdd", model.getValue("/root/hidden/srchinfo/prcpdd")); model.makeValue("/root/send/patlistinfo/fst_drugno", model.getValue("/root/hidden/srchinfo/fst_drugno")); model.makeValue("/root/send/patlistinfo/last_drugno", model.getValue("/root/hidden/srchinfo/last_drugno")); model.makeValue("/root/send/patlistinfo/wardcd", model.getValue("/root/hidden/srchinfo/wardcd")); model.makeValue("/root/send/patlistinfo/pid", model.getValue("/root/hidden/srchinfo/pid")); model.makeValue("/root/send/patlistinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/autoprntflag")); model.makeValue("/root/send/patlistinfo/etcdescflag", model.getValue("/root/hidden/srchinfo/etcdescflag")); model.makeValue("/root/send/patlistinfo/prntkind", model.getValue("/root/hidden/srchinfo/prntkind")); model.makeValue("/root/send/patlistinfo/autolblyn", model.getValue("/root/hidden/srchinfo/autolblyn")); model.makeValue("/root/send/patlistinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag")); model.makeValue("/root/send/patlistinfo/orderbyatc", model.getValue("/root/hidden/srchinfo/orderbyatc")); model.makeValue("/root/send/patlistinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd")); model.makeValue("/root/send/patlistinfo/atc3", model.getValue("/root/hidden/srchinfo/atc3")); model.makeValue("/root/send/patlistinfo/autoyn", model.getValue("/root/hidden/srchinfo/autoyn")); submit("TRADT10202"); if(model.getValue("/root/hidden/srchinfo/fst_drugno") != ""){ model.setValue("/root/main/patlist/patlist/sel", "Y"); } //sortNodeList("") } } /** * ó¹æÀü/¶óº§ Ãâ·Â */ function fPrcpMPSPrint( flag ) { //Åõ¾à¹øÈ£·Î Ãâ·Â var sDrugNo = model.getValue("/root/hidden/srchinfo/fst_drugno"); sleepTime = model.getValue("/root/hidden/sleeptime") * 1000; /*if(sDrugNo != "" && chk_prnt_count == 0){ fAutoPrnt(); return; }*/ chk_prnt_count = 0; //ó¹æÀü ¹× ¶óº§ Ãâ·Â var chk_mpsflag = model.getValue("/root/hidden/srchinfo/mpsflag"); var chk_lblyn = model.getValue("/root/hidden/srchinfo/lblyn"); var chk_lbl_drug = model.getValue("/root/hidden/srchinfo/lbl_drug"); var chk_lbl_inj = model.getValue("/root/hidden/srchinfo/lbl_inj"); grd_patlist.rebuildStyle(); if (chk_mpsflag != "" || chk_lblyn != "") { //ó¹æÀü Ãâ·Â µ¥ÀÌÅÍ Á¶È¸ var cnt = 0; for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){ if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){ model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]"); if(chk_lbl_drug != "" && chk_lbl_inj != ""){ model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_drug+"|"+chk_lbl_inj); } else if(chk_lbl_drug != ""){ model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_drug); } else if(chk_lbl_inj != ""){ model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_inj); } model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag")); model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag")); model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn")); model.makeValue("/root/send/prcpinfo/ioflag", "I"); var drugno = model.getValue("/root/send/prcpinfo/drugno"); var wardcd = model.getValue("/root/send/prcpinfo/wardcd"); var pid = model.getValue("/root/send/prcpinfo/pid"); //alert(flag); if ( flag =="M" || flag == null ){ //ó¹æÀü Ãâ·Â // if (chk_mpsflag != "" && fChkParam(drugno, wardcd, pid) == true) { if (chk_mpsflag != "" ) { //var gT1 = window.setInterval("fHosInMPSPrint()",10000); //window.clearinterval(gT1); //gT1 = window.setInterval("fStopTimer()",100000); fSleep(sleepTime); fHosInMPSPrint(); } } if ( flag =="L" || flag == null ){ //¶óº§ Ãâ·Â // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) { if (chk_lblyn != "" ) { fSleep(sleepTime); fHosInLBLPrint(); } } if ( flag =="Q" ){ //¶óº§ Ãâ·Â // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) { if (chk_lblyn != "" ) { fSleep(sleepTime/2); fLiquidLBLPrint(); } } if ( flag =="O" ){ //¶óº§ Ãâ·Â // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) { if (chk_lblyn != "" ) { fSleep(sleepTime/2); fOutLBLPrint(); } } if ( flag =="P" ){ //¶óº§ Ãâ·Â // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) { if (chk_lblyn != "" ) { fSleep(sleepTime/2); fPTPLBLPrint(); } } cnt++; if (model.getValue("/root/hidden/srchinfo/autoyn") !="Y") { //Ãâ·Â»óÅ ǥ½Ã for ( var j = 0 ; j < grd_patlist.cols -1; j++){ grd_patlist.cellStyle("background-color", i, j) = "#cfffcf"; //grd_patlist.cellStyle("font-weight", i, j) = "bold"; } grd_patlist.refresh(); } } } if( cnt == 0 && gTimer == null){ messageBox("ó¹æÀüÀ» Ãâ·ÂÇÒ È¯ÀÚ¸®½ºÆ®°¡ ¾ø°Å³ª ¼±ÅÃµÈ È¯ÀÚ°¡", "I004"); } model.setValue("/root/send/atcinfo/drugdd", model.getValue("/root/hidden/srchinfo/prcpdd")); if ( model.getValue("/root/hidden/srchinfo/prcpflag") =="L" ) { model.setValue("/root/send/atcinfo/drugflag", "L"); } else if ( model.getValue("/root/hidden/srchinfo/prcpflag") =="E" ) { model.setValue("/root/send/atcinfo/drugflag", "E"); } else { model.setValue("/root/send/atcinfo/drugflag", "I"); } if (model.getValue("/root/hidden/srchinfo/autoatcyn") =="Y") { model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd")); submit("TXADT10202"); //ATC Data Àü¼Û(¹èġȣÃâ) } } } function fStopTimer() { window.clearinterval(gT1); } /** * ó¹æÀü Ãâ·Â */ function fHosInMPSPrint() { var sParam = ""; sParam = "drugdd¢Ëdrugno¢Ëioflag¢Ëprcpdd¢Ëorddd¢Ëcretno¢Ëprcpgenrflag¢Ëpid¢Ëorddeptcd¢Ëwardcd¢Ëlblflag¢Ëprcpflag¢Ëprntflag¢Ëetcdescflag¢Ëreyn¢Ëautoyn¢Ëreprintyn¢Ì"; sParam += model.getValue("/root/send/prcpinfo/drugdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/ioflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/cretno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpgenrflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/pid")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddeptcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/wardcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/lblflag")+"¢Ë"+ //model.getValue("/root/send/prcpinfo/prcpflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prntflag")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/etcdescflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/reyn")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/autoyn") +"¢Ë"+ model.getValue("/root/send/prcpinfo/reprintyn")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/stocdeptcd")+"¢Ì"; // 2009.09.08 pymi model.setAttribute("params", sParam); modal("SPADT62200",0,200,200,"",""); model.setAttribute("params", ""); return 0; } /** * ¶óº§ Ãâ·Â */ function fHosInLBLPrint() { var sParam = ""; sParam = "drugdd¢Ëdrugno¢Ëioflag¢Ëprcpdd¢Ëorddd¢Ëcretno¢Ëprcpgenrflag¢Ëpid¢Ëorddeptcd¢Ëwardcd¢Ëlblflag¢Ëprcpflag¢Ëprntflag¢Ëliquidflag¢Ëetcdescflag¢Ëlblkind¢Ëoutlblyn¢Ëptplblyn¢Ëreprintyn¢Ëlbltype¢Ëdrugkind¢Ëautolblyn¢Ì"; sParam += model.getValue("/root/send/prcpinfo/drugdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/ioflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/cretno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpgenrflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/pid")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddeptcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/wardcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/lblflag")+"¢Ë"+ //model.getValue("/root/send/prcpinfo/prcpflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prntflag")+"¢Ë"+ ""+"¢Ë"+ model.getValue("/root/hidden/srchinfo/etcdescflag")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/lblkind")+"¢Ë"+ ""+"¢Ë"+ ""+"¢Ë"+ model.getValue("/root/send/prcpinfo/reprintyn")+"¢Ë"+ model.getValue("/root/init/lbltype/item/lbltype")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/drugkind")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/autoyn")+"¢Ì"; model.setAttribute("params", sParam); model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup"); modal("SPADT62300",0,200,200,"SPADT62300","/root/init/barcdprntsetup","/root/init/barcdprntsetup"); model.setAttribute("params", ""); // submit("TRADT10205"); return 0; } /** * ¹°¾à ¶óº§ Ãâ·Â */ function fLiquidLBLPrint() { //ó¹æÀü Ãâ·Â µ¥ÀÌÅÍ Á¶È¸ var cnt = 0; for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){ if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){ model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]"); model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag")); model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag")); model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn")); model.makeValue("/root/send/prcpinfo/ioflag", "I"); var drugno = model.getValue("/root/send/prcpinfo/drugno"); var wardcd = model.getValue("/root/send/prcpinfo/wardcd"); var pid = model.getValue("/root/send/prcpinfo/pid"); var sParam = ""; sParam = "drugdd¢Ëdrugno¢Ëioflag¢Ëprcpdd¢Ëorddd¢Ëcretno¢Ëprcpgenrflag¢Ëpid¢Ëorddeptcd¢Ëwardcd¢Ëlblflag¢Ëprcpflag¢Ëprntflag¢Ëliquidflag¢Ëetcdescflag¢Ëlblkind¢Ëoutlblyn¢Ëptplblyn¢Ëreprintyn¢Ëlbltype¢Ëdrugkind¢Ëautolblyn¢Ì"; sParam += model.getValue("/root/send/prcpinfo/drugdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/ioflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/cretno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpgenrflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/pid")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddeptcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/wardcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/lblflag")+"¢Ë"+ //model.getValue("/root/send/prcpinfo/prcpflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prntflag")+"¢Ë"+ "Y"+"¢Ë"+ model.getValue("/root/hidden/srchinfo/etcdescflag")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/lblkind")+"¢Ë"+ ""+"¢Ë"+ ""+"¢Ë"+ model.getValue("/root/send/prcpinfo/reprintyn")+"¢Ë"+ model.getValue("/root/init/lbltype/item/lbltype")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/drugkind")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/autoyn")+"¢Ì"; model.setAttribute("params", sParam); model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup"); modal("SPADT62300",0,200,200,"SPADT62300","/root/init/barcdprntsetup","/root/init/barcdprntsetup"); model.setAttribute("params", ""); //fSleep(sleepTime); cnt++; } } if( cnt == 0 && gTimer == null){ messageBox("¶óº§¸¦ Ãâ·ÂÇÒ È¯ÀÚ¸®½ºÆ®°¡ ¾ø°Å³ª ¼±ÅÃµÈ È¯ÀÚ°¡", "I004"); } } /** * ¿Ü¿ë ¶óº§ Ãâ·Â */ function fOutLBLPrint() { //ó¹æÀü Ãâ·Â µ¥ÀÌÅÍ Á¶È¸ var cnt = 0; for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){ if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){ model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]"); model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag")); model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag")); model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn")); model.makeValue("/root/send/prcpinfo/ioflag", "I"); var drugno = model.getValue("/root/send/prcpinfo/drugno"); var wardcd = model.getValue("/root/send/prcpinfo/wardcd"); var pid = model.getValue("/root/send/prcpinfo/pid"); var sParam = ""; sParam = "drugdd¢Ëdrugno¢Ëioflag¢Ëprcpdd¢Ëorddd¢Ëcretno¢Ëprcpgenrflag¢Ëpid¢Ëorddeptcd¢Ëwardcd¢Ëlblflag¢Ëprcpflag¢Ëprntflag¢Ëliquidflag¢Ëetcdescflag¢Ëlblkind¢Ëoutlblyn¢Ëptplblyn¢Ëreprintyn¢Ëlbltype¢Ëdrugkind¢Ëautolblyn¢Ì"; sParam += model.getValue("/root/send/prcpinfo/drugdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/ioflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/cretno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpgenrflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/pid")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddeptcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/wardcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/lblflag")+"¢Ë"+ //model.getValue("/root/send/prcpinfo/prcpflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prntflag")+"¢Ë"+ ""+"¢Ë"+ model.getValue("/root/hidden/srchinfo/etcdescflag")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/lblkind")+"¢Ë"+ "Y"+"¢Ë"+ ""+"¢Ë"+ model.getValue("/root/send/prcpinfo/reprintyn")+"¢Ë"+ model.getValue("/root/init/lbltype/item/lbltype")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/drugkind")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/autoyn")+"¢Ì"; model.setAttribute("params", sParam); model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup"); modal("SPADT62300",0,200,200,"SPADT62300","/root/init/barcdprntsetup","/root/init/barcdprntsetup"); model.setAttribute("params", ""); //fSleep(sleepTime); cnt++; } } if( cnt == 0 && gTimer == null){ messageBox("¶óº§¸¦ Ãâ·ÂÇÒ È¯ÀÚ¸®½ºÆ®°¡ ¾ø°Å³ª ¼±ÅÃµÈ È¯ÀÚ°¡", "I004"); } } /** * PTP ¶óº§ Ãâ·Â ( ATC Àü¼Û±¸ºÐ e ÀΠ󹿏¸ ÀÖ´Â ¾à¹øÈ£ÀÇ ¶óº§ ) */ function fPTPLBLPrint() { //ó¹æÀü Ãâ·Â µ¥ÀÌÅÍ Á¶È¸ var cnt = 0; for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){ if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){ model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]"); model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag")); model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag")); model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn")); model.makeValue("/root/send/prcpinfo/ioflag", "I"); var drugno = model.getValue("/root/send/prcpinfo/drugno"); var wardcd = model.getValue("/root/send/prcpinfo/wardcd"); var pid = model.getValue("/root/send/prcpinfo/pid"); var sParam = ""; sParam = "drugdd¢Ëdrugno¢Ëioflag¢Ëprcpdd¢Ëorddd¢Ëcretno¢Ëprcpgenrflag¢Ëpid¢Ëorddeptcd¢Ëwardcd¢Ëlblflag¢Ëprcpflag¢Ëprntflag¢Ëliquidflag¢Ëetcdescflag¢Ëlblkind¢Ëoutlblyn¢Ëptplblyn¢Ëreprintyn¢Ëlbltype¢Ëdrugkind¢Ëautolblyn¢Ì"; sParam += model.getValue("/root/send/prcpinfo/drugdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/ioflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpdd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/cretno")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prcpgenrflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/pid")+"¢Ë"+ model.getValue("/root/send/prcpinfo/orddeptcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/wardcd")+"¢Ë"+ model.getValue("/root/send/prcpinfo/lblflag")+"¢Ë"+ //model.getValue("/root/send/prcpinfo/prcpflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/drugflag")+"¢Ë"+ model.getValue("/root/send/prcpinfo/prntflag")+"¢Ë"+ ""+"¢Ë"+ model.getValue("/root/hidden/srchinfo/etcdescflag")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/lblkind")+"¢Ë"+ ""+"¢Ë"+ "Y"+"¢Ë"+ model.getValue("/root/send/prcpinfo/reprintyn")+"¢Ë"+ model.getValue("/root/init/lbltype/item/lbltype")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/drugkind")+"¢Ë"+ model.getValue("/root/hidden/srchinfo/autoyn")+"¢Ì"; model.setAttribute("params", sParam); model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup"); modal("SPADT62300",0,200,200,"SPADT62300","/root/init/barcdprntsetup","/root/init/barcdprntsetup"); model.setAttribute("params", ""); //fSleep(sleepTime); cnt++; } } if( cnt == 0 && gTimer == null){ messageBox("¶óº§¸¦ Ãâ·ÂÇÒ È¯ÀÚ¸®½ºÆ®°¡ ¾ø°Å³ª ¼±ÅÃµÈ È¯ÀÚ°¡", "I004"); } } /** * ó¹æÀü Ãâ·Â */ /* function fChkParam(drugno, wardcd, pid) { var chk = true; var srch_fst_drugno = model.getValue("/root/hidden/srchinfo/fst_drugno"); var srch_last_drugno = model.getValue("/root/hidden/srchinfo/last_drugno"); var srch_wardcd = model.getValue("/root/hidden/srchinfo/ward"); var srch_pid = model.getValue("/root/hidden/srchinfo/pid"); //Åõ¾à¹øÈ£ Á¶È¸ ¹üÀ§¿¡ ÀÖ´ÂÁö üũ if(srch_fst_drugno != "" && srch_last_drugno != ""){ if(drugno <= srch_fst_drugno && drugno >= srch_last_drugno){ chk = false; chk_drugno++; } } else if(srch_fst_drugno != "") { if(drugno != srch_fst_drugno ){ chk = false; chk_drugno++; } } else if(srch_last_drugno != ""){ if(drugno != srch_last_drugno ){ chk = false; chk_drugno++; } } //Á¶È¸º´µ¿°ú µ¿ÀÏÇÑÁö üũ if(srch_wardcd != ""){ if(wardcd != srch_wardcd){ chk = false; chk_wardcd++; } } //Á¶È¸È¯ÀÚ¹øÈ£°ú µ¿ÀÏÇÑÁö üũ if(srch_pid != ""){ if(pid != srch_pid){ chk = false; chk_pid++; } } return chk; }*/ /** * ÀÚµ¿Ãâ·Â ¹öư Ŭ¸¯½Ã ŸÀÌ¸Ó ÀÛµ¿ */ function fClickAutoPrnt(chk) { if (chk == "Y") { //20090824 ¸¶Á¤¹Î ¼öÁ¤. ¿À·ù°¡ ³ª´õ¶óµµ ÆË¾÷ÀÌ ¶ßÁö ¾Ê°í °è¼ÓÇØ¼­ ÁøÇàµÉ ¼ö ÀÖµµ·Ï ¼öÁ¤. setErrorOff(true); model.setValue("/root/hidden/autoend", "N") ; /*if(model.getValue("/root/hidden/srchinfo/auto_selflag") == "1" && model.getValue("/root/hidden/srchinfo/auto_bigflag") == ""){ messageBox("ÀÚµ¿Ãâ·Â±¸ºÐÀ»", "C001"); return; } else if(model.getValue("/root/hidden/srchinfo/auto_selflag") == "2" && model.getValue("/root/hidden/srchinfo/auto_smallflag") == ""){ messageBox("ÀÚµ¿Ãâ·Â±¸ºÐÀ»", "C001"); return; }*/ if(model.getValue("/root/hidden/srchinfo/autoprntflag") == ""){ messageBox("ÀÚµ¿Ãâ·ÂÀÇ Ã³¹æ±¸ºÐÀ»", "C001"); return; } if(model.getValue("/root/hidden/srchinfo/autokind") == "") { messageBox("ÀÚµ¿Ãâ·ÂÀÇ Ãâ·Â±¸ºÐÀ»", "C001"); return; } /*if(isSearchString(chk_auto_big.value, "L") || isSearchString(chk_auto_big.value, "Q")) { if(model.getValue("/root/hidden/srchinfo/autolblflag") == ""){ messageBox("ÀÚµ¿Ãâ·ÂÀÇ ¶óº§±¸ºÐÀ»", "C001"); return; } }*/ var sRst = ""; if(gTimer != null) { sRst = messageBox("ÀÚµ¿Ãâ·ÂÀÌ µ¿ÀÛÁßÀÔ´Ï´Ù.\nÀÚµ¿Ãâ·Â±¸ºÐ¼³Á¤´ë·Î ´Ù½Ã", "Q004"); if(sRst == "6"){ window.clearinterval(gTimer); gTimer = null; } else { return; } } if(sRst == ""){ sRst = messageBox("ÀÚµ¿Ãâ·ÂÀ»", "S001"); if(sRst != "6"){ return; } } btn_hist.visible=false; grd_sumlist.visible=false; grd_patlist.visible=false; //20090914 À̼±°æ Ãß°¡ : ÀÚµ¿Ãâ·ÂÁß Ã³¹æ±¸ºÐµî ´Ù¸¥Á¶°Ç º¯°æ ¸øÇÏ°Ô ÇÔ(¿À·ù °¡´É¼º ÀÖÀ½) rdo_prcp.disabled = true; //󹿱¸ºÐ(Á¤±Ô, Ãß°¡) rdo_prcp2.disabled = true; //󹿱¸ºÐ(admission, º´µ¿ÀÀ±Þ, Åð¿ø, ¿Ü¹Ú, ÀÀ±Þ½Ç) checkbox4.disabled = true; //Ç×¾ÏÇÁ·ÎÅäÄÝ󹿏¸ üũ ipt_fst_drugno.disabled = true; //Åõ¾à¹øÈ£ from caption25.disabled = true; //'~' ipt_last_drugno.disabled = true; //Åõ¾à¹øÈ£ to ipt_pid.disabled = true; //µî·Ï¹øÈ£ btn_prt.disabled = true; //Ãâ·Â¹öư button1.disabled = true; //¸¶°¨¹öư button2.disabled = true; //¹°¾à¶óº§¹öư button4.disabled = true; //¿Ü¿ë¶óº§¹öư button6.disabled = true; //ptp¶óº§¹öư chk_auto_small.disabled = true; //ÀÚµ¿Ãâ·ÂÀÇ Ã³¹æ±¸ºÐ //chk_auto_lblflag.disabled = true; //ÀÚµ¿Ãâ·ÂÀÇ ¶óº§±¸ºÐ chk_auto_big.disabled = true; //ÀÚµ¿Ãâ·ÂÀÇ Ãâ·Â±¸ºÐ checkbox8.disabled = true; //ÀÚµ¿Ãâ·ÂÀÇ ptp¶óº§, ¿Ü¿ë¶óº§ ipt_prcpdd.disabled = true; //Àû¿ëÀÏÀÚ btn_sea.disabled = true; //Á¶È¸¹öư cmb_sumtmflag.disabled = true; //¸¶°¨½Ã°£´ë±¸ºÐ cmb_fromddflag.disabled = true; //¸¶°¨ÀÏÀÚfrom ipt_fromtm.disabled = true; //¸¶°¨½Ã°£from cmb_toddflag.disabled = true; //¸¶°¨ÀÏÀÚto ipt_totm.disabled = true; //¸¶°¨½Ã°£to radio1.disabled = true; //¾àÁֻ籸ºÐ radio3.disabled = true; //±âŸÁ¶È¸±¸ºÐ btn_init.disabled = true; //ÃʱâÈ­¹öư button5.disabled = true; //º´µ¿°Ë»öÀ̹ÌÁö chk_mps.disabled = true; //Ãâ·Â±¸ºÐÀÇ Ã³¹æÀüüũ chk_lbl.disabled = true; //Ãâ·Â±¸ºÐÀÇ ¶óº§Ã¼Å© checkbox1.disabled = true; //Ãâ·Â±¸ºÐÀÇ ¾àüũ checkbox2.disabled = true; //Ãâ·Â±¸ºÐÀÇ ÁÖ»çüũ chk_lbl_drug.disabled = true; //Ãâ·Â±¸ºÐÀÇ ¾à¸®½ºÆ®Ã¼Å© chk_lbl_inj.disabled = true; //Ãâ·Â±¸ºÐÀÇ Áֻ縮½ºÆ®Ã¼Å© combo1.disabled = true; //½ÇÃâ°íºÎ¼­ checkbox7.disabled = true; //ATC¼øÀ¸·Î Á¤·Ä //cmb_ward.visible = false; model.setValue("/root/hidden/srchinfo/prcpflag", ""); model.setValue("/root/hidden/srchinfo/fst_drugno", ""); model.setValue("/root/hidden/srchinfo/last_drugno", ""); model.setValue("/root/hidden/srchinfo/wardcd", ""); model.setValue("/root/hidden/srchinfo/wardnm", ""); model.setValue("/root/temp/srchinfo/ward", ""); model.setValue("/root/hidden/srchinfo/pid", ""); model.setValue("/root/hidden/srchinfo/onlyantis",""); model.makeValue("/root/hidden/srchinfo/autoyn", "Y"); model.setValue("/root/send/suminfo/fromdd", ""); model.setValue("/root/send/suminfo/fromtm", ""); model.setValue("/root/send/suminfo/todd", ""); model.setValue("/root/send/suminfo/totm", ""); //model.setValue("/root/hidden/srchinfo/fromdd", ""); //model.setValue("/root/hidden/srchinfo/fromtm", ""); //model.setValue("/root/hidden/srchinfo/todd", ""); //model.setValue("/root/hidden/srchinfo/totm", ""); var autostr = chk_auto_small.label + " " + chk_auto_big.label; /*if(isSearchString(chk_auto_big.value, "L") || isSearchString(chk_auto_big.value, "Q")){ autostr = autostr + "(" + chk_auto_lblflag.label + ")"; }*/ autostr = autostr.setReplaceWord("|", ", " ); caption23.text = autostr; model.refresh(); window.minimize(); fSleep(sleepTime); window.maximize(); /*if(model.getValue("/root/hidden/srchinfo/auto_selflag") == "1"){ model.setValue("/root/hidden/srchinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/auto_bigflag")); } else { model.setValue("/root/hidden/srchinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/auto_smallflag")); }*/ btn_autoprnt_start.disabled = true; btn_autoprnt_end.disabled = false; chk_sum_count = 8; gTimer = window.setInterval("fAutoPrnt()",11000); //ÀçÃâ·Â ºÒ°¡ model.setValue("/root/hidden/srchinfo/reprintyn", ""); checkbox3.disabled = true; group2.visible = "true"; //¼­¹ö¿À·ù°¡ ¹ß»ýÇÏ´õ¶óµµ modeless ÆË¾÷À» ÅëÇØ °è¼ÓÇØ¼­ ÁøÇàÇÒ ¼ö ÀÖµµ·Ï ¼öÁ¤. fErrMsg (); } else { setErrorOn(); window.clearinterval(gTimer); gTimer = null; btn_hist.visible=true; grd_sumlist.visible=true; grd_patlist.visible=true; //20090914 À̼±°æ Ãß°¡ : ÀÚµ¿Ãâ·ÂÁß Ã³¹æ±¸ºÐµî ´Ù¸¥Á¶°Ç º¯°æ ¸øÇÏ°Ô ÇÔ(¿À·ù °¡´É¼º ÀÖÀ½) rdo_prcp.disabled = false; //󹿱¸ºÐ(Á¤±Ô, Ãß°¡) rdo_prcp2.disabled = false; //󹿱¸ºÐ(admission, º´µ¿ÀÀ±Þ, Åð¿ø, ¿Ü¹Ú, ÀÀ±Þ½Ç) checkbox4.disabled = false; //Ç×¾ÏÇÁ·ÎÅäÄÝ󹿏¸ üũ ipt_fst_drugno.disabled = false; //Åõ¾à¹øÈ£ from caption25.disabled = false; //'~' ipt_last_drugno.disabled = false; //Åõ¾à¹øÈ£ to ipt_pid.disabled = false; //µî·Ï¹øÈ£ btn_prt.disabled = false; //Ãâ·Â¹öư button1.disabled = false; //¸¶°¨¹öư button2.disabled = false; //¹°¾à¶óº§¹öư button4.disabled = false; //¿Ü¿ë¶óº§¹öư button6.disabled = false; //ptp¶óº§¹öư chk_auto_small.disabled = false; //ÀÚµ¿Ãâ·ÂÀÇ Ã³¹æ±¸ºÐ //chk_auto_lblflag.disabled = false; //ÀÚµ¿Ãâ·ÂÀÇ ¶óº§±¸ºÐ chk_auto_big.disabled = false; //ÀÚµ¿Ãâ·ÂÀÇ Ãâ·Â±¸ºÐ checkbox8.disabled = false; //ÀÚµ¿Ãâ·ÂÀÇ ptp¶óº§, ¿Ü¿ë¶óº§ ipt_prcpdd.disabled = false; //Àû¿ëÀÏÀÚ btn_sea.disabled = false; //Á¶È¸¹öư cmb_sumtmflag.disabled = false; //¸¶°¨½Ã°£´ë±¸ºÐ cmb_fromddflag.disabled = false; //¸¶°¨ÀÏÀÚfrom ipt_fromtm.disabled = false; //¸¶°¨½Ã°£from cmb_toddflag.disabled = false; //¸¶°¨ÀÏÀÚto ipt_totm.disabled = false; //¸¶°¨½Ã°£to radio1.disabled = false; //¾àÁֻ籸ºÐ radio3.disabled = false; //±âŸÁ¶È¸±¸ºÐ btn_init.disabled = false; //ÃʱâÈ­¹öư button5.disabled = false; //º´µ¿°Ë»öÀ̹ÌÁö chk_mps.disabled = false; //Ãâ·Â±¸ºÐÀÇ Ã³¹æÀüüũ chk_lbl.disabled = false; //Ãâ·Â±¸ºÐÀÇ ¶óº§Ã¼Å© checkbox1.disabled = false; //Ãâ·Â±¸ºÐÀÇ ¾àüũ checkbox2.disabled = false; //Ãâ·Â±¸ºÐÀÇ ÁÖ»çüũ chk_lbl_drug.disabled = false; //Ãâ·Â±¸ºÐÀÇ ¾à¸®½ºÆ®Ã¼Å© chk_lbl_inj.disabled = false; //Ãâ·Â±¸ºÐÀÇ Áֻ縮½ºÆ®Ã¼Å© combo1.disabled = false; //½ÇÃâ°íºÎ¼­ checkbox7.disabled = false; //ATC¼øÀ¸·Î Á¤·Ä if(model.getValue("/root/init/lbltype/item2/lbltype") == "Y") { button4.visible = true; button6.visible = true; } else { button4.visible = false; button6.visible = false; } //cmb_ward.visible = true; model.setValue("/root/hidden/srchinfo/prcpflag", ""); model.setValue("/root/hidden/srchinfo/fst_drugno", ""); model.setValue("/root/hidden/srchinfo/last_drugno", ""); model.setValue("/root/hidden/srchinfo/wardcd", ""); model.setValue("/root/hidden/srchinfo/wardnm", ""); model.setValue("/root/temp/srchinfo/ward", ""); model.setValue("/root/hidden/srchinfo/pid", ""); //model.setValue("/root/hidden/srchinfo/autoprntflag", ""); model.makeValue("/root/hidden/srchinfo/autoyn", ""); btn_autoprnt_start.disabled = false; btn_autoprnt_end.disabled = true; model.setValue("/root/hidden/autoend", "Y") ; model.refresh(); //ÀçÃâ·Â °¡´É checkbox3.disabled = false; group2.visible = "false"; } } function fReStart(){ window.clearinterval(gTimer2); window.maximize(); gTimer = window.setInterval("fAutoPrnt()",11000); } /** * ÀÚµ¿Ãâ·Â */ function fAutoPrnt() { window.clearinterval(gTimer); if ( model.getValue("/root/hidden/autoend") =="Y" ){ gTimer = null; return; } var orgPrcpflag = model.getValue("/root/hidden/srchinfo/prcpflag"); if ( chk_count >= 50 ){ chk_count = 0; window.minimize(); gTimer2 = window.setInterval("fReStart()",5000); return; } chk_count++; if ( ( chk_count % 4 )=="0" ){ caption14.text="ÀÚµ¿ Ãâ·ÂÁß[£¯]"; } if ( ( chk_count % 4 )=="1" ){ caption14.text="ÀÚµ¿ Ãâ·ÂÁß[ ¡ª]"; } if ( ( chk_count % 4 )=="2" ){ caption14.text="ÀÚµ¿ Ãâ·ÂÁß[¡¬]"; } if ( ( chk_count % 4 )=="3" ){ caption14.text="ÀÚµ¿ Ãâ·ÂÁß[£ü]"; } caption14.refresh(); if(chk_sum_count >= 8){ if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("M") > -1 ){ //20090721 À̼±°æ ¼öÁ¤ : ó¹æÀü ÀÚµ¿Ãâ·ÂÀ϶§¸¸ ¸¶°¨Àû¿ë if (model.getValue("/root/hidden/srchinfo/autoendyn") =="Y") { if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("M") >=0 ){ model.setValue("/root/hidden/srchinfo/prcpflag", "M"); fHosInSum("N"); //Admission¸¶°¨ } if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("W") >=0 ){ model.setValue("/root/hidden/srchinfo/prcpflag", "W"); fHosInSum("N"); //º´µ¿ÀÀ±Þ¸¶°¨ } if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") >=0 ){ model.setValue("/root/hidden/srchinfo/prcpflag", "L"); // ÀÚµ¿À϶§´Â ¿ÜÃâ¿Ü¹ÚÀ¸·Î ó¸®ÇÏ¿© ÀÀ±Þ½Ç Åð¿ø¾à Á¦¿Ü fHosInSum("N"); //Åð¿ø¾à¸¶°¨ } if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("G") >=0 ){ model.setValue("/root/hidden/srchinfo/prcpflag", "G"); fHosInSum("N"); //¿Ü¹Ú¸¶°¨ } if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") >=0 ){ //model.setValue("/root/hidden/srchinfo/prcpflag", "Q"); //¸¶¾à¸¸ ¸¶°¨ //fHosInSum("N"); } } model.setValue("/root/hidden/srchinfo/prcpflag", ""); chk_sum_count = 0; } } chk_sum_count++; //Åð¿ø ÀÚµ¿Ãâ·Â½Ã ¸¶°¨À» G·Î ÇØ¼­ ¿ø·¡ L °ªÀ» º¸³»Áà¾ßÇÔ //model.setValue("/root/hidden/srchinfo/prcpflag", orgPrcpflag); //ÀÌÈÆÀç ¸·À½. ( ¿É¼ÇÀ» ¼±ÅÃÇÑ °ªÀÓ) if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("M") > -1 ){ model.setValue("/root/hidden/srchinfo/prntkind", "M"); fInSumList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·Âµ¥ÀÌÅÍ Á¶È¸ for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){ chk_prnt_count++; grd_sumlist.isSelected(i) = true; grd_sumlist.row = i; model.makeValue("/root/hidden/srchinfo/autolblyn", ""); fPrntPatList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·ÂȯÀÚµ¥ÀÌÅÍ Á¶È¸ fPrcpMPSPrint("M"); //ó¹æÀüÃâ·Â } /* chk_ward.visible = false; if(model.getValue("/root/hidden/srchinfo/autoprntflag") == "" && model.getValue("/root/hidden/srchinfo/prcpflag") == ""){ messageBox("󹿱¸ºÐÀ»", "C001") return; } model.copyNode("/root/send/sumlistinfo", "/root/hidden/srchinfo"); model.makeValue("/root/hidden/srchinfo/autolblyn", ""); submit("TRADT10205"); if(model.getValue("/root/hidden/srchinfo/fst_drugno") != ""){ model.setValue("/root/main/patlist/patlist/sel", "Y"); } model.refresh(); fPrcpMPSPrint("M"); //Ãâ·Â */ } if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("L") > -1 ){ model.setValue("/root/hidden/srchinfo/prntkind", "L"); fInSumList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·Âµ¥ÀÌÅÍ Á¶È¸ for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){ chk_prnt_count++; grd_sumlist.isSelected(i) = true; grd_sumlist.row = i; if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") { model.makeValue("/root/hidden/srchinfo/autolblyn", "Y"); } else { model.makeValue("/root/hidden/srchinfo/autolblyn", ""); } fPrntPatList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·ÂȯÀÚµ¥ÀÌÅÍ Á¶È¸ fPrcpMPSPrint("L"); //¶óº§Ãâ·Â } } //¹°¾à¶óº§ if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("Q") > -1 ){ model.setValue("/root/hidden/srchinfo/prntkind", "Q"); fInSumList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·Âµ¥ÀÌÅÍ Á¶È¸ for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){ chk_prnt_count++; grd_sumlist.isSelected(i) = true; grd_sumlist.row = i; if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") { model.makeValue("/root/hidden/srchinfo/autolblyn", "Y"); } else { model.makeValue("/root/hidden/srchinfo/autolblyn", ""); } fPrntPatList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·ÂȯÀÚµ¥ÀÌÅÍ Á¶È¸ fPrcpMPSPrint("Q"); //¹°¾à¶óº§Ãâ·Â //var gT1 = window.setInterval("fDelay()",10000); //window.clearinterval(gT1); } } //¿Ü¿ë¶óº§ if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("O") > -1 ){ model.setValue("/root/hidden/srchinfo/prntkind", "O"); fInSumList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·Âµ¥ÀÌÅÍ Á¶È¸ for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){ chk_prnt_count++; grd_sumlist.isSelected(i) = true; grd_sumlist.row = i; if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") { model.makeValue("/root/hidden/srchinfo/autolblyn", "Y"); } else { model.makeValue("/root/hidden/srchinfo/autolblyn", ""); } fPrntPatList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·ÂȯÀÚµ¥ÀÌÅÍ Á¶È¸ fPrcpMPSPrint("O"); //¿Ü¿ë¶óº§Ãâ·Â //var gT1 = window.setInterval("fDelay()",10000); //window.clearinterval(gT1); } } //PTP¶óº§ if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("P") > -1 ){ model.setValue("/root/hidden/srchinfo/prntkind", "P"); fInSumList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·Âµ¥ÀÌÅÍ Á¶È¸ for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){ chk_prnt_count++; grd_sumlist.isSelected(i) = true; grd_sumlist.row = i; if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") { model.makeValue("/root/hidden/srchinfo/autolblyn", "Y"); } else { model.makeValue("/root/hidden/srchinfo/autolblyn", ""); } fPrntPatList(); //¸¶°¨½Ã°£º° ¹ÌÃâ·ÂȯÀÚµ¥ÀÌÅÍ Á¶È¸ fPrcpMPSPrint("P"); //PTP¶óº§Ãâ·Â //var gT1 = window.setInterval("fDelay()",10000); //window.clearinterval(gT1); } } if (model.getValue("/root/hidden/srchinfo/autoatcyn") =="Y") { //ATCÀü¼Û model.setValue("/root/send/atcinfo/drugdd", model.getValue("/root/hidden/srchinfo/prcpdd")); if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") > -1 ) { model.setValue("/root/send/atcinfo/drugflag", "L"); model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd")); submit("TXADT10202"); //ATC Data Àü¼Û(¹èġȣÃâ) } if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") > -1 ) { model.setValue("/root/send/atcinfo/drugflag", "E"); model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd")); submit("TXADT10202"); //ATC Data Àü¼Û(¹èġȣÃâ) } //if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") == -1 && model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") == -1 ){ model.setValue("/root/send/atcinfo/drugflag", "I"); model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd")); submit("TXADT10202"); //ATC Data Àü¼Û(¹èġȣÃâ) //} } gTimer = window.setInterval("fAutoPrnt()",11000); } function fSleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } /** * Åõ¾à¹øÈ£ º¯°æ½Ã */ function fChgDrugno(flag) { var bResult = true; if(flag == "first"){ var chk = model.getValue("/root/hidden/srchinfo/fst_drugno"); if(chk == ""){ model.setValue("/root/hidden/srchinfo/last_drugno", ""); model.refresh(); bResult = false; } else { if(isNaN(chk)){ messageBox("Åõ¾à¹øÈ£´Â ¼ýÀÚ·Î","C001"); model.setValue("/root/hidden/srchinfo/fst_drugno", ""); model.refresh(); bResult = false; } if(chk.length > 5){ messageBox("Åõ¾à¹øÈ£´Â 5ÀÚ¸®¹Ì¸¸À¸·Î","C001"); model.setValue("/root/hidden/srchinfo/fst_drugno", ""); model.refresh(); bResult = false; } } } else if(flag == "last"){ var chk_fst = model.getValue("/root/hidden/srchinfo/fst_drugno"); var chk_last = model.getValue("/root/hidden/srchinfo/fst_drugno"); if(chk_fst == ""){ messageBox("ù¹øÂ° Åõ¾à¹øÈ£ºÎÅÍ","C001"); model.setValue("/root/hidden/srchinfo/last_drugno", ""); bResult = false; } else { if(isNaN(chk_fst)){ messageBox("Åõ¾à¹øÈ£´Â ¼ýÀÚ·Î","C001"); model.setValue("/root/hidden/srchinfo/fst_drugno", ""); bResult = false; } if(chk_fst.length > 5 ){ messageBox("Åõ¾à¹øÈ£´Â 5ÀÚ¸®¹Ì¸¸À¸·Î","C001"); model.setValue("/root/hidden/srchinfo/fst_drugno", ""); bResult = false; } if(isNaN(chk_last)){ messageBox("Åõ¾à¹øÈ£´Â ¼ýÀÚ·Î","C001"); model.setValue("/root/hidden/srchinfo/last_drugno", ""); bResult = false; } if(chk_last.length > 5 ){ messageBox("Åõ¾à¹øÈ£´Â 5ÀÚ¸®¹Ì¸¸À¸·Î","C001"); model.setValue("/root/hidden/srchinfo/last_drugno", ""); bResult = false; } } model.refresh(); } return bResult; } function fErrMsg () { var errorMsgPath = "/root/properties/error"; if ( model.getValue ( "/root/properties/error/type" ) == "error" ) { window.load("../../../com/commonweb/xrw/SPZZZ00100_½Ã½ºÅÛ¿¡·¯.xrw","modeless","","width:514px;height:198px;align:center;","/root/properties/error","/root/main"); } }