var xInlvListPath = "/root/main/inlvinfo/inlvlist"; //ÀÔ¿ø¹æ¹®°ü¸® var xDschlvListPath = "/root/main/dschlvinfo/dschlvlist"; //Åð¿ø¹æ¹®°ü¸® var xTestlvListPath = "/root/main/testlvinfo/testlvlist"; //°Ë»ç´ë±â¹æ¹®°ü¸® var xMedilvListPath = "/root/main/medilvinfo/medilvlist"; //Áø·á´ë±â¹æ¹®°ü¸® // ÃʱâÈ­ function fInitialize(){ zbcfGetCodeList(new Array("M0375",'M0376','P0341','P0008','P0010'), new Array("/root/comcodelist/bdtppartcd_cmblist","/root/comcodelist/bdbtype_cmblist","/root/comcodelist/rsrvflag_cmblist","/root/comcodelist/insukind_cmblist","/root/comcodelist/suppkind_cmblist"), true); fGetNursHardCdInfo("'R2'", getCurrentDate()); model.removeNodeset("/root/main/inlvinfo/inlvlist"); model.resetInstanceNode("/root/send"); model.setValue("/root/main/cond/fromdd",getCurrentDate()); model.setValue("/root/main/cond/todd",getCurrentDate()); ipt_fromdd.refresh(); ipt_todd.refresh(); submit("TRPMI00106"); var instcd = getUserInfo("dutplceinstcd"); model.makeValue("/root/send/data1/sess_posinstcd",instcd); submit("TRPMI00405"); model.toggle("inlv"); cap_ddnm.attribute("left") = "20"; cap_ddnm.attribute("width") = "90"; cap_ddnm.text = "ÀÔ¿øÀÏÀÚ :"; model.setValue("/root/main/cond/menuflag", "inlv"); model.refresh(); fSearch(); } // ¹æ¹®Á¶È¸ function fSearch(){ var fromdd = model.getValue("/root/main/cond/fromdd"); var todd = model.getValue("/root/main/cond/todd"); switch(model.getValue("/root/main/cond/menuflag")) { case "inlv" : if(getDateInterval(fromdd, todd) > 2){ messageBox("Á¶È¸±â°£Àº 3ÀÏ ÀÌ»óÀ» ³ÑÀ» ¼ö", "I004"); model.setFocus("ipt_todd"); return; } fSearchinlv(); break; case "dschlv" : if(getDateInterval(fromdd, todd) > 2){ messageBox("Á¶È¸±â°£Àº 3ÀÏ ÀÌ»óÀ» ³ÑÀ» ¼ö", "I004"); model.setFocus("ipt_todd"); return; } fSearchdschlv(); break; case "testlv" : if(getDateInterval(fromdd, todd) > 0){ messageBox("Á¶È¸±â°£Àº 1ÀÏ ÀÌ»óÀ» ³ÑÀ» ¼ö", "I004"); model.setFocus("ipt_todd"); return; } fSearchtestlv(); break; case "medilv" : if(getDateInterval(fromdd, todd) > 2){ messageBox("Á¶È¸±â°£Àº 3ÀÏ ÀÌ»óÀ» ³ÑÀ» ¼ö", "I004"); model.setFocus("ipt_todd"); return; } fSearchmedilv(); break; default : if(getDateInterval(fromdd, todd) > 2){ messageBox("Á¶È¸±â°£Àº 3ÀÏ ÀÌ»óÀ» ³ÑÀ» ¼ö", "I004"); model.setFocus("ipt_todd"); return; } fSearchinlv(); break; } } // ÀÔ¿ø¹æ¹®Á¶È¸ function fSearchinlv(){ model.removeNodeset("/root/main/inlvinfo/inlvlist"); model.copyNode("/root/send","/root/main/cond"); submit("TRMNW18000"); model.refresh(); } // Åð¿ø¹æ¹®Á¶È¸ function fSearchdschlv(){ model.removeNodeset("/root/main/dschlvinfo/dschlvlist"); model.copyNode("/root/send","/root/main/cond"); submit("TRMNW18010"); model.refresh(); } // °Ë»ç´ë±â ¹æ¹®Á¶È¸ function fSearchtestlv(){ model.removeNodeset("/root/main/testlvinfo/testlvlist"); model.copyNode("/root/send","/root/main/cond"); submit("TRMNW18020"); model.refresh(); } // Áø·á´ë±â ¹æ¹®Á¶È¸ function fSearchmedilv(){ model.removeNodeset("/root/main/medilvinfo/medilvlist"); model.copyNode("/root/send","/root/main/cond"); submit("TRMNW18030"); model.refresh(); } // ¹æ¹®ÀúÀå function fSave(){ switch(model.getValue("/root/main/cond/menuflag")) { case "inlv" : fSaveinlv() break; case "dschlv" : fSavedschlv(); break; case "testlv" : fSavetestlv(); break; case "medilv" : fSavemedilv(); break; default : fSaveinlv(); break; } } // ÀÔ¿ø¹æ¹®ÀúÀå function fSaveinlv(){ var inlvinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëindd¢Ëcretno¢Ëinrecdd¢Ëinrectm¢Ëwardcd¢Ëbedcd¢Ëroomcd¢Ëroomgrdecd¢Ëorddeptcd¢Ëmedispclid¢Ì"; var inlvinfoData = ""; var inrecddcnt = 0; var inrectmcnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_inlvlist.rows; i++) { if(model.getValue(xInlvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xInlvListPath+"[" + i + "]/check"); var instcd = model.getValue(xInlvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xInlvListPath+"[" + i + "]/pid"); var indd = model.getValue(xInlvListPath+"[" + i + "]/indd"); var cretno = model.getValue(xInlvListPath+"[" + i + "]/cretno"); var inrecdd = model.getValue(xInlvListPath+"[" + i + "]/inrecdd"); var inrectm = model.getValue(xInlvListPath+"[" + i + "]/inrectm"); var wardcd = model.getValue(xInlvListPath+"[" + i + "]/wardcd"); var bedcd = model.getValue(xInlvListPath+"[" + i + "]/bedcd"); var roomcd = model.getValue(xInlvListPath+"[" + i + "]/roomcd"); var roomgrdecd = model.getValue(xInlvListPath+"[" + i + "]/roomgrdecd"); var orddeptcd = model.getValue(xInlvListPath+"[" + i + "]/orddeptcd"); var medispclid = model.getValue(xInlvListPath+"[" + i + "]/medispclid"); if(inrecdd == ""){ inrecddcnt++; } if(inrectm == ""){ inrectmcnt++; } inlvinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + indd +"¢Ë" + cretno +"¢Ë" + inrecdd +"¢Ë" + inrectm +"¢Ë" + wardcd +"¢Ë" + bedcd +"¢Ë" + roomcd +"¢Ë" + roomgrdecd +"¢Ë" + orddeptcd +"¢Ë" + medispclid +"¢Ì"; } } if(inlvinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(inrecddcnt > 0 || inrectmcnt > 0 ){ messageBox("¹æ¹®ÀúÀåÀϽø¦ ÀÔ·ÂÇϽʽÿÀ.","C"); }else{ model.makeValue("/root/send/savedata", inlvinfoHeader+inlvinfoData); submit("TXMNW18000"); fSearch() ; } } // Åð¿ø¹æ¹®ÀúÀå function fSavedschlv(){ var dschlvinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëindd¢Ëcretno¢Ëinrecdd¢Ëinrectm¢Ëwardcd¢Ëbedcd¢Ëroomcd¢Ëroomgrdecd¢Ëorddeptcd¢Ëmedispclid¢Ì"; var dschlvinfoData = ""; var inrecddcnt = 0; var inrectmcnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_dschlvlist.rows; i++) { if(model.getValue(xDschlvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xDschlvListPath+"[" + i + "]/check"); var instcd = model.getValue(xDschlvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xDschlvListPath+"[" + i + "]/pid"); var indd = model.getValue(xDschlvListPath+"[" + i + "]/indd"); var cretno = model.getValue(xDschlvListPath+"[" + i + "]/cretno"); var inrecdd = model.getValue(xDschlvListPath+"[" + i + "]/inrecdd"); var inrectm = model.getValue(xDschlvListPath+"[" + i + "]/inrectm"); var wardcd = model.getValue(xDschlvListPath+"[" + i + "]/wardcd"); var bedcd = model.getValue(xDschlvListPath+"[" + i + "]/bedcd"); var roomcd = model.getValue(xDschlvListPath+"[" + i + "]/roomcd"); var roomgrdecd = model.getValue(xDschlvListPath+"[" + i + "]/roomgrdecd"); var orddeptcd = model.getValue(xDschlvListPath+"[" + i + "]/orddeptcd"); var medispclid = model.getValue(xDschlvListPath+"[" + i + "]/medispclid"); if(inrecdd == ""){ inrecddcnt++; } if(inrectm == ""){ inrectmcnt++; } dschlvinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + indd +"¢Ë" + cretno +"¢Ë" + inrecdd +"¢Ë" + inrectm +"¢Ë" + wardcd +"¢Ë" + bedcd +"¢Ë" + roomcd +"¢Ë" + roomgrdecd +"¢Ë" + orddeptcd +"¢Ë" + medispclid +"¢Ì"; } } if(dschlvinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(inrecddcnt > 0 || inrectmcnt > 0 ){ messageBox("¹æ¹®ÀúÀåÀϽø¦ ÀÔ·ÂÇϽʽÿÀ.","C"); }else{ model.makeValue("/root/send/savedata", dschlvinfoHeader+dschlvinfoData); submit("TXMNW18010"); fSearch() ; } } // °Ë»ç´ë±â ¹æ¹®ÀúÀå function fSavetestlv(){ var testlvinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëorddd¢Ëcretno¢Ëprcpdd¢Ëprcpno¢Ëinrecdd¢Ëinrectm¢Ëorddeptcd¢Ëcentcd¢Ëorddrid¢Ì"; var testlvinfoData = ""; var inrecddcnt = 0; var inrectmcnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_testlvlist.rows; i++) { if(model.getValue(xTestlvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xTestlvListPath+"[" + i + "]/check"); var instcd = model.getValue(xTestlvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xTestlvListPath+"[" + i + "]/pid"); var orddd = model.getValue(xTestlvListPath+"[" + i + "]/orddd"); var cretno = model.getValue(xTestlvListPath+"[" + i + "]/cretno"); var prcpdd = model.getValue(xTestlvListPath+"[" + i + "]/prcpdd"); var prcpno = model.getValue(xTestlvListPath+"[" + i + "]/prcpno"); var inrecdd = model.getValue(xTestlvListPath+"[" + i + "]/inrecdd"); var inrectm = model.getValue(xTestlvListPath+"[" + i + "]/inrectm"); var orddeptcd = model.getValue(xTestlvListPath+"[" + i + "]/orddeptcd"); var centcd = model.getValue(xTestlvListPath+"[" + i + "]/centcd"); var orddrid = model.getValue(xTestlvListPath+"[" + i + "]/orddrid"); if(inrecdd == ""){ inrecddcnt++; } if(inrectm == ""){ inrectmcnt++; } testlvinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + orddd +"¢Ë" + cretno +"¢Ë" + prcpdd +"¢Ë" + prcpno +"¢Ë" + inrecdd +"¢Ë" + inrectm +"¢Ë" + orddeptcd +"¢Ë" + centcd +"¢Ë" + orddrid +"¢Ì"; } } if(testlvinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(inrecddcnt > 0 || inrectmcnt > 0 ){ messageBox("¹æ¹®ÀúÀåÀϽø¦ ÀÔ·ÂÇϽʽÿÀ.","C"); }else{ model.makeValue("/root/send/savedata", testlvinfoHeader+testlvinfoData); submit("TXMNW18020"); fSearch() ; } } // Áø·á´ë±â ¹æ¹®ÀúÀå function fSavemedilv(){ var medilvinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëorddd¢Ëcretno¢Ëinrecdd¢Ëinrectm¢Ëorddeptcd¢Ëcentcd¢Ëorddrid¢Ì"; var medilvinfoData = ""; var inrecddcnt = 0; var inrectmcnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_medilvlist.rows; i++) { if(model.getValue(xMedilvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xMedilvListPath+"[" + i + "]/check"); var instcd = model.getValue(xMedilvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xMedilvListPath+"[" + i + "]/pid"); var orddd = model.getValue(xMedilvListPath+"[" + i + "]/orddd"); var cretno = model.getValue(xMedilvListPath+"[" + i + "]/cretno"); var inrecdd = model.getValue(xMedilvListPath+"[" + i + "]/inrecdd"); var inrectm = model.getValue(xMedilvListPath+"[" + i + "]/inrectm"); var orddeptcd = model.getValue(xMedilvListPath+"[" + i + "]/orddeptcd"); var centcd = model.getValue(xMedilvListPath+"[" + i + "]/centcd"); var orddrid = model.getValue(xMedilvListPath+"[" + i + "]/orddrid"); if(inrecdd == ""){ inrecddcnt++; } if(inrectm == ""){ inrectmcnt++; } medilvinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + orddd +"¢Ë" + cretno +"¢Ë" + inrecdd +"¢Ë" + inrectm +"¢Ë" + orddeptcd +"¢Ë" + centcd +"¢Ë" + orddrid +"¢Ì"; } } if(medilvinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(inrecddcnt > 0 || inrectmcnt > 0 ){ messageBox("¹æ¹®ÀúÀåÀϽø¦ ÀÔ·ÂÇϽʽÿÀ.","C"); }else{ model.makeValue("/root/send/savedata", medilvinfoHeader+medilvinfoData); submit("TXMNW18030"); fSearch() ; } } // ¹æ¹®ÀúÀåÃë¼Ò function fDel(){ switch(model.getValue("/root/main/cond/menuflag")) { case "inlv" : fDelinlv(); break; case "dschlv" : fDeldschlv(); break; case "testlv" : fDeltestlv(); break; case "medilv" : fDelmedilv(); break; default : fDelinlv(); break; } } // ÀÔ¿ø¹æ¹®ÀúÀåÃë¼Ò function fDelinlv(){ var inlvinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëindd¢Ëcretno¢Ì"; var inlvinfoData = ""; var inreccnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_inlvlist.rows; i++) { if(model.getValue(xInlvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xInlvListPath+"[" + i + "]/check"); var instcd = model.getValue(xInlvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xInlvListPath+"[" + i + "]/pid"); var indd = model.getValue(xInlvListPath+"[" + i + "]/indd"); var cretno = model.getValue(xInlvListPath+"[" + i + "]/cretno"); var inrecyn = model.getValue(xInlvListPath+"[" + i + "]/inrecyn"); inlvinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + indd +"¢Ë" + cretno +"¢Ì"; if(inrecyn == "N"){ inreccnt ++ ; } } } if(inlvinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(inreccnt > 0 ){ messageBox("¹æ¹®ÀúÀåµÈ °Ç¸¸ ¹æ¹®ÀúÀåÃë¼Ò°¡ °¡´ÉÇÕ´Ï´Ù.","C"); }else{ model.makeValue("/root/send/savedata", inlvinfoHeader+inlvinfoData); submit("TXMNW18001"); fSearch() ; } } // Åð¿ø¹æ¹®ÀúÀåÃë¼Ò function fDeldschlv(){ var dschvinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëindd¢Ëcretno¢Ì"; var dschlvinfoData = ""; var inreccnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_dschlvlist.rows; i++) { if(model.getValue(xDschlvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xDschlvListPath+"[" + i + "]/check"); var instcd = model.getValue(xDschlvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xDschlvListPath+"[" + i + "]/pid"); var indd = model.getValue(xDschlvListPath+"[" + i + "]/indd"); var cretno = model.getValue(xDschlvListPath+"[" + i + "]/cretno"); var inrecyn = model.getValue(xDschlvListPath+"[" + i + "]/inrecyn"); dschlvinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + indd +"¢Ë" + cretno +"¢Ì"; if(inrecyn == "N"){ inreccnt ++ ; } } } if(dschlvinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(inreccnt > 0 ){ messageBox("¹æ¹®ÀúÀåµÈ °Ç¸¸ ¹æ¹®ÀúÀåÃë¼Ò°¡ °¡´ÉÇÕ´Ï´Ù.","C"); }else{ model.makeValue("/root/send/savedata", dschvinfoHeader+dschlvinfoData); submit("TXMNW18011"); fSearch() ; } } // °Ë»ç´ë±â ¹æ¹®ÀúÀåÃë¼Ò function fDeltestlv(){ var testvinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëorddd¢Ëcretno¢Ëprcpdd¢Ëprcpno¢Ì"; var testlvinfoData = ""; var inreccnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_testlvlist.rows; i++) { if(model.getValue(xTestlvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xTestlvListPath+"[" + i + "]/check"); var instcd = model.getValue(xTestlvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xTestlvListPath+"[" + i + "]/pid"); var orddd = model.getValue(xTestlvListPath+"[" + i + "]/orddd"); var cretno = model.getValue(xTestlvListPath+"[" + i + "]/cretno"); var prcpdd = model.getValue(xTestlvListPath+"[" + i + "]/prcpdd"); var prcpno = model.getValue(xTestlvListPath+"[" + i + "]/prcpno"); var inrecyn = model.getValue(xTestlvListPath+"[" + i + "]/inrecyn"); testlvinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + orddd +"¢Ë" + cretno +"¢Ë" + prcpdd +"¢Ë" + prcpno +"¢Ì"; if(inrecyn == "N"){ inreccnt ++ ; } } } if(testlvinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(inreccnt > 0 ){ messageBox("¹æ¹®ÀúÀåµÈ °Ç¸¸ ¹æ¹®ÀúÀåÃë¼Ò°¡ °¡´ÉÇÕ´Ï´Ù.","C"); }else{ model.makeValue("/root/send/savedata", testvinfoHeader+testlvinfoData); submit("TXMNW18021"); fSearch() ; } } // Áø·á´ë±â ¹æ¹®ÀúÀåÃë¼Ò function fDelmedilv(){ var medivinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëorddd¢Ëcretno¢Ì"; var medilvinfoData = ""; var inreccnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_medilvlist.rows; i++) { if(model.getValue(xMedilvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xMedilvListPath+"[" + i + "]/check"); var instcd = model.getValue(xMedilvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xMedilvListPath+"[" + i + "]/pid"); var orddd = model.getValue(xMedilvListPath+"[" + i + "]/orddd"); var cretno = model.getValue(xMedilvListPath+"[" + i + "]/cretno"); var inrecyn = model.getValue(xMedilvListPath+"[" + i + "]/inrecyn"); medilvinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + orddd +"¢Ë" + cretno +"¢Ì"; if(inrecyn == "N"){ inreccnt ++ ; } } } if(medilvinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(inreccnt > 0 ){ messageBox("¹æ¹®ÀúÀåµÈ °Ç¸¸ ¹æ¹®ÀúÀåÃë¼Ò°¡ °¡´ÉÇÕ´Ï´Ù.","C"); }else{ model.makeValue("/root/send/savedata", medivinfoHeader+medilvinfoData); submit("TXMNW18031"); fSearch() ; } } function fExcel(){ switch(model.getValue("/root/main/cond/menuflag")) { case "inlv" : fExcelinlv(); break; case "dschlv" : fExceldschlv(); break; case "testlv" : fExceltestlv(); break; case "medilv" : fExcelmedilv(); break; default : fExcelinlv(); break; } } // ÀÔ¿ø¹æ¹® ¿¢¼¿ÀúÀå function fExcelinlv(){ var fileName = window.fileDialog("save", ",", false, "ÀÔ¿ø¹æ¹®°ü¸®_" + getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); var col1 = grd_inlvlist.colRef("wardcd"); var col2 = grd_inlvlist.colRef("bedcd"); var col3 = grd_inlvlist.colRef("roomcd"); var col4 = grd_inlvlist.colRef("roomgrdecd"); var col5 = grd_inlvlist.colRef("bdtppartcd"); var col6 = grd_inlvlist.colRef("bdbtype"); if (fileName != ""){ grd_inlvlist.saveExcel(fileName, "SheetName;exportfalsecols:1;col_"+col1+":label;col_"+col2+":label;col_"+col3+":label;col_"+col4+":label;col_"+col5+":label;col_"+col6+":label;", true, false, "", "", false); } } // Åð¿ø¹æ¹® ¿¢¼¿ÀúÀå function fExceldschlv(){ var fileName = window.fileDialog("save", ",", false, "Åð¿ø¹æ¹®°ü¸®_" + getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); var col1 = grd_dschlvlist.colRef("wardcd"); var col2 = grd_dschlvlist.colRef("bedcd"); var col3 = grd_dschlvlist.colRef("roomcd"); var col4 = grd_dschlvlist.colRef("roomgrdecd"); if (fileName != ""){ grd_dschlvlist.saveExcel(fileName, "SheetName;exportfalsecols:1;col_"+col1+":label;col_"+col2+":label;col_"+col3+":label;col_"+col4+":label;", true, false, "", "", false); } } // °Ë»ç´ë±â¹æ¹® ¿¢¼¿ÀúÀå function fExceltestlv(){ var fileName = window.fileDialog("save", ",", false, "°Ë»ç´ë±â¹æ¹®°ü¸®_" + getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); var col1 = grd_testlvlist.colRef("centcd"); if (fileName != ""){ grd_testlvlist.saveExcel(fileName, "SheetName;exportfalsecols:1;col_"+col1+":label;col_", true, false, "", "", false); } } // Áø·á´ë±â¹æ¹® ¿¢¼¿ÀúÀå function fExcelmedilv(){ var fileName = window.fileDialog("save", ",", false, "Áø·á´ë±â¹æ¹®°ü¸®_" + getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls"); var col1 = grd_medilvlist.colRef("centcd"); var col2 = grd_medilvlist.colRef("rsrvflag"); var col3 = grd_medilvlist.colRef("insukind"); var col4 = grd_medilvlist.colRef("suppkind"); if (fileName != ""){ grd_medilvlist.saveExcel(fileName, "SheetName;exportfalsecols:1;col_"+col1+":label;col_"+col2+":label;col_"+col3+":label;col_"+col4+":label;", true, false, "", "", false); } } // °£È£Á¤º¸Á¶»ç ÀÓ½ÃÀúÀå function fNrInfoSave(){ var nrinfoHeader = "check¢Ëinstcd¢Ëpid¢Ëindd¢Ëcretno¢Ërecflag¢Ëhighbp¢Ëlowbp¢Ëpulse¢Ëbreth¢Ëbdtp¢Ëbdtppartcd¢Ëbdht¢Ëbdwt¢Ëspo2¢Ëbdbtype¢Ì"; var nrinfoData = ""; var recflagcnt = 0; var signinfoyncnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_inlvlist.rows; i++) { if(model.getValue(xInlvListPath + "[" + i + "]/check") == "Y"){ var check = model.getValue(xInlvListPath+"[" + i + "]/check"); var instcd = model.getValue(xInlvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xInlvListPath+"[" + i + "]/pid"); var indd = model.getValue(xInlvListPath+"[" + i + "]/indd"); var cretno = model.getValue(xInlvListPath+"[" + i + "]/cretno"); var recflag = model.getValue(xInlvListPath+"[" + i + "]/recflag"); var highbp = model.getValue(xInlvListPath+"[" + i + "]/highbp"); var lowbp = model.getValue(xInlvListPath+"[" + i + "]/lowbp"); var pulse = model.getValue(xInlvListPath+"[" + i + "]/pulse"); var breth = model.getValue(xInlvListPath+"[" + i + "]/breth"); var bdtp = model.getValue(xInlvListPath+"[" + i + "]/bdtp"); var bdtppartcd = model.getValue(xInlvListPath+"[" + i + "]/bdtppartcd"); var bdht = model.getValue(xInlvListPath+"[" + i + "]/bdht"); var bdwt = model.getValue(xInlvListPath+"[" + i + "]/bdwt"); var spo2 = model.getValue(xInlvListPath+"[" + i + "]/spo2"); var bdbtype = model.getValue(xInlvListPath+"[" + i + "]/bdbtype"); var signinfoyn = model.getValue(xInlvListPath+"[" + i + "]/signinfoyn"); if(recflag == ""){ recflagcnt++; } if(signinfoyn == "Y"){ signinfoyncnt++; } nrinfoData += check +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + indd +"¢Ë" + cretno +"¢Ë" + recflag +"¢Ë" + highbp +"¢Ë" + lowbp +"¢Ë" + pulse +"¢Ë" + breth +"¢Ë" + bdtp +"¢Ë" + bdtppartcd +"¢Ë" + bdht +"¢Ë" + bdwt +"¢Ë" + spo2 +"¢Ë" + bdbtype +"¢Ì"; } } if(nrinfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(signinfoyncnt > 0 ){ messageBox("ÀÌ¹Ì ÀÎÁõÀúÀåµÈ °ÇÀº ÀúÀå ¶Ç´Â ¼öÁ¤ÀÌ ºÒ°¡ ÇÕ´Ï´Ù.","E"); }else if(recflagcnt > 0 ){ messageBox("°£È£Á¤º¸Á¶»çÁö Á¾·ù¸¦ ¼±ÅÃÇϽʽÿÀ.","C"); }else{ model.makeValue("/root/send/savedata", nrinfoHeader+nrinfoData); submit("TXMNW18002"); fSearch() ; } } // ÀÔ½ÇÀúÀå function fSaveInroom(){ var inroominfoHeader = "check¢Ëstat¢Ëinrmcnfmflag¢ËsaveId¢Ëchngdeptroomflag¢Ëinstcd¢Ëpid¢Ëindd¢Ëcretno¢Ëwardcd¢Ëbedcd¢Ëroomcd¢Ëroomgrdecd¢Ëorddeptcd¢Ëordtype¢Ëpatnm¢Ësexage¢Ëtoward¢Ëtoroom¢Ëchngorddeptcd¢Ëchngatdoctid¢Ëatdoctnm¢Ëatdoctidphonno¢Ëmedispclid¢Ëorddrnm¢Ëmedispclphonno¢Ëtocntctel¢Ëcurdd¢Ëcurtm¢Ëuserid¢Ëusernm¢Ì"; var inroominfoData = ""; var careinrmddcnt = 0 ; var inddcnt = 0; var checkcnt = 0; var userdeptcd = getUserInfo("dutplcecd"); for(var i = 0 ; i < grd_inlvlist.rows; i++) { if(model.getValue(xInlvListPath + "[" + i + "]/check") == "Y"){ checkcnt++; if(checkcnt > 1) { messageBox("ÀÔ½ÇÀúÀåÀº 1°Ç¸¸ °¡´ÉÇÕ´Ï´Ù.","E"); return; } var check = model.getValue(xInlvListPath+"[" + i + "]/check"); var instcd = model.getValue(xInlvListPath+"[" + i + "]/instcd"); var pid = model.getValue(xInlvListPath+"[" + i + "]/pid"); var indd = model.getValue(xInlvListPath+"[" + i + "]/indd"); var cretno = model.getValue(xInlvListPath+"[" + i + "]/cretno"); var wardcd = model.getValue(xInlvListPath+"[" + i + "]/wardcd"); var bedcd = model.getValue(xInlvListPath+"[" + i + "]/bedcd"); var roomcd = model.getValue(xInlvListPath+"[" + i + "]/roomcd"); var roomgrdecd = model.getValue(xInlvListPath+"[" + i + "]/roomgrdecd"); var orddeptcd = model.getValue(xInlvListPath+"[" + i + "]/orddeptcd"); var ordtype = model.getValue(xInlvListPath+"[" + i + "]/ordtype"); var patnm = model.getValue(xInlvListPath+"[" + i + "]/hngnm"); var careinrmdd = model.getValue(xInlvListPath+"[" + i + "]/careinrmdd"); var toward = grd_inlvlist.labelMatrix(grd_inlvlist.row, grd_inlvlist.colRef("wardcd")); var toroom = grd_inlvlist.labelMatrix(grd_inlvlist.row, grd_inlvlist.colRef("roomcd")); var chngorddeptcd= model.getValue(xInlvListPath+"[" + i + "]/wardcd"); var chngatdoctid = model.getValue(xInlvListPath+"[" + i + "]/atdoctid"); var atdoctnm = model.getValue(xInlvListPath+"[" + i + "]/atdoctnm"); var atdoctidphonno = model.getValue(xInlvListPath+"[" + i + "]/atdoctidphonno"); var medispclid = model.getValue(xInlvListPath+"[" + i + "]/medispclid"); var orddrnm = model.getValue(xInlvListPath+"[" + i + "]/orddrnm"); var medispclphonno = model.getValue(xInlvListPath+"[" + i + "]/medispclphonno"); var tocntctel = model.getValue(xInlvListPath+"[" + i + "]/tocntctel"); var stat = "u"; var chngdeptroomflag = "01"; var saveId = "SMMNW18000"; var sexage = model.getValue(xInlvListPath+"[" + i + "]/sex") + "/" + model.getValue(xInlvListPath+"[" + i + "]/age"); var curdd = getCurrentDate(); var curtm = getCurrentTime().substr(0,4); var userid = getUserId(); var usernm = getUserName(); var ordflag = "01"; var inrmcnfmflag = "U"; if(careinrmdd != "-"){ careinrmddcnt++; } if(indd != getCurrentDate()){ inddcnt++; } inroominfoData += check +"¢Ë" + stat +"¢Ë" + inrmcnfmflag +"¢Ë" + saveId +"¢Ë" + chngdeptroomflag +"¢Ë" + instcd +"¢Ë" + pid +"¢Ë" + indd +"¢Ë" + cretno +"¢Ë" + wardcd +"¢Ë" + bedcd +"¢Ë" + roomcd +"¢Ë" + roomgrdecd +"¢Ë" + orddeptcd +"¢Ë" + ordtype +"¢Ë" + patnm +"¢Ë" + sexage +"¢Ë" + toward +"¢Ë" + toroom +"¢Ë" + chngorddeptcd +"¢Ë" + chngatdoctid +"¢Ë" + atdoctnm +"¢Ë" + atdoctidphonno +"¢Ë" + medispclid +"¢Ë" + orddrnm +"¢Ë" + medispclphonno +"¢Ë" + tocntctel +"¢Ë" + curdd +"¢Ë" + curtm +"¢Ë" + userid +"¢Ë" + usernm +"¢Ì"; } } if(inroominfoData == "") { messageBox("¼±ÅÃµÈ ³»¿ªÀÌ", "I004"); return; }else if(careinrmddcnt > 0 ){ messageBox("ÀÌ¹Ì ÀÔ½ÇÀúÀåµÈ °ÇÀº ÀúÀåÀÌ ºÒ°¡ÇÕ´Ï´Ù.","E"); }else if(inddcnt > 0 ){ messageBox("´çÀÏ ÀÔ¿øÈ¯ÀÚ¿¡ ´ëÇØ¼­¸¸ ÀÔ½ÇÀúÀåÀÌ", "I006","\ÀÔ¿øÀÏÀÚ¸¦ È®ÀÎÇϽʽÿÀ.","E"); }else{ model.makeValue("/root/send/savedata", inroominfoHeader+inroominfoData); model.removenode("/root/main/rtninfo"); if(submit("TXMNW18003")== true){ var sMessage = ""; sMessage = model.getValue("/root/main/rtninfo/patinfolist/pid") + " " + model.getValue("/root/main/rtninfo/patinfolist/patnm") + " " + model.getValue("/root/main/rtninfo/patinfolist/sexage") + " " + "ÀԽǵî·ÏµÇ¾ú½À´Ï´Ù." ; if(model.getValue("/root/main/rtninfo/rtnmsg/resultflag") == "2") { sMessage += "\n\nÀÔ¿øÀü °Ë»ç½Ç¿¡¼­ ¹Ì¾×ÆÃµÈ °Ë»ç°¡ Á¸ÀçÇÕ´Ï´Ù.\nÀÔ¿øÀü °Ë»ç½Ç¿¡ È®ÀÎÇϽʽÿÀ!!"; } messageBox(sMessage, "I"); } fSearch() ; } }