/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ½ÅÀå½Ç óġÀåµî·Ï ( SMMND04400_½ÅÀå½ÇóġÀåµî·Ï.xrw - JScript ) - Version : 1) : Ver.1.00.01 - Author : ÃÖ¿øµ· - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ var sBDHTCUREINFO_PATH = "/root/main/bdHtCureinfo/bdHtCureinfo"; /** * creat : 20101019 * author : ÃÖ¿øµ· * desc : ÃʱâÈ­ */ function fInitialize(){ //Á¶È¸Á¶°Ç default ¼¼ÆÃ model.removenode('/root/main/cond'); model.makeValue('/root/main/cond/workdd' , getCurrentDate()); //ÀÛ¾÷ÀÏÀÚ model.makeValue('/root/main/cond/flag' , "H"); //±¸ºÐ model.makeValue('/root/main/cond/ngdtnursid' , getUserId()); //ÇöÀç ·Î±×ÀÎÇÑ »ç¿ëÀÚ ¹øÈ£(ID) model.makeValue('/root/main/cond/ngdtnursnm' , getUserName()); //ÇöÀç ·Î±×ÀÎÇÑ »ç¿ëÀÚ¸í //±×¸®µå ³ëµå ÃʱâÈ­ model.removenode('/root/main/bdHtCureinfo'); model.makenode('/root/main/bdHtCureinfo'); initCalendar(); fGetbdHtCureinfo(); } /** * @desc : ½ÅÀå½Ç óġÀå µî·Ï * @ : ÀúÀå »óŰ¡ ½Å±ÔÀÎ °æ¿ì, ¹«°á¼º µ¥ÀÌÅÍ °Ë»ç ÈÄ ÀúÀå * @ : ÀúÀå »óŰ¡ ¼öÁ¤ÀÎ °æ¿ì, º¯°æµÈ »çÇ×ÀÌ ÀÖ´ÂÁö °Ë»ç, ¹«°á¼º µ¥ÀÌÅÍ °Ë»ç ÈÄ ÀúÀå * @param : * @return : * @author : ÃÖ¿øµ· * @--------------------------------------------------- */ function fClkBtnbdHtCureSave(){ if(!(compareNodeVal('/root/temp', sBDHTCUREINFO_PATH, false))){ messageBox('ÀúÀåÇÒ µ¥ÀÌÅͰ¡', 'I004'); return; } model.removeNodeset("/root/send/savedata"); model.makeNode("/root/send/savedata"); model.copyNode("/root/send/savedata", sBDHTCUREINFO_PATH); if(!submit('TXMND04401')){ messageBox('ÀúÀåÀ» ½ÇÆÐÇÏ¿´½À´Ï´Ù.', 'E999'); return; } model.removeNodeset("/root/temp"); model.makeNode("/root/temp"); model.copyNode("/root/temp", sBDHTCUREINFO_PATH); } /** * creat : 20101014 * author : ÃÖ¿øµ· * desc : ½ÅÀå½Ç óġÀåÁ¶È¸ */ function fGetbdHtCureinfo(bfcopyyn){ //Á¶°Çº¯¼ö var workdd = model.getValue('/root/main/cond/workdd'); //ÀÛ¾÷ÀÏÀÚ //null ó¸® if(workdd == null) { workdd = ''; } //send parameter ¼³Á¤ model.removenode('/root/send'); model.makeValue('/root/send/workdd' , workdd); model.makeValue('/root/send/flag' , model.getValue('/root/main/cond/flag')); model.makeValue('/root/send/ngdtnursid', model.getValue('/root/main/cond/ngdtnursid')); model.makeValue('/root/send/bfcopyyn' , bfcopyyn); //submit È£Ãâ if(!submit('TRMND04401')){ messageBox('Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.', 'E999'); model.setValue('/root/send/bfcopyyn' , ''); return; } if(model.instances(0).selectNodes(sBDHTCUREINFO_PATH + "[instcd!='']").length <= 0) { model.makeValue(sBDHTCUREINFO_PATH + '/instcd' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/workdd' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/seq' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/flag' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/ngdtnursid', ''); model.makeValue(sBDHTCUREINFO_PATH + '/fnexam' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/foexam' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/lab' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/tns' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/sled' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/delive' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/discharge' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/incnts' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/rsrv' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/xray' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/spcltest' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/op' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/dialliqd' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/dialfilm' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/hbsag' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/etc' , ''); model.makeValue(sBDHTCUREINFO_PATH + '/machgd' , ''); } model.removeNodeset("/root/temp"); model.makeNode("/root/temp"); model.copyNode("/root/temp", sBDHTCUREINFO_PATH); if (bfcopyyn == 'Y') { model.setValue(sBDHTCUREINFO_PATH + '/workdd', model.getValue('/root/main/cond/workdd')); model.setValue(sBDHTCUREINFO_PATH + '/seq', ''); model.setValue('/root/send/bfcopyyn' , ''); } model.refresh(); } /** * creat : 20101014 * author : ÃÖ¿øµ· * desc : ½ÅÀå½Ç óġÀå Ãâ·Â */ function fPrintHtCureList(){ if( model.getValue(sBDHTCUREINFO_PATH + "/instcd") == '' || compareNodeVal('/root/temp', sBDHTCUREINFO_PATH, true)) { messageBox('Ãâ·ÂÇÒ ³»¿ªÀÌ ¾ø½À´Ï´Ù.', 'E999'); return; } var dd = model.getValue('/root/main/cond/workdd').toDate("YYYYMMDD"); model.setValue('/root/main/prtinfo/date' , 'ÀÏÀÚ : ' + dd.getDateFormat('YYYY-MM-DD ') + getDateTime(dd, 'W') + '¿äÀÏ'); if ( model.getValue('/root/main/cond/flag') == 'H') { exeReportPreview("RPMND04401", "XMLSTR", "", "", "false","","","","","false", "", "");//Ç÷¾×Åõ¼®Ã³Ä¡Àå } else { exeReportPreview("RPMND04402", "XMLSTR", "", "", "false","","","","","false", "", "");//º¹¸·Åõ¼®Ã³Ä¡Àå } } function initCalendar() { var workdd = model.getValue('/root/main/cond/workdd'); //ÀÛ¾÷ÀÏÀÚ if(workdd == null || workdd == '') { workdd = getCurrentDate(); } var curDate = workdd.toDate(); model.setValue("/root/hidden/calendar/year", curDate.getDateFormat('YYYY')); model.setValue("/root/hidden/calendar/month", curDate.getDateFormat('MM')); model.refresh(); opt_date.value = "** " + model.getValue("/root/hidden/calendar/year") + "³â " + model.getValue("/root/hidden/calendar/month") + "¿ù **"; setCalendar(curDate); } function setCalendar(dateObj) { // ±×¸®µå ÃʱâÈ­ model.removeNodeset("/root/hidden/calendar/weeklist/list"); grd_calendar.rebuild() var today = dateObj.getDate(); // ¿À´Ã ³¯Â¥¸¦ °¡Á®¿È. /************************ 1. objDate.setDate(numDate) ·ÎÄà ½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ³¯Â¥ °ªÀ» ¼³Á¤ÇÕ´Ï´Ù. 2. objDate.getDay() ·ÎÄà ½Ã°£À» »ç¿ëÇÏ¿© Date °³Ã¼ÀÇ ¿äÀÏ °ªÀ» ¹ÝȯÇÕ´Ï´Ù. 0 = ÀÏ¿äÀÏ 1 = ¿ù¿äÀÏ 2 = È­¿äÀÏ 3 = ¼ö¿äÀÏ 4 = ¸ñ¿äÀÏ 5 = ±Ý¿äÀÏ 6 = Åä¿äÀÏ *************************/ dateObj.setDate(1); var startDay = dateObj.getDay(); // ÇØ´ç ´ÞÀÇ ½ÃÀÛ¿äÀÏÀ» ¹Ýȯ var days = dateObj.getMonthDay(); // ÇØ´ç ´ÞÀÇ Àϼö¸¦ ¹Ýȯ //nprw.dll /************************* ceil ¼ýÀÚ Àμöº¸´Ù Å©°Å³ª °°Àº °¡Àå ÀÛÀº Á¤¼ö¸¦ ¹ÝȯÇÕ´Ï´Ù. *************************/ var rows = Math.ceil( ( startDay + days ) / 7 ); for( var i = 0; i < rows; i++ ) grd_calendar.addRow(false); grd_calendar.rebuild(); /************************* fixedRows ½ºÅ©·ÑÀÌ °¡´ÉÇÏÁö ¾ÊÀº °íÁ¤µÈ Çà µéÀ» ¸î °³³ª ¸¸µé °ÍÀÎÁö¸¦ ¼³Á¤ ¶Ç´Â ¸®ÅÏÇÑ´Ù. *************************/ var rowIndex = grd_calendar.fixedRows; var colIndex = startDay; for( var i = 1; i <= days; i++ ) { grd_calendar.valueMatrix(rowIndex, colIndex) = i; //grd_calendar.valueMatrix(rowIndex, colIndex+7) = "0/0"; if(i == today) // ¿À´Ã ³¯Â¥À̸é { // »ö»ó Ç¥½Ã var calRow = rowIndex; var calCol = colIndex; var tmpCalCol; if( calCol < 7 ) tmpCalCol = calCol + 7; else tmpCalCol = calCol - 7; grd_calendar.rebuildStyle(); grd_calendar.cellStyle("background-color", calRow, calCol) = "#daa7d9"; grd_calendar.cellStyle("background-color", calRow, tmpCalCol) = "#daa7d9"; } colIndex++; if( colIndex == 7 ) { colIndex = 0; rowIndex++; } } } function setCellColor(gridObj) { var calRow = gridObj.row; var calCol = gridObj.col; var tmpCalCol; if( calCol < 7 ) tmpCalCol = calCol + 7; else tmpCalCol = calCol - 7; gridObj.rebuildStyle(); gridObj.cellStyle("background-color", calRow, calCol) = "#daa7d9"; gridObj.cellStyle("background-color", calRow, tmpCalCol) = "#daa7d9"; } /** * @--------------------------------------------------- * @desc : µÎ NodeList¿Í NodeValue°ªÀ» ºñ±³ °á°ú¿¡ µû¶ó true, false¸¦ returnÇÑ´Ù. * @ref : C:\KNUProject\application\webapps\emr\prcpmngtweb\js\MMO001.js * @--------------------------------------------------- */ function compareNodeVal(desNode, srcNode, prtYn){ var node = instance1.selectSingleNode(desNode); var node2 = instance1.selectSingleNode(srcNode); var nodeList = node.childNodes; var nodeList2 = node2.childNodes; while(childNode = nodeList.nextNode()){ childNode2 = nodeList2.nextNode(); //alert(childNode.NodeValue + "," + childNode2.NodeValue); //alert(childNode.nodeName + " : " + childNode.NodeValue); if(childNode.NodeValue != childNode2.NodeValue) { if ( prtYn && childNode.nodeName == 'workdd') // ÀüÀϺ¹»ç ¶§¹®¿¡.. Ãâ·Â ½Ã ºñ±³´Â Á¦¿Ü { //... } else { return true; //°ªÀÌ ´Ù¸¥ °æ¿ì true } } } return false; //°ªÀÌ °°Àº °æ¿ì false }