123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218 |
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면을 초기화 한다
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitalize(){
- 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", "C");
- model.setValue("/root/init/userinfo/userid", getUserId());
- model.setValue("/root/init/userinfo/usernm", getUserName());
- model.setValue("/root/init/userinfo/instcd", instcd);
-
- //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.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"));
- grd_cchist.colHidden(1) = true;
- submit("TRMRT00301");
- 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 == "N" || flag == "M") {
- ipt_icd10cd.disabled = "false";
- btn_icd10cd.disabled = "false";
- ipt_hngnm.disabled = "false";
- ipt_engnm.disabled = "false";
- ipt_termfromdd.disabled = "false";
- ipt_ccattrcd.disabled = "true";
- ipt_termcd.disabled = "true";
- if(maininstyn == "Y"){
- rdo_essntermflag.disabled = "false";
- }
- if(flag == "M"){
- ipt_snmdcnptid.disabled = "true";
- btn_snmdcnptid.disabled = "true";
- btn_snmddescid.disabled = "true";
- ipt_termtodd.disabled = "true";
- if(maininstyn == "Y"){
- rdo_essntermflag.disabled = "false";
- }
- } else {
- ipt_snmdcnptid.disabled = "false";
- btn_snmdcnptid.disabled = "false";
- btn_snmddescid.disabled = "false";
- ipt_termtodd.disabled = "false";
- if(maininstyn == "Y"){
- cap_appinst.disabled = "false";
- chk_appinst.disabled = "false";
- rdo_essntermflag.disabled = "false";
- }
- }
- } else if(flag == "AS") {
- //??? ?? ??
- ipt_snmdcnptid.disabled = "true";
- btn_snmdcnptid.disabled = "true";
- btn_snmddescid.disabled = "true";
- ipt_icd10cd.disabled = "true";
- btn_icd10cd.disabled = "true";
- ipt_hngnm.disabled = "true";
- ipt_engnm.disabled = "true";;
- ipt_termfromdd.disabled = "true";
- ipt_termtodd.disabled = "true";
- ipt_ccattrcd.disabled = "true";
- ipt_termcd.disabled = "true";
- chk_appinst.disabled = "true";
- rdo_essntermflag.disabled = "true";
- }
- }
- /**
- * @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/deptcccdlist/deptcccdinfo");
- trv_ccindx.rebuild();
- grd_deptcc.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("TRMRT00305")){
- model.removenodeset("/root/main/deptcccdlist/deptcccdinfo");
- model.setValue(xCondPath+"/selectedIndx","");
- grd_deptcc.rebuild();
- trv_ccindx.rebuild();
- }
- }else{
- model.refresh();
- }
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과주호소 추가시 주호소 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchCCInfo(){
- var sCondPath = "/root/hidden/condition/deptset";
- var sSrchedCCCdInfoPath = "/root/main/srchedcccdlist/srchedcccdinfo";
- var srchnm = model.getValue(sCondPath+"/srchnm");
- srchnm = srchnm.replace(/^ *| *$/g, "");
-
- model.removenode("/root/send");
- if(model.getValue(sCondPath+"/srchnm") == ""){
- messageBox("조회할 내용을","C001");
- return;
- }
- model.removenodeset(sSrchedCCCdInfoPath);
- grd_srchedccinfo.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("TRMRT00307");
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과주호소에 주호소 추가
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendDeptCC(){
- var sCondPath = "/root/hidden/condition/deptset";
- var sIndxListPath = "/root/main/indxlist/item";
- var sSrchedCCCdListPath = "/root/main/srchedcccdlist/srchedcccdinfo";
- var sDeptCCCdListPath = "/root/main/deptcccdlist/deptcccdinfo";
- var sDeptCd = model.getValue(sCondPath+"/selecteddeptcd");
- var sIndxCd = model.getValue("/root/hidden/condition/selectedIndx");
- var sSrchedCCRowCnt = grd_srchedccinfo.rows - grd_srchedccinfo.fixedrows;
- var iDeptCCRow = 0;
- var sTermcd = "";
- if(sDeptCd == ""){
- messageBox("부서코드를 먼저", "C002");
- return;
- }
-
- if(sIndxCd == ""){
- messageBox("색인코드를 먼저", "C002");
- return;
- }
- for(var iSrchedCCRow = 1; iSrchedCCRow <= sSrchedCCRowCnt; iSrchedCCRow++){
- if(model.getValue(sSrchedCCCdListPath+"["+iSrchedCCRow+"]/check") == "true"){
- sTermcd = model.geTValue(sSrchedCCCdListPath+"["+iSrchedCCRow+"]/termcd");
- if(model.getValue(sDeptCCCdListPath+"[termcd = '"+sTermcd+"' and deptindxcd = '"+sIndxCd+"']/termcd") != "") continue;
- grd_deptcc.addItem();
- iDeptCCRow = grd_deptcc.rows - grd_deptcc.fixedrows;
- model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/status","I");
- model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/deptcd",sDeptCd);
- model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/deptnm",model.getValue(sCondPath+"/selecteddeptnm"));
- model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/termcd",sTermcd);
- model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/deptindxcd",sIndxCd);
- model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/termengnm",model.getValue(sSrchedCCCdListPath+"["+iSrchedCCRow+"]/termengnm"));
- model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/termhngnm",model.getValue(sSrchedCCCdListPath+"["+iSrchedCCRow+"]/termhngnm"));
- model.setValue(sDeptCCCdListPath+"["+iDeptCCRow+"]/deptindxflag",model.getValue("/root/hidden/condition/indxflag"));
- }
- }
- grd_deptcc.rebuild();
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과주호소 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveDeptCCInfo(){
- 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/deptcccdlist", grd_deptcc.getUpdateDataAll("i"));
- submit("TXMRT00302");
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전체주호소 팝업 호출
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCallExtnCCInfo(){
- setParameter("indxflag", model.getValue("/root/hidden/condition/indxflag"));
- modal("SPMRT01000", 1,10,10);
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSelCc(){
- model.setValue("/root/hidden/condition/selctedmode", "C");
- 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("TRMRT00301");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 신규
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetNewCc(){
- var iRow = grd_cccd.row;
- var sIndx = model.getValue("/root/hidden/condition/selectedIndx"); //선택한 색인(무조건 선택되어야 함)
- var sGrd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"); //그리드 중 주호소코드 하나를 선택했다면 sccccd가 존재함
- var fromdd = ((getCurrentDate()).toDate()).getAddDate(1);
- if(sIndx == "" || sIndx == null){
- var rtn = messageBox("색인을 ", "C002");
- return;
- }
- model.removeNodeset("/root/main/cccdhist/list"); // 신규버튼 클릭시 이력조회 그리드 초기화
- fDisabled("N");
- btn_delete1.disabled = "true";
- model.removeNodeset("/root/send");
- model.resetInstanceNode("/root/main/seqcd/seq");
- if(sGrd != "") {
- sIndx = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccindxcd");
- }
- model.makeValue("/root/send/indxcd",sIndx);
- model.makeValue("/root/send/attrcd", model.getValue("/root/main/peprterminfo/info/ccattrcd"));
- //선택한 색인에 해당하는 시퀀셜한 주호소코드를 가지고 온다
- submit("TRMRT00304");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.setValue("/root/main/peprterminfo/info/ccindxcd", model.getValue("/root/main/seqcd/seq/indxcd"));
- // Edited by nj 20070927 속성코드는 snmd-conceptID로 함.
- //model.setValue("/root/main/peprterminfo/info/ccattrcd", model.getValue("/root/main/seqcd/seq/cccd"));
- model.setValue("/root/main/peprterminfo/info/ccattrcd", model.getValue("/root/main/peprterminfo/info/snmdcnptid"));
- model.setValue("/root/main/peprterminfo/info/termcd", model.getValue("/root/main/seqcd/seq/termcd"));
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/init/userinfo/userid"));
- model.setValue("/root/main/peprterminfo/info/fstrgstrnm", model.getValue("/root/init/userinfo/usernm"));
- 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");
- // Edited by NJ 2007-07-21 getDate()- > getCurrentDate()
- //model.setValue("/root/main/peprterminfo/info/termfromdd", getDate() );
- model.setValue("/root/main/peprterminfo/info/termfromdd", fromdd.getDateFormat());
- model.setValue("/root/main/peprterminfo/info/termtodd", "99991231");
- // Edited by NJ 2007-07-21 getDate()- > getCurrentDate()
- //model.setValue("/root/main/peprterminfo/info/attrfromdd", getDate() );
- 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/essntermflag", "N");
- model.setValue("/root/hidden/condition/status", "N"); //new insert mode
-
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 수정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSetCcUpdt(){
- var selTermcd = model.getValue("/root/main/peprterminfo/info/termcd");
- var selCcattrcd = model.getValue("/root/main/peprterminfo/info/ccattrcd");
- var fromdd = ((getCurrentDate()).toDate()).getAddDate(1);
- fDisabled("M");
- btn_delete1.disabled = "true";
- if((selTermcd == "" || selTermcd == null) || (selCcattrcd == "" || selCcattrcd == null)){
- var rtn = messageBox("수정할 주호소를 ", "C002");
- return;
- }
- if(model.getValue("/root/main/peprterminfo/info/termfromdd") == model.getValue("/root/init/today")){
- var rtn = messageBox("당일 등록한 용어는 수정 ", "E001");
- return;
- }
- model.setValue("/root/hidden/condition/status", "M");
- 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/fstrgstrnm", getUserName());
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/init/userinfo/userid"));
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSaveCcTerm(){
- var insCcindxcd = model.getValue("/root/main/peprterminfo/info/ccindxcd");
- var insCcattrcd = model.getValue("/root/main/peprterminfo/info/ccattrcd");
- var snmdcnptid = model.getValue("/root/main/peprterminfo/info/snmdcnptid");
- var insTermcd = model.getValue("/root/main/peprterminfo/info/ccattrcd") + "." + model.getValue("/root/main/peprterminfo/info/termcd");
- var rowCnt = grd_cccd.row;
-
- if((insTermcd == "") || (insTermcd == "")){
- messageBox("용어코드는", "I003");
- return;
- } else if((snmdcnptid == "") || (snmdcnptid == null)){
- messageBox("SNMD-conceptID는", "I003");
- return;
- }
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/reqdata");
- model.copyNode("/root/send/reqdata", "/root/main/peprterminfo/info");
- model.setValue("/root/send/reqdata/ccindxcd", insCcindxcd);
- model.setValue("/root/send/reqdata/ccattrcd", insCcattrcd);
- model.setValue("/root/send/reqdata/termcd", insTermcd);
- model.setValue("/root/send/reqdata/termfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
- model.setValue("/root/send/reqdata/termtodd", model.getValue("/root/main/peprterminfo/info/termtodd"));
- model.setValue("/root/send/reqdata/termflag", "2"); //defalut :주호소(2)
- model.setValue("/root/send/reqdata/reprflag", "R");
- model.makeValue("/root/send/reqdata/status", model.getValue("/root/hidden/condition/status")); //N:등록, M:수정
- model.makeValue("/root/send/reqdata/maininstyn", model.getValue("/root/hidden/condition/maininstyn"));
- model.makeValue("/root/send/reqdata/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
-
- model.makeValue("/root/send/reqdata/fstrgstdt", model.getValue("/root/main/peprterminfo/info/fstrgstdate") + model.getValue("/root/main/peprterminfo/info/fstrgsttime")+"00");
- if(model.getValue("/root/hidden/condition/status") == "N") {
- //동일한 코드가 있는지 조회한 후 , 있으면 에러메세지
- if(submit("TXMRT00301")){
- model.resetInstanceNode("/root/main/peprterminfo/info");
- fDisabled("AS");
- model.refresh();
- }
- } else if(model.getValue("/root/hidden/condition/status") == "M" || insTermcd == model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/termcd")) {
- if(model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/termengnm") != model.getValue("/root/main/peprterminfo/info/termengnm") ||
- model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/termhngnm") != model.getValue("/root/main/peprterminfo/info/termhngnm")) {
- //if(model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/icd10cd") != model.getValue("/root/main/peprterminfo/info/icd10cd") ||
- // model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/snmdcnptid") != model.getValue("/root/main/peprterminfo/info/snmdcnptid") ||
- // /model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/snmdcnptnm") != model.getValue("/root/main/peprterminfo/info/snmdcnptnm"))
- if(model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/icd10cd") != model.getValue("/root/main/peprterminfo/info/icd10cd") )
- {
- model.setValue("/root/send/reqdata/status", "ATM");
- } else {
- model.setValue("/root/send/reqdata/status", "TM");
- }
- if(submit("TXMRT00301")){
- model.resetInstanceNode("/root/main/peprterminfo/info");
- fDisabled("AS");
- model.refresh();
- }
- model.setValue("/root/hidden/condition/status", "");
- } else if(model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/icd10cd") != model.getValue("/root/main/peprterminfo/info/icd10cd") ||
- model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/snmdcnptid") != model.getValue("/root/main/peprterminfo/info/snmdcnptid") ||
- model.getValue("/root/main/cccdinfo/cccd[" + rowCnt + "]/snmdcnptnm") != model.getValue("/root/main/peprterminfo/info/snmdcnptnm")) {
-
- //alert("AA");
- model.setValue("/root/send/reqdata/status", "AM");
- if(submit("TXMRT00301")){
- model.resetInstanceNode("/root/main/peprterminfo/info");
- fDisabled("AS");
- model.refresh();
- model.setValue("/root/hidden/condition/status", "");
- }
-
- } else {
- var rtn = messageBox("변경된 내용이 없으므로 저장 ", "E001");
- return;
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 사용종료
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fEndCcTerm(){
- var iRow = grd_cccd.row;
- var ccattr = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd");
- var term = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termcd");
- var insccindxcd = model.getValue("/root/main/peprterminfo/info/ccindxcd");
- var insccattrcd = model.getValue("/root/main/peprterminfo/info/ccattrcd");
- var insTermcd = model.getValue("/root/main/peprterminfo/info/ccattrcd")+"."+ model.getValue("/root/main/peprterminfo/info/termcd");
- if((insTermcd == "" || insTermcd == null)||(insccattrcd == "" || insccattrcd == null)){
- var rtn = messageBox("삭제할 주호소용어를 ", "C002");
- return;
- }
- if(insccattrcd == ccattr && insTermcd == term) {
- model.setValue("/root/hidden/condition/status", "ATD");
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/reqdata/indxcd", insccindxcd);
- model.makeValue("/root/send/reqdata/ccattrcd",insccattrcd);
- model.makeValue("/root/send/reqdata/termcd", insTermcd);
- model.makeValue("/root/send/reqdata/status", model.getValue("/root/hidden/condition/status")); //N:등록, M:수정, D:삭제
-
- model.makeValue("/root/send/reqdata/termflag", "2"); //용어구분
- model.makeValue("/root/send/reqdata/oldtermfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
- model.makeValue("/root/send/reqdata/termfromdd", model.getValue("/root/main/peprterminfo/info/termfromdd"));
- model.makeValue("/root/send/reqdata/oldattrfromdd", model.getValue("/root/main/peprterminfo/info/attrfromdd"));
- model.makeValue("/root/send/reqdata/attrfromdd", model.getValue("/root/main/peprterminfo/info/attrfromdd"));
-
- submit("TXMRT00301");
- model.resetInstanceNode("/root/main/peprterminfo/info");
- model.setValue("/root/hidden/condition/status", "");
- model.refresh();
- } else {
- var rtn = messageBox("내용이 수정되었습니다. 수정 내용을 저장하시려면 저장 버튼을 ", "C002");
- return;
- }
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSelCcTerm(){
- fDisabled("AS");
- var sametermmode = model.getValue("/root/hidden/condition/sametermmode");
-
- //2009-04-30 오후 10:51:05 강지훈 수정 : 기관별 사용 이력조회를 선택했을경우에는 사용종료를 할수없다.
- if(sametermmode != "H"){
- btn_delete1.disabled = "false";
- }
-
- var iRow = grd_cccd.row;
- var ccindx = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccindxcd");
- var ccattr = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd");
- var term = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termcd");
-
- model.setValue("/root/hidden/condition/selectedtermcd", term);
- model.setValue("/root/main/peprterminfo/info/ccindxcd", ccindx); // 색인코드
- model.setValue("/root/main/peprterminfo/info/ccattrcd", ccattr); // 속성코드
- model.setValue("/root/main/peprterminfo/info/termcd", term.substr(term.lastIndexOf(".") + 1, term.length - (term.lastIndexOf(".") + 1))); // 대표 주호소 코드
- model.setValue("/root/main/peprterminfo/info/snmdcnptid", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/snmdcnptid")); // 스노메드-cncpt
- model.setValue("/root/main/peprterminfo/info/snmdcnptnm", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/snmdcnptnm")); // 스노메드-cncpt명
- model.setValue("/root/main/peprterminfo/info/snmddescid", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/snmddescid")); // 스노메드-dscrpt
- model.setValue("/root/main/peprterminfo/info/icd10cd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/icd10cd")); // ICD10CD
- model.setValue("/root/main/peprterminfo/info/umlscd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/umlscd")); // ICD10CD
- model.setValue("/root/main/peprterminfo/info/termengnm", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termengnm")); // 영문
- model.setValue("/root/main/peprterminfo/info/termhngnm", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termhngnm")); // 한글
- model.setValue("/root/main/peprterminfo/info/reprflag", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/reprflag")); // 대표어구분
- model.setValue("/root/main/peprterminfo/info/termflag", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termflag")); // 용어구분
- //model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/fstrgstrid")); // 등록자
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/lastupdtrid")); //
- model.setValue("/root/main/peprterminfo/info/fstrgstrnm", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/lastupdtrnm"));
- model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/attrfromdd"));
- model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/attrtodd"));
- model.setValue("/root/main/peprterminfo/info/essntermflag", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/essntermflag"));
-
- var fstrgstdt = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/fstrgstdt");
- var termfromdd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/termfromdd");
- var termtodd = model.getValue("/root/main/cccdinfo/cccd[" + 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-02-28 오전 10:21:46 강지훈 수정 : 기관별 이력조회 추가
- //model.setValue("/root/hidden/condition/sametermmode", "N");
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/ccattrcd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"));
- model.makeValue("/root/send/termcd", model.getValue("/root/main/cccdinfo/cccd["+iRow+"]/termcd"));
- model.makeValue("/root/send/termflag", model.getValue("/root/main/cccdinfo/cccd["+iRow+"]/termflag"));
- model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
- model.makeValue("/root/send/allinsthist", model.getValue("/root/hidden/condition/allinsthist"));
- submit("TRMRT00308");
-
- model.setValue("/root/main/peprterminfo/info/appinstcd", model.getValue("/root/main/cccdhist/appinstcd/appinstcd"));
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fGetSNMDCT(){
- var iRow = grd_cccd.row;
- var sIndx = model.getValue("/root/hidden/condition/selectedIndx");
- var sGrd = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"); //그리드 중 주호소코드 하나를 선택했다면 sccccd가 존재함
- model.setValue("/root/main/peprterminfo/info/ccattrcd", model.getValue("/root/main/peprterminfo/info/snmdcnptid"));
- if(sGrd != "") {
- sIndx = model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccindxcd");
- }
- model.makeValue("/root/send/indxcd",sIndx);
- model.makeValue("/root/send/attrcd", model.getValue("/root/main/peprterminfo/info/ccattrcd"));
- //선택한 색인에 해당하는 시퀀셜한 주호소코드를 가지고 온다
- submit("TRMRT00304");
- model.setValue("/root/main/peprterminfo/info/termcd", model.getValue("/root/main/seqcd/seq/termcd"));
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : ICD10 팝업 호출
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fGetICD10(){
- /*
- model.removeNodeset("/root/temp/send");
- model.makeValue("/root/temp/send/indxflag", "0");
- model.makeValue("/root/temp/send/srchflag", "C");
- model.makeValue("/root/temp/send/srchnm", model.getValue("/root/main/peprterminfo/info/icd10cd"));
- modal("SPMRT01400", 1,10, 10, "SPMRT01400", "/root/temp/send", "/root/temp/receive");
- model.setValue("/root/main/peprterminfo/info/icd10cd", model.getValue("/root/temp/receive/cd"));
- ipt_icd10cd.refresh();
- */
- setParameter("SPMMO3200_param_nodepath", "/root/temp/diaginfo");
- modal("SPMMO03200", 1, 0, 0, "", "", "");
- if(getNodesetCount("/root/temp/diaginfo/selectdiaglist") > 1){
- messageBox("진단코드는 하나만", "C002");
- model.resetInstanceNode("/root/temp/diaginfo/selectdiaglist");
- return;
- }
- model.setValue("/root/main/peprterminfo/info/icd10cd", model.getValue("/root/temp/diaginfo/selectdiaglist/diagcd"));
- ipt_icd10cd.refresh();
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 이력 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSelCcTermHist(){
- var iRow = grd_cchist.row;
- var indx = model.getValue("/root/hidden/condition/selectedIndx");
- var path = model.getValue("/root/hidden/condition/selectedIndxPath");
- var term = model.getValue("/root/main/cccdhist/list[" + iRow + "]/termcd");
- model.setValue("/root/hidden/condition/selectedtermcd", term);
- if( !isNull(iRow) ){
- model.setValue("/root/hidden/condition/status", "STM");
- model.setValue("/root/main/peprterminfo/info/ccindxcd", indx); //icd9
- model.setValue("/root/main/peprterminfo/info/ccattrcd", model.getValue("/root/main/cccdhist/list/attrcd")); // 확장코드
- model.setValue("/root/main/peprterminfo/info/termcd", term.substr(term.lastIndexOf(".") + 1, term.length - (term.lastIndexOf(".") + 1))); // 대표어(동의어)코드
- model.setValue("/root/main/peprterminfo/info/snmddescid", model.getValue("/root/main/cccdhist/list/snmddescid")); // 스노메드-dscrpt
- model.setValue("/root/main/peprterminfo/info/termengnm", model.getValue("/root/main/cccdhist/list[" + iRow + "]/termengnm")); // 영문
- model.setValue("/root/main/peprterminfo/info/termhngnm", model.getValue("/root/main/cccdhist/list[" + iRow + "]/termhngnm")); // 한글
- model.setValue("/root/main/peprterminfo/info/reprflag", model.getValue("/root/main/cccdhist/list[" + iRow + "]/reprflag")); // 대표어구분
- model.setValue("/root/main/peprterminfo/info/termflag", model.getValue("/root/main/cccdhist/list[" + iRow + "]/termflag")); // 용어구분
- model.setValue("/root/main/peprterminfo/info/fstrgstrid", model.getValue("/root/main/cccdhist/list[" + iRow + "]/lastupdtrid"));
- model.setValue("/root/main/peprterminfo/info/fstrgstrnm", model.getValue("/root/main/cccdhist/list[" + iRow + "]/lastupdtrnm"));
- //저장시 필요한 키값
- model.setValue("/root/main/peprterminfo/info/attrfromdd", model.getValue("/root/main/cccdhist/list[" + iRow + "]/attrfromdd"));
- model.setValue("/root/main/peprterminfo/info/attrtodd", model.getValue("/root/main/cccdhist/list[" + iRow + "]/attrtodd"));
- model.setValue("/root/main/peprterminfo/info/snmdcnptid", model.getValue("/root/main/cccdhist/list[" + iRow + "]/snmdcnptid")); // snmdconceptid
- model.setValue("/root/main/peprterminfo/info/snmdcnptnm", model.getValue("/root/main/cccdhist/list[" + iRow + "]/snmdcnptnm"));
- model.setValue("/root/main/peprterminfo/info/icd10cd", model.getValue("/root/main/cccdhist/list[" + iRow + "]/icd10cd")); //icd10cd
- model.setValue("/root/main/peprterminfo/info/umlscd", model.getValue("/root/main/cccdhist/list[" + iRow + "]/umlscd")); //icd10cd
-
- var fstrgstdt = model.getValue("/root/main/cccdhist/list[" + iRow + "]/lastupdtdt");
- var termfromdd = model.getValue("/root/main/cccdhist/list[" + iRow + "]/termfromdd");
- var termtodd = model.getValue("/root/main/cccdhist/list[" + 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 : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택부서 과주호소 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSrchDeptCcInfo(){
- model.removeNodeset("/root/send");
- var selIndxCd = model.getValue("/root/hidden/condition/selectedIndx");
- var sDeptCd = model.getValue("/root/hidden/condition/deptset/selecteddeptcd");
- if(sDeptCd == ""){
- messageBox("부서코드를 먼저", "C002");
- return;
- }
- if(selIndxCd == ""){
- messageBox("색인코드를 먼저", "C002");
- return;
- }
- model.makeValue("/root/send/indxcd", selIndxCd);
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/deptcd", sDeptCd);
- submit("TRMRT00306");
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택부서 과주호소 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fDelDeptCcTerm(){
- var iRow = grd_deptcc.row;
- if(iRow < 1){
- return;
- }
- if(model.getValue("/root/main/deptcccdlist/deptcccdinfo["+iRow+"]/status") == "I"){
- grd_deptcc.deleteItem(iRow);
- }else{
- model.setValue("/root/main/deptcccdlist/deptcccdinfo["+iRow+"]/status","D");
- }
- grd_deptcc.rebuild();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과주호소추가 리스트 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSelAddCcList(){
- if(grd_srchedccinfo.row == 0){
- var sCheck = model.getValue("/root/main/srchedcccdlist/srchedcccdinfo[1]/check");
- if(sCheck == "true"){
- var sRowCnt = grd_srchedccinfo.rows- grd_srchedccinfo.fixedRows;
- for(var iRow=1; iRow <= sRowCnt; iRow++){
- model.setValue("/root/main/srchedcccdlist/srchedcccdinfo["+iRow+"]/check","false");
- }
- }else{
- var sRowCnt = grd_srchedccinfo.rows- grd_srchedccinfo.fixedRows;
- for(var iRow=1; iRow <= sRowCnt; iRow++){
- model.setValue("/root/main/srchedcccdlist/srchedcccdinfo["+iRow+"]/check","true");
- }
- }
- grd_srchedccinfo.rebuild();
- }
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 색인추가
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddIndx(){
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/paramindx","");
- model.setValue("/root/send/paramindx", "2");
- modal("SMMRT00100", 1,10, 10, "SMMRT00100", "/root/send", "/root/hidden/condition/getdata");
- var child = "SMMRT00100";
- if(child != null){
- //var getVal = getParameter("setVal");
- //model.alert(getVal);
- //if(getVal == "I" || getVal == "U") {
- 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("TRMRT00301");
- trv_ccindx.refresh();
- // }
- }
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 색인 언어 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChngLangIndx(){
- 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("TRMRT00301");
- trv_ccindx.rebuild();
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Tree 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSelTreeIndx(){
- model.removeNodeset("/root/send");
-
- var iIndx = trv_ccindx.focusIndex + 1;
- var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd");
- model.makeValue("/root/send/indxcd", selIndxCd);
- model.makeValue("/root/send/maininstyn", model.getValue("/root/hidden/condition/maininstyn"));
- model.makeValue("/root/send/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
- if(model.getValue("/root/hidden/condition/selctedmode") == "C"){ //주호소 코드를 선택했을때
- model.setValue("/root/hidden/condition/selectedIndx", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"));
- model.setValue("/root/hidden/condition/selectedIndxDepth", model.getValue("/root/main/indxlist/item[" + iIndx + "]/depth"));
- model.setValue("/root/hidden/condition/selectedIndxPath", model.getValue("/root/main/indxlist/item[" + iIndx + "]/pathcd"));
- submit("TRMRT00302"); //인덱스 트리를 가지고 온다
- grd_cccd.rebuild();
- }else{ // 과주호소코드를 선택했을때
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/deptcd", model.getValue("/root/hidden/condition/deptset/selecteddeptcd"));
- submit("TRMRT00306");
- }
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 과주호소 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSelDeptDiag(){
- 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.removenodeset("/root/main/indxlist/item");
- model.removenodeset("/root/main/srchedcccdlist/srchedcccdinfo");
- model.removenodeset("/root/main/deptcccdlist/deptcccdinfo");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 색인 코드 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSrchIndxCd(){
- if(model.getValue("/root/hidden/condition/srchindxcd") == "" || model.getValue("/root/hidden/condition/srchindxcd") == null){
- var rtn = messageBox("검색할 색인코드를 ", "C001");
- return;
- } else {
- model.setValue("/root/hidden/condition/selectedIndx", model.getValue("/root/hidden/condition/srchindxcd"));
- //trv_ccindx.vscroll.attribute("pos") = ( parseInt(trv_ccindx.attribute("itemheight")) + 1 ) * trv_ccindx.selectedIndex;
- trv_ccindx.expandDepth = 5;
- model.refresh();
- trv_ccindx.vscroll.attribute("pos") = ( parseInt(trv_ccindx.attribute("itemheight")) + 1 ) * trv_ccindx.selectedIndex;
- }
- }
- /**
- * @group :
- * @ver : 2008.03.19
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주호소 용어 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSrchCcTerm(){
- if(model.getValue("/root/hidden/condition/srchnm") == "" || model.getValue("/root/hidden/condition/srchnm") == null){
- var rtn = messageBox("검색어를 ", "C001");
- return;
- } else {
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/srchflag", model.getValue("/root/hidden/condition/srchflag"));
- model.makeValue("/root/send/srchnm", model.getValue("/root/hidden/condition/srchnm"));
- model.makeValue("/root/send/srchfromdd", model.getValue("/root/hidden/condition/srchfromdd"));
- model.makeValue("/root/send/srchtodd", model.getValue("/root/hidden/condition/srchtodd"));
- model.makeValue("/root/send/endflag", model.getValue("/root/hidden/condition/endflag"));
- model.makeValue("/root/send/maininstyn", model.getValue("/root/hidden/condition/maininstyn"));
- model.makeValue("/root/send/selInstcd", model.getValue("/root/hidden/condition/selInstcd"));
- var srchnm = model.getValue("/root/hidden/condition/srchnm");
- srchnm = srchnm.replace(/^ *| *$/g, "");
- if(model.getValue("/root/send/srchflag") == "C" || model.getValue("/root/send/srchflag") == "E") {
- srchnm = srchnm.toUpperCase();
- model.setValue("/root/send/srchnm", srchnm);
- }
- if (model.getValue("/root/hidden/condition/selctedmode") == "C" ) { // 주호소코드 선택했을때
- model.removeNodeset("/root/main/cccdinfo/cccd");
- submit("TRMRT00303");
- } else if(model.getValue("/root/hidden/condition/selctedmode") == "P" ) { //과 주호소코드 선택했을경우
- model.removeNodeset("/root/send");
- model.removeNodeset("/root/main/deptcccdlist/deptcccdinfo");
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/indxcd", "null");
- model.makeValue("/root/send/deptcd", model.getValue("/root/hidden/condition/deptset/selecteddeptcd"));
- model.makeValue("/root/send/srchflag", model.getValue("/root/hidden/condition/srchflag"));
- model.makeValue("/root/send/srchnm", model.getValue("/root/hidden/condition/srchnm"));
- submit("TRMRT00306");
- }
- model.refresh();
- }
- }
- function fRollbackTerm(){
- var icd10cd = model.getValue("/root/main/peprterminfo/info/ccindxcd");
- var attrcd = model.getValue("/root/main/peprterminfo/info/ccattrcd");
- var termcd = model.getValue("/root/main/peprterminfo/info/termcd");
- var fullTermcd = 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/ccindxcd", icd10cd);
- model.setValue("/root/send/reqdata/ccattrcd", attrcd);
- model.setValue("/root/send/reqdata/termcd", fullTermcd);
- model.setValue("/root/send/reqdata/termflag", "2");
- model.setValue("/root/send/reqdata/reprflag", "R");
- 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"));
- model.makeValue("/root/send/reqdata/status", "N");
- submit("TXMRT00301");
- }
- /**
- * @group :
- * @ver : 2008.12.11
- * @by : 나종천
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 오른쪽 마우스 팝업 호출
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCallPopup(flag){
- if(flag == "grd_cccd"){
- if(isDataCell()){
- setPopupMenu(flag, false, "/root/init/func/mouserght", "label", "value");
- }
- } else if(flag == "trv_ccindx"){
- if(trv_ccindx.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 == "C"){
- selectedRows = grd_cccd.selectedRows;
- for(var cnt = 0; cnt <= selectedRows -1; cnt++){
- copyNodeset("/root/hidden/reqdata/ccindxlist", "/root/main/cccdinfo/cccd[" + grd_cccd.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_ccindx.focusIndex + 1;
- var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd");
- var msg = messageBox("색인을", "Q012");
- if(msg == "7"){
- return;
- }
- switch(selTab){
- case "C":
- copyNodeset("/root/send/reqdata/ccindxlist", "/root/hidden/reqdata/ccindxlist");
- model.makeValue("/root/send/reqdata/chnginfo/chngindxcd", selIndxCd);
- model.makeValue("/root/send/reqdata/chnginfo/indxflag", selTab);
- if(msg == "6"){
- if(submit("TXMRT00303")){
- messageBox("색인 변경이","I001");
- grd_cccd.refresh();
- } else {
- messageBox("색인 변경을","E009");
- }
- }
- model.removeNodeset("/root/send/reqdata");
- model.removeNodeset("/root/hidden/reqdata");
- break;
- }
- }
- /**
- * @group :
- * @ver : 2009.02.09
- * @by : 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기관별 용어 사용여부 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fTermUseSave(){
- model.removeNodeset("/root/send/termuse");
- var RowCnt = grd_cccd.rows;
- model.makeValue("/root/send/termuse",getGridUpdateData(grd_cccd));
- submit("TXMRT00206");
-
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2009-02-28 오전 10:01:34
- * @by : 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 용어 이력 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fGetDiagTermHistList(){
- var iRow = grd_cccd.row;
- grd_cchist.colHidden(1) = true;
- model.setValue("/root/hidden/condition/sametermmode", "N");
-
- cap_allinsthist.visible = false;
- cmb_allinsthist.visible = false;
-
- btn_modify1.disabled = false;
- btn_rollback.disabled = false;
- btn_termsave.disabled = false;
- btn_delete1.disabled = false;
-
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/ccattrcd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"));
- model.makeValue("/root/send/termcd", model.getValue("/root/main/cccdinfo/cccd["+iRow+"]/termcd"));
- model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
- submit("TRMRT00308");
- }
- /**
- * @group :
- * @ver : 2009-02-23 오후 10:30:15
- * @by : 강지훈
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 기관별 용어 이력 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetDiagInstTermHistList(){
- var iRow = grd_cccd.row;
- grd_cchist.colHidden(1) = false;
-
- cap_allinsthist.visible = true;
- cmb_allinsthist.visible = true;
-
- //2009-04-30 오후 10:37:47 강지훈 수정 : 기관별 사용이력조회일때는 시작, 종료일자 때문에 수정이 불가하다.
- btn_modify1.disabled = true;
- btn_rollback.disabled = true;
- btn_termsave.disabled = true;
- btn_delete1.disabled = true;
-
- model.setValue("/root/hidden/condition/sametermmode", "H");
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/allinsthist", model.getValue("/root/hidden/condition/allinsthist"));
- model.makeValue("/root/send/ccattrcd", model.getValue("/root/main/cccdinfo/cccd[" + iRow + "]/ccattrcd"));
- model.makeValue("/root/send/termcd", model.getValue("/root/main/cccdinfo/cccd["+iRow+"]/termcd"));
- model.makeValue("/root/send/sametermmode", model.getValue("/root/hidden/condition/sametermmode"));
- submit("TRMRT00308");
- }
|