var sETCPRMSPRCPSETLIST = "/root/main/etcprmsprcpsetinfo/etcprmsprcpsetlist"; var sETCPRMSPRCPSETDETLLIST = "/root/main/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist"; var sETCPRMSPRCPSETLIST_TMP = "/root/hidden/etcprmsprcpsettmp/etcprmsprcpsetlist"; var sETCPRMSPRCPSETLIST_HIDDEN = "/root/hidden/etcprmsprcpsetinfo/etcprmsprcpsetlist"; var sDIAGHISTINFO = "/root/hidden/diaghistinfo/diaghist"; /** * @desc : È­¸é ÃʱâÈ­ * @ * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ model.removeNodeset(sETCPRMSPRCPSETDETLLIST); group1.attribute("height") = 0; model.makeNode("/root/send/reqdata/settypecd"); model.setValue("/root/send/reqdata/settypecd", "D"); model.refresh(); if(submit("TRMMB00601")){ copyNodeSet(sETCPRMSPRCPSETLIST_TMP, sETCPRMSPRCPSETLIST); } } /** * @desc : ¸¶¿ì½º ¿À¸¥ÂÊ ¹öư ÆË¾÷â * @ * @param : * @return : * @--------------------------------------------------- */ function fMouseRghtBtnPopup(){ if(event.button == 3){ if(trv_etcprmsprcpsetlist.isCell(event.target)){ window.setPopupMenu(true, "/root/hidden/menu/menu", "label", "func", false); //ÆË¾÷â ¼ÂÆÃ }else{ window.setPopupMenu(false); } } } /** * @desc : ¸¶¿ì½º ¿À¸¥ÂÊ ¹öư ÆË¾÷â * @ * @param : * @return : * @--------------------------------------------------- */ function fMouseRghtBtnPopupDetlCD(){ if(event.button == 3){ if(grd_etcprmsprcpdetl.isCell(event.target)){ window.setPopupMenu(true, "/root/hidden/menu2/menu", "label", "func", false); //ÆË¾÷â ¼ÂÆÃ }else{ window.setPopupMenu(false); } } } /** * @desc : »õÆú´õ Ãß°¡ * @ * @param : * @return : * @--------------------------------------------------- */ function fAddPrmsDiagSet(){ var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex); var rowPos = item.index + 1; fSetPrmsDiagInfo(rowPos, "i"); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/status", "i"); model.refresh(); //alert(setno + "," + supsetno + "," + setkindcd + "," + setclscd + "," + settrgtcd + "," + settypecd + "," + setnm); fShowWndIptBox(); } /** * @desc : Æú´õ »èÁ¦ * @ * @param : * @return : * @--------------------------------------------------- */ function fDelPrmsDiagSet(){ var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex); var rowPos = item.index + 1; if(fSetPrmsDiagInfo(rowPos, "d")!= -1){ fSavePrmsDiagSet(); } //alert(setno + "," + supsetno + "," + setkindcd + "," + setclscd + "," + settrgtcd + "," + settypecd + "," + setnm);*/ } /** * @desc : Æú´õ ¼öÁ¤ * @ * @param : * @return : * @--------------------------------------------------- */ function fUpdtPrmsDiagSet(){ var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex); var rowPos = item.index + 1; if(fSetPrmsDiagInfo(rowPos, "u")!=-1){ fShowWndIptBox(); } } /** * @desc : ¾à¼ÓÁø´Ü SETÀúÀå * @ * @param : * @return : * @--------------------------------------------------- */ function fSavePrmsDiagSet(){ var setnm = model.getValue("/root/hidden/inputbox/setnm"); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setnm", setnm); model.refresh(); model.copyNode("/root/send/savedata", sETCPRMSPRCPSETLIST_HIDDEN); if(submit("TXMMB00601")){ copyNodeSet(sETCPRMSPRCPSETLIST_TMP, sETCPRMSPRCPSETLIST); } } /** * @desc : ¾à¼ÓÁø´Ü°ü¸® Æú´õ¸íÀ» ÀÔ·ÂÇÒ InputBox¸¦ º¸¿©ÁÜ. * @ * @param : * @return : * @--------------------------------------------------- */ function fShowWndIptBox(){ group1.attribute("top") = event.clientY; group1.attribute("left") = event.clientX; group1.attribute("height") = 32; model.setFocus("ipt_setnm"); model.refresh(); } /** * @desc : ¾à¼ÓÁø´Ü SETÁ¤º¸ SETTING * @ * @param : * @return : * @--------------------------------------------------- */ function fSetPrmsDiagInfo(rowpos, status){ var setno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setno"); if(status == "u" && setno == 1){ messageBox("¼±ÅÃÇÑ Æú´õ´Â ¼öÁ¤", "E001"); return -1; }else if(status == "d" && setno == 1){ messageBox("¼±ÅÃÇÑ Æú´õ´Â »èÁ¦", "E001"); return -1; } var levl = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/levl"); var supsetno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/supsetno"); var setkindcd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setkindcd"); var setclscd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setclscd"); var settrgtcd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/settrgtcd"); var settypecd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/settypecd"); var setnm = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setnm"); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/levl" , levl); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setno" , setno); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setkindcd", setkindcd); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setclscd" , setclscd); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/settrgtcd", settrgtcd); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/settypecd", settypecd); model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/status" , status); if(status == "i"){ model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/supsetno" , setno); }else{ model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/supsetno" , supsetno); } model.refresh(); } /** * @desc : ¾à¼ÓÁø´ÜSET Drag * @ * @param : * @return : * @--------------------------------------------------- */ function fPrmsDiagSetDrag(){ var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex); var rowpos = item.index + 1; fSetPrmsDiagInfo(rowpos, "u"); var setnm = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setnm"); model.setValue("/root/hidden/inputbox/setnm", setnm); model.refresh(); fSavePrmsDiagSet(); } /** * @desc : ¾à¼ÓÁø´ÜSET Drop * @ * @param : * @return : * @--------------------------------------------------- */ function fPrmsDiagSetDrop(){ var rowpos = trv_etcprmsprcpsetlist.mouseRow + 1; var levl = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/levl"); var setno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setno"); var supsetno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/supsetno"); var cmplevl = model.getValue(sETCPRMSPRCPSETLIST_HIDDEN + "/levl"); var cmpsetno = model.getValue(sETCPRMSPRCPSETLIST_HIDDEN + "/setno"); var cmpsupsetno = model.getValue(sETCPRMSPRCPSETLIST_HIDDEN + "/supsetno"); if(setno == cmpsetno){ messageBox("µ¿ÀÏÇÑ À§Ä¡·Î À̵¿", "E001"); return; }else if(setno == cmpsupsetno){ messageBox("ÁöÁ¤µÈ À§Ä¡·Î À̵¿", "E001"); return; } //À̵¿ÇÏ´Â SETÆú´õÀÇ depth°¡ µµÂøÇÏ´Â °÷º¸´Ù ³·Àº ·¹º§ÀÏ °æ¿ì, //ÀÚ½ÅÀÇ child node ¾Æ·¡·Î À̵¿ÇÏ´Â °ÍÀ» ¹æÁöÇÔ. if(cmplevl < levl){ var rootlevl; var rootsetno; while(cmplevl != rootlevl){ rootlevl = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/levl"); rootsetno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setno"); rowpos--; } if(rootsetno == cmpsetno){ messageBox("ÁöÁ¤µÈ À§Ä¡·Î À̵¿", "E001"); return; } } model.setValue(sETCPRMSPRCPSETLIST_HIDDEN + "/supsetno" , setno); model.refresh(); fSavePrmsDiagSet(); } /** * @desc : ¾à¼ÓÁø´ÜSET¿¡ Áø´ÜÃß°¡ * @ * @param : * @return : * @--------------------------------------------------- */ function fAddPrmsDiagDetl(){ var setno = model.getValue("/root/hidden/etcprmsprcpsetdetl/setno"); var settypecd = model.getValue("/root/hidden/etcprmsprcpsetdetl/settypecd"); if(setno.length < 1){ messageBox("Áø´ÜÀ» µî·ÏÇÒ Æú´õ¸¦", "C002"); return; } modal("SPMMB00600", "", "", "", "SPMMB00600"); totRow = grd_etcprmsprcpdetl.rows - 1; var useyn = getParameter("useYN"); if(useyn == "Y"){ var iTotNode = getNodeSetCnt("/root/hidden/diaghistinfo/diaghist"); for(var i = 1; i <= iTotNode ; i++){ var diagcd = model.getValue(sDIAGHISTINFO + "[" + i + "]/diagcd"); var diagnm = model.getValue(sDIAGHISTINFO + "[" + i + "]/icd10engnm"); iChkRow = grd_etcprmsprcpdetl.findRow(diagcd, 1, 4, "true", "true"); if(iChkRow > 0){ messageBox("[" + diagnm + "]Àº Áø´Ü¸íÀº À̹Ì", "E005"); continue; }else{ totRow++; grd_etcprmsprcpdetl.addRow(false); model.setValue(sETCPRMSPRCPSETDETLLIST + "[" + totRow + "]/detlsetcd", diagcd); model.setValue(sETCPRMSPRCPSETDETLLIST + "[" + totRow + "]/termengnm", diagnm); model.setValue(sETCPRMSPRCPSETDETLLIST + "[" + totRow + "]/setno", setno); model.setValue(sETCPRMSPRCPSETDETLLIST + "[" + totRow + "]/settypecd", settypecd); } } model.refresh(); } } /** * @desc : ¾à¼ÓÁø´ÜSET»ó¼¼ Á¶È¸ * @ * @param : * @return : * @--------------------------------------------------- */ function fReqPrmsDetlDiagSet(){ var item = trv_etcprmsprcpsetlist.item(trv_etcprmsprcpsetlist.selectedIndex); var rowpos = item.index + 1; var setno = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/setno"); var settypecd = model.getValue(sETCPRMSPRCPSETLIST_TMP + "[" + rowpos + "]/settypecd"); model.setValue("/root/hidden/etcprmsprcpsetdetl/setno", setno); model.setValue("/root/hidden/etcprmsprcpsetdetl/settypecd", settypecd); model.refresh(); model.makeValue("/root/send/reqdata/setno", setno); model.makeValue("/root/send/reqdata/settypecd", settypecd); submit("TRMMB00602"); } /** * @desc : ¾à¼ÓÁø´ÜSET»ó¼¼ º¹»ç * @ * @param : * @return : * @--------------------------------------------------- */ function fCopyDiagCD(){ totRow = grd_etcprmsprcpdetl.rows; for(var i = 1 ; i < totRow; i++){ if(grd_etcprmsprcpdetl.isSelected(i)==true){ addCopyNode("/root/init/today", "/root/main/etcprmsprcpsetdetlinfo/etcprmsprcpsetdetllist[" + i + "]"); } } } /** * @desc : ¾à¼ÓÁø´ÜSET»ó¼¼ ºÙ¿©³Ö±â * @ * @param : * @return : * @--------------------------------------------------- */ function fPasteDiagCD(){ }