/** * @desc : »öÀÎ Tree ÀÛ¼º * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fInitalize(){ // Edited by NJ 2007-07-21 getDate() -> getCurrentDate() // model.setValue("/root/init/today", getDate()); model.setValue("/root/init/today", getCurrentDate()); var value = model.getValue("/root/hidden/condition/indxflag"); if(checkOpener()){ model.makeValue("/root/hidden/condition/indxflag", model.getValue("/root/hidden/condition/getdata/paramindx")); model.makeValue("/root/hidden/condition/selectedmode", "H"); model.makeValue("/root/hidden/condition/indxuseflag", "TOBE"); } if(model.getValue("/root/hidden/condition/indxflag") == "0") { model.toggle("case1"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { model.toggle("case2"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2"){ model.toggle("case4"); } else{ model.toggle("case3"); } fIndxListSrch(); } /** * @desc : »öÀÎ Tree ÀÛ¼º * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fIndxListSrch(){ model.resetInstanceNode("/root/send"); model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode",model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag")); submit("TRMRT00101"); trv_dgindx.rebuild(); } /** * @desc : ÇØ´ç »öÀο¡ ´ëÇÑ Á¤º¸¸¦ Á¶È¸ * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fIndxInfoListSrch(){ var iIndx = trv_dgindx.focusIndex + 1; var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"); model.setValue("/root/hidden/condition/rowcnt", iIndx); model.resetInstanceNode("/root/send"); model.makeValue("/root/hidden/condition/selectedindx", selIndxCd); model.makeValue("/root/hidden/condition/focusindx", iIndx); model.makeValue("/root/send/indxcd", selIndxCd ); model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); submit("TRMRT00102"); } /** * @desc : ¹öư ¼Ó¼º Setting * * @param : flag(DE: Áø´Ü»öÀÎ(ICD10), OE: ¼ö¼ú»öÀÎ(ICD9), CE: ÁÖÈ£¼Ò»öÀÎ, NE: ¾ÏÁø´Ü»öÀÎ) * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fDisable(flag){ if(flag == "DE"){ ipt_indxcd.disabled = "false"; ipt_indxhngnm.disabled = "false"; ipt_indxengnm.disabled = "false"; ipt_upindxcd.disabled = "false"; btn_upindxcd.disabled = "false"; cmb_indxdrdiflag.disabled = "false"; cmb_highestlvel.disabled = "false"; } else if(flag == "OE"){ ipt_opindxcd.disabled = "false"; ipt_opindxhngnm.disabled = "false"; ipt_opindxengnm.disabled = "false"; ipt_opupindxcd.disabled = "false"; btn_opupindxcd.disabled = "false"; cmb_opindxdrdiflag.disabled = "false"; cmb_highestlvel.disabled = "false"; } else if(flag == "NE"){ ipt_cncindxcd.disabled = "false"; ipt_cncindxhngnm.disabled = "false"; ipt_cncindxengnm.disabled = "false"; ipt_cncupindxcd.disabled = "false"; btn_cncupindxcd.disabled = "false"; cmb_cncindxdrdiflag.disabled = "false"; cmb_highestlvel.disabled = "false"; } else if(flag == "CE"){ ipt_ccindxcd.disabled = "false"; ipt_ccindxhngnm.disabled = "false"; ipt_ccindxengnm.disabled = "false"; ipt_ccupindxcd.disabled = "false"; btn_ccupindxcd.disabled = "false"; cmb_ccindxdrdiflag.disabled = "false"; cmb_highestlvel.disabled = "false"; } else if(flag == "AD"){ ipt_indxcd.disabled = "true"; ipt_indxhngnm.disabled = "true"; ipt_indxengnm.disabled = "true"; btn_upindxcd.disabled = "true"; ipt_upindxcd.disabled = "true"; cmb_indxdrdiflag.disabled = "true"; ipt_opindxcd.disabled = "true"; ipt_opindxhngnm.disabled = "true"; ipt_opindxengnm.disabled = "true"; ipt_opupindxcd.disabled = "true"; btn_opupindxcd.disabled = "true"; cmb_opindxdrdiflag.disabled = "true"; ipt_cncindxcd.disabled = "true"; ipt_cncindxhngnm.disabled = "true"; ipt_cncindxengnm.disabled = "true"; ipt_cncupindxcd.disabled = "true"; btn_cncupindxcd.disabled = "true"; cmb_cncindxdrdiflag.disabled = "true"; ipt_ccindxcd.disabled = "true"; ipt_ccindxhngnm.disabled = "true"; ipt_ccindxengnm.disabled = "true"; ipt_ccupindxcd.disabled = "true"; btn_ccupindxcd.disabled = "true"; cmb_ccindxdrdiflag.disabled = "true"; cmb_highestlvel.disabled = "true"; } model.refresh(); } /** * @desc : »öÀÎÀ» Ãß°¡ÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fAddIndx(){ var iIndx = model.getValue("/root/hidden/condition/rowcnt"); model.makeValue("/root/hidden/condition/highestlvel", ""); //if(model.getValue("/root/hidden/condition/selectedindx") == "" || model.getValue("/root/hidden/condition/selectedindx") == null){ // var rtn1 = messageBox("»óÀ§ »öÀÎÀ» ", "C002"); //} //model.resetInstanceNode("/root/main/indxinfo"); if((trv_dgindx.focusIndex < 0)){ messageBox("»öÀÎÀ» ¼±ÅÃÇÏÁö", "E007"); } if((model.getValue("/root/hidden/condition/indexcode") != "" ) || (trv_dgindx.length == 0)){ var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"); var selIndxSeqNo = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxseqno"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { model.resetInstanceNode("/root/main/indxinfo/diagindx"); fDisable("DE"); model.makeValue("/root/main/indxinfo/diagindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd")); model.makeValue("/root/main/indxinfo/diagindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm")); model.makeValue("/root/main/indxinfo/diagindx/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/main/indxinfo/diagindx/indxseqno", selIndxSeqNo); model.makeNode("/root/main/indxinfo/diagindx/indxcd"); model.makeNode("/root/main/indxinfo/diagindx/indxhngnm"); model.makeNode("/root/main/indxinfo/diagindx/indxengnm"); model.makeNode("/root/main/indxinfo/diagindx/indxdrdiflag"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { model.resetInstanceNode("/root/main/indxinfo/opindx"); fDisable("OE"); model.makeValue("/root/main/indxinfo/opindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd")); model.makeValue("/root/main/indxinfo/opindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm")); model.makeValue("/root/main/indxinfo/opindx/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/main/indxinfo/opindx/indxseqno", selIndxSeqNo); model.makeNode("/root/main/indxinfo/opindx/indxcd"); model.makeNode("/root/main/indxinfo/opindx/indxhngnm"); model.makeNode("/root/main/indxinfo/opindx/indxengnm"); model.makeNode("/root/main/indxinfo/opindx/indxdrdiflag"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { model.resetInstanceNode("/root/main/indxinfo/ccindx"); fDisable("CE"); model.makeValue("/root/main/indxinfo/ccindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd")); model.makeValue("/root/main/indxinfo/ccindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm")); model.makeValue("/root/main/indxinfo/ccindx/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/main/indxinfo/ccindx/indxseqno", selIndxSeqNo); model.makeNode("/root/main/indxinfo/ccindx/indxcd"); model.makeNode("/root/main/indxinfo/ccindx/indxhngnm"); model.makeNode("/root/main/indxinfo/ccindx/indxengnm"); model.makeNode("/root/main/indxinfo/ccindx/indxdrdiflag"); }else if (model.getValue("/root/hidden/condition/indxflag") == "1" || model.getValue("/root/hidden/condition/indxflag") == "3" || model.getValue("/root/hidden/condition/indxflag") == "4") { model.resetInstanceNode("/root/main/indxinfo/cncrindx"); fDisable("NE"); model.makeValue("/root/main/indxinfo/cncrindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd")); model.makeValue("/root/main/indxinfo/cncrindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm")); model.makeValue("/root/main/indxinfo/cncrindx/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/main/indxinfo/cncrindx/indxseqno", selIndxSeqNo); model.makeNode("/root/main/indxinfo/cncrindx/indxcd"); model.makeNode("/root/main/indxinfo/cncrindx/indxhngnm"); model.makeNode("/root/main/indxinfo/cncrindx/indxengnm"); model.makeNode("/root/main/indxinfo/cncrindx/indxdrdiflag"); } } model.setValue("/root/hidden/condition/state", "I"); //ÃÖ»óÀ§ ·¹º§ µî·Ï(»óÀ§ÄÚµå=À妽ºÄÚµå) model.refresh(); } /** * @desc : »öÀÎÀ» ¼±ÅÃÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSelIndx(){ if(model.getValue("/root/hidden/condition/indxflag") == "0") { model.toggle("case1"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { model.toggle("case2"); }else if(model.getValue("/root/hidden/condition/indxflag") == "2"){ model.toggle("case4"); } else{ model.toggle("case3"); } fIndxListSrch(); fDisable("AD"); model.resetInstanceNode("/root/hidden/condition/indexcode"); model.refresh(); } /** * @desc : ÃÖ»óÀ§ ¾ÏÁø´Ü »öÀÎÀ¸·Î ¼³Á¤ÇÑ´Ù * * @param : * @return : 2008/07/07 ÀÌâ·Ï ¼öÁ¤ (üũ »óŰ¡¾Æ´Ï¸é ¿ø·¡µÇ·Î µÇµ¹¸®±â) * @author : HIT EMR Team * @--------------------------------------------------- */ function fSetHighIndx(){ var iIndx = trv_dgindx.focusIndex + 1; if(model.getValue("/root/hidden/condition/highestlvel") == "Y"){ ipt_upindxcd.disabled = "true"; if(model.getValue("/root/hidden/condition/indxflag") == "0") { model.makeValue("/root/main/indxinfo/diagindx/upindxcd", "-"); model.makeValue("/root/main/indxinfo/diagindx/upindxhngnm", ""); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { model.makeValue("/root/main/indxinfo/opindx/upindxcd", "-"); model.makeValue("/root/main/indxinfo/opindx/upindxhngnm", ""); } else if(model.getValue("/root/hidden/condition/indxflag") == "2"){ model.makeValue("/root/main/indxinfo/ccindx/upindxcd", "-"); model.makeValue("/root/main/indxinfo/ccindx/upindxhngnm", ""); } else{ model.makeValue("/root/main/indxinfo/cncrindx/upindxcd", "-"); model.makeValue("/root/main/indxinfo/cncrindx/upindxhngnm", ""); } } else { ipt_upindxcd.disabled = "false"; if(model.getValue("/root/hidden/condition/indxflag") == "0") { model.makeValue("/root/main/indxinfo/diagindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/upindxcd")); model.makeValue("/root/main/indxinfo/diagindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm")); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { model.makeValue("/root/main/indxinfo/opindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/upindxcd")); model.makeValue("/root/main/indxinfo/opindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm")); } else if(model.getValue("/root/hidden/condition/indxflag") == "2"){ model.makeValue("/root/main/indxinfo/ccindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/upindxcd")); model.makeValue("/root/main/indxinfo/ccindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm")); } else{ model.makeValue("/root/main/indxinfo/cncrindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/upindxcd")); model.makeValue("/root/main/indxinfo/cncrindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm")); } } model.refresh(); } /** * @desc : ¾ÏÁø´Ü »öÀÎÁ¤º¸¸¦ ÀúÀåÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSaveCncrDiagIndx(){ var state = model.getValue("/root/hidden/condition/state"); if(state == "-"){ messageBox("½Å±Ô ¹× ¼öÁ¤ ¸ðµå¸¦", "C002"); return; } if(model.getValue("/root/main/indxinfo/cncrindx/indxcd") == ""){ messageBox("»öÀÎÄÚµå´Â ","I003"); return; } //ÀÔ·ÂÇÑ »öÀÎÄÚµå¿Í µ¿ÀÏÇÑ Äڵ尡 Á¸ÀçÇÏ´ÂÁö Ã¼Å©ÇØº» ÈÄ µ¿ÀÏÇÑ ÄÚµå Á¸ÀçÇÏ¸é ¼öÁ¤, Á¸ÀçÇÏÁö ¾ÊÀ¸¸é µî·Ï model.resetInstanceNode("/root/send"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { //ºÐ±â:Áø´Ü model.copyNode("/root/send", "/root/main/indxinfo/diagindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //ºÐ±â:¼ö¼ú model.copyNode("/root/send", "/root/main/indxinfo/opindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //ºÐ±â:ÁÖÈ£¼Ò model.copyNode("/root/send", "/root/main/indxinfo/ccindx"); }else { //ºÐ±â:¾Ï model.copyNode("/root/send", "/root/main/indxinfo/cncrindx"); } model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag")); model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state")); submit("TRMRT00103"); if(model.getValue("/root/hidden/condition/state") == "I") { if(model.getValue("/root/main/equalindx/indxcount/count") == "0"){ if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); } else { var rtn = messageBox("µ¿ÀÏÇÑ »öÀÎÄڵ尡 Á¸ÀçÇϹǷΠµî·Ï ", "E001"); } } else { if(model.getValue("/root/main/equalindx/indxcount/count") == "1") { var rtn = messageBox("»öÀÎÀ» ¼öÁ¤", "S001"); if (rtn == "6"){ model.setValue("/root/hidden/condition/state", "U"); model.setValue("/root/send/state", "U"); if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); } else { return; } } else { var rtn = messageBox("µ¿ÀÏÇÑ »öÀÎÄڵ尡 Á¸ÀçÇÏÁö ¾ÊÀ¸¹Ç·Î ¼öÁ¤ ", "E001"); } } model.resetInstanceNode("/root/main/indxinfo"); model.setValue("/root/hidden/condition/state", ""); model.setValue("/root/hidden/condition/indexcode", model.getValue("/root/send/indxcd")); ipt_upindxcd.disabled = "true"; fDisable("AD"); model.refresh(); } /** * @desc : ¾ÏÁø´Ü »öÀÎÀ» »èÁ¦ÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fDelCncrDiagIndx(){ var rtn = messageBox("»öÀÎÀ» ", "Q001"); if (rtn == "6"){ model.setValue("/root/hidden/condition/state", "D"); model.resetInstanceNode("/root/send"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { //ºÐ±â:Áø´Ü model.copyNode("/root/send", "/root/main/indxinfo/diagindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //ºÐ±â:¼ö¼ú model.copyNode("/root/send", "/root/main/indxinfo/opindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //ºÐ±â:ÁÖÈ£¼Ò model.copyNode("/root/send", "/root/main/indxinfo/ccindx"); }else { model.copyNode("/root/send", "/root/main/indxinfo/cncrindx"); } model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state")); if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); model.resetInstanceNode("/root/main/indxinfo"); model.setValue("/root/hidden/condition/state", ""); model.refresh(); } } /** * @desc : ¾ÏÁø´Ü ÇØ´ç »öÀÎÀÇ »óÀ§ »öÀÎÀ» ¼±ÅÃÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSelCncrDiagHighIndx(){ model.removeNodeset("/root/send"); model.makeValue("/root/send/paramindx",""); model.makeValue("/root/send/parammode",""); model.setValue("/root/send/paramindx", model.getValue("/root/hidden/condition/indxflag")); model.setValue("/root/send/parammode", model.getValue("/root/hidden/condition/selectedmode")); modal("SPMRT01200", 1,10, 10, "SPMRT01200", "/root/send", "/root/hidden/condition/getdata"); var child = "SPMRT01200"; if(child != null){ var getVal1 = getParameter("setVal1"); var getVal2 = getParameter("setVal2"); model.setValue("/root/main/indxinfo/cncrindx/upindxcd", getVal1); model.setValue("/root/main/indxinfo/cncrindx/upindxhngnm", getVal2); model.refresh(); } } /** * @desc : Áø´Ü(ICD10) »öÀÎÁ¤º¸¸¦ ÀúÀåÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSaveDiagIndx(){ var state = model.getValue("/root/hidden/condition/state"); if(state == "-"){ messageBox("½Å±Ô ¹× ¼öÁ¤ ¸ðµå¸¦", "C002"); return; } if(model.getValue("/root/main/indxinfo/diagindx/indxcd") == ""){ messageBox("»öÀÎÄÚµå´Â ","I003"); return; } //ÀÔ·ÂÇÑ »öÀÎÄÚµå¿Í µ¿ÀÏÇÑ Äڵ尡 Á¸ÀçÇÏ´ÂÁö Ã¼Å©ÇØº» ÈÄ µ¿ÀÏÇÑ ÄÚµå Á¸ÀçÇÏ¸é ¼öÁ¤, Á¸ÀçÇÏÁö ¾ÊÀ¸¸é µî·Ï model.resetInstanceNode("/root/send"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { //ºÐ±â:Áø´Ü model.copyNode("/root/send", "/root/main/indxinfo/diagindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //ºÐ±â:¼ö¼ú model.copyNode("/root/send", "/root/main/indxinfo/opindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //ºÐ±â:ÁÖÈ£¼Ò model.copyNode("/root/send", "/root/main/indxinfo/ccindx"); }else { //ºÐ±â:¾Ï model.copyNode("/root/send", "/root/main/indxinfo/cncrindx"); } model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag")); model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state")); submit("TRMRT00103"); if(model.getValue("/root/hidden/condition/state") == "I") { if(model.getValue("/root/main/equalindx/indxcount/count") == "0"){ if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); } else { var rtn = messageBox("µ¿ÀÏÇÑ »öÀÎÄڵ尡 Á¸ÀçÇϹǷΠµî·Ï ", "E001"); } } else { if(model.getValue("/root/main/equalindx/indxcount/count") == "1") { var rtn = messageBox("»öÀÎÀ» ¼öÁ¤", "S001"); if (rtn == "6"){ model.setValue("/root/hidden/condition/state", "U"); model.setValue("/root/send/state", "U"); if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); trv_dgindx.rebuild(); } else { return; } } else { var rtn = messageBox("µ¿ÀÏÇÑ »öÀÎÄڵ尡 Á¸ÀçÇÏÁö ¾ÊÀ¸¹Ç·Î ¼öÁ¤ ", "E001"); } } model.resetInstanceNode("/root/main/indxinfo"); model.setValue("/root/hidden/condition/state", ""); model.setValue("/root/hidden/condition/indexcode", model.getValue("/root/send/indxcd")); ipt_upindxcd.disabled = "true"; fDisable("AD"); model.refresh(); } /** * @desc : Áø´Ü »öÀÎÀ» »èÁ¦ÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fDelDiagIndx(){ var rtn = messageBox("»öÀÎÀ» ", "Q001"); if (rtn == "6"){ model.setValue("/root/hidden/condition/state", "D"); model.resetInstanceNode("/root/send"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { //ºÐ±â:Áø´Ü model.copyNode("/root/send", "/root/main/indxinfo/diagindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //ºÐ±â:¼ö¼ú model.copyNode("/root/send", "/root/main/indxinfo/opindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //ºÐ±â:ÁÖÈ£¼Ò model.copyNode("/root/send", "/root/main/indxinfo/ccindx"); }else { model.copyNode("/root/send", "/root/main/indxinfo/cncrindx"); } model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state")); if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); model.resetInstanceNode("/root/main/indxinfo"); model.setValue("/root/hidden/condition/state", ""); model.refresh(); } } /** * @desc : Áø´Ü ÇØ´ç »öÀÎÀÇ »óÀ§ »öÀÎÀ» ¼±ÅÃÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSelDiagHighIndx(){ model.removeNodeset("/root/send"); model.makeValue("/root/send/paramindx",""); model.makeValue("/root/send/parammode",""); model.makeValue("/root/send/paramindxuseflag",""); model.setValue("/root/send/paramindx", model.getValue("/root/hidden/condition/indxflag")); model.setValue("/root/send/parammode", model.getValue("/root/hidden/condition/selectedmode")); model.setValue("/root/send/paramindxuseflag", model.getValue("/root/hidden/condition/indxuseflag")); modal("SPMRT01200_»öÀμ±ÅÃ", 1,10, 10, "SPMRT01200", "/root/send", "/root/hidden/condition/getdata"); var child = "SPMRT01200"; var getVal1 = getParameter("setVal1"); var getVal2 = getParameter("setVal2"); if((child != "")&&((getVal1 != "")|| (getVal1 != ""))){ model.setValue("/root/main/indxinfo/diagindx/upindxcd", getVal1); model.setValue("/root/main/indxinfo/diagindx/upindxhngnm", getVal2); model.refresh(); } } /** * @desc : ¼ö¼ú ÇØ´ç »öÀÎÀÇ »óÀ§ »öÀÎÀ» ¼±ÅÃÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSelOpHighIndx(){ model.removeNodeset("/root/send"); model.makeValue("/root/send/paramindx",""); model.makeValue("/root/send/parammode",""); model.setValue("/root/send/paramindx", model.getValue("/root/hidden/condition/indxflag")); model.setValue("/root/send/parammode", model.getValue("/root/hidden/condition/selectedmode")); modal("SPMRT01200", 1,10, 10, "SPMRT01200", "/root/send", "/root/hidden/condition/getdata"); var child = "SPMRT01200"; if(child != null){ var getVal1 = getParameter("setVal1"); var getVal2 = getParameter("setVal2"); model.setValue("/root/main/indxinfo/opindx/upindxcd", getVal1); model.setValue("/root/main/indxinfo/opindx/upindxhngnm", getVal2); model.refresh(); } } /** * @desc : ¼ö¼ú(ICD9) »öÀÎÁ¤º¸¸¦ ÀúÀåÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSaveOpIndx(){ var state = model.getValue("/root/hidden/condition/state"); if(state == "-"){ messageBox("½Å±Ô ¹× ¼öÁ¤ ¸ðµå¸¦", "C002"); return; } if(model.getValue("/root/main/indxinfo/opindx/indxcd") == ""){ messageBox("»öÀÎÄÚµå´Â ","I003"); return; } //ÀÔ·ÂÇÑ »öÀÎÄÚµå¿Í µ¿ÀÏÇÑ Äڵ尡 Á¸ÀçÇÏ´ÂÁö Ã¼Å©ÇØº» ÈÄ µ¿ÀÏÇÑ ÄÚµå Á¸ÀçÇÏ¸é ¼öÁ¤, Á¸ÀçÇÏÁö ¾ÊÀ¸¸é µî·Ï model.resetInstanceNode("/root/send"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { //ºÐ±â:Áø´Ü model.copyNode("/root/send", "/root/main/indxinfo/diagindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //ºÐ±â:¼ö¼ú model.copyNode("/root/send", "/root/main/indxinfo/opindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //ºÐ±â:ÁÖÈ£¼Ò model.copyNode("/root/send", "/root/main/indxinfo/ccindx"); }else { //ºÐ±â:¾Ï model.copyNode("/root/send", "/root/main/indxinfo/cncrindx"); } model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag")); model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state")); submit("TRMRT00103"); if(model.getValue("/root/hidden/condition/state") == "I") { if(model.getValue("/root/main/equalindx/indxcount/count") == "0"){ if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); } else { var rtn = messageBox("µ¿ÀÏÇÑ »öÀÎÄڵ尡 Á¸ÀçÇϹǷΠµî·Ï ", "E001"); } } else { if(model.getValue("/root/main/equalindx/indxcount/count") == "1") { var rtn = messageBox("»öÀÎÀ» ¼öÁ¤", "S001"); if (rtn == "6"){ model.setValue("/root/hidden/condition/state", "U"); model.setValue("/root/send/state", "U"); if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); } else { return; } } else { var rtn = messageBox("µ¿ÀÏÇÑ »öÀÎÄڵ尡 Á¸ÀçÇÏÁö ¾ÊÀ¸¹Ç·Î ¼öÁ¤ ", "E001"); } } model.resetInstanceNode("/root/main/indxinfo"); model.setValue("/root/hidden/condition/state", ""); model.setValue("/root/hidden/condition/indexcode", model.getValue("/root/send/indxcd")); ipt_upindxcd.disabled = "true"; fDisable("AD"); model.refresh(); } /** * @desc : ¼ö¼ú »öÀÎÀ» »èÁ¦ÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fDelOpIndx(){ var rtn = messageBox("»öÀÎÀ» ", "Q001"); if (rtn == "6"){ model.setValue("/root/hidden/condition/state", "D"); model.resetInstanceNode("/root/send"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { //ºÐ±â:Áø´Ü model.copyNode("/root/send", "/root/main/indxinfo/diagindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //ºÐ±â:¼ö¼ú model.copyNode("/root/send", "/root/main/indxinfo/opindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //ºÐ±â:ÁÖÈ£¼Ò model.copyNode("/root/send", "/root/main/indxinfo/ccindx"); }else { model.copyNode("/root/send", "/root/main/indxinfo/cncrindx"); } model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state")); if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); model.resetInstanceNode("/root/main/indxinfo"); model.setValue("/root/hidden/condition/state", ""); model.refresh(); } } /** * @desc : ÁÖÈ£¼Ò ÇØ´ç »öÀÎÀÇ »óÀ§ »öÀÎÀ» ¼±ÅÃÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSelCcHighIndx(){ model.removeNodeset("/root/send"); model.makeValue("/root/send/paramindx",""); model.makeValue("/root/send/parammode",""); model.setValue("/root/send/paramindx", model.getValue("/root/hidden/condition/indxflag")); model.setValue("/root/send/parammode", model.getValue("/root/hidden/condition/selectedmode")); modal("SPMRT01200", 1,10, 10, "SPMRT01200", "/root/send", "/root/hidden/condition/getdata"); var child = "SPMRT01200"; if(child != null){ var getVal1 = getParameter("setVal1"); var getVal2 = getParameter("setVal2"); model.setValue("/root/main/indxinfo/opindx/upindxcd", getVal1); model.setValue("/root/main/indxinfo/opindx/upindxhngnm", getVal2); model.refresh(); } } /** * @desc : ÁÖÈ£¼Ò »öÀÎÁ¤º¸¸¦ ÀúÀåÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fSaveCcIndx(){ var state = model.getValue("/root/hidden/condition/state"); if(state == "-"){ messageBox("½Å±Ô ¹× ¼öÁ¤ ¸ðµå¸¦", "C002"); return; } if(model.getValue("/root/main/indxinfo/ccindx/indxcd") == ""){ messageBox("»öÀÎÄÚµå´Â ","I003"); return; } //ÀÔ·ÂÇÑ »öÀÎÄÚµå¿Í µ¿ÀÏÇÑ Äڵ尡 Á¸ÀçÇÏ´ÂÁö Ã¼Å©ÇØº» ÈÄ µ¿ÀÏÇÑ ÄÚµå Á¸ÀçÇÏ¸é ¼öÁ¤, Á¸ÀçÇÏÁö ¾ÊÀ¸¸é µî·Ï model.resetInstanceNode("/root/send"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { //ºÐ±â:Áø´Ü model.copyNode("/root/send", "/root/main/indxinfo/diagindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //ºÐ±â:¼ö¼ú model.copyNode("/root/send", "/root/main/indxinfo/opindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //ºÐ±â:ÁÖÈ£¼Ò model.copyNode("/root/send", "/root/main/indxinfo/ccindx"); }else { //ºÐ±â:¾Ï model.copyNode("/root/send", "/root/main/indxinfo/cncrindx"); } model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag")); model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state")); submit("TRMRT00103"); if(model.getValue("/root/hidden/condition/state") == "I") { if(model.getValue("/root/main/equalindx/indxcount/count") == "0"){ if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); } else { var rtn = messageBox("µ¿ÀÏÇÑ »öÀÎÄڵ尡 Á¸ÀçÇϹǷΠµî·Ï ", "E001"); } } else { if(model.getValue("/root/main/equalindx/indxcount/count") == "1") { var rtn = messageBox("»öÀÎÀ» ¼öÁ¤", "S001"); if (rtn == "6"){ model.setValue("/root/hidden/condition/state", "U"); model.setValue("/root/send/state", "U"); if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); } else { return; } } else { var rtn = messageBox("µ¿ÀÏÇÑ »öÀÎÄڵ尡 Á¸ÀçÇÏÁö ¾ÊÀ¸¹Ç·Î ¼öÁ¤ ", "E001"); } } model.resetInstanceNode("/root/main/indxinfo"); model.setValue("/root/hidden/condition/state", ""); model.setValue("/root/hidden/condition/indexcode", model.getValue("/root/send/indxcd")); ipt_upindxcd.disabled = "true"; fDisable("AD"); model.refresh(); } /** * @desc : ÁÖÈ£¼Ò »öÀÎÀ» »èÁ¦ÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fDelCcIndx(){ var rtn = messageBox("»öÀÎÀ» ", "Q001"); if (rtn == "6"){ model.setValue("/root/hidden/condition/state", "D"); model.resetInstanceNode("/root/send"); if(model.getValue("/root/hidden/condition/indxflag") == "0") { //ºÐ±â:Áø´Ü model.copyNode("/root/send", "/root/main/indxinfo/diagindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //ºÐ±â:¼ö¼ú model.copyNode("/root/send", "/root/main/indxinfo/opindx"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //ºÐ±â:ÁÖÈ£¼Ò model.copyNode("/root/send", "/root/main/indxinfo/ccindx"); }else { model.copyNode("/root/send", "/root/main/indxinfo/cncrindx"); } model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state")); if(isPopup()){ //ÆË¾÷È­¸éÀÌ¸é ºÎ¸ðÈ­¸é¿¡ ¸®ÅÏÇÒ °ªÀ» ¼ÂÆÃÇÑ´Ù. opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state")); } submit("TXMRT00101"); model.resetInstanceNode("/root/main/indxinfo"); model.setValue("/root/hidden/condition/state", ""); model.refresh(); } } /** * @desc : »öÀÎÀ» ¼öÁ¤ÇÑ´Ù * * @param : * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fEditIndx(){ if(model.getValue("/root/hidden/condition/indexcode") != "" ) { if(model.getValue("/root/hidden/condition/indxflag") == "0") { fDisable("DE"); } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { fDisable("OE"); } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { fDisable("CE"); }else if (model.getValue("/root/hidden/condition/indxflag") == "1" || model.getValue("/root/hidden/condition/indxflag") == "3" || model.getValue("/root/hidden/condition/indxflag") == "4") { fDisable("NE"); } } model.setValue("/root/hidden/condition/state", "U"); //ÃÖ»óÀ§ ·¹º§ µî·Ï(»óÀ§ÄÚµå=À妽ºÄÚµå) model.refresh(); } /** * @desc : Drag & Drop * * @param : srcNodePos : ±âÁ¸ »öÀÎÀ§Ä¡ * : targetNodePos : ¹Ù²ð »öÀÎÀ§Ä¡ * @return : * @author : HIT EMR Team * @--------------------------------------------------- */ function fDragDropIndx(){ var treePath = "/root/main/indxlist/item"; var node = root.main.indxlist.item; var ins = document.models(0).instances(0); var srcValue = trv_dgindx.item(trv_dgindx.mouseRow).value; //alert("drop=" + srcValue); var targetNode = ins.selectSingleNode(treePath + "[indxcd='"+srcValue+"']" ); //alert(targetNode.xml); //alert("drag=" + trv_dgindx.value); var srcNode = ins.selectSingleNode(treePath + "[indxcd='"+trv_dgindx.value+"']"); //alert(srcNode.xml); //alert(model.getValue(treePath + "[indxcd='"+srcValue+"']/indxseqno")+","+ model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxseqno")); if(model.getValue(treePath + "[indxcd='"+srcValue+"']/indxcd") != model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxcd")){ var rtn = messageBox("»öÀÎ ¼ø¼­ º¯°æÀ»", "Q004"); if(rtn != 6){ return; } if((model.getValue(treePath + "[indxcd='"+srcValue+"']/upindxcd") == model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/upindxcd")) && (rtn == 6)){ // °ªÀº level¿¡¼­¸¸ ¼ø¼­º¯°æÀÌ °¡´ÉÇÏ´Ù // indxseqno °ªÀ» º¯°æ if(parseInt(model.getValue(treePath + "[indxcd='"+srcValue+"']/indxseqno")) < parseInt(model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxseqno"))){ //alert("À§·Î"); model.makeValue("/root/send/reqdata/dragdrop/state", "PLUS"); model.makeValue("/root/send/reqdata/dragdrop/indxcd", model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxcd")); model.makeValue("/root/send/reqdata/dragdrop/indxseqno", model.getValue(treePath + "[indxcd='"+srcValue+"']/indxseqno")); model.makeValue("/root/send/reqdata/dragdrop/preindxseqno", model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxseqno")); model.makeValue("/root/send/reqdata/dragdrop/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/reqdata/dragdrop/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/reqdata/dragdrop/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag")); } else { //alert("¾Æ·¡·Î"); model.makeValue("/root/send/reqdata/dragdrop/state", "MINUS"); model.makeValue("/root/send/reqdata/dragdrop/indxcd", model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxcd")); model.makeValue("/root/send/reqdata/dragdrop/indxseqno", model.getValue(treePath + "[indxcd='"+srcValue+"']/indxseqno")); model.makeValue("/root/send/reqdata/dragdrop/preindxseqno", model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxseqno")); model.makeValue("/root/send/reqdata/dragdrop/mode", model.getValue("/root/hidden/condition/selectedmode")); model.makeValue("/root/send/reqdata/dragdrop/indxflag", model.getValue("/root/hidden/condition/indxflag")); model.makeValue("/root/send/reqdata/dragdrop/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag")); } node.insertBefore(srcNode, targetNode); model.resetInstanceNode("/root/main/indxlist/item"); if(submit("TXMRT00102")){ messageBox("»öÀκ¯°æÀÌ", "I001"); } } else if(rtn == 6){ messageBox("´Ù¸¥ Level·Î »öÀκ¯°æÀ»", "E001"); } } trv_dgindx.rebuild(); }