123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918 |
- /**
- * @desc : 색인 Tree 작성
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fInitalize(){
- // Edited by NJ 2007-07-21 getDate() -> getCurrentDate()
- // model.setValue("/root/init/today", getDate());
- model.setValue("/root/init/today", getCurrentDate());
- var value = model.getValue("/root/hidden/condition/indxflag");
- if(checkOpener()){
- model.makeValue("/root/hidden/condition/indxflag", model.getValue("/root/hidden/condition/getdata/paramindx"));
- model.makeValue("/root/hidden/condition/selectedmode", "H");
- model.makeValue("/root/hidden/condition/indxuseflag", "TOBE");
- }
-
- if(model.getValue("/root/hidden/condition/indxflag") == "0") {
- model.toggle("case1");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") {
- model.toggle("case2");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2"){
- model.toggle("case4");
- } else{
- model.toggle("case3");
- }
- fIndxListSrch();
- }
- /**
- * @desc : 색인 Tree 작성
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fIndxListSrch(){
- model.resetInstanceNode("/root/send");
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode",model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag"));
- submit("TRMRT00101");
- trv_dgindx.rebuild();
- }
- /**
- * @desc : 해당 색인에 대한 정보를 조회
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fIndxInfoListSrch(){
- var iIndx = trv_dgindx.focusIndex + 1;
- var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd");
- model.setValue("/root/hidden/condition/rowcnt", iIndx);
-
- model.resetInstanceNode("/root/send");
- model.makeValue("/root/hidden/condition/selectedindx", selIndxCd);
- model.makeValue("/root/hidden/condition/focusindx", iIndx);
- model.makeValue("/root/send/indxcd", selIndxCd );
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- submit("TRMRT00102");
- }
- /**
- * @desc : 버튼 속성 Setting
- *
- * @param : flag(DE: 진단색인(ICD10), OE: 수술색인(ICD9), CE: 주호소색인, NE: 암진단색인)
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fDisable(flag){
- if(flag == "DE"){
- ipt_indxcd.disabled = "false";
- ipt_indxhngnm.disabled = "false";
- ipt_indxengnm.disabled = "false";
- ipt_upindxcd.disabled = "false";
- btn_upindxcd.disabled = "false";
- cmb_indxdrdiflag.disabled = "false";
- cmb_highestlvel.disabled = "false";
- } else if(flag == "OE"){
- ipt_opindxcd.disabled = "false";
- ipt_opindxhngnm.disabled = "false";
- ipt_opindxengnm.disabled = "false";
- ipt_opupindxcd.disabled = "false";
- btn_opupindxcd.disabled = "false";
- cmb_opindxdrdiflag.disabled = "false";
- cmb_highestlvel.disabled = "false";
- } else if(flag == "NE"){
- ipt_cncindxcd.disabled = "false";
- ipt_cncindxhngnm.disabled = "false";
- ipt_cncindxengnm.disabled = "false";
- ipt_cncupindxcd.disabled = "false";
- btn_cncupindxcd.disabled = "false";
- cmb_cncindxdrdiflag.disabled = "false";
- cmb_highestlvel.disabled = "false";
- } else if(flag == "CE"){
- ipt_ccindxcd.disabled = "false";
- ipt_ccindxhngnm.disabled = "false";
- ipt_ccindxengnm.disabled = "false";
- ipt_ccupindxcd.disabled = "false";
- btn_ccupindxcd.disabled = "false";
- cmb_ccindxdrdiflag.disabled = "false";
- cmb_highestlvel.disabled = "false";
- } else if(flag == "AD"){
- ipt_indxcd.disabled = "true";
- ipt_indxhngnm.disabled = "true";
- ipt_indxengnm.disabled = "true";
- btn_upindxcd.disabled = "true";
- ipt_upindxcd.disabled = "true";
- cmb_indxdrdiflag.disabled = "true";
- ipt_opindxcd.disabled = "true";
- ipt_opindxhngnm.disabled = "true";
- ipt_opindxengnm.disabled = "true";
- ipt_opupindxcd.disabled = "true";
- btn_opupindxcd.disabled = "true";
- cmb_opindxdrdiflag.disabled = "true";
- ipt_cncindxcd.disabled = "true";
- ipt_cncindxhngnm.disabled = "true";
- ipt_cncindxengnm.disabled = "true";
- ipt_cncupindxcd.disabled = "true";
- btn_cncupindxcd.disabled = "true";
- cmb_cncindxdrdiflag.disabled = "true";
- ipt_ccindxcd.disabled = "true";
- ipt_ccindxhngnm.disabled = "true";
- ipt_ccindxengnm.disabled = "true";
- ipt_ccupindxcd.disabled = "true";
- btn_ccupindxcd.disabled = "true";
- cmb_ccindxdrdiflag.disabled = "true";
- cmb_highestlvel.disabled = "true";
- }
- model.refresh();
- }
- /**
- * @desc : 색인을 추가한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fAddIndx(){
- var iIndx = model.getValue("/root/hidden/condition/rowcnt");
- model.makeValue("/root/hidden/condition/highestlvel", "");
-
- //if(model.getValue("/root/hidden/condition/selectedindx") == "" || model.getValue("/root/hidden/condition/selectedindx") == null){
- // var rtn1 = messageBox("상위 색인을 ", "C002");
- //}
- //model.resetInstanceNode("/root/main/indxinfo");
- if((trv_dgindx.focusIndex < 0)){
- messageBox("색인을 선택하지", "E007");
- }
- if((model.getValue("/root/hidden/condition/indexcode") != "" ) || (trv_dgindx.length == 0)){
- var selIndxCd = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd");
- var selIndxSeqNo = model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxseqno");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") {
- model.resetInstanceNode("/root/main/indxinfo/diagindx");
- fDisable("DE");
- model.makeValue("/root/main/indxinfo/diagindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"));
- model.makeValue("/root/main/indxinfo/diagindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm"));
- model.makeValue("/root/main/indxinfo/diagindx/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/main/indxinfo/diagindx/indxseqno", selIndxSeqNo);
- model.makeNode("/root/main/indxinfo/diagindx/indxcd");
- model.makeNode("/root/main/indxinfo/diagindx/indxhngnm");
- model.makeNode("/root/main/indxinfo/diagindx/indxengnm");
- model.makeNode("/root/main/indxinfo/diagindx/indxdrdiflag");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") {
- model.resetInstanceNode("/root/main/indxinfo/opindx");
- fDisable("OE");
- model.makeValue("/root/main/indxinfo/opindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"));
- model.makeValue("/root/main/indxinfo/opindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm"));
- model.makeValue("/root/main/indxinfo/opindx/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/main/indxinfo/opindx/indxseqno", selIndxSeqNo);
- model.makeNode("/root/main/indxinfo/opindx/indxcd");
- model.makeNode("/root/main/indxinfo/opindx/indxhngnm");
- model.makeNode("/root/main/indxinfo/opindx/indxengnm");
- model.makeNode("/root/main/indxinfo/opindx/indxdrdiflag");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") {
- model.resetInstanceNode("/root/main/indxinfo/ccindx");
- fDisable("CE");
- model.makeValue("/root/main/indxinfo/ccindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"));
- model.makeValue("/root/main/indxinfo/ccindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm"));
- model.makeValue("/root/main/indxinfo/ccindx/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/main/indxinfo/ccindx/indxseqno", selIndxSeqNo);
- model.makeNode("/root/main/indxinfo/ccindx/indxcd");
- model.makeNode("/root/main/indxinfo/ccindx/indxhngnm");
- model.makeNode("/root/main/indxinfo/ccindx/indxengnm");
- model.makeNode("/root/main/indxinfo/ccindx/indxdrdiflag");
- }else if (model.getValue("/root/hidden/condition/indxflag") == "1" || model.getValue("/root/hidden/condition/indxflag") == "3" || model.getValue("/root/hidden/condition/indxflag") == "4") {
- model.resetInstanceNode("/root/main/indxinfo/cncrindx");
- fDisable("NE");
- model.makeValue("/root/main/indxinfo/cncrindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxcd"));
- model.makeValue("/root/main/indxinfo/cncrindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm"));
- model.makeValue("/root/main/indxinfo/cncrindx/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/main/indxinfo/cncrindx/indxseqno", selIndxSeqNo);
- model.makeNode("/root/main/indxinfo/cncrindx/indxcd");
- model.makeNode("/root/main/indxinfo/cncrindx/indxhngnm");
- model.makeNode("/root/main/indxinfo/cncrindx/indxengnm");
- model.makeNode("/root/main/indxinfo/cncrindx/indxdrdiflag");
- }
- }
- model.setValue("/root/hidden/condition/state", "I"); //최상위 레벨 등록(상위코드=인덱스코드)
- model.refresh();
- }
- /**
- * @desc : 색인을 선택한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSelIndx(){
- if(model.getValue("/root/hidden/condition/indxflag") == "0") {
- model.toggle("case1");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") {
- model.toggle("case2");
- }else if(model.getValue("/root/hidden/condition/indxflag") == "2"){
- model.toggle("case4");
- } else{
- model.toggle("case3");
- }
- fIndxListSrch();
- fDisable("AD");
- model.resetInstanceNode("/root/hidden/condition/indexcode");
- model.refresh();
- }
- /**
- * @desc : 최상위 암진단 색인으로 설정한다
- *
- * @param :
- * @return : 2008/07/07 이창록 수정 (체크 상태가아니면 원래되로 되돌리기)
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSetHighIndx(){
- var iIndx = trv_dgindx.focusIndex + 1;
- if(model.getValue("/root/hidden/condition/highestlvel") == "Y"){
- ipt_upindxcd.disabled = "true";
- if(model.getValue("/root/hidden/condition/indxflag") == "0") {
- model.makeValue("/root/main/indxinfo/diagindx/upindxcd", "-");
- model.makeValue("/root/main/indxinfo/diagindx/upindxhngnm", "");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") {
- model.makeValue("/root/main/indxinfo/opindx/upindxcd", "-");
- model.makeValue("/root/main/indxinfo/opindx/upindxhngnm", "");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2"){
- model.makeValue("/root/main/indxinfo/ccindx/upindxcd", "-");
- model.makeValue("/root/main/indxinfo/ccindx/upindxhngnm", "");
- } else{
- model.makeValue("/root/main/indxinfo/cncrindx/upindxcd", "-");
- model.makeValue("/root/main/indxinfo/cncrindx/upindxhngnm", "");
- }
- } else {
- ipt_upindxcd.disabled = "false";
- if(model.getValue("/root/hidden/condition/indxflag") == "0") {
- model.makeValue("/root/main/indxinfo/diagindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/upindxcd"));
- model.makeValue("/root/main/indxinfo/diagindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm"));
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") {
- model.makeValue("/root/main/indxinfo/opindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/upindxcd"));
- model.makeValue("/root/main/indxinfo/opindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm"));
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2"){
- model.makeValue("/root/main/indxinfo/ccindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/upindxcd"));
- model.makeValue("/root/main/indxinfo/ccindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm"));
- } else{
- model.makeValue("/root/main/indxinfo/cncrindx/upindxcd", model.getValue("/root/main/indxlist/item[" + iIndx + "]/upindxcd"));
- model.makeValue("/root/main/indxinfo/cncrindx/upindxhngnm", model.getValue("/root/main/indxlist/item[" + iIndx + "]/indxhngnm"));
- }
- }
- model.refresh();
- }
- /**
- * @desc : 암진단 색인정보를 저장한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSaveCncrDiagIndx(){
- var state = model.getValue("/root/hidden/condition/state");
- if(state == "-"){
- messageBox("신규 및 수정 모드를", "C002");
- return;
- }
- if(model.getValue("/root/main/indxinfo/cncrindx/indxcd") == ""){
- messageBox("색인코드는 ","I003");
- return;
- }
- //입력한 색인코드와 동일한 코드가 존재하는지 체크해본 후 동일한 코드 존재하면 수정, 존재하지 않으면 등록
- model.resetInstanceNode("/root/send");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") { //분기:진단
- model.copyNode("/root/send", "/root/main/indxinfo/diagindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //분기:수술
- model.copyNode("/root/send", "/root/main/indxinfo/opindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //분기:주호소
- model.copyNode("/root/send", "/root/main/indxinfo/ccindx");
- }else { //분기:암
- model.copyNode("/root/send", "/root/main/indxinfo/cncrindx");
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag"));
- model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state"));
- submit("TRMRT00103");
- if(model.getValue("/root/hidden/condition/state") == "I") {
- if(model.getValue("/root/main/equalindx/indxcount/count") == "0"){
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- } else {
- var rtn = messageBox("동일한 색인코드가 존재하므로 등록 ", "E001");
- }
- } else {
- if(model.getValue("/root/main/equalindx/indxcount/count") == "1") {
- var rtn = messageBox("색인을 수정", "S001");
- if (rtn == "6"){
- model.setValue("/root/hidden/condition/state", "U");
- model.setValue("/root/send/state", "U");
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- } else {
- return;
- }
- } else {
- var rtn = messageBox("동일한 색인코드가 존재하지 않으므로 수정 ", "E001");
- }
- }
- model.resetInstanceNode("/root/main/indxinfo");
- model.setValue("/root/hidden/condition/state", "");
- model.setValue("/root/hidden/condition/indexcode", model.getValue("/root/send/indxcd"));
- ipt_upindxcd.disabled = "true";
- fDisable("AD");
- model.refresh();
- }
- /**
- * @desc : 암진단 색인을 삭제한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fDelCncrDiagIndx(){
- var rtn = messageBox("색인을 ", "Q001");
- if (rtn == "6"){
- model.setValue("/root/hidden/condition/state", "D");
- model.resetInstanceNode("/root/send");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") { //분기:진단
- model.copyNode("/root/send", "/root/main/indxinfo/diagindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //분기:수술
- model.copyNode("/root/send", "/root/main/indxinfo/opindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //분기:주호소
- model.copyNode("/root/send", "/root/main/indxinfo/ccindx");
- }else {
- model.copyNode("/root/send", "/root/main/indxinfo/cncrindx");
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state"));
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- model.resetInstanceNode("/root/main/indxinfo");
- model.setValue("/root/hidden/condition/state", "");
- model.refresh();
- }
- }
- /**
- * @desc : 암진단 해당 색인의 상위 색인을 선택한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSelCncrDiagHighIndx(){
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/paramindx","");
- model.makeValue("/root/send/parammode","");
- model.setValue("/root/send/paramindx", model.getValue("/root/hidden/condition/indxflag"));
- model.setValue("/root/send/parammode", model.getValue("/root/hidden/condition/selectedmode"));
- modal("SPMRT01200", 1,10, 10, "SPMRT01200", "/root/send", "/root/hidden/condition/getdata");
- var child = "SPMRT01200";
- if(child != null){
- var getVal1 = getParameter("setVal1");
- var getVal2 = getParameter("setVal2");
- model.setValue("/root/main/indxinfo/cncrindx/upindxcd", getVal1);
- model.setValue("/root/main/indxinfo/cncrindx/upindxhngnm", getVal2);
- model.refresh();
- }
- }
- /**
- * @desc : 진단(ICD10) 색인정보를 저장한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSaveDiagIndx(){
- var state = model.getValue("/root/hidden/condition/state");
- if(state == "-"){
- messageBox("신규 및 수정 모드를", "C002");
- return;
- }
- if(model.getValue("/root/main/indxinfo/diagindx/indxcd") == ""){
- messageBox("색인코드는 ","I003");
- return;
- }
- //입력한 색인코드와 동일한 코드가 존재하는지 체크해본 후 동일한 코드 존재하면 수정, 존재하지 않으면 등록
- model.resetInstanceNode("/root/send");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") { //분기:진단
- model.copyNode("/root/send", "/root/main/indxinfo/diagindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //분기:수술
- model.copyNode("/root/send", "/root/main/indxinfo/opindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //분기:주호소
- model.copyNode("/root/send", "/root/main/indxinfo/ccindx");
- }else { //분기:암
- model.copyNode("/root/send", "/root/main/indxinfo/cncrindx");
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag"));
- model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state"));
- submit("TRMRT00103");
- if(model.getValue("/root/hidden/condition/state") == "I") {
- if(model.getValue("/root/main/equalindx/indxcount/count") == "0"){
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- } else {
- var rtn = messageBox("동일한 색인코드가 존재하므로 등록 ", "E001");
- }
- } else {
- if(model.getValue("/root/main/equalindx/indxcount/count") == "1") {
- var rtn = messageBox("색인을 수정", "S001");
- if (rtn == "6"){
- model.setValue("/root/hidden/condition/state", "U");
- model.setValue("/root/send/state", "U");
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- trv_dgindx.rebuild();
- } else {
- return;
- }
- } else {
- var rtn = messageBox("동일한 색인코드가 존재하지 않으므로 수정 ", "E001");
- }
- }
- model.resetInstanceNode("/root/main/indxinfo");
- model.setValue("/root/hidden/condition/state", "");
- model.setValue("/root/hidden/condition/indexcode", model.getValue("/root/send/indxcd"));
-
- ipt_upindxcd.disabled = "true";
- fDisable("AD");
- model.refresh();
- }
- /**
- * @desc : 진단 색인을 삭제한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fDelDiagIndx(){
- var rtn = messageBox("색인을 ", "Q001");
- if (rtn == "6"){
- model.setValue("/root/hidden/condition/state", "D");
- model.resetInstanceNode("/root/send");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") { //분기:진단
- model.copyNode("/root/send", "/root/main/indxinfo/diagindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //분기:수술
- model.copyNode("/root/send", "/root/main/indxinfo/opindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //분기:주호소
- model.copyNode("/root/send", "/root/main/indxinfo/ccindx");
- }else {
- model.copyNode("/root/send", "/root/main/indxinfo/cncrindx");
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state"));
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
-
- model.resetInstanceNode("/root/main/indxinfo");
- model.setValue("/root/hidden/condition/state", "");
- model.refresh();
- }
- }
- /**
- * @desc : 진단 해당 색인의 상위 색인을 선택한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSelDiagHighIndx(){
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/paramindx","");
- model.makeValue("/root/send/parammode","");
- model.makeValue("/root/send/paramindxuseflag","");
- model.setValue("/root/send/paramindx", model.getValue("/root/hidden/condition/indxflag"));
- model.setValue("/root/send/parammode", model.getValue("/root/hidden/condition/selectedmode"));
- model.setValue("/root/send/paramindxuseflag", model.getValue("/root/hidden/condition/indxuseflag"));
- modal("SPMRT01200_색인선택", 1,10, 10, "SPMRT01200", "/root/send", "/root/hidden/condition/getdata");
- var child = "SPMRT01200";
- var getVal1 = getParameter("setVal1");
- var getVal2 = getParameter("setVal2");
- if((child != "")&&((getVal1 != "")|| (getVal1 != ""))){
- model.setValue("/root/main/indxinfo/diagindx/upindxcd", getVal1);
- model.setValue("/root/main/indxinfo/diagindx/upindxhngnm", getVal2);
- model.refresh();
- }
- }
- /**
- * @desc : 수술 해당 색인의 상위 색인을 선택한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSelOpHighIndx(){
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/paramindx","");
- model.makeValue("/root/send/parammode","");
- model.setValue("/root/send/paramindx", model.getValue("/root/hidden/condition/indxflag"));
- model.setValue("/root/send/parammode", model.getValue("/root/hidden/condition/selectedmode"));
- modal("SPMRT01200", 1,10, 10, "SPMRT01200", "/root/send", "/root/hidden/condition/getdata");
- var child = "SPMRT01200";
- if(child != null){
- var getVal1 = getParameter("setVal1");
- var getVal2 = getParameter("setVal2");
- model.setValue("/root/main/indxinfo/opindx/upindxcd", getVal1);
- model.setValue("/root/main/indxinfo/opindx/upindxhngnm", getVal2);
- model.refresh();
- }
- }
- /**
- * @desc : 수술(ICD9) 색인정보를 저장한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSaveOpIndx(){
- var state = model.getValue("/root/hidden/condition/state");
- if(state == "-"){
- messageBox("신규 및 수정 모드를", "C002");
- return;
- }
- if(model.getValue("/root/main/indxinfo/opindx/indxcd") == ""){
- messageBox("색인코드는 ","I003");
- return;
- }
- //입력한 색인코드와 동일한 코드가 존재하는지 체크해본 후 동일한 코드 존재하면 수정, 존재하지 않으면 등록
- model.resetInstanceNode("/root/send");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") { //분기:진단
- model.copyNode("/root/send", "/root/main/indxinfo/diagindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //분기:수술
- model.copyNode("/root/send", "/root/main/indxinfo/opindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //분기:주호소
- model.copyNode("/root/send", "/root/main/indxinfo/ccindx");
- }else { //분기:암
- model.copyNode("/root/send", "/root/main/indxinfo/cncrindx");
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag"));
- model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state"));
- submit("TRMRT00103");
- if(model.getValue("/root/hidden/condition/state") == "I") {
- if(model.getValue("/root/main/equalindx/indxcount/count") == "0"){
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- } else {
- var rtn = messageBox("동일한 색인코드가 존재하므로 등록 ", "E001");
- }
- } else {
- if(model.getValue("/root/main/equalindx/indxcount/count") == "1") {
- var rtn = messageBox("색인을 수정", "S001");
- if (rtn == "6"){
- model.setValue("/root/hidden/condition/state", "U");
- model.setValue("/root/send/state", "U");
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- } else {
- return;
- }
- } else {
- var rtn = messageBox("동일한 색인코드가 존재하지 않으므로 수정 ", "E001");
- }
- }
- model.resetInstanceNode("/root/main/indxinfo");
- model.setValue("/root/hidden/condition/state", "");
- model.setValue("/root/hidden/condition/indexcode", model.getValue("/root/send/indxcd"));
- ipt_upindxcd.disabled = "true";
- fDisable("AD");
- model.refresh();
- }
- /**
- * @desc : 수술 색인을 삭제한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fDelOpIndx(){
- var rtn = messageBox("색인을 ", "Q001");
- if (rtn == "6"){
- model.setValue("/root/hidden/condition/state", "D");
- model.resetInstanceNode("/root/send");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") { //분기:진단
- model.copyNode("/root/send", "/root/main/indxinfo/diagindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //분기:수술
- model.copyNode("/root/send", "/root/main/indxinfo/opindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //분기:주호소
- model.copyNode("/root/send", "/root/main/indxinfo/ccindx");
- }else {
- model.copyNode("/root/send", "/root/main/indxinfo/cncrindx");
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state"));
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- model.resetInstanceNode("/root/main/indxinfo");
- model.setValue("/root/hidden/condition/state", "");
- model.refresh();
- }
- }
- /**
- * @desc : 주호소 해당 색인의 상위 색인을 선택한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSelCcHighIndx(){
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/paramindx","");
- model.makeValue("/root/send/parammode","");
- model.setValue("/root/send/paramindx", model.getValue("/root/hidden/condition/indxflag"));
- model.setValue("/root/send/parammode", model.getValue("/root/hidden/condition/selectedmode"));
- modal("SPMRT01200", 1,10, 10, "SPMRT01200", "/root/send", "/root/hidden/condition/getdata");
- var child = "SPMRT01200";
- if(child != null){
- var getVal1 = getParameter("setVal1");
- var getVal2 = getParameter("setVal2");
- model.setValue("/root/main/indxinfo/opindx/upindxcd", getVal1);
- model.setValue("/root/main/indxinfo/opindx/upindxhngnm", getVal2);
- model.refresh();
- }
- }
- /**
- * @desc : 주호소 색인정보를 저장한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fSaveCcIndx(){
- var state = model.getValue("/root/hidden/condition/state");
- if(state == "-"){
- messageBox("신규 및 수정 모드를", "C002");
- return;
- }
- if(model.getValue("/root/main/indxinfo/ccindx/indxcd") == ""){
- messageBox("색인코드는 ","I003");
- return;
- }
- //입력한 색인코드와 동일한 코드가 존재하는지 체크해본 후 동일한 코드 존재하면 수정, 존재하지 않으면 등록
- model.resetInstanceNode("/root/send");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") { //분기:진단
- model.copyNode("/root/send", "/root/main/indxinfo/diagindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //분기:수술
- model.copyNode("/root/send", "/root/main/indxinfo/opindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //분기:주호소
- model.copyNode("/root/send", "/root/main/indxinfo/ccindx");
- }else { //분기:암
- model.copyNode("/root/send", "/root/main/indxinfo/cncrindx");
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag"));
- model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state"));
- submit("TRMRT00103");
- if(model.getValue("/root/hidden/condition/state") == "I") {
- if(model.getValue("/root/main/equalindx/indxcount/count") == "0"){
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- } else {
- var rtn = messageBox("동일한 색인코드가 존재하므로 등록 ", "E001");
- }
- } else {
- if(model.getValue("/root/main/equalindx/indxcount/count") == "1") {
- var rtn = messageBox("색인을 수정", "S001");
- if (rtn == "6"){
- model.setValue("/root/hidden/condition/state", "U");
- model.setValue("/root/send/state", "U");
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- } else {
- return;
- }
- } else {
- var rtn = messageBox("동일한 색인코드가 존재하지 않으므로 수정 ", "E001");
- }
- }
- model.resetInstanceNode("/root/main/indxinfo");
- model.setValue("/root/hidden/condition/state", "");
- model.setValue("/root/hidden/condition/indexcode", model.getValue("/root/send/indxcd"));
- ipt_upindxcd.disabled = "true";
- fDisable("AD");
- model.refresh();
- }
- /**
- * @desc : 주호소 색인을 삭제한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fDelCcIndx(){
- var rtn = messageBox("색인을 ", "Q001");
- if (rtn == "6"){
- model.setValue("/root/hidden/condition/state", "D");
- model.resetInstanceNode("/root/send");
- if(model.getValue("/root/hidden/condition/indxflag") == "0") { //분기:진단
- model.copyNode("/root/send", "/root/main/indxinfo/diagindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") { //분기:수술
- model.copyNode("/root/send", "/root/main/indxinfo/opindx");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") { //분기:주호소
- model.copyNode("/root/send", "/root/main/indxinfo/ccindx");
- }else {
- model.copyNode("/root/send", "/root/main/indxinfo/cncrindx");
- }
- model.makeValue("/root/send/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/state", model.getValue("/root/hidden/condition/state"));
- if(isPopup()){
- //팝업화면이면 부모화면에 리턴할 값을 셋팅한다.
- opener.javascript.setParameter("setVal", model.getValue("/root/hidden/condition/state"));
- }
- submit("TXMRT00101");
- model.resetInstanceNode("/root/main/indxinfo");
- model.setValue("/root/hidden/condition/state", "");
- model.refresh();
- }
- }
- /**
- * @desc : 색인을 수정한다
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
-
- function fEditIndx(){
- if(model.getValue("/root/hidden/condition/indexcode") != "" ) {
- if(model.getValue("/root/hidden/condition/indxflag") == "0") {
- fDisable("DE");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "9") {
- fDisable("OE");
- } else if(model.getValue("/root/hidden/condition/indxflag") == "2") {
- fDisable("CE");
- }else if (model.getValue("/root/hidden/condition/indxflag") == "1" || model.getValue("/root/hidden/condition/indxflag") == "3" || model.getValue("/root/hidden/condition/indxflag") == "4") {
- fDisable("NE");
- }
- }
-
- model.setValue("/root/hidden/condition/state", "U"); //최상위 레벨 등록(상위코드=인덱스코드)
- model.refresh();
- }
- /**
- * @desc : Drag & Drop
- *
- * @param : srcNodePos : 기존 색인위치
- * : targetNodePos : 바뀔 색인위치
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fDragDropIndx(){
- var treePath = "/root/main/indxlist/item";
- var node = root.main.indxlist.item;
- var ins = document.models(0).instances(0);
- var srcValue = trv_dgindx.item(trv_dgindx.mouseRow).value;
- //alert("drop=" + srcValue);
- var targetNode = ins.selectSingleNode(treePath + "[indxcd='"+srcValue+"']" );
- //alert(targetNode.xml);
- //alert("drag=" + trv_dgindx.value);
- var srcNode = ins.selectSingleNode(treePath + "[indxcd='"+trv_dgindx.value+"']");
- //alert(srcNode.xml);
- //alert(model.getValue(treePath + "[indxcd='"+srcValue+"']/indxseqno")+","+ model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxseqno"));
- if(model.getValue(treePath + "[indxcd='"+srcValue+"']/indxcd") != model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxcd")){
- var rtn = messageBox("색인 순서 변경을", "Q004");
- if(rtn != 6){
- return;
- }
- if((model.getValue(treePath + "[indxcd='"+srcValue+"']/upindxcd") == model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/upindxcd")) && (rtn == 6)){
- // 값은 level에서만 순서변경이 가능하다
- // indxseqno 값을 변경
- if(parseInt(model.getValue(treePath + "[indxcd='"+srcValue+"']/indxseqno")) < parseInt(model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxseqno"))){
- //alert("위로");
- model.makeValue("/root/send/reqdata/dragdrop/state", "PLUS");
- model.makeValue("/root/send/reqdata/dragdrop/indxcd", model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxcd"));
- model.makeValue("/root/send/reqdata/dragdrop/indxseqno", model.getValue(treePath + "[indxcd='"+srcValue+"']/indxseqno"));
- model.makeValue("/root/send/reqdata/dragdrop/preindxseqno", model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxseqno"));
- model.makeValue("/root/send/reqdata/dragdrop/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/reqdata/dragdrop/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/reqdata/dragdrop/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag"));
- } else {
- //alert("아래로");
- model.makeValue("/root/send/reqdata/dragdrop/state", "MINUS");
- model.makeValue("/root/send/reqdata/dragdrop/indxcd", model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxcd"));
- model.makeValue("/root/send/reqdata/dragdrop/indxseqno", model.getValue(treePath + "[indxcd='"+srcValue+"']/indxseqno"));
- model.makeValue("/root/send/reqdata/dragdrop/preindxseqno", model.getValue(treePath + "[indxcd='"+trv_dgindx.value+"']/indxseqno"));
- model.makeValue("/root/send/reqdata/dragdrop/mode", model.getValue("/root/hidden/condition/selectedmode"));
- model.makeValue("/root/send/reqdata/dragdrop/indxflag", model.getValue("/root/hidden/condition/indxflag"));
- model.makeValue("/root/send/reqdata/dragdrop/indxuseflag", model.getValue("/root/hidden/condition/indxuseflag"));
- }
- node.insertBefore(srcNode, targetNode);
- model.resetInstanceNode("/root/main/indxlist/item");
- if(submit("TXMRT00102")){
- messageBox("색인변경이", "I001");
- }
- } else if(rtn == 6){
- messageBox("다른 Level로 색인변경을", "E001");
- }
- }
- trv_dgindx.rebuild();
- }
|