/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ¸¶ÃëȯÀÚ±â·Ï ( SSMMR05800_¸¶ÃëȯÀÚ±â·Ï¸¶½ºÅÍ.xrw - JScript ) - Version : 1) : Ver.1.00.01 2008-06-23 - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ var instcd = "012"; var anstrecno = ""; var currentdate = ""; var prcpmast_load = ""; var prcpset_load = ""; /** ¼ö¼úȯÀÚ parameter ±¸Á¶ : mmohoprs¼ö¼ú¿¹¾àÁ¤º¸ tblÀÇ Á¤º¸¸¦ ±âº»À¸·Î ÇÔ var param = ±¸ºÐÀÚ'T' + "¢Ë" + µî·Ï¹øÈ£ :=pid + "¢Ë" + ¼ö¼úÈ®Á¤ÀÏÀÚ :=opcnfmdd + "¢Ë" + (»ý¼º¹øÈ£) :=cretno + "¢Ë" + ±â°üÄÚµå :=instcd + "¢Ë" + Áýµµ°úÄÚµå :=perfdeptcd + "¢Ë" + ÁýµµÀÇ :=perfdrid + "¢Ë" + ȯÀÚ±¸ºÐ :=patflag + "¢Ë" + ==> ¿Ü·¡(I), ÀÔ¿ø(O), DSC(D), ÀÀ±Þ(E) 󸮱¸ºÐ'F' + "¢Ë" + ¼ö¼ú¿¹¾à¹øÈ£ :=oprsrvno + "¢Ë" + ¼ö¼úÀ̷¹øÈ£ :=ophistno + "¢Ë" + Á¶È¸ÀÏÀÚ; */ /** * @desc : ÆûÃʱâÈ­ ( ¸¶ÃëȯÀÚ ±â·Ï¼Â & ±â·ÏÇ׸ñ Á¶È¸ ) * @ * @param : * @return : * @--------------------------------------------------- */ function fFormInit() { anstrecno = window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/anstrecno"); // ±â·Ï : default tab ó¸® btn_anstrec.dispatch("onclick"); // ÇöÀçÀϽà currentdate = getCurrentDate() + getCurrentTime(); model.setValue("/root/send/reqdata/currentdate" , currentdate); // ±â·Ï Set ¸ñ·Ï model.setValue("/root/send/reqdata/settype", "R"); submit("TRMMR04204","","/root/send/reqdata", "/root/init/recsetlist/item"); // ±â·Ï Set Code var recsetcd = window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/recsetcd"); if (recsetcd == "0") { recsetcd = "-1"; } model.setValue("/root/send/reqdata/recsetcd", recsetcd); if (recsetcd == "-1") { // ¸¶Ãë±â·Ï ¸¶½ºÅÍ Á¤º¸ Á¶È¸ submit("TRMMR04201"); } else { model.setValue("/root/send/setinfo/instcd" , instcd); model.setValue("/root/send/setinfo/settype", "R"); model.setValue("/root/send/setinfo/setcd" , recsetcd); // ÇöÀçÀϽà currentdate = getCurrentDate() + getCurrentTime(); model.setValue("/root/send/setinfo/currentdate" , currentdate); // ¸¶Ãë±â·Ï SET ¾ÆÀÌÅÛ Á¶È¸Çϱâ.. submit("TRMMR04205"); } // ±×¸®µå¸¦ Æ®¸®ÇüÅ·Πº¸¿©ÁÖ±â.. setTree(grd_recmast , grd_recmast.colref("depth"), grd_recmast.colref("rec"), false); if (anstrecno != "0") { // ¸¶Ãë±â·Ï¹øÈ£ model.setValue("/root/send/reqdata/anstrecno", anstrecno); // ¸¶ÃëȯÀÚ ±â·Ï Á¶È¸ submit("TRMMR03704"); // ¸¶ÃëȯÀÚ ±â·Ï Ã¼Å·ÇØÁÖ±â fAnstRecChecked("/root/main/anstrec/item", grd_recmast, "recitem", "checked", "rec", "rectype", "recnm", "subrec"); } } /** * @desc : ó¹æ SET Á¶È¸ * @ * @param : * @return : * @--------------------------------------------------- */ function fPrcpSetLoad() { sw_left1.visible = true; if (prcpset_load != "Y") { // Àüü ¼±ÅÃÀ» À§ÇÑ ±×¸®µå ¼Â.. // grd_agent01.fixedcellcheckbox(0,0) = true; grd_prcpset.fixedcellcheckbox(0,0) = true; var setclscd = model.getValue("/root/send/reqdata/setclscd"); if (setclscd == "") { model.setValue("/root/send/reqdata/setclscd","1"); model.refresh(); // ±×¸®µå ÃʱâÈ­ if (grd_prcpset.rows> 1) { grd_prcpset.removeRow(); grd_prcpset.refresh(); } // ó¹æ SET ¼ö¼úº° Á¶È¸ fComboSetlist(); } prcpset_load = "Y"; } } /** * @desc : ó¹æ ¸¶½ºÅÍ Á¶È¸ * @ * @param : * @return : * @--------------------------------------------------- */ function fPrcpMastLoad() { sw_left1.visible = true; if (prcpmast_load != "Y") { // ¿ë¹ýÁ¶È¸ (ÁÖ»ç¾à) model.setValue ( "/root/send/req/cond1" , "I"); model.setValue ( "/root/send/req/cond2" , 1); model.setValue ( "/root/send/req/cond3" , ""); submit("TRMMR03710"); //°øÅëÄÚµå °¡Á®¿À±â... //M0287:drug ¼ÒºÐ·ù zbcfGetCodeList(new Array("M0287"), new Array("/root/init/M0287")); // Agent ½ÃÀÛÀϽÃ, Á¾·áÀϽà Àû¿ëÀ» À§ÇÑ ±âº» ¼Â model.setValue("/root/hidden/agentfromdd", window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/anstfromdd")); model.setValue("/root/hidden/agentfromtm", window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/anstfromtm")); model.setValue("/root/hidden/agenttodd" , window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/ansttodd")); model.setValue("/root/hidden/agenttotm" , window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/ansttotm")); // 󹿏¶½ºÅÍ Á¤º¸ Á¶È¸ model.setValue("/root/send/reqdata/clscd",""); model.setValue("/root/send/reqdata/prcptype",""); submit("TRMMR04202","","/root/send/reqdata","/root/main/prcpmast/item"); copyNodeset("/root/main/agent/item" , "/root/main/prcpmast/item[prcptype = 'A']"); copyNodeset("/root/main/drug/item" , "/root/main/prcpmast/item[prcptype = 'D']"); copyNodeset("/root/main/fluid/item" , "/root/main/prcpmast/item[prcptype = 'F']"); copyNodeset("/root/main/blod/item" , "/root/main/prcpmast/item[prcptype = 'H']"); copyNodeset("/root/main/proc/item" , "/root/main/prcpmast/item[prcptype = 'P']"); copyNodeset("/root/main/agent01/item", "/root/main/agent/item[clscd = '01']"); copyNodeset("/root/main/agent02/item", "/root/main/agent/item[clscd = '02']"); copyNodeset("/root/main/agent03/item", "/root/main/agent/item[clscd = '03']"); copyNodeset("/root/main/agent04/item", "/root/main/agent/item[clscd = '04']"); // 2008.01.04. drug... ¼ÒºÐ·ù´Â "¸¹À̾²´Â¾à" À¸·Î µðÆúÆ® ó¸®ÇÑ´Ù.. model.setValue("/root/send/reqdata/clscd", "01"); model.setValue("/root/send/reqdata/prcptype","D"); submit("TRMMR04202","","/root/send/reqdata","/root/main/drug/item"); // Inhalational Agent : º°µµ·Î (±×·ì½Ì±Û) Á¶È¸ÇÏ¿© Æ®¸®ÇüÅ·Π¼­ºêÇ׸ñÀ» º¸¿©ÁÜ // submit("TRMMR04208","","/root/send/reqdata","/root/main/agent01/item"); // Inhalational Agent : º°µµ·Î Display (Ç׸ñ ¼±ÅÃÇØ ÁÖ°í, ½ÃÀÛÀϽÃ, Á¾·áÀϽà ´Ù½Ã º¸¿©ÁÖ±â) fDisplayAgent01(); // Ç÷¾×¸®½ºÆ® Á¶È¸ fGetBlodList(); prcpmast_load = "Y"; model.refresh(); } //20131106 Start ó¹æ °Ë»ö ÈÄ DRUG°¡ ¼¼ÆÃ ¾ÈµÇ´Â ¿À·ù ¼öÁ¤ model.resetInstanceNode("/root/send/reqdata/data"); model.resetInstanceNode("/root/main/prcpsearch/item"); model.refresh(); //20131106 End } /** * @desc : Inhalational Agent ÀÎ °æ¿ì ½ÃÀÛÀϽÃ, Á¾·áÀϽà ¼ÂÇØÁÖ±â * @ * @param : * @return : * @author : * @--------------------------------------------------- */ function fSetTimeAgent01() { model.setValue("/root/hidden/agentfromdd", window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/anstfromdd")); model.setValue("/root/hidden/agentfromtm", window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/anstfromtm")); model.setValue("/root/hidden/agenttodd" , window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/ansttodd")); model.setValue("/root/hidden/agenttotm" , window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/ansttotm")); model.refresh(); } /** * @desc : Inhalational Agent : º°µµ·Î Display (Ç׸ñ ¼±ÅÃÇØ ÁÖ°í, ½ÃÀÛÀϽÃ, Á¾·áÀϽà ´Ù½Ã º¸¿©ÁÖ±â) * @ * @param : * @return : * @author : * @--------------------------------------------------- */ function fDisplayAgent01() { var gridObj = grd_agent01; var dataRef = "/root/main/agent01/item"; // Inhalational Agent ÀÎ °æ¿ì ½ÃÀÛÀϽÃ, Á¾·áÀϽà ¼ÂÇØÁÖ±â var agentfromdd = model.getValue("/root/hidden/agentfromdd"); var agentfromtm = model.getValue("/root/hidden/agentfromtm"); var agenttodd = model.getValue("/root/hidden/agenttodd"); var agenttotm = model.getValue("/root/hidden/agenttotm"); var dataCnt = getNodesetCnt(model, dataRef); for (var i=1 ; i <= dataCnt ; i++) { gridObj.textMatrix(i,gridObj.colref("drugfromdd")) = agentfromdd; gridObj.textMatrix(i,gridObj.colref("drugfromtm")) = agentfromtm; gridObj.textMatrix(i,gridObj.colref("drugtodd")) = agenttodd; gridObj.textMatrix(i,gridObj.colref("drugtotm")) = agenttotm; } var prcpRef = "/root/main/anstprcp/item"; var prcpCnt = getNodesetCnt(window.parent.iv_anstprcp.model, prcpRef); // Àüü 󹿏ñ·Ï Áß Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) Ã¼Å·ÇØ ÁÖ±â if (anstrecno != "0") { for (var i=1 ; i <= prcpCnt ; i++) { var prcptype = window.parent.iv_anstprcp.model.getValue(prcpRef+"["+ i +"]/prcptype"); var clscd = window.parent.iv_anstprcp.model.getValue(prcpRef+"["+ i +"]/clscd"); if (prcptype == "A" && clscd == "01") { var prcpcd = window.parent.iv_anstprcp.model.getValue(prcpRef+"["+ i +"]/prcpcd"); // ó¹æÄڵ尡 Àִ°¡? var dataCnt = getNodesetCnt(model, dataRef+"[prcpcd = '"+ prcpcd +"']"); if (dataCnt > 0) { model.setValue(dataRef+"[prcpcd = '"+ prcpcd +"']/checked", "true"); var remark = window.parent.iv_anstprcp.model.getValue(prcpRef+"[prcpcd = '"+ prcpcd +"']/remark"); var tmpString = remark.split("."); if (tmpString.length == 4) { if (tmpString[0].length != 0) { window.parent.iv_anstprcp.model.setValue(prcpRef+"[prcpcd = '"+ prcpcd +"']/drugfromdd",tmpString[0].replace(".","")); } if (tmpString[1].length != 0) { window.parent.iv_anstprcp.model.setValue(prcpRef+"[prcpcd = '"+ prcpcd +"']/drugfromtm",tmpString[1].replace(".","")); } if (tmpString[2].length != 0) { window.parent.iv_anstprcp.model.setValue(prcpRef+"[prcpcd = '"+ prcpcd +"']/drugtodd" ,tmpString[2].replace(".","")); } if (tmpString[3].length != 0) { window.parent.iv_anstprcp.model.setValue(prcpRef+"[prcpcd = '"+ prcpcd +"']/drugtotm" ,tmpString[3].replace(".","")); } } } } } } gridObj.refresh(); model.refresh(); } /** * @desc : ÀúÀåµÈ ±â·Ï Á¤º¸¸¦ ±×¸®µå Æ®¸®ºä ¿¡ üŷ Ç¥½ÃÇÏ°í ±â·Ï¸íĪÀÇ Ãß°¡±â·Ïµµ º¸¿©ÁØ´Ù * @ * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fAnstRecChecked(dataPath, gridObj, levlColNm, checkedColNm, recColNm, rectypeColNm, recnmColNm, subrecColNm) { gridObj.allstyle( "all", "font-weight" ) = "normal"; gridObj.allstyle( "all", "color" ) = "#000000"; for (var i=1 ; i < gridObj.rows ; i++) { gridObj.textmatrix(i, gridObj.colref(checkedColNm)) = "false"; gridObj.textmatrix(i, gridObj.colref(subrecColNm)) = ""; } var dataCnt = getNodesetCnt(model, dataPath); var levlCol = gridObj.colref(levlColNm); var checkedCol = gridObj.colref(checkedColNm); var recCol = gridObj.colref(recColNm); var rectypeCol = gridObj.colref(rectypeColNm); var recnmCol = gridObj.colref(recnmColNm); var subrecCol = gridObj.colref(subrecColNm); //±×¸®µå Æ®¸®ºä ¿¡ üŷ Ç¥½Ã for (var i = 1 ; i <= dataCnt ; i++) { var recitem = model.getValue(dataPath + "["+ i + "]/" + levlColNm); var rectype = model.getValue(dataPath + "["+ i + "]/" + rectypeColNm); var recnm = model.getValue(dataPath + "["+ i + "]/" + recnmColNm); var subrec = model.getValue(dataPath + "["+ i + "]/" + subrecColNm); for (var j=1 ; j < gridObj.rows ; j++) { var tmplevl = gridObj.textmatrix(j, levlCol); if (tmplevl == recitem) { fSetCheckedStyle(gridObj, j, checkedCol, "true"); if (rectype == "R" || rectype == "P") { if (subrec.length > 0) { gridObj.textmatrix(j, recCol) = fDisplayRec(recnm, subrec); gridObj.textmatrix(j, subrecCol) = subrec; } } break; } } } } /** * @desc : Ãß°¡±â·Ï Á¤º¸ º¸¿©ÁÖ±â * @ * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fDisplayRec(recnm, subrec) { var recnmdata = recnm.split("_"); if (recnmdata.length == 2) { recnm = recnmdata[0].replace("_","") + subrec + recnmdata[1].replace("_",""); } else { recnm = recnm + " " + subrec; } return recnm; } /** * @desc : ÀúÀåµÈ ó¹æ Á¤º¸¸¦ ±×¸®µå ¿¡ üŷ Ç¥½Ã * @ * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fAnstPrcpChecked(dataPath, targetPath, prcpcdColNm, checkedColNm) { var dataCnt = getNodesetCnt(model, dataPath) var targetCnt = getNodesetCnt(model, targetPath) //±×¸®µå ¿¡ üŷ Ç¥½Ã for (var i = 1 ; i <= dataCnt ; i++) { var prcpcd = model.getValue(dataPath + "["+ i +"]/" + prcpcdColNm); for (var j=1 ; j < targetCnt ; j++) { var tmpprcpcd = model.getValue(targetPath + "["+ j +"]/" + prcpcdColNm); if (tmpprcpcd == prcpcd) { model.setValue(targetPath + "["+ j +"]/" + checkedColNm, "true"); break; } } } } /** * @desc : ±×¸®µå Æ®¸®ºä ´õºí Ŭ¸¯½Ã üŷ Ç¥½Ã * @ * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fRecDbClick(gridObj) { // ±×¸®µå Æ®¸®ºä ´õºí Ŭ¸¯½Ã üŷ Åä±Û var getChecked = model.getValue("/root/main/recmast/item[" + gridObj.row + "]/checked"); if (getChecked == "true") { getChecked = "false"; } else { getChecked = "true"; } model.setValue("/root/main/recmast/item[" + gridObj.row + "]/checked", getChecked); // ±×¸®µå Æ®¸®ºä ´õºí Ŭ¸¯½Ã üŷ Ç¥½Ã fSetChecked(gridObj, "depth", "recitem", "suprecitem", "checked"); // ±â·Ï ¸¶½ºÅÍÀÇ Ã¼Å©µÈ Á¤º¸¸¦ ¸¶ÃëȯÀÚ ±â·Ï ÀνºÅϽº¿¡ Ä«Çdzëµå Çϱâ.. copyNodeset("/root/main/anstrec/item", "/root/main/recmast/item[checked = 'true']"); // checked "true" À̰í rectype ÀÌ ±â·Ï(R), ó¹æ(P) ÀÎ °æ¿ì¿¡¸¸ ÆË¾÷ó¸® // checked °¡ "true" Àΰ¡? var checked = gridObj.textMatrix(gridObj.row, gridObj.colref("checked")); if (checked == "true") { // rectype ÀÌ ±â·Ï(R), ó¹æ(P) Àΰ¡? var rectype = gridObj.textMatrix(gridObj.row, gridObj.colref("rectype")); if (rectype == "R") { // recnm ¿¡ ±¸ºÐÀÚ "_" °¡ Àִ°¡? ÀÖ´Â °æ¿ì¿¡¸¸ Ãß°¡±â·Ï ÆË¾÷ º¸¿©ÁÖ±â... var recnm = gridObj.textMatrix(gridObj.row, gridObj.colref("recnm")); var recnmdata = recnm.split("_"); if (recnmdata.length > 1) { fAddSubRec(); } } else if (rectype == "P") { fOpenRecPrcp(); } } } /** * @desc : Ãß°¡±â·Ï (¿¹ : ¸ôÇÉ @ ¼ö·® @ mg. -> ¸ôÇÉ 45 mg. ) * @ * @param : * @return : * @--------------------------------------------------- */ function fAddSubRec() { var gridObj = grd_recmast; // ±â·Ï¸¶½ºÅÍ var ref = "/root/main/recmast/item"; // ¼±Åà Row var selectedRow = gridObj.row; model.setValue("/root/hidden/selectedrec", selectedRow); // checked °¡ "true" Àΰ¡? var checked = model.getValue(ref+"["+ selectedRow +"]/checked"); if (checked == "true") { // subrec (Ãß°¡±â·ÏÁ¤º¸°¡ ÀÖÀ¸¸é input box¿¡ Àû¾îÁÖ±â var subrec = model.getValue(ref+"["+ selectedRow +"]/subrec"); model.setValue("/root/hidden/subrec", subrec); model.refresh(); // ÆË¾÷À¸·Î º¸¿©ÁÖÀÚ!!! fShowWndIptBox("subrec"); } else { model.setValue("/root/hidden/subrec", ""); model.refresh(); } } /** * @desc : ±×¸®µå Æ®¸®ºäÀÎ °æ¿ì ¼±Åÿ¡ ÀÇÇØ ¼±ÅÃÇ׸ñ üŷÇÏ¿© boldü·Î Ç¥ÇöÇÑ´Ù. * @ checked °¡ true ÀÌ¸é »óÀ§Ç׸ñµµ checked ¸¦ true ·Î ÇÑ´Ù. * @ checked °¡ false À̸é ÇÏÀ§Ç׸ñµµ checked ¸¦ false ·Î ÇÑ´Ù. * @param : * @ gridObj : grid °´Ã¼ * @ depthColNm : depth Ä÷³ ÂüÁ¶ * @ levlColNm : ·¹º§ Ä÷³ ÂüÁ¶ * @ suplevlColNm : »óÀ§·¹º§ Ä÷³ ÂüÁ¶ * @ checkedCol : checked Ä÷³ ÂüÁ¶ * @return : * @author : * @--------------------------------------------------- */ function fSetChecked(gridObj, depthColNm, levlColNm, suplevlColNm, checkedColNm) { // ¼±ÅÃµÈ ·Î¿ì¿¡ ´ëÇÑ Ã³¸® var depth = gridObj.textmatrix(gridObj.row, gridObj.colref(depthColNm)); var levl = gridObj.textmatrix(gridObj.row, gridObj.colref(levlColNm)); var suplevl = gridObj.textmatrix(gridObj.row, gridObj.colref(suplevlColNm)); var checked = gridObj.textmatrix(gridObj.row, gridObj.colref(checkedColNm)); var checkedCol = gridObj.colref(checkedColNm); // ¼±ÅÃÇ׸ñ ó¸® fSetCheckedStyle(gridObj, gridObj.row, checkedCol, checked); if (checked == "true") { for (var i = gridObj.row -1 ; i > 0 ; i--) { var tmpdepth = gridObj.textmatrix(i, gridObj.colref(depthColNm)); var tmplevl = gridObj.textmatrix(i, gridObj.colref(levlColNm)); var tmpsuplevl = gridObj.textmatrix(i, gridObj.colref(suplevlColNm)); var tmpchecked = gridObj.textmatrix(i, gridObj.colref(checkedColNm)); if (tmpdepth < 1) { break; } if (tmplevl == suplevl) { if (tmpchecked == checked) { break; } fSetCheckedStyle(gridObj, i, checkedCol, checked); suplevl = tmpsuplevl; } } } else { for (var i = gridObj.row+1; i < gridObj.rows; i++) { var tmpdepth = gridObj.textmatrix(i, gridObj.colref(depthColNm)); var tmplevl = gridObj.textmatrix(i, gridObj.colref(levlColNm)); var tmpsuplevl = gridObj.textmatrix(i, gridObj.colref(suplevlColNm)); if (tmpdepth <= depth) { break; } fSetCheckedStyle(gridObj, i, checkedCol, checked); } } gridObj.refresh(); } /** * @desc : ±×¸®µå Æ®¸®ºäÀÎ °æ¿ì ¼±ÅûóŰª(true/false)¿Í Ç¥Çö(bold/normal)À» ÇÑ´Ù. * @param : * @ gridObj : grid °´Ã¼ * @ checkedRow : ¼±Åà ·Î¿ì * @ checkedCol : ¼±Åà Ä÷³ * @ checked : ¼±Åà »óÅ * @return : * @author : * @--------------------------------------------------- */ function fSetCheckedStyle(gridObj, checkedRow, checkedCol, checked) { gridObj.textmatrix(checkedRow, checkedCol) = checked; if (checked == "true") { gridObj.rowStyle(checkedRow, "data", "font-weight") = "bold"; gridObj.rowStyle(checkedRow, "data", "color") = "#0000ff"; } else { gridObj.rowStyle(checkedRow, "data", "font-weight") = "normal"; gridObj.rowStyle(checkedRow, "data", "color") = "#000000"; } } /** * @desc : 󹿏¶½ºÅÍÀÇ Ã³¹æÄÚµå/ó¹æ¸í °Ë»ö * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fGetPrcpDrugClscd() { var clscd = model.getValue("/root/send/reqdata/clscd"); model.setValue("/root/send/reqdata/clscd", clscd); model.setValue("/root/send/reqdata/prcptype","D"); submit("TRMMR04202","","/root/send/reqdata","/root/main/drug/item"); } /** * @desc : 󹿏¶½ºÅÍÀÇ Ã³¹æÄÚµå/ó¹æ¸í °Ë»ö * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fSearchPrcpMast() { currentdate = getCurrentDate() + getCurrentTime(); model.setValue("/root/send/reqdata/currentdate", currentdate); model.setValue("/root/send/reqdata/prcptype", ""); //20131106 ÀÌÁ¤Åà ÁÖ¼®Ã³¸® //model.setValue("/root/send/reqdata/clscd", ""); var data = model.getValue("/root/send/reqdata/data"); model.setValue("/root/send/reqdata/data", data.toUpperCase()); submit("TRMMR04202", "", "/root/send/reqdata", "/root/main/prcpsearch/item"); model.refresh(); } /** * @desc : Agent, Drug, Fluid, Blood, Proc ¿¡¼­ÀÇ Ã³¹æÃß°¡ ¹öư Ŭ¸¯ * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fAddBtnClick(prcptype, clscd) { if (prcptype == "A") { if (clscd == "02") { fAddAnstPrcp(grd_agent02,"/root/main/agent02/item"); copyNodeset("/root/main/agent02/item", "/root/main/agent/item[clscd = '02']"); } else if (clscd == "03") { fAddAnstPrcp(grd_agent03,"/root/main/agent03/item"); copyNodeset("/root/main/agent03/item", "/root/main/agent/item[clscd = '03']"); } else if (clscd == "04") { fAddAnstPrcp(grd_agent04,"/root/main/agent04/item"); copyNodeset("/root/main/agent04/item", "/root/main/agent/item[clscd = '04']"); } } else if (prcptype == "D") { fAddAnstPrcp(grd_drug,"/root/main/drug/item"); copyNodeset("/root/main/drug/item" , "/root/main/prcpmast/item[prcptype = 'D']"); // 2008.01.04. drug... ¼±ÅÃÇÑ ¼ÒºÐ·ù·Î ´Ù½Ã Á¶È¸Çϱâ.. model.setValue("/root/send/reqdata/prcptype","D"); submit("TRMMR04202","","/root/send/reqdata","/root/main/drug/item"); } else if (prcptype == "F") { fAddAnstPrcp(grd_fluid,"/root/main/fluid/item"); copyNodeset("/root/main/fluid/item" , "/root/main/prcpmast/item[prcptype = 'F']"); } else if (prcptype == "H") { fAddAnstPrcp(grd_fluid,"/root/main/blod/item"); copyNodeset("/root/main/blod/item" , "/root/main/prcpmast/item[prcptype = 'H']"); } else if (prcptype == "P") { fAddAnstPrcp(grd_proc,"/root/main/proc/item"); copyNodeset("/root/main/proc/item" , "/root/main/prcpmast/item[prcptype = 'P']"); } else if (prcptype == "S") { fAddAnstPrcp(grd_prcpset,"/root/main/prcpsetitem/item"); copyNodeset("/root/main/prcpsetitem/item", "/root/main/prcpset/item"); } else if (prcptype == "Z") { fAddAnstPrcp(grd_search,"/root/main/prcpsearch/item"); //2014/01/03 grd_search.valueMatrix(grd_search.row, grd_search.colRef("checked"))="false"; //2014/01/03 } model.refresh(); } /** * @desc : ó¹æÃß°¡ ¹öư Ŭ¸¯½Ã 󹿏ñ·Ï¿¡ Ãß°¡ÇÑ´Ù. * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fAddAnstPrcp(gridObj, ref) { // 󹿏ñ·Ï ³ëµå var AddRef = "/root/main/anstprcp/item"; // ³ëµå °¹¼ö¸¦ °¡Á®¿ÂÈÄ ³ëµå Çϳª¸¦ Ãß°¡ÇÑ´Ù. var dataCnt = getNodesetCnt(window.parent.iv_anstprcp.model, AddRef); // agent, drug, fluid, blood, prog for (var i=1 ; i < gridObj.rows ; i++) { var checked = model.getValue(ref+"[" + i + "]/checked"); if (checked == "true") { var prcpcd = model.getValue(ref+"[" + i + "]/prcpcd"); if (prcpcd != "" && prcpcd != null) { var prcpcd = model.getValue(ref+"[" + i + "]/prcpcd"); var prcptype = model.getValue(ref+"[" + i + "]/prcptype"); var clscd = model.getValue(ref+"[" + i + "]/clscd"); var prcpnm = model.getValue(ref+"[" + i + "]/prcpnm"); var abbrnm = model.getValue(ref+"[" + i + "]/abbrnm"); var prcpvol = model.getValue(ref+"[" + i + "]/prcpvol"); var prcpvolunitnm = model.getValue(ref+"[" + i + "]/prcpvolunitnm"); var drugmthdcd = model.getValue(ref+"[" + i + "]/drugmthdcd"); var prcpappyn = model.getValue(ref+"[" + i + "]/prcpappyn"); var totvolyn = model.getValue(ref+"[" + i + "]/totvolyn"); var sortno = model.getValue(ref+"[" + i + "]/sortno"); // 󹿏ñ·Ï¿¡ ó¹æÄڵ尡 Àִ°¡? var cntprcpcd = getNodesetCnt(window.parent.iv_anstprcp.model, AddRef+"[prcpcd = '" + prcpcd + "']"); if (cntprcpcd > 0 && prcptype != "F") { messageBox("ÀÌ¹Ì Ãß°¡µÇ¾ú½À´Ï´Ù. - [" + prcpnm+ "]", "E"); /** ó¹æÀº Çѹø¸¸ ÇÑ´Ù..................................2007.10.09. // ó¹æÄڵ尡 ÀÖ´Ù¸é ¿ë·®¸¸ ´õÇÏÀÚ.. for (var j=1 ; j <= dataCnt ; j++) { var tmpprcpcd = model.getValue(AddRef+"[" + j + "]/prcpcd"); if (prcpcd == tmpprcpcd) { var tmpprcpvol = model.getValue(AddRef+"["+ j +"]/prcpvol"); prcpvol = Number(prcpvol) + Number(tmpprcpvol); model.setValue(AddRef+"["+ j +"]/prcpvol", prcpvol); break; } } */ } else { // ó¹æÄڵ尡 ¾ø´Ù¸é Ãß°¡ÇÏÀÚ.. var checkValue = window.parent.iv_anstprcp.model.getValue(AddRef+"["+dataCnt+"]/prcpnm"); if (checkValue != "" || dataCnt == "0") { dataCnt = dataCnt + 1; } // 2008.09.23. ¾î·Æ´Ù.. var prcpseqno = 0; for (var j=1 ; j <= dataCnt ; j++) { var tmp = window.parent.iv_anstprcp.model.getValue(AddRef+"["+ j +"]/prcpcd"); if (tmp == prcpcd) { prcpseqno = window.parent.iv_anstprcp.model.getValue(AddRef+"["+ j +"]/prcpseqno"); } } prcpseqno = parseInt(prcpseqno) + 1; window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpcd" , prcpcd); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcptype" , prcptype); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpvol" , ""); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpvolunitnm" , prcpvolunitnm); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpvolunitnm2", prcpvolunitnm); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpnm" , prcpnm); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/abbrnm" , abbrnm); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/drugmthdcd" , drugmthdcd); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/recvol" , ""); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/remark" , ""); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/clscd" , clscd); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpappyn" , prcpappyn); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/totvolyn" , totvolyn); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/sortno" , sortno); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/pcaflag" , "N"); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/checked" , checked); // 2008.09.23. 2°³ÀÌ»ó ó¹æÄÚµå Ãß°¡ ±â·ÏÇϱâ.. (fluidÀ϶§) window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpseqno" , prcpseqno); window.parent.iv_anstprcp.model.refresh(); window.parent.javascript.fAddRow(prcptype, prcpcd, sortno, prcpseqno); } } } } // ±×¸®µå Á¤·ÄÈÄ ³ëµå¼Â Á¤·Ä window.parent.iv_anstprcp.window.javascript.fSetAnstPrcp(); // ¸ÞÀÎ ±×¸®µå Á¤·Ä //2014/05/16 ÀÌÁ¤Åà ¼öÁ¤ window.parent.javascript.fGridSort(); //2014/05/16 ÀÌÁ¤Åà ¼öÁ¤ //2012/12/26 Start ±â·Ï & ó¹æ¿¡¼­ ÀÔ·ÂÇßÀ»½Ã¿¡ ¿À¸¥ÂÊ¿¡ ÁÙ ¹Ý¿µ window.parent.javascript.fSetGrdColor(); //2012/12/26 end } /** * @desc : ³ëµå¼Â °¹¼ö ±¸Çϱâ * @ * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function getNodeList(strPath) { var node = instance1.selectNodes(strPath); if(node == null) return 0; return node; } /** * @desc : ¸¶¿ì½º ¿À¸¥ÂÊ ¹öư ÆË¾÷â * @ * @param : * @return : * @--------------------------------------------------- * */ function fMouseRghtBtnPopup(gridObj, job) { if (event.button == 3) { if (gridObj.isCell(event.target)) { if (job == "subrec") { // checked "true" À̰í rectype ÀÌ ±â·Ï(R) ÀÎ °æ¿ì¿¡¸¸ ÆË¾÷ó¸® // checked °¡ "true" Àΰ¡? var checked = gridObj.textMatrix(gridObj.row, gridObj.colref("checked")); if (checked == "true") { // rectype ÀÌ ±â·Ï(R) Àΰ¡? var rectype = gridObj.textMatrix(gridObj.row, gridObj.colref("rectype")); if (rectype == "R") { window.setPopupMenu(true, "/root/hidden/menu2/menu", "label", "func", false); } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } else if (job == "search") { // ó¹æ ¿¡¼­ ¿ìŬ¸¯½Ã ¾àǰÆí¶÷ ÆË¾÷ if (gridObj.row > 0) { window.setPopupMenu(true, "/root/hidden/menu7/menu", "label", "func", false); } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } else { window.setPopupMenu(false); } } /** * @desc :¸¶Ãë±â·Ï Ãß°¡±â·ÏÀÇ ÆË¾÷ * @ * @param : * @return : * @--------------------------------------------------- */ function fShowWndIptBox(job) { grup_subrec.visible = "false"; if (job == "subrec") { if (event.clientY < 700) { grup_subrec.attribute("top") = event.clientY-70; } else { grup_subrec.attribute("top") = event.clientY-150; } grup_subrec.visible = "true"; } } /** * @desc : Ãß°¡±â·Ï ³»¿ë ¸¶Ãë±â·Ï¿¡ Àû¿ëÇϱâ.. * @ * @param : * @return : * @--------------------------------------------------- * */ function fSendSubRec() { var gridObj = grd_recmast; // ±â·Ï¸¶½ºÅÍ var ref = "/root/main/recmast/item"; // ¼±Åà Row var selectedRow = model.getValue("/root/hidden/selectedrec"); if (selectedRow > 0) { // checked °¡ "true" Àΰ¡? var checked = model.getValue(ref+"["+ selectedRow + "]/checked"); if (checked == "true") { // rectype ÀÌ ±â·Ï(R), ó¹æ(P) Àΰ¡? var rectype = model.getValue(ref+"["+ selectedRow + "]/rectype"); if (rectype == "R" || rectype == "P") { var recnm = gridObj.textmatrix(selectedRow, gridObj.colref("recnm")); var subrec = model.getValue("/root/hidden/subrec"); gridObj.textmatrix(selectedRow, gridObj.colref("rec")) = fDisplayRec(recnm, subrec); gridObj.textmatrix(selectedRow, gridObj.colref("subrec")) = subrec; } } } grup_subrec.visible = "false"; // ±â·Ï ¸¶½ºÅÍÀÇ Ã¼Å©µÈ Á¤º¸¸¦ ¸¶ÃëȯÀÚ ±â·Ï ÀνºÅϽº¿¡ Ä«Çdzëµå Çϱâ.. copyNodeset("/root/main/anstrec/item", "/root/main/recmast/item[checked = 'true']"); // ¸¶Ãë±â·Ï Ã¼Å·ÇØÁÖ±â fAnstRecChecked("/root/main/anstrec/item", grd_recmast, "recitem", "checked", "rec", "rectype", "recnm", "subrec"); } /** * @group : SET ¹öư Ŭ¸¯½Ã SET ¸ñ·Ï Á¶È¸ÇÏ¿© ÄÞº¸ ÃʱâÈ­ or ¸®¼Â * @ver : 2007-08-24 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : * @--------------------------------------------------- */ function fComboSetlist() { var dataCnt = getNodesetCnt(model, "/root/init/setlist/item"); if (dataCnt < 2) { model.setValue("/root/send/reqdata/settype","P"); submit("TRMMR04204","","/root/send/reqdata","/root/init/setlist/item"); } // SET ¸ñ·Ï ÄÞº¸ ¸®¼ÂÇϱâ.. var clscd = model.getValue("/root/send/reqdata/setclscd"); model.refresh(); cbo_setlist.choices.itemset.attribute("nodeset") = "/root/init/setlist/item[clscd = '"+ clscd +"']"; cbo_setlist.refresh(); // ÄÞº¸¿¡ ¼ÂÄڵ带 ¼±ÅÃÇØÁÖ±â... model.setValue("/root/send/setinfo/setcd",model.getValue("/root/hidden/prcpsetcd")); model.refresh(); } /** * @group : SET ¸ñ·Ï Á¶È¸ ¼±Åýà SET ¾ÆÀÌÅÛ º¸¿©ÁÖ±â * @ver : 2007-08-24 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : * @--------------------------------------------------- */ function fRecSetItemDisplay() { var recsetcd = cbo_recsetlist.value; window.parent.iv_anstinfo.model.makeValue("/root/main/anstinfo/recsetcd" , model.getValue("/root/send/reqdata/recsetcd")); model.setValue("/root/send/setinfo/instcd" , instcd); model.setValue("/root/send/setinfo/settype", "R"); model.setValue("/root/send/setinfo/setcd" , recsetcd); // ÇöÀçÀϽà currentdate = getCurrentDate() + getCurrentTime(); model.setValue("/root/send/setinfo/currentdate" , currentdate); if (cbo_recsetlist.value != "-1") { // ¸¶Ãë±â·Ï SET ¾ÆÀÌÅÛ Á¶È¸Çϱâ.. submit("TRMMR04205"); } else { // ¸¶Ãë±â·Ï ¸¶½ºÅÍ Á¤º¸ Á¶È¸ submit("TRMMR04201"); } // ±×¸®µå¸¦ Æ®¸®ÇüÅ·Πº¸¿©ÁÖ±â.. setTree(grd_recmast , grd_recmast.colref("depth"), grd_recmast.colref("rec"), false); // ¸¶ÃëȯÀÚ ±â·Ï Ã¼Å·ÇØÁÖ±â fAnstRecChecked("/root/main/anstrec/item", grd_recmast, "recitem", "checked", "rec", "rectype", "recnm", "subrec"); } /** * @group : SET ¸ñ·Ï Á¶È¸ ¼±Åýà SET ¾ÆÀÌÅÛ º¸¿©ÁÖ±â * @ver : 2007-08-24 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : * @--------------------------------------------------- */ function fPrcpSetItemDisplay() { model.setValue("/root/send/setinfo/instcd",instcd); model.setValue("/root/send/setinfo/settype","P"); model.setValue("/root/send/setinfo/setcd",cbo_setlist.value); // ÇöÀçÀϽà currentdate = getCurrentDate() + getCurrentTime(); model.setValue("/root/send/setinfo/currentdate" , currentdate); // ¸¶Ãëó¹æ SET ¾ÆÀÌÅÛ Á¶È¸Çϱâ.. submit("TRMMR04206"); // copyNodeset("/root/main/prcpsetitem/item", "/root/main/prcpset/item"); model.refresh(); } /** * @desc : Á¾·áÀϽà Àû¿ë (¼±ÅÃµÈ Inhalational Agent) * @ * @param : * @return : * @--------------------------------------------------- */ function fSetAnstToDt() { // 2007.12.13. ¸¶Ãë½ÃÀ۽ð£À» È®ÀÎÇÑ´Ù.. ¸¶Ãë½ÃÀ۽ð£À̶û ¼±ÅÃÇÒ ½ÃÀ۽ð£ÀÌ °°À¸¸é ¼±Åý𣠺¯°æÇÑ´Ù.. var anstfromdt = window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/anstfromdd") + window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/anstfromtm"); //20111103 ¼öÁ¤½ÃÀÛ //var agenttodd = window.parent.iv_anstinfo.model.getValue("/root/hidden/agenttodd"); //var agenttotm = window.parent.iv_anstinfo.model.getValue("/root/hidden/agenttotm"); var agenttodd =window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/ansttodd"); var agenttotm =window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/ansttotm"); var todt = agenttodd + agenttotm; //20111103 ¼öÁ¤Á¾·á if (anstfromdt > todt) { alert("Á¾·áÀϽð¡ ¸¶Ãë½ÃÀÛÀϽà º¸´Ù ÀÛ½À´Ï´Ù."); return; } // Inhalational Agent var ref = "/root/main/agent01/item"; var gridObj = grd_agent01; for (var i=1 ; i < gridObj.rows ; i++) { var checked = model.getValue(ref +"[" + i + "]/checked"); var depth = model.getValue(ref +"[" + i + "]/depth"); if (checked == "true" && depth == "1") { gridObj.textMatrix(i, gridObj.colref("drugtodd")) = agenttodd; gridObj.textMatrix(i, gridObj.colref("drugtotm")) = agenttotm; } } gridObj.rebuild(); model.refresh(); } /** * @desc : col = checked : ó¹æ ¸ñ·Ï üũ¹Ú½º Ŭ¸¯½Ã 󹿏ñ·Ï¿¡¼­ Ãß°¡/»èÁ¦ ÇÏ°í ¸ÞÀÎ ±×¸®µå¿¡¼­ Ãß°¡/»èÁ¦ÇÑ´Ù. * @ * @param : * @return : * @--------------------------------------------------- */ function fCheckedPrcpA01(gridObj, ref, row) { if (gridObj.col == gridObj.colref("checked")) { var checked = model.getValue(ref+"["+ row +"]/checked"); var depth = model.getValue(ref+"["+ row +"]/depth"); if (checked == "false" && depth == "1") { // 󹿏ñ·Ï¿¡¼­ »èÁ¦ ÇϽðڽÀ´Ï±î? var result = window.alert("󹿏ñ·Ï¿¡¼­ »èÁ¦ ÇϽðڽÀ´Ï±î?", "", 4 | 32 | 256); if (result == 6) { // yes // »èÁ¦ÇØÁÖÀÚ fDelAnstPrcpA01(gridObj, ref, row); } else { model.setValue(ref+"["+ row +"]/checked", "true"); model.refresh(); } } else if (checked == "true") { // Ãß°¡ÇØÁÖÀÚ fAddAnstPrcpA01(gridObj, ref, row); } } } /** * @desc : Agent ¸¶½ºÅÍ ±×¸®µå ¼±Åýà Àüü ó¹æ ¸ñ·Ï¿¡ Ãß°¡ÇÑ´Ù. * @ - Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) * @ - Àüü 󹿏ñ·Ï¿¡ ÀÖÀ¸¸é skip * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fAddAnstPrcpA01(gridObj, ref, row) { var prcpcd = model.getValue(ref+"[" + row + "]/prcpcd"); var prcptype = model.getValue(ref+"[" + row + "]/prcptype"); var clscd = model.getValue(ref+"[" + row + "]/clscd"); var prcpnm = model.getValue(ref+"[" + row + "]/prcpnm"); var abbrnm = model.getValue(ref+"[" + row + "]/abbrnm"); var prcpvol = model.getValue(ref+"[" + row + "]/prcpvol"); var prcpvolunitnm = model.getValue(ref+"[" + row + "]/prcpvolunitnm"); var drugmthdcd = model.getValue(ref+"[" + row + "]/drugmthdcd"); var prcpappyn = model.getValue(ref+"[" + row + "]/prcpappyn"); var totvolyn = model.getValue(ref+"[" + row + "]/totvolyn"); var sortno = model.getValue(ref+"[" + row + "]/sortno"); // 󹿏ñ·Ï ³ëµå var AddRef = "/root/main/anstprcp/item"; // 󹿏ñ·Ï¿¡ ó¹æÄڵ尡 Àִ°¡? var cntprcpcd = getNodesetCnt(window.parent.iv_anstprcp.model, AddRef+"[prcpcd = '" + prcpcd + "']"); // 󹿏ñ·Ï¿¡ ó¹æÄڵ尡 ¾ø´Â°¡? add if ( cntprcpcd > 0 ) { alert("ÀÌ¹Ì Ãß°¡µÇ¾ú½À´Ï´Ù. - [" + prcpnm+ "]"); return; } else { // ³ëµå °¹¼ö¸¦ °¡Á®¿ÂÈÄ ³ëµå Çϳª¸¦ Ãß°¡ÇÑ´Ù. var dataCnt = getNodesetCnt(window.parent.iv_anstprcp.model, AddRef); var checkValue = window.parent.iv_anstprcp.model.getValue(AddRef+"["+dataCnt+"]/prcpnm"); if (checkValue != "" || dataCnt == "0") { dataCnt = dataCnt + 1; } // 2008.09.23. ¾î·Æ´Ù.. var prcpseqno = 0; for (var j=1 ; j <= dataCnt ; j++) { var tmp = window.parent.iv_anstprcp.model.getValue(AddRef+"["+ j +"]/prcpcd"); if (tmp == prcpcd) { prcpseqno = window.parent.iv_anstprcp.model.getValue(AddRef+"["+ j +"]/prcpseqno"); } } prcpseqno = parseInt(prcpseqno) + 1; window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpcd" , prcpcd); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcptype" , prcptype); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpvol" , ""); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpvolunitnm" , prcpvolunitnm); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpvolunitnm2", prcpvolunitnm); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpnm" , prcpnm); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/abbrnm" , abbrnm); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/drugmthdcd" , drugmthdcd); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/recvol" , ""); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/remark" , ""); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/clscd" , clscd); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpappyn" , prcpappyn); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/totvolyn" , totvolyn); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/sortno" , sortno); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/pcaflag" , "N"); window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/checked" , "true"); // 2008.09.23. 2°³ÀÌ»ó ó¹æÄÚµå Ãß°¡ ±â·ÏÇϱâ.. (fluidÀ϶§) window.parent.iv_anstprcp.model.makeValue(AddRef+"["+dataCnt+"]/prcpseqno" , prcpseqno); window.parent.iv_anstprcp.model.refresh(); // ±×¸®µå Á¤·ÄÈÄ ³ëµå¼Â Á¤·Ä window.parent.iv_anstprcp.window.javascript.fSetAnstPrcp(); window.parent.javascript.fAddRow(prcptype, prcpcd, sortno, prcpseqno); // ¸ÞÀÎ ±×¸®µå Á¤·Ä window.parent.javascript.fGridSort(); // 2008.10.03. °Ë»ö¿¡¼­ ãÀº ó¹æÄڵ带 ¼±ÅÃÇØ ÁÖÀÚ~~ model.setValue("/root/main/agent01/item[prcpcd='" + prcpcd + "']/checked", "true"); } } /** * @desc : Agent ¸¶½ºÅÍ ±×¸®µå ¼±Åà Ãë¼Ò½Ã Àüü ó¹æ ¸ñ·Ï¿¡ »èÁ¦ÇÑ´Ù. * @ - Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) * @ - Àüü 󹿏ñ·Ï¿¡¼­ del * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fDelAnstPrcpA01(gridObj, ref, row) { // 󹿏ñ·Ï ³ëµå var DelRef = "/root/main/anstprcp/item"; // ³ëµå °¹¼ö¸¦ °¡Á®¿À±â var dataCnt = getNodesetCnt(window.parent.iv_anstprcp.model, DelRef); var prcpcd = model.getValue(ref+"[" + row + "]/prcpcd"); // 2008.09.23. 2°³ÀÌ»ó ó¹æÄÚµå Ãß°¡ ±â·ÏÇϱâ.. (fluidÀ϶§) var prcpseqno = model.getValue(ref+"[" + row + "]/prcpseqno"); // 󹿏ñ·Ï¿¡ ó¹æÄڵ尡 Àִ°¡? »èÁ¦ for (var j=1 ; j <= dataCnt ; j++) { var tmpprcptype = window.parent.iv_anstprcp.model.getValue(DelRef+"[" + j + "]/prcptype"); var tmpclscd = window.parent.iv_anstprcp.model.getValue(DelRef+"[" + j + "]/clscd"); var tmpprcpcd = window.parent.iv_anstprcp.model.getValue(DelRef+"[" + j + "]/prcpcd"); var tmpprcpseqno= window.parent.iv_anstprcp.model.getValue(DelRef+"[" + j + "]/prcpseqno"); if (tmpprcptype == "A" && tmpclscd == "01" && tmpprcpcd == prcpcd && tmpprcpseqno == prcpseqno) { // Àüü 󹿏ñ·ÏÀÇ Ç׸ñ »èÁ¦ window.parent.iv_anstprcp.model.destroy(DelRef+"["+ j +"]"); window.parent.iv_anstprcp.model.refresh(); // Åõ¿©ÀϽà ÀνºÅϽºµµ »èÁ¦ window.parent.fDestroyAnstItem("root/main/anstitem/item", prcpcd, prcpseqno); // ±×¸®µå Á¤·ÄÈÄ ³ëµå¼Â Á¤·Ä window.parent.iv_anstprcp.window.javascript.fSetAnstPrcp(); break; } } } /** * @desc : Agent ÀÇ ¼ÒºÐ·ù 01 (Inhalational Agent) ó¹æÀû¿ëÀ¯¹« "N" ÀÎ °æ¿ì * @ - ±×¸®µå Àüü¼±Åà (󹿏ñ·Ï add) / Àüü¼±ÅÃÃë¼Ò (󹿏ñ·Ï del) * @ - >> »ç¶óÁø ¾÷¹« ±â´É 2007.10.10 * @param : * @ * @return : * @author : * @--------------------------------------------------- */ function fCheckedAgent01n(flag) { var gridObj = grd_agent01n; var ref = "/root/main/agent01n/item"; if (flag == "true") { for (var i = 1 ; i < gridObj.rows ; i++) { var prcpcd = model.getValue(ref+"[" + i + "]/prcpcd"); // 󹿏ñ·Ï ³ëµå var AddRef = "/root/main/anstprcp/item"; // 󹿏ñ·Ï¿¡ ó¹æÄڵ尡 Àִ°¡? var cntprcpcd = getNodesetCnt(model, AddRef+"[prcpcd = '" + prcpcd + "']"); if (cntprcpcd == 0) { fAddAnstPrcpA01(gridObj, ref, i); } } } if (flag == "false") { for (var i = 1 ; i < gridObj.rows ; i++) { fDelAnstPrcpA01(gridObj, ref, i); } } } /** * @group : Ç÷¾×¸®½ºÆ® Á¶È¸ * @ver : 2007-11-23 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : * @--------------------------------------------------- */ function fGetBlodList() { //pid = "12158831"; //ioflag = "o"; model.makeValue("/root/send/reqdata/pid" , window.parent.iv_anstinfo.window.javascript.pid); model.makeValue("/root/send/reqdata/ioflag" , window.parent.iv_anstinfo.window.javascript.ioflag); // prcpfromdd, prcptodd (¼ö¼ú¿¹¾àµî·ÏÀÏÀÚ, ¼ö¼úÈ®Á¤ÀÏÀÚ) var prcpfromdd = window.parent.iv_anstinfo.model.getValue("/root/main/oprsrvinfo/rgstdd"); var prcptodd = window.parent.iv_anstinfo.model.getValue("/root/main/oprsrvinfo/opcnfmdd"); var ansttodd = window.parent.iv_anstinfo.model.getValue("/root/main/anstinfo/ansttodd"); model.makeValue("/root/send/reqdata/prcpfromdd" ,prcpfromdd); model.makeValue("/root/send/reqdata/prcptodd" ,prcptodd); model.makeValue("/root/send/reqdata/ansttodd" ,ansttodd); // Ç÷¾×¸®½ºÆ® Á¶È¸Çϱâ.. submit("TRMMR03713"); } /** * @group : ¾àǰÆí¶÷ ÆË¾÷ó¸® * @ver : 2007-12-13 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : * @--------------------------------------------------- */ function fDrugInfo() { // model.setValue ( "/root/hidden/receivedata/srchdrugcd", "prcpcd" )); modal ( "SMADB01900" ); } /** * @group : Ç÷¾×¸®½ºÆ® ´õºíŬ¸¯½Ã Ç÷¾×°ü·Ã ó¹æÇ׸ñ üũÇÏ¿© Ç׸ñÃß°¡ÇÑ´Ù. * @ver : 2007-12-13 * @by : ÀÌÀº¿µ * @--------------------------------------------------- * @type : function * @access : public * @desc : * @--------------------------------------------------- */ function fSetBlodChecked() { if (grd_blodlist.row < 1) { return; } // Ç÷¾×¸®½ºÆ®¿¡¼­ ¼±ÅÃµÈ Ç÷¾× ó¹æÄڵ带 Àд´Ù. var prcpcd = model.getValue("/root/main/blodlist/item[" + grd_blodlist.row + "]/prcpcd"); // Blood ó¹æÇ׸ñ¸®½ºÆ® var ref = "/root/main/blod/item"; var gridObj = grd_blod; for (var i=1 ; i < gridObj.rows ; i++) { var tempprcpcd = model.getValue(ref +"[" + i + "]/prcpcd"); if (tempprcpcd == prcpcd) { model.setValue(ref +"[" + i + "]/checked", "true"); model.refresh(); break; } } if (i < gridObj.rows) { btn_addblod.dispatch("DOMActivate"); } else { alert("¸¶½ºÅÍ¿¡ µî·ÏµÈ Ç÷¾×Á¾·ù°¡ ¾Æ´Õ´Ï´Ù."); } } /** * @group : Ç÷¾×¸®½ºÆ® ¸¶¿ì½º ¿ìŬ¸¯ ÈÄ Ç÷¾×¹øÈ£ º¹»ç ¹öư Ŭ¸¯ ½Ã º¹»çÇÒ ´ë»ó ÇàÀ» üũ ÇÒ ¼ö ÀÖµµ·Ï UI visible * @ver : 2010-03-15 * @by : ÁÖÈñ°æ * @--------------------------------------------------- * @type : function * @access : public * @desc : * @--------------------------------------------------- */ function fSetBlodno() { model.removeNodeset("/root/temp/blodcopy"); var rows = parent.grd_prog.rows; for(i=1; i 1) { for(i=0; i