1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591 |
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면을 초기화 한다
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitalize(){
- grd_termlist.colHidden(1) = true;
- var currentTime = getCurrentTime();
- var instcd = getUserInfo("dutplceinstcd");
-
- // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
- //model.setValue("/root/init/today", getDate());
- model.setValue("/root/init/today", getCurrentDate());
- model.setValue("/root/init/curruntTime", currentTime.substr(0,4));
- model.setValue("/root/hidden/condition/selctedmode", "D");
-
- model.setValue("/root/init/userinfo/userid", getUserId());
- model.setValue("/root/init/userinfo/usernm", getUserName());
- model.setValue("/root/init/userinfo/instcd", getUserInfo("dutplceinstcd"));
-
- //2009-05-06 오전 9:55:28 강지훈 수정 : 선택할수있는 기관을 공통코드로 관리한다.
- zbcfGetCodeList( new Array("M0534"), new Array("/root/init/M0534list") ); //화면하단의 사용되는 기관 CheckBox instance 초기화
- copyNodeset("/root/init/M0534selcmb", "/root/init/M0534list", "replace");//중앙의료원일때 보이는 기관선택 Combo Instance 초기화
- copyNodeset("/root/init/M0534allcmb", "/root/init/M0534list", "replace");//기관별이력조회의 Combo Instance 초기화
- addComboInstance("/root/init/M0534selcmb", "cdid^cdnm", "001^전체", "M0534");
- addComboInstance("/root/init/M0534allcmb", "cdid^cdnm", "-^전체", "M0534");
-
- //2009-03-12 오전 10:59:38 강지훈 수정 : 접속 기관별 보여지는 항목이 다르다.
- //maininstyn : 중앙관리자여부, selInstcd : 선택기관코드
- if(instcd == "001"){ //중앙의료원에서 접속할경우
- model.setValue("/root/hidden/condition/maininstyn", "Y");
- cap_selInst.visible = true;
- cmb_selInst.visible = true;
- cmb_selInst.value = "001";
- cap_selInst.refresh();
- btn_saverow.disabled = true;
- }
- else{
- model.setValue("/root/hidden/condition/maininstyn", "N");
- model.setValue("/root/hidden/condition/selInstcd", instcd);
- }
-
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/indxviewmode"));
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- submit("TRMRT00701");
- model.refresh();
-
- }
- /**
- * @group :
- * @ver : 2007.03.20
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 버튼 Enable / Disable
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDisabled(flag) {
-
- var maininstyn = model.getValue("/root/hidden/condition/maininstyn");
-
- if(flag == "ETN" || flag == "ETM") {
- cmb_icd9cd.disabled = "false";
- if(flag == "ETM"){
- ipt_opattrcd.disabled = "true";
- btn_opattrcd.disabled = "true";
- ipt_termcd.disabled = "true";
- ipt_snmdcnptid.disabled = "false";
- ipt_termtodd.disabled = "true";
- if(maininstyn == "Y"){
- rdo_essntermflag.disabled = "false";
- }
- } else {
- ipt_opattrcd.disabled = "true";
- btn_opattrcd.disabled = "true";
- ipt_termcd.disabled = "true";
- ipt_snmdcnptid.disabled = "false";
- ipt_termtodd.disabled = "false";
- opt_Hdicd9cd.visible = "false";
- cmb_icd9cd.visible = "true";
- btn_delete2.disabled = "true";
-
- if(maininstyn == "Y"){
- cap_appinst.disabled = "false";
- chk_appinst.disabled = "false";
- rdo_essntermflag.disabled = "false";
- }
- }
- //btn_snmddescid.disabled = "false";
- ipt_termfromdd.disabled = "false";
- ipt_engnm.disabled = "false";
- ipt_hngnm.disabled = "false";
- cmb_reprflag.disabled = "false";
- //ipt_verflag.disabled = "false";
- btn_medreccd.disabled = "false";
- cmb_version.disabled = "false";
- ipt_calcscor.disabled = "false";
- } else if(flag == "TN" || flag == "TM") {
- ipt_opattrcd.disabled = "true";
- btn_opattrcd.disabled = "true";
- ipt_termcd.disabled = "true";
- cmb_reprflag.disabled = "false";
- ipt_engnm.disabled = "false";
- ipt_hngnm.disabled = "false";
- ipt_termfromdd.disabled = "false";
- ipt_termtodd.disabled = "false";
- cmb_version.disabled = "true";
- ipt_snmdcnptid.disabled = "false"; // 동의어 일때도 conceptid 등록 가능
- chk_appinst.disabled = "true";
- rdo_essntermflag.disabled = "true";
- //btn_snmdcnptid.disabled = "true";
- } else if(flag == "AS") {
- //??? ?? ??
- cmb_icd9cd.disabled = "true";
- ipt_opattrcd.disabled = "true";
- btn_opattrcd.disabled = "true";
- ipt_termcd.disabled = "true";
- ipt_snmdcnptid.disabled = "true";
- btn_snmdcnptid.disabled = "true";
- //btn_snmddescid.disabled = "true";
- ipt_engnm.disabled = "true";
- ipt_hngnm.disabled = "true";
- cmb_reprflag.disabled = "true";
- //ipt_verflag.disabled = "true";
- btn_medreccd.disabled = "true";
- ipt_termfromdd.disabled = "true";
- ipt_termtodd.disabled = "true";
- ipt_calcscor.disabled = "true";
- cmb_version.disabled = "true";
- chk_appinst.disabled = "true";
- rdo_essntermflag.disabled = "true";
- }
- }
- function fCntlReset(flag) {
- if(flag == "TN"){
- model.resetInstanceNode("/root/main/peprterminfo/info/termengnm");
- model.resetInstanceNode("/root/main/peprterminfo/info/termhngnm");
- model.resetInstanceNode("/root/main/peprterminfo/info/reprflag");
- }
- if((flag == "ETN") || (flag == "SAVE")){
- model.resetInstanceNode("/root/main/peprterminfo/info/snmdcnptid");
- model.resetInstanceNode("/root/main/peprterminfo/info/snmdcnptnm");
- model.resetInstanceNode("/root/main/peprterminfo/info/calcscorcd");
- model.resetInstanceNode("/root/main/peprterminfo/info/opattrverflag");
- model.resetInstanceNode("/root/main/peprterminfo/info/icd9cd");
- model.resetInstanceNode("/root/main/icd9cdlist/info");
- model.resetInstanceNode("/root/main/peprterminfo/info/opattrcd");
- model.resetInstanceNode("/root/main/peprterminfo/info/termcd");
- model.resetInstanceNode("/root/main/peprterminfo/info/opattrmedireccd");
- model.resetInstanceNode("/root/main/peprterminfo/info/termengnm");
- model.resetInstanceNode("/root/main/peprterminfo/info/termhngnm");
- model.resetInstanceNode("/root/main/peprterminfo/info/reprflag");
- model.resetInstanceNode("/root/main/peprterminfo/info/attrfromdd");
- model.resetInstanceNode("/root/main/peprterminfo/info/icdfromdd");
- }
- }
- function fAddRow(flag) {
- var iRow = 0;
- var currentTime = getCurrentTime();
- if(flag == "I") {
- grd_icd9.addItem();
- iRow = grd_icd9.row - grd_icd9.fixedRows + 1;
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/state", "I");
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9todd", "99991231");
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9fromdd", model.getValue("/root/init/today"));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/fstrgstdt", model.getValue("/root/init/today") + currentTime.substr(0,6));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/lastupdtdt", model.getValue("/root/init/today") + currentTime.substr(0,6));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/fstrgstrid", model.getValue("/root/init/userinfo/userid"));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/lastupdtrid", model.getValue("/root/init/userinfo/userid"));
- } else if(flag == "D") {
- grd_opcd.addItem();
- iRow = grd_opcd.row - grd_opcd.fixedRows + 1;
- model.setValue("/root/main/opcdinfo/opcd[" + iRow + "]/state", "I" );
- model.setValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrtodt", "99991231235959");
- }
- }
- /**
- * @group :
- * @ver : 2007.04.11
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 부서선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCallDeptInfo(){
- var xCondPath = "/root/hidden/condition";
- model.removenodeset("/root/main/indxlist/item");
- model.removenodeset("/root/main/deptopcdlist/deptopcdinfo");
- trv_dgindx.rebuild();
- grd_deptop.rebuild();
- zbcfOpenInstDeptCodeList("deptnm", model.getValue(xCondPath+"/deptset/selecteddeptnm"), xCondPath+"/deptset/selecteddeptcd", xCondPath+"/deptset/selecteddeptnm", "ordduseryn", "");
- if(model.getValue(xCondPath+"/deptset/selecteddeptcd") != ""){
- model.removenode("/root/send");
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/deptcd", model.getValue("/root/hidden/condition/deptset/selecteddeptcd"));
- if(submit("TRMRT00710")){
- model.removenodeset("/root/main/deptopcdlist/deptopcdinfo");
- model.setValue(xCondPath+"/selectedIndx","");
- grd_deptop.rebuild();
- trv_dgindx.rebuild();
- }
- }else{
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2007.04.11
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과수술 용어 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchDeptOpInfo(){
- var xCondPath = "/root/hidden/condition";
- var sIndxCd = model.getValue(xCondPath+"/selectedIndx");
- var sDeptCd = model.getValue(xCondPath+"/deptset/selecteddeptcd");
- if(sDeptCd == ""){
- messageBox("부서코드를 먼저", "C002");
- return;
- }
-
- if(sIndxCd == ""){
- messageBox("색인코드를 먼저", "C002");
- return;
- }
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/indxcd", sIndxCd);
- model.makeValue("/root/send/indxflag", model.getValue(xCondPath+"/indxflag"));
- model.makeValue("/root/send/deptcd", sDeptCd);
- submit("TRMRT00711");
- }
- /**
- * @group :
- * @ver : 2007.04.12
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과수술 용어 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveDeptOpInfo(){
- var xCondPath = "/root/hidden/condition";
- var sSelIndxCd = model.getValue(xCondPath+"/selectedIndx");
- model.removenode("/root/send");
- model.makeValue("/root/send/indxcd", sSelIndxCd);
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/deptcd", model.getValue(xCondPath+"/deptset/selecteddeptcd"));
- model.makeValue("/root/send/deptopcdlist", grd_deptop.getUpdateDataAll("i"));
- submit("TXMRT00702");
- }
- /**
- * @group :
- * @ver : 2007.04.12
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과수술에 수술 추가
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendDeptOp(){
- var sCondPath = "/root/hidden/condition/deptset";
- var sIndxListPath = "/root/main/indxlist/item";
- var sSrchedOpCdListPath = "/root/main/srchedopcdlist/srchedopcdinfo";
- var sDeptOpCdListPath = "/root/main/deptopcdlist/deptopcdinfo";
- var sDeptCd = model.getValue(sCondPath+"/selecteddeptcd");
- var sIndxCd = model.getValue("/root/hidden/condition/selectedIndx");
- var sIndxNm = model.getValue("/root/main/indxlist/item[indxcd='"+sIndxCd+"']/indxhngnm");;
- var sSrchedOpRowCnt = grd_srchedopinfo.rows - grd_srchedopinfo.fixedrows;
- var iDeptOpRow = 0;
- var sTermcd = "";
- if(sDeptCd == ""){
- messageBox("부서코드를 먼저", "C002");
- return;
- }
-
- if(sIndxCd == ""){
- messageBox("색인코드를 먼저", "C002");
- return;
- }
- for(var iSrchedOpRow = 1; iSrchedOpRow <= sSrchedOpRowCnt; iSrchedOpRow++){
- if(model.getValue(sSrchedOpCdListPath+"["+iSrchedOpRow+"]/check") == "true"){
- sTermcd = model.getValue(sSrchedOpCdListPath+"["+iSrchedOpRow+"]/termcd");
- if(model.getValue(sDeptOpCdListPath+"[termcd = '"+sTermcd+"' and deptindxcd = '"+sIndxCd+"']/termcd") != "") continue;
- grd_deptop.addItem();
- iDeptOpRow = grd_deptop.rows - grd_deptop.fixedrows;
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/status","I");
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/deptcd",sDeptCd);
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/deptnm",model.getValue(sCondPath+"/selecteddeptnm"));
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/termcd",sTermcd);
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/deptindxcd",sIndxCd);
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/deptindxnm",sIndxNm);
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/termengnm",model.getValue(sSrchedOpCdListPath+"["+iSrchedOpRow+"]/termengnm"));
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/termhngnm",model.getValue(sSrchedOpCdListPath+"["+iSrchedOpRow+"]/termhngnm"));
- model.setValue(sDeptOpCdListPath+"["+iDeptOpRow+"]/deptindxflag",model.getValue("/root/hidden/condition/indxflag"));
- }
- }
- grd_deptop.rebuild();
- }
- /**
- * @group :
- * @ver : 2007.04.12
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과수술 추가시 수술 용어 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchOpInfo(){
- var sCondPath = "/root/hidden/condition/deptset";
- var sSrchedOpCdInfoPath = "/root/main/srchedopcdlist/srchedopcdinfo";
- var srchnm = model.getValue(sCondPath+"/srchnm");
- srchnm = srchnm.replace(/^ *| *$/g, "");
-
- model.removenode("/root/send");
- if(model.getValue(sCondPath+"/srchnm") == ""){
- messageBox("조회할 내용을","C001");
- return;
- }
- model.removenodeset(sSrchedOpCdInfoPath);
- grd_srchedopinfo.rebuild();
- model.makeValue("/root/send/srchflag", model.getValue(sCondPath+"/srchflag")); //
- model.makeValue("/root/send/srchnm", srchnm); // ??????
- model.makeValue("/root/send/termflag",model.getValue("/root/hidden/condition/indxflag")); // ????????
- submit("TRMRT00712");
- }
- /**
- * @group :
- * @ver : 2007.04.16
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전체수술조회 팝업 호출
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCallExtnOpInfo(){
- setParameter("indxflag", model.getValue("/root/hidden/condition/indxflag"));
- modal("SPMRT01000", 1,10,10);
-
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수가 조회 화면 호출
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetCalcScor(){
- model.removeNodeset("/root/temp");
- model.makeValue("/root/temp", model.getValue("/root/main/peprterminfo/info/calcscorcd"));
- modal("SMPIC00200", 1,10, 10, "SMPIC00200", "/root/temp", "/root/temp");
- model.setValue("/root/main/peprterminfo/info/calcscorcd", model.getValue("/root/temp/mech/calcscorcd"));
- ipt_calcscor.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술 용어 리스트를 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelOpList(){
- btn_addrow.attribute("visibility") = "hidden";
- btn_delrow.attribute("visibility") = "hidden";
- btn_saverow.attribute("visibility") = "visible";
- btn_modify.attribute("visibility") = "hidden";
- model.setValue("/root/hidden/condition/selctedmode", "D");
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/indxviewmode"));
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- submit("TRMRT00701");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과수술 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelDeptOp(){
- btn_addrow.attribute("visibility") = "hidden";
- btn_delrow.attribute("visibility") = "hidden";
- btn_saverow.attribute("visibility") = "hidden";
- btn_modify.attribute("visibility") = "hidden";
- model.setValue("/root/hidden/condition/deptset/srchflag","H");
- model.setValue("/root/hidden/condition/deptset/srchnm","");
- model.setValue("/root/hidden/condition/deptset/selecteddeptcd","");
- model.setValue("/root/hidden/condition/deptset/selecteddeptnm","");
- model.setValue("/root/hidden/condition/selctedmode", "P");
- model.setValue("/root/hidden/condition/indxflag", "9"); // 진단 : 0, 수술 : 9
- model.removenodeset("/root/main/indxlist/item");
- model.removenodeset("/root/main/srchedopcdlist/srchedopcdinfo");
- model.removenodeset("/root/main/deptopcdlist/deptopcdinfo");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술 용어 신규 등록시 확장코드 생성
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetNewExtCd(){
- //ICD9코드 선택 시, 새로운 확장, 용어코드 및 ICD시작일자 함께 조회
- var iCd = cmb_icd9cd.focusIndex + 1;
- var selCd = model.getValue("/root/main/icd9cdlist/info[" + iCd + "]/icd9cd");
- // var iSelCd = selCd.substr(0,2) + "." + selCd.substr(2, selCd.length-2);
- // Edited by Nj 2007-08-07 IDC9코드의 '.'을 삭제하기로함
- var iSelCd = selCd;
- var path = model.getValue("/root/hidden/condition/selectedIndxPath"); //인덱스코드.속성코드.용어코드
-
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/temp");
- model.makeValue("/root/send/icd9cd", iSelCd);
- model.setValue("/root/hidden/condition/selectedicd9", iSelCd);
- model.makeNode("/root/main/temp/icd9info");
- submit("TRMRT00707");
-
- model.setValue("/root/main/peprterminfo/info/icd9cd", selCd);
- model.setValue("/root/main/peprterminfo/info/opattrcd", model.getValue("/root/main/temp/icd9info/opattrcd"));
- model.setValue("/root/main/peprterminfo/info/termcd", model.getValue("/root/main/temp/icd9info/termcd"));
- var path = model.getValue("/root/hidden/condition/selectedIndxPath").split(".");
- model.setValue("/root/main/peprterminfo/info/opattrdrindxcd", path[path.length-2]);
- if(model.getValue("/root/main/temp/icd9info/opattrmedireccd") == ""){
- model.setValue("/root/main/peprterminfo/info/opattrmedireccd", model.getValue("/root/main/peprterminfo/info/opattrdrindxcd"));
- } else {
- model.setValue("/root/main/peprterminfo/info/opattrmedireccd", model.getValue("/root/main/temp/icd9info/opattrmedireccd"));
- }
- model.setValue("/root/main/peprterminfo/info/icdfromdd", model.getValue("/root/main/temp/icd9info/icdfromdd"));
- // Edited by NJ 2007-07-21 getDate()- > getCurrentDate()
- //model.setValue("/root/main/peprterminfo/info/attrfromdd", getDate());
- model.setValue("/root/main/peprterminfo/info/attrfromdd", getCurrentDate());
- model.setValue("/root/main/peprterminfo/info/attrtodd", "99991231");
- model.setValue("/root/main/peprterminfo/info/reprflag", "R"); //신규모드일때에는 디폴트 R
- model.setValue("/root/main/peprterminfo/info/termflag", "9");
- model.setValue("/root/main/peprterminfo/info/fstrgstdate", model.getValue("/root/init/today"));
- model.setValue("/root/main/peprterminfo/info/fstrgsttime", model.getValue("/root/init/curruntTime"));
- model.setValue("/root/main/peprterminfo/info/fstrgstdt", model.getValue("/root/main/peprterminfo/info/fstrgstdate")+model.getValue("/root/main/peprterminfo/info/fstrgsttime")+"00");
- model.setValue("/root/main/peprterminfo/info/termfromdd", model.getValue("/root/init/today"));
- model.setValue("/root/main/peprterminfo/info/termtodd", "99991231");
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/init/userinfo/userid"));
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 동의어 리스트에서 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetSynom(){
- var iRow = grd_termlist.row;
- var indx = model.getValue("/root/hidden/condition/selectedIndx");
- var path = model.getValue("/root/hidden/condition/selectedIndxPath");
- var term = model.getValue("/root/main/sametermlist/info[" + iRow + "]/termcd");
- model.setValue("/root/hidden/condition/selectedtermcd", term);
-
- opt_Hdicd9cd.visible = "true";
- cmb_icd9cd.visible = "false";
- btn_delete2.disabled = "false";
- fDisabled("AS");
-
- if( !isNull(iRow) ){
- model.setValue("/root/hidden/condition/status", "STM");
- //model.setValue("/root/main/peprterminfo/info/icd9cd", term.split(".")[0] + term.split(".")[1]); //icd9
- //model.setValue("/root/main/peprterminfo/info/opattrcd", term.split(".")[2]); // 확장코드
- //model.setValue("/root/main/peprterminfo/info/termcd", term.split(".")[3]); // 대표어(동의어)코드
-
- model.setValue("/root/main/peprterminfo/info/icd9cd", term.split(".")[0]); //icd9
- model.setValue("/root/main/peprterminfo/info/opattrcd", term.split(".")[1]); // 확장코드
- model.setValue("/root/main/peprterminfo/info/termcd", term.split(".")[2]); // 대표어(동의어)코드
- model.setValue("/root/main/peprterminfo/info/snmdcnptid", model.getValue("/root/main/sametermlist/info[" + iRow + "]/snmdcnptid")); // 스노메드-dscrpt
- model.setValue("/root/main/peprterminfo/info/snmdcnptnm", model.getValue("/root/main/sametermlist/info[" + iRow + "]/snmdcnptnm")); // 스노메드명
- model.setValue("/root/main/peprterminfo/info/calcscorcd", model.getValue("/root/main/sametermlist/info[" + iRow + "]/calcscorcd")); // 수가코드
- model.setValue("/root/main/peprterminfo/info/termengnm", model.getValue("/root/main/sametermlist/info[" + iRow + "]/termengnm")); // 영문
- model.setValue("/root/main/peprterminfo/info/termhngnm", model.getValue("/root/main/sametermlist/info[" + iRow + "]/termhngnm")); // 한글
- model.setValue("/root/main/peprterminfo/info/reprflag", model.getValue("/root/main/sametermlist/info[" + iRow + "]/reprflag")); // 대표어구분
- model.setValue("/root/main/peprterminfo/info/termflag", model.getValue("/root/main/sametermlist/info[" + iRow + "]/termflag")); // 용어구분
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/sametermlist/info[" + iRow + "]/lastupdtrnm"));
- //저장시 필요한 키값
- model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/sametermlist/info[" + iRow + "]/attrfromdd"));
- model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/sametermlist/info[" + iRow + "]/attrtodd"));
- model.setValue("/root/main/peprterminfo/info/icdfromdd", model.getValue("/root/main/sametermlist/info[" + iRow + "]/icdfromdd"));
- model.setValue("/root/main/peprterminfo/info/alttermcd", model.getValue("/root/main/sametermlist/info[" + iRow + "]/alttermcd"));
-
- var fstrgstdt = model.getValue("/root/main/sametermlist/info[" + iRow + "]/fstrgstdt");
- var termfromdd = model.getValue("/root/main/sametermlist/info[" + iRow + "]/termfromdd");
- var termtodd = model.getValue("/root/main/sametermlist/info[" + iRow + "]/termtodd");
-
- model.setValue("/root/main/peprterminfo/info/fstrgstdt", fstrgstdt); // 등록일
- model.setValue("/root/main/peprterminfo/info/fstrgstdate", fstrgstdt.substr(0,8));
- model.setValue("/root/main/peprterminfo/info/fstrgsttime", fstrgstdt.substr(8,4));
- model.setValue("/root/main/peprterminfo/info/termfromdd", termfromdd); // 시작일
- model.setValue("/root/main/peprterminfo/info/termtodd", termtodd); // 종료일
-
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술용어 사용종료
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fEndOpTerm(){
- var selTermcd = model.getValue("/root/hidden/condition/selectedtermcd");
- var selCd = model.getValue("/root/main/peprterminfo/info/icd9cd");
- // var insicd9cd = selCd.substr(0,2) + "." + selCd.substr(2, selCd.length-2);
- // Edited by Nj 2007-08-07 IDC9코드의 '.'을 삭제하기로 함
- var insicd9cd = selCd
- var insopattrcd = model.getValue("/root/main/peprterminfo/info/opattrcd");
- var insTermcd = model.getValue("/root/main/peprterminfo/info/termcd");
- var fullTermCode = insicd9cd + "." + insopattrcd + "." + insTermcd;
-
- var sRow = grd_termlist.rows - grd_termlist.fixedRows;
- if(insTermcd == "" || insTermcd == null){
- var rtn = messageBox("삭제할 수술용어 코드를 ", "C002");
- return;
- }
- //대표어일지라도 동의어/유사어가 없다면 삭제 가능함.
- if(model.getValue("/root/main/peprterminfo/info/reprflag") == "R" && sRow >= 1) {
- model.makeValue("/root/send/reqdata/termcd", fullTermCode);
- model.makeValue("/root/send/reqdata/opattrcd", insicd9cd + "." + insopattrcd);
- model.makeValue("/root/send/reqdata/termflag", model.getValue("/root/hidden/condition/indxflag"));
- if(submit("TRMRT00709")){
- var sametermyn = model.getValue("/root/hidden/exists/sametermyn");
- if(sametermyn == "Y"){
- var rtn = messageBox("대표어는 삭제 ", "E001");
- return;
- }
- } else {
- return;
- }
- }
-
- var rtn = messageBox("선택한 수술용어를", "Q001");
-
- if( rtn == "6") { //수술코드를 삭제하시겠습니까?
- var altmsg = messageBox("대체코드를", "Q014");
- if(altmsg == "6"){
- btn_altterm.disabled = "false";
- var ref1 = "/root/main/peprterminfo/info/alttermcd";
- var altflag = fCallTermSrch(ref1);
- btn_altterm.disabled = "true";
- if(!altflag){
- return;
- }
- }
- model.setValue("/root/hidden/condition/status", "TD");
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/indxcd", model.getValue("/root/hidden/condition/selectedIndx"));
- model.makeValue("/root/send/reqdata/icd9cd", insicd9cd);
- model.makeValue("/root/send/reqdata/opattrcd", insicd9cd + "." + insopattrcd);
- model.makeValue("/root/send/reqdata/termcd", fullTermCode);
- model.makeValue("/root/send/reqdata/status", model.getValue("/root/hidden/condition/status")); //N:등록, M:수정, D:삭제
- model.makeValue("/root/send/reqdata/termflag", "9"); //용어구분
-
- model.makeValue("/root/send/reqdata/termfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
- model.makeValue("/root/send/reqdata/oldtermfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
- model.makeValue("/root/send/reqdata/attrfromdd", model.getValue("/root/main/peprterminfo/info/attrfromdd"));
- model.makeValue("/root/send/reqdata/oldattrfromdd", model.getValue("/root/main/peprterminfo/info/attrfromdd"));
- model.makeValue("/root/send/reqdata/alttermcd", model.getValue("/root/main/peprterminfo/info/alttermcd"));
- submit("TXMRT00701");
- } else if( rtn == "7") {
- return;
- }
- var iRow = grd_opcd.findRow(insicd9cd + "." + insopattrcd, 0, 4, true, true);
- grd_opcd.row = iRow;
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 신규 용어 등록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSetNewTerm(){
- var sIndx = model.getValue("/root/hidden/condition/selectedIndx");
- var fromdd = ((getCurrentDate()).toDate()).getAddDate(1);
-
- if(sIndx == "" || sIndx == null){
- var rtn = messageBox("색인을 ", "C002");
- return;
- }
- model.removeNodeset("/root/main/sametermlist/info"); // 신규버튼 클릭시 동의어 그리스 초기화
- fCntlReset("ETN");
- fDisabled("ETN");
-
- model.setValue("/root/hidden/condition/status", "ETN");
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/indxcd",sIndx);
- model.makeValue("/root/send/indxflag",model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/main/peprterminfo/info/reprflag", "");
-
- //선택한 인덱스에 해당하는 icd9코드를 가지고 온다..
- submit("TRMRT00706");
- // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
- //model.setValue("/root/main/peprterminfo/info/attrfromdd", getDate());
- model.setValue("/root/main/peprterminfo/info/termfromdd", fromdd.getDateFormat());
- model.setValue("/root/main/peprterminfo/info/termtodd", "99991231");
- model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
- model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/peprterminfo/info/termtodd"));
- model.setValue("/root/main/peprterminfo/info/fstrgstdate", getCurrentDate());
- model.setValue("/root/main/peprterminfo/info/fstrgsttime", getCurrentTime());
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", getUserName());
- model.setValue("/root/main/peprterminfo/info/essntermflag", "N");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 동의어 등록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSetInj(){
- //동의어 신규
- var jRow = grd_opcd.row;
- var term1 = model.getValue("/root/main/opcdinfo/opcd[" + jRow + "]/termcd"); //수술용어 그리드에서 선택한 term
- var opattr = model.getValue("/root/main/opcdinfo/opcd[" + jRow + "]/opattrcd"); //그리드에서 선택한 term
- var icd9cd = model.getValue("/root/main/opcdinfo/opcd[" + jRow + "]/icd9cd"); //그리드에서 선택한 term
- var indx = model.getValue("/root/hidden/condition/selectedIndx"); //트리에서 선택한 index
- var fromdd = ((getCurrentDate()).toDate()).getAddDate(1);
-
- if(term1 == "" || term1 == null){
- var rtn = messageBox("수술 용어를 ", "C002");
- return;
- }
- fDisabled("TN");
- opt_Hdicd9cd.visible = "true";
- cmb_icd9cd.visible = "false";
- btn_delete2.disabled = "true";
- fCntlReset("TN");
-
- model.setValue("/root/hidden/condition/status", "TN"); //term만 new
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/temp");
- model.makeValue("/root/send/reqdata/reqdata/icd9cd", icd9cd);
- model.makeValue("/root/send/reqdata/reqdata/opattrcd", opattr);
- model.makeNode("/root/main/temp/info");
- submit("TRMRT00708");
- //Edited by nj 20071010 ICD9코드에서 .을 제거
- //icd9cd = icd9cd.substr(0,2) + icd9cd.substr(3, icd9cd.length-2);
- model.setValue("/root/main/peprterminfo/info/icd9cd", icd9cd);
- model.setValue("/root/main/peprterminfo/info/opattrcd", model.getValue("/root/main/temp/info/opattrcd").split(".")[1]);
- model.setValue("/root/main/peprterminfo/info/termcd", model.getValue("/root/main/temp/info/termcd"));
- model.setValue("/root/main/peprterminfo/info/reprflag", "");
- model.setValue("/root/main/peprterminfo/info/opattrmedireccd", model.getValue("/root/main/opcdinfo/opcd[" + jRow + "]/opattrmedireccd"));
- //model.setValue("/root/main/peprterminfo/info/opattrdrindxcd", model.getValue("/root/main/opcdinfo/opcd[" + jRow + "]/opattrmedireccd").split(".")[0]);
- var path = model.getValue("/root/hidden/condition/selectedIndxPath").split(".");
- model.setValue("/root/main/peprterminfo/info/opattrdrindxcd", path[path.length-2]);
- model.setValue("/root/main/peprterminfo/info/termflag", "9");
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/init/userinfo/userid"));
- model.setValue("/root/main/peprterminfo/info/termengnm", model.getValue("/root/main/opcdinfo/opcd[" + jRow + "]/termengnm"));
- model.setValue("/root/main/peprterminfo/info/termhngnm", model.getValue("/root/main/opcdinfo/opcd[" + jRow + "]/termhngnm"));
- model.makeValue("/root/main/peprterminfo/info/oldattrfromdd", model.getValue("/root/main/opcdinfo/opcd[" + jRow + "]/attrfromdd"));
- //신규 등록 모드는 디폴트를 설정
- model.setValue("/root/main/peprterminfo/info/fstrgstdate", model.getValue("/root/init/today"));
- model.setValue("/root/main/peprterminfo/info/fstrgsttime", model.getValue("/root/init/curruntTime"));
- model.setValue("/root/main/peprterminfo/info/fstrgstdt", model.getValue("/root/main/peprterminfo/info/fstrgstdate")+model.getValue("/root/main/peprterminfo/info/fstrgsttime")+"00");
- model.setValue("/root/main/peprterminfo/info/termfromdd", fromdd.getDateFormat());
- model.setValue("/root/main/peprterminfo/info/termtodd", "99991231");
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/init/userinfo/usernm"));
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 용어 수정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSetTermUpdt(){
- var selTermcd = model.getValue("/root/hidden/condition/selectedtermcd");
- var fromdd = ((getCurrentDate()).toDate()).getAddDate(1);
-
- if(selTermcd == "" || selTermcd == null){
- var rtn = messageBox("icd9 코드를 ", "C002");
- return;
- }
- // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
- //var today = getDate();
- var today = getCurrentDate();
- if(model.getValue("/root/main/peprterminfo/info/termfromdd") == today){
- var rtn = messageBox("당일 등록한 용어는 수정 ", "E001");
- return;
- }
-
- fDisabled("ETM");
- btn_delete2.disabled = "true";
- model.setValue("/root/hidden/condition/status", "ETM");
- model.makeValue("/root/main/peprterminfo/info/oldtermfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
- model.makeValue("/root/main/peprterminfo/info/oldattrfromdd", model.getValue("/root/main/peprterminfo/info/attrfromdd"));
- model.setValue("/root/main/peprterminfo/info/termfromdd", fromdd.getDateFormat());
- model.setValue("/root/main/peprterminfo/info/termtodd", "99991231");
- model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
- model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/peprterminfo/info/termtodd"));
- model.setValue("/root/main/peprterminfo/info/fstrgstdate", getCurrentDate());
- model.setValue("/root/main/peprterminfo/info/fstrgsttime", getCurrentTime());
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", getUserName());
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술용어 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveOp(){
- var selCd = model.getValue("/root/main/peprterminfo/info/icd9cd");
- //var insicd9cd = selCd.substr(0,2) + "." + selCd.substr(2, selCd.length-2);
- // Edited by Nj 2007-08-07 IDC9코드의 '.'을 삭제하기로 함
- var insicd9cd = selCd;
- var insopattrcd = model.getValue("/root/main/peprterminfo/info/opattrcd");
- var insTermcd = model.getValue("/root/main/peprterminfo/info/termcd");
- var fullTermCode = insicd9cd + "." + insopattrcd + "." + insTermcd;
- var rowCnt = grd_opcd.row;
- var orgReprFlag = model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/reprflag"); //상단 그리드의 원래 대표어구분
- var chngReprFlag = model.getValue("/root/main/peprterminfo/info/reprflag"); //저장 전 선택한 대표어구분
-
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/peprterminfo/info");
- model.setValue("/root/send/reqdata/icd9cd", insicd9cd);
- model.setValue("/root/send/reqdata/opattrcd", insicd9cd + "." + insopattrcd);
- model.setValue("/root/send/reqdata/termcd", fullTermCode);
- model.setValue("/root/send/reqdata/fstrgstdt", model.getValue("/root/main/peprterminfo/info/fstrgstdate") + model.getValue("/root/main/peprterminfo/info/fstrgsttime")+"00");
- model.setValue("/root/send/reqdata/termflag", "9"); //defalut :수술용어(9)
- model.makeValue("/root/send/reqdata/indxcd", model.getValue("/root/hidden/condition/selectedIndx"));
- model.makeValue("/root/send/reqdata/status", model.getValue("/root/hidden/condition/status")); //TN:용어만 등록, ETN:용어,속성함께등록,TM:용어만수정, EM:속성만수정,
- //ETM:용어,속성함께수정, 용어수정+대표어교환, ETM:속성수정+대표어교환, ETFM:용어,속성수정+대표어교환, FM:대표어만 교환
-
- model.makeValue("/root/send/reqdata/maininstyn", model.getValue("/root/hidden/condition/maininstyn"));
- model.makeValue("/root/send/reqdata/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
-
- if(model.getValue("/root/hidden/condition/status") == "ETN" || model.getValue("/root/hidden/condition/status") == "TN") {
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- } else if( model.getValue("/root/hidden/condition/status") == "STM" ) {
- //오른쪽 그리드에서 정보를 선택했을 때
- var sRowCnt = grd_termlist.row;
- var OrgReprFlag2 = model.getValue("/root/main/sametermlist/info[" + sRowCnt + "]/reprflag");
- if(fullTermCode == model.getValue("/root/main/sametermlist/info[" + sRowCnt + "]/termcd")) {
- if(model.getValue("/root/main/sametermlist/info[" + sRowCnt + "]/termengnm") != model.getValue("/root/main/peprterminfo/info/termengnm") ||
- model.getValue("/root/main/sametermlist/info[" + sRowCnt + "]/termhngnm") != model.getValue("/root/main/peprterminfo/info/termhngnm") ||
- model.getValue("/root/main/sametermlist/info[" + sRowCnt + "]/termflag") != model.getValue("/root/main/peprterminfo/info/termflag")) {
- if( OrgReprFlag2 != chngReprFlag ){
- if( OrgReprFlag2 != "R" ) {
- //동의어나 유사어를 대표어로 수정하는 경우 (대표어구분코드를 맞교환)
- if( chngReprFlag != "R" )
- model.setValue("/root/send/reqdata/status", "TM");
- else {
- model.setValue("/root/send/reqdata/reprflag", OrgReprFlag2); //대표어구분을 교환하기 위해 원래 값을 다시 세팅한다.
- model.setValue("/root/send/reqdata/status", "TFM");
- }
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- } else {
- var rtn = messageBox("대표어를 동의어나 유사어로 수정 ", "E001");
- return;
- //동의어를 대표어로 바꾸는 것만 허용
- }
- } else {
- model.setValue("/root/send/reqdata/status", "TM");
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- }
- } else {
- var rtn = messageBox("변경된 내용이 없으므로 저장 ", "E001");
- return;
- }
- } else {
- var rtn = messageBox("신규입력 버튼을 ", "C002");
- return;
- }
- } else {
- if(fullTermCode == model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/termcd")) {
- // 용어명칭이 바뀐 경우
- if(model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/termengnm") != model.getValue("/root/main/peprterminfo/info/termengnm") ||
- model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/termhngnm") != model.getValue("/root/main/peprterminfo/info/termhngnm") ||
- model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/termflag") != model.getValue("/root/main/peprterminfo/info/termflag")) {
- if(model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/opattrverflag") != model.getValue("/root/main/peprterminfo/info/opattrverflag") ||
- //model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/opattrdrindxcd") != model.getValue("/root/main/peprterminfo/info/opattrdrindxcd") ||
- model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/opattrmedireccd") != model.getValue("/root/main/peprterminfo/info/opattrmedireccd") ||
- //model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/snmdcnptid") != model.getValue("/root/main/peprterminfo/info/snmdcnptid") ||
- model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/calcscorcd") != model.getValue("/root/main/peprterminfo/info/calcscorcd")) {
- if(orgReprFlag != chngReprFlag ){
- if(orgReprFlag != "R" ) {
- //동의어나 유사어를 대표어로 수정하는 경우 (대표어구분코드를 맞교환)
- if( chngReprFlag != "R" )
- model.setValue("/root/send/reqdata/status", "ETM");
- else {
- model.setValue("/root/send/reqdata/orgreprflag", orgReprFlag); //대표어구분을 교환하기 위해 원래 값을 다시 세팅한다.
- model.setValue("/root/send/reqdata/status", "ETFM");
- }
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- } else {
- var rtn = messageBox("대표어를 동의어나 유사어로 수정 ", "E001");
- return;
- //동의어를 대표어로 바꾸는 것만 허용
- }
- } else {
- model.setValue("/root/send/reqdata/status", "ETM");
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- }
- } else {
- //용어테이블만 수정되었을 경우
- if(orgReprFlag != chngReprFlag ){
- if(orgReprFlag != "R" ) {
- //동의어나 유사어를 대표어로 수정하는 경우 (대표어구분코드를 맞교환)
- if( chngReprFlag != "R" )
- model.setValue("/root/send/reqdata/status", "TM");
- else {
- model.setValue("/root/send/reqdata/orgreprflag", orgReprFlag); //대표어구분을 교환하기 위해 원래 값을 다시 세팅한다.
- model.setValue("/root/send/reqdata/status", "TFM");
- }
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.refresh();
- }
- } else {
- var rtn = messageBox("대표어를 동의어나 유사어로 수정 ", "E001");
- return;
- }
- } else {
- model.setValue("/root/send/reqdata/status", "TM");
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- }
- }
- } else {
- //속성만 수정
- if(model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/opattrverflag") != model.getValue("/root/main/peprterminfo/info/opattrverflag") ||
- //model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/opattrdrindxcd") != model.getValue("/root/main/peprterminfo/info/opattrdrindxcd") ||
- model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/opattrmedireccd") != model.getValue("/root/main/peprterminfo/info/opattrmedireccd") ||
- //model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/snmdcnptid") != model.getValue("/root/main/peprterminfo/info/snmdcnptid") ||
- model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/calcscorcd") != model.getValue("/root/main/peprterminfo/info/calcscorcd")) {
- if(orgReprFlag != chngReprFlag ){
- if(orgReprFlag != "R" ) {
- //동의어나 유사어를 대표어로 수정하는 경우 (대표어구분코드를 맞교환)
- model.setValue("/root/send/reqdata/reprflag", orgReprFlag); //대표어구분을 교환하기 위해 원래 값을 다시 세팅한다.
- if( chngReprFlag != "R" )
- model.setValue("/root/send/reqdata/status", "ETM");
- else {
- model.setValue("/root/send/reqdata/reprflag", orgReprFlag); //대표어구분을 교환하기 위해 원래 값을 다시 세팅한다.
- model.setValue("/root/send/reqdata/status", "EFM");
- }
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- } else {
- var rtn = messageBox("대표어를 동의어나 유사어로 수정 ", "E001");
- return;
- //동의어를 대표어로 바꾸는 것만 허용
- }
- } else {
- model.setValue("/root/send/reqdata/status", "EM");
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- }
- } else {
- //용어테이블만 수정되었을 경우
- if(orgReprFlag != chngReprFlag ){
- if(orgReprFlag != "R" ) {
- //동의어나 유사어를 대표어로 수정하는 경우 (대표어구분코드를 맞교환)
- if( chngReprFlag != "R" )
- model.setValue("/root/send/reqdata/status", "TM");
- else {
- model.setValue("/root/send/reqdata/reprflag", orgReprFlag); //대표어구분을 교환하기 위해 원래 값을 다시 세팅한다.
- model.setValue("/root/send/reqdata/status", "FM");
- }
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- } else {
- var rtn = messageBox("대표어를 동의어나 유사어로 수정 ", "E001");
- return;
- //동의어를 대표어로 바꾸는 것만 허용
- }
- } else {
- if (model.getValue("/root/main/opcdinfo/opcd[" + rowCnt + "]/snmdcnptid") != model.getValue("/root/main/peprterminfo/info/snmdcnptid"))
- {
- model.setValue("/root/send/reqdata/status", "TM");
- if(submit("TXMRT00701")){
- fCntlReset("SAVE");
- model.removeNodeset("/root/main/sametermlist");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.refresh();
- }
- }
- else {
- var rtn = messageBox("수정된 사항이 없으므로 수정 ", "E001");
- return;
- }
- }
- }
- }
- } else {
- var rtn = messageBox("용어를 입력하시려면 입력 버튼을 ", "C002");
- return;
- }
- }
- fDisabled("AS");
- btn_delete2.disabled = "false";
- model.setValue("/root/hidden/condition/status", ""); //서브밋 실행 후 상태 초기화
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 동의어 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetSynomList(){
- grd_termlist.colHidden(1) = true;
- var iRow = grd_opcd.row;
- opt_Hdicd9cd.visible = "true";
- cmb_icd9cd.visible = "false";
- cap_allinsthist.visible = "false";
- cmb_allinsthist.visible = "false";
- fDisabled("S");
-
- btn_insert2.disabled = "false";
- button4.disabled = "false";
- btn_save1.disabled = "false";
- btn_delete2.disabled = "false";
-
-
- //2009-04-28 오후 3:21:38 강지훈 수정 : 중앙이 아닌 기관일경우 확장,용어코드가 000.00인것은 수정불가처리
- var term = model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termcd");
- var diagattrcd = model.getValue("/root/main/peprterminfo/info/opattrcd");
- var termcd = model.getValue("/root/main/peprterminfo/info/termcd");
- var maininstyn = model.getValue("/root/hidden/condition/maininstyn");
-
- if(maininstyn == "N" && diagattrcd == "000" && termcd == "00"){
- btn_modify1.disabled = true;
- }
- else{
- btn_modify1.disabled = false;
- }
-
- model.setValue("/root/hidden/condition/sametermmode", "U");
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/opattrcd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrcd"));
- model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
- model.makeValue("/root/send/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
- submit("TRMRT00705");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 용어 이력 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetOpTermHistList(){
- grd_termlist.colHidden(1) = true;
- var iRow = grd_opcd.row - grd_opcd.fixedRows + 1;
- opt_Hdicd9cd.visible = "true";
- cmb_icd9cd.visible = "false";
- cap_allinsthist.visible = "false";
- cmb_allinsthist.visible = "false";
- fDisabled("S");
-
- btn_insert2.disabled = "false";
- button4.disabled = "false";
- btn_save1.disabled = "false";
- btn_delete2.disabled = "false";
-
- //2009-04-28 오후 3:21:38 강지훈 수정 : 중앙이 아닌 기관일경우 확장,용어코드가 000.00인것은 수정불가처리
- var term = model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termcd");
- var diagattrcd = model.getValue("/root/main/peprterminfo/info/opattrcd");
- var termcd = model.getValue("/root/main/peprterminfo/info/termcd");
- var maininstyn = model.getValue("/root/hidden/condition/maininstyn");
-
- if(maininstyn == "N" && diagattrcd == "000" && termcd == "00"){
- btn_modify1.disabled = true;
- }
- else{
- btn_modify1.disabled = false;
- }
-
- model.setValue("/root/hidden/condition/sametermmode", "N");
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/opattrcd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrcd"));
- model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
- model.makeValue("/root/send/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
- submit("TRMRT00705");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2009.03.19
- * @by : 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 용어 기관별 이력 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetDiagInstTermHistList(){
-
- var iRow = grd_opcd.row - grd_opcd.fixedRows + 1;
- opt_Hdicd9cd.visible = "true";
- cmb_icd9cd.visible = "false";
- fDisabled("AS");
- grd_termlist.colHidden(1) = false;
- cap_allinsthist.visible = "true";
- cmb_allinsthist.visible = "true";
- btn_insert2.disabled = "true";
- btn_modify1.disabled = "true";
- button4.disabled = "true";
- btn_save1.disabled = "true";
- btn_delete2.disabled = "true";
-
-
- model.setValue("/root/hidden/condition/sametermmode", "H");
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/opattrcd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrcd"));
- model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
- model.makeValue("/root/send/allinsthist", model.getValue("/root/hidden/condition/allinsthist"));
- submit("TRMRT00705");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술 용어 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelOpTerm(){
- opt_Hdicd9cd.visible = "true";
- cmb_icd9cd.visible = "false";
- //2009-03-20 오전 9:12:31 강지훈 수정 : 기관별 사용 이력조회에서는 신규입력외의 Operation 금지
- var sameTermMode = model.getValue("/root/hidden/condition/sametermmode");
- if(sameTermMode != "H"){
- btn_delete2.disabled = "false";
- }
-
- fDisabled("AS");
-
- var iRow = grd_opcd.row;
- var opattr = model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrcd");
- var term = model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termcd");
- var icd9cd = term.split(".")[0];
- var opattrcd = term.split(".")[1];
- var termcd = term.split(".")[2];
-
- if( !isNull(iRow) ) {
- model.setValue("/root/hidden/condition/status", "");
- model.setValue("/root/hidden/condition/selectedtermcd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termcd"));
- model.setValue("/root/main/peprterminfo/info/icd9cd", icd9cd); //icd9
- model.setValue("/root/main/peprterminfo/info/opattrcd", opattrcd); // 확장코드
- model.setValue("/root/main/peprterminfo/info/termcd", termcd); // 대표어(동의어)코드
- model.setValue("/root/main/peprterminfo/info/snmdcnptid", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/snmdcnptid")); // 스노메드-dscrpt
- model.setValue("/root/main/peprterminfo/info/snmdcnptnm", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/snmdcnptnm")); // 스노메드-dscrpt
- model.setValue("/root/main/peprterminfo/info/snmddescid", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/snmddescid")); // 스노메드-cncpt
- model.setValue("/root/main/peprterminfo/info/termengnm", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termengnm")); // 영문
- model.setValue("/root/main/peprterminfo/info/termhngnm", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termhngnm")); // 한글
- model.setValue("/root/main/peprterminfo/info/reprflag", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/reprflag")); // 대표어구분
- model.setValue("/root/main/peprterminfo/info/termflag", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termflag")); // 용어구분
- model.setValue("/root/main/peprterminfo/info/opattrdrindxcd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrdrindxcd")); // 의사색인
- model.setValue("/root/main/peprterminfo/info/opattrmedireccd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrmedireccd")); // 의무기록색인
- model.setValue("/root/main/peprterminfo/info/opattrverflag", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrverflag")); // 버전
- model.setValue("/root/main/peprterminfo/info/calcscorcd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/calcscorcd")); // 수가코드
- model.setValue("/root/main/peprterminfo/info/umlscd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/umlscd")); // UMLS코드
- //model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/fstrgstrid"));
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/lastupdtrnm"));
- model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/attrfromdd"));
- model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/attrtodd"));
- model.setValue("/root/main/peprterminfo/info/icdfromdd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/icdfromdd"));
- model.setValue("/root/main/peprterminfo/info/alttermcd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/alttermcd"));
- model.setValue("/root/main/peprterminfo/info/essntermflag", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/essntermflag"));
-
-
- var fstrgstdt = model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/fstrgstdt");
- var termfromdd = model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termfromdd");
- var termtodd = model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termtodd");
-
- model.setValue("/root/main/peprterminfo/info/fstrgstdt", fstrgstdt); // 등록일
- model.setValue("/root/main/peprterminfo/info/fstrgstdate", fstrgstdt.substr(0,8));
- model.setValue("/root/main/peprterminfo/info/fstrgsttime", fstrgstdt.substr(8,4));
- model.setValue("/root/main/peprterminfo/info/termfromdd", termfromdd); // 시작일
- model.setValue("/root/main/peprterminfo/info/termtodd", termtodd); // 종료일
-
-
- //2009-04-28 오후 3:21:38 강지훈 수정 : 중앙이 아닌 기관일경우 확장,용어코드가 000.00인것은 수정불가처리, 기관별사용이력조회일때도 불가
- var maininstyn = model.getValue("/root/hidden/condition/maininstyn");
- if(sameTermMode != "H"){
- if(maininstyn == "N" && opattrcd == "000" && termcd == "00"){
- btn_modify1.disabled = true;
- }
- else{
- btn_modify1.disabled = false;
- }
- }
- else{
- btn_modify1.disabled = true;
- }
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/opattrcd", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/opattrcd"));
- model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
- model.makeValue("/root/send/allinsthist", model.getValue("/root/hidden/condition/allinsthist"));
- model.makeValue("/root/send/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
- model.makeValue("/root/send/termcd", term);
- model.makeValue("/root/send/termflag", model.getValue("/root/main/opcdinfo/opcd[" + iRow + "]/termflag"));
-
- submit("TRMRT00705");
-
- model.setValue("/root/main/peprterminfo/info/appinstcd", model.getValue("/root/main/sametermlist/appinstcd/appinstcd"));
- model.refresh();
- }
- }
- function fChngLangIndx(){
- var selectedmode = model.getValue("/root/hidden/condition/selctedmode");
- if(selectedmode != "P"){
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/mode",model.getValue("/root/hidden/condition/indxviewmode"));
- model.makeValue("/root/send/indxflag",model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/indxuseflag",model.getValue("/root/hidden/condition/indxuseflag"));
- submit("TRMRT00701");
- trv_dgindx.rebuild();
- model.refresh();
- }
- }
- function fSelICD9List(){
- var sSelectedMode = model.getValue("/root/hidden/condition/selctedmode");
- btn_addrow.attribute("visibility") = "visible";
- btn_delrow.attribute("visibility") = "visible";
- btn_saverow.attribute("visibility") = "visible";
- btn_modify.attribute("visibility") = "visible";
- if(sSelectedMode == "D" || sSelectedMode == "P") {
- model.setValue("/root/hidden/condition/indxflag", "9");
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/indxviewmode"));
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- submit("TRMRT00701");
- model.refresh();
- }
- model.setValue("/root/hidden/condition/selctedmode", "I");
- }
- function fICD9Save(){
- model.removeNodeset("/root/send");
- var RowCnt = grd_icd9.rows;
- model.makeValue("/root/send/reqdata","");
- var cnt = 1;
- for ( i=1; i<=RowCnt; i++) {
- if(model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/state") == "I" || model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/state") == "U" || model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/state") == "D") {
- model.makeValue("/root/send/reqdata[" + cnt + "]/state", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/state"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/icd9cd", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/icd9cd"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/icd9drindxcd", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/icd9drindxcd"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/icd9medireccd", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/icd9medireccd"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/icd9engnm", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/icd9engnm"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/icd9hngnm", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/icd9hngnm"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/icd9seqno", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/icd9seqno"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/icd9fromdd", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/icd9fromdd"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/icd9todd", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/icd9todd"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/fstrgstrid", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/fstrgstrid"));
- model.makeValue("/root/send/reqdata[" + cnt + "]/lastupdtrid", model.getValue("/root/main/opcdinfo/icd9cd[" + i + "]/lastupdtrid"));
- cnt++;
- }
- }
- model.makeValue("/root/send/reqdata/indxcd", model.getValue("/root/hidden/condition/selectedIndx"));
- model.makeValue("/root/send/reqdata/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- submit("TXMRT00703");
- grd_icd9.rebuild();
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.07.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ICD9코드 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelRow(flag) {
- var iRow = grd_icd9.row - grd_icd9.fixedRows + 1;
- if(model.getValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9cd") == ""){
- return;
- }
- if(flag == "I") {
- iRow = grd_icd9.row - grd_icd9.fixedRows + 1;
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/state", "D");
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9todd", model.getValue("/root/init/today"));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/lastupdtdt", model.getValue("/root/init/today"));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/lastupdtrid", model.getValue("/root/init/userinfo/userid"));
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.11.29
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사용종료 용어 되살리기
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fRollbackTerm(){
- var icd9cd = model.getValue("/root/main/peprterminfo/info/icd9cd");
- var attrcd = model.getValue("/root/main/peprterminfo/info/opattrcd");
- var termcd = model.getValue("/root/main/peprterminfo/info/termcd");
- var fullTermcd = icd9cd + "." + attrcd + "." + termcd;
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/peprterminfo/info");
- model.setValue("/root/send/reqdata/icd9cd", icd9cd);
- model.setValue("/root/send/reqdata/opattrcd", icd9cd + "." + attrcd);
- model.setValue("/root/send/reqdata/termcd", fullTermcd);
- model.setValue("/root/send/reqdata/termflag", "9");
- model.setValue("/root/send/reqdata/termfromdd", model.getValue("/root/init/today"));
- model.setValue("/root/send/reqdata/termtodd", "99991231");
- model.makeValue("/root/send/reqdata/indxcd", model.getValue("/root/hidden/condition/selectedIndx"));
- if(termcd == "00"){
- model.makeValue("/root/send/reqdata/status", "ETN");
- model.makeValue("/root/send/reqdata/attrfromdd", model.getValue("/root/init/today"));
- model.makeValue("/root/send/reqdata/attrtodd", "99991231");
- } else {
- model.makeValue("/root/send/reqdata/status", "TN");
- }
- submit("TXMRT00701");
- }
- /**
- * @group :
- * @ver : 2008.11.29
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ICD9
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fEditRow(flag){
- var iRow = grd_icd9.row - grd_icd9.fixedRows + 1;
- var currentTime = getCurrentTime();
- if(model.getValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9cd") == ""){
- return;
- }
- if(flag == "I") {
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/state", "U");
-
- model.makeValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/oldfromdd", model.getValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9fromdd"));
- model.makeValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/oldtodd", model.getValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9todd"));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9fromdd", model.getValue("/root/init/today"));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/icd9todd", "99991231");
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/fstrgstdt", model.getValue("/root/init/today") + currentTime.substr(0,6));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/fstrgstrid", model.getValue("/root/init/userinfo/userid"));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/lastupdtdt", model.getValue("/root/init/today") + currentTime.substr(0,6));
- model.setValue("/root/main/opcdinfo/icd9cd[" + iRow + "]/lastupdtrid", model.getValue("/root/init/userinfo/userid"));
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.12.11
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 오른쪽 마우스 팝업 호출
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCallPopup(flag){
- if(flag == "grd_opcd"){
- if(isDataCell()){
- setPopupMenu(flag, false, "/root/init/func/mouserght", "label", "value");
- }
- } else if(flag == "trv_dgindx"){
- if(trv_dgindx.value == ""){
- return;
- }
- setPopupMenu(flag, false, "/root/init/func/trvmouserght", "label", "value");
- } else {
- initPopupMenu();
- }
- }
- /**
- * @group :
- * @ver : 2008.12.11
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 색인 변경 처리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fModifyIndx(){
- var selTab = model.getValue("/root/hidden/condition/selctedmode");
- model.removenode("/root/hidden/reqdata");
- if(selTab == "D"){
- selectedRows = grd_opcd.selectedRows;
- for(var cnt = 0; cnt <= selectedRows -1; cnt++){
- copyNodeset("/root/hidden/reqdata/opindxlist", "/root/main/opcdinfo/opcd[" + grd_opcd.selectedrow(cnt) + "]", "append");
- }
- }
- }
- /**
- * @group :
- * @ver : 2008.12.11
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 색인 변경할 인덱스로 이동 처리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPasteIndx(){
- var selTab = model.getValue("/root/hidden/condition/selctedmode");
- var iIndx = trv_dgindx.focusIndex + 1;
- var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd");
- var selIndxDrdiflag = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxdrdiflag");
- var msg = messageBox("색인을", "Q012");
- if(msg == "7"){
- return;
- }
- switch(selTab){
- case "D":
- copyNodeset("/root/send/reqdata/opindxlist", "/root/hidden/reqdata/opindxlist");
- model.makeValue("/root/send/reqdata/chnginfo/chngindxcd", selIndxCd);
- model.makeValue("/root/send/reqdata/chnginfo/indxdrdiflag", selIndxDrdiflag);
- model.makeValue("/root/send/reqdata/chnginfo/indxflag", selTab);
- if(msg == "6"){
- if(submit("TXMRT00704")){
- messageBox("색인 변경이","I001");
- grd_opcd.refresh();
- } else {
- messageBox("색인 변경을","E009");
- }
- }
- model.removeNodeset("/root/send/reqdata");
- model.removeNodeset("/root/hidden/reqdata");
- break;
- }
- }
- /**
- * @group :
- * @ver : 2008.12.11
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 대체코드 검색
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCallTermSrch(ref1){
- var alttermcd = model.getValue("/root/main/peprterminfo/info/alttermcd");
- var curr_date = model.getValue("/root/init/today");
- model.removeNodeset("/root/temp/terminfo/altterminfo");
- setParameter("SPMRT01500_param_nodepath", "/root/temp/terminfo/altterminfo");
- setParameter("SPMRT01500_SEARCHDATA", alttermcd);
- setParameter("SPMRT01500_FLAG", "5");
- setParameter("stndd", curr_date);
- // 2009-08-03 nj 추가
- setParameter("maininstyn", "Y");
- modal("SPMRT01500");
- if(getParameter("SPMRT01500_FLAG") == ""){
- return;
- }
- if(getNodesetCnt(model,"/root/temp/terminfo/altterminfo")>0){
- model.setValue(ref1, model.getValue("/root/temp/terminfo/altterminfo/selectoplist/opcd"));
- ipt_alttermcd.refresh();
- return true;
- } else {
- return false;
- }
- }
- /**
- * @group :
- * @ver : 2009.02.11
- * @by : 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기관별 용어 사용여부 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fTermUseSave(){
- model.removeNodeset("/root/send");
- var RowCnt = grd_opcd.rows;
- model.makeValue("/root/send/termuse",getGridUpdateData(grd_opcd));
- submit("TXMRT00206");
-
- model.refresh();
- }
|