123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772 |
- /*
-
- 간호일지타입II_부서별SET 조회 (SMMNR03700.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xGrupInfoPath = "/root/main/grupinfo/gruplist"; // 그룹 경로
- var xStmtSetListPath = "/root/main/stmtsetinfo/stmtsetlist"; // 그룹별 진술문 경로
- var xSelectedStmtListPath = "/root/main/selectedstmtinfo/stmtlist"; // 선택된 진술문 경로
- var xNStmtSetListPath = "/root/main/stmtsetinfo/nstmtsetlist"; // 20080621 김홍점 SET 진술문 정보
- var xDStmtSetListPath = "/root/main/stmtsetinfo/dstmtsetlist"; // 20080621 김홍점 SET 진술문 정보
- var xAStmtSetListPath = "/root/main/stmtsetinfo/astmtsetlist"; // 20080621 김홍점 SET 진술문 정보
- var xRStmtSetListPath = "/root/main/stmtsetinfo/rstmtsetlist"; // 20080621 김홍점 SET 진술문 정보
- var xHiddenGrupInfoPath = "/root/hidden/grupinfo/gruplist"; //20080621 김홍점 추가 set그룹 hidden
- var xLrgGrupInfoPath = "/root/main/grupinfo/lrggruplist" ;//20080621 김홍점 추가 set그룹
- var xMdlGrupInfoPath = "/root/main/grupinfo/mdlgruplist" ;//20080621 김홍점 추가 set그룹
- var xSmlGrupInfoPath = "/root/main/grupinfo/smlgruplist" ;//20080621 김홍점 추가 set그룹
- var xSmlGrupInfoPath2 = "/root/main/grupinfo/smlgruplist2" ;//20080621 김홍점 추가 set그룹
- var gReturnGrupcd = "";
- var gGrupFlag="";
- /**
- * @group :
- * @ver : 2007.06.20
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
-
- grd_nursingd.fixedcellcheckbox(0, grd_nursingd.colRef("check")) = true;
- grd_data.fixedcellcheckbox(0, grd_data.colRef("check")) = true;
- grd_action.fixedcellcheckbox(0, grd_action.colRef("check")) = true;
- grd_result.fixedcellcheckbox(0, grd_result.colRef("check")) = true;
-
- var sDeptcd = opener.javascript.getParameter("SPMNR03700_Param"); // 부서코드
- opener.javascript.setParameter("SPMNR03700_Return","");
- model.makeValue("/root/send/deptcd", sDeptcd); // 부서코드
- model.makeValue("/root/send/grupflag", "1"); // 그룹구분
- model.removenodeset(xStmtSetListPath);
- model.removenodeset(xSelectedStmtListPath);
- fSettingLrgMdlSml("A",grd_lrg,xLrgGrupInfoPath); // SET 그룹 정보 조회
- // if(submit("TRMNR03701")){
- // var sRowCnt = grd_grupinfo.rows-grd_grupinfo.fixedRows;
- //
- // for(var i=1; i<=sRowCnt; i++){
- // sDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth"));
- // grd_grupinfo.outlinelevel(i)=sDepth;
- // }
- // grd_grupinfo.OutlineCol=1; //연결선이 표현되는 컬럼
- // grd_grupinfo.OutlineBar=4; //연결선 형태 설정 (+ , - , 사각형 안보이게 하려면 0 으로 세팅)
- // grd_grupinfo.TreeColor="gray";
- // // 자식 접기
- // for(var i=1; i<=sRowCnt; i++){
- // sDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth"));
- // if(sDepth>2){
- // grd_grupinfo.iscollapsed(i)=true; //자식 트리 접기
- // }
- // }
- // }
-
- }
- /**
- * @group :
- * @ver : 2007.06.20
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : SET별 진술문 정보를 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- //function fSearchStmtSetList(){
- // var iGrupRow = grd_grupinfo.row;
- // if(iGrupRow < 1) return;
- // // 자식 접기 or 펼치기
- // sDepth = eval(model.getValue(xGrupInfoPath+"["+iGrupRow+"]/depth"));
- // if(sDepth < 4){
- // sRowCnt = grd_grupinfo.rows - grd_grupinfo.fixedrows;
- // if(grd_grupinfo.iscollapsed(iGrupRow) == true){
- // sBoolStatus = false;
- // }else{
- // sBoolStatus = true;
- // }
- //
- // for(var i=iGrupRow; i<=sRowCnt; i++){
- // iDepth = eval(model.getValue(xGrupInfoPath+"["+i+"]/depth"));
- // if(i==iGrupRow){
- // grd_grupinfo.iscollapsed(i) = sBoolStatus;
- // }else if(i != iGrupRow && sDepth < iDepth){
- // grd_grupinfo.iscollapsed(i) = sBoolStatus;
- // }else{
- // break;
- // }
- // }
- // }
- // model.removenode("/root/send");
- // model.makeValue("/root/send/grupcd", model.getValue(xGrupInfoPath+"["+iGrupRow+"]/grupcd"));
- // model.makeValue("/root/send/dnarflag", "%");
- // if(submit("TRMNR03702")){
- // grd_grupstmtinfo.mergecells = "bycol";
- // grd_grupstmtinfo.mergecol(2) = false;
- // grd_grupstmtinfo.mergecol(3) = false;
- // grd_grupstmtinfo.allstyle("data","color") = "#000000";
- // for(var iRow=grd_grupstmtinfo.fixedrows; iRow<=grd_grupstmtinfo.rows-grd_grupstmtinfo.fixedrows; iRow++){
- // if(eval(model.getValue(xStmtSetListPath+"["+iRow+"]/attrcnt"))>0){
- // grd_grupstmtinfo.cellstyle("color",iRow,3) = "#33CC33"; // 녹색
- // }
- // }
- // grd_grupstmtinfo.resizeCells();
- // }
- //}
- /**
- * @group :
- * @ver : 2007.06.20
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : SET별 진술문 정보를 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClickedGridRow(pObj, pListPath, pRow, pCol){
- var iRow = pRow;
- var iCol = pCol;
-
- if(iRow < 1 || iRow > pObj.rows) return;
- if(iCol != pObj.colRef("check")) {
- if(model.getValue(pListPath+"["+iRow+"]/check") == "true"){
- model.setValue(pListPath+"["+iRow+"]/check","false");
- }else{
- model.setValue(pListPath+"["+iRow+"]/check","true");
- }
- }
- if( pObj == grd_nursingd ){
- fSettingGridBackColorNew(pRow);
- }
- }
- /**
- * @group :
- * @ver : 2007.06.20
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진술문 보내기
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSendStmtInfo(){
- var sStmtCnt = grd_stmtinfo.rows - grd_stmtinfo.fixedrows;
- var xAttrInfo = "/root/init/recinfo/attrinfo"; // opener의 속성 경로
- var xSelectedAttrInfo = "/root/main/attrlist/attrinfo"; // 선택된 진술문의 속성 경로
- var sAttrCnt = 0;
- var sSelectedAttrCnt = 0;
- var sAttrInfo = "";
- var sStmtInfo = "grupcd▦grupnm▦stmtcd▦stmtcnts▦attrinfo1▦attrinfo2▦attressnyn▦dnarflag▦attrcnt▦diagstmtcd▩";
- model.removenode("/root/send");
- model.makeNode("/root/send/attrinfo");
-
- for(var i=grd_stmtinfo.fixedrows; i<=sStmtCnt; i++){
- sAttrInfo = model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo1").split("⊙");
- sStmtInfo += model.getValue(xSelectedStmtListPath+"["+i+"]/grupcd") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/grupnm") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/stmtcd") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/stmtcnts") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo1") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/attrinfo2") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/attressnyn") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/dnarflag") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/attrcnt") + "▦"
- + model.getValue(xSelectedStmtListPath+"["+i+"]/diagstmtcd") + "▩"
- // 문장 내의 속성 가져오기
- for(var j=0; j<sAttrInfo.length-1; j++){
- // 간호일지타입II에 속성이 존재하는지 유무를 체크
-
- if(opener.model.getValue(xAttrInfo+"[attrcd = '"+sAttrInfo[j]+"']/attrcd") != "") continue;
-
- if(fExistAttrCd(sAttrInfo[j]) == "Y") continue;
-
- sSendData = model.getValue("/root/send/attrinfo");
- if(sSendData != "") sSendData += ",";
- sSendData += sAttrInfo[j];
- model.setValue("/root/send/attrinfo", sSendData);
-
- }
- }
-
- if(model.getValue("/root/send/attrinfo") != ""){
- if(submit("TRMNR03703")){
- sAttrCnt = getNodesetCnt(opener.model,xAttrInfo)+1;
- sSelectedAttrCnt = getNodesetCnt(model, xSelectedAttrInfo);
- for(var iRow = 1; iRow <= sSelectedAttrCnt; iRow++){
- opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/attrcd", model.getValue(xSelectedAttrInfo+"["+iRow+"]/attrcd"));
- opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/attrnm", model.getValue(xSelectedAttrInfo+"["+iRow+"]/attrnm"));
- opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/attrflag", model.getValue(xSelectedAttrInfo+"["+iRow+"]/attrflag"));
- opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/supcd", model.getValue(xSelectedAttrInfo+"["+iRow+"]/supcd"));
- opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/unitnm", model.getValue(xSelectedAttrInfo+"["+iRow+"]/unitnm"));
- opener.model.makeValue(xAttrInfo+"["+sAttrCnt+"]/plnumchoiyn", model.getValue(xSelectedAttrInfo+"["+iRow+"]/plnumchoiyn"));
- sAttrCnt++;
- }
- }
- }
- opener.javascript.setParameter("SPMNR03700_Return", sStmtInfo);
- model.close();
- }
-
- /**
- * @group :
- * @ver : 2007.04.25
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 가져올 데이터의 속성 코드 존재 유무 check
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fExistAttrCd(pAttrCD){
- var sAttrInfo = model.getValue("/root/send/attrinfo").split(",");
- for(var i=0; i<sAttrInfo.length; i++){
- if(sAttrInfo[i] == pAttrCD){
- return "Y";
- }
- }
- return "N";
- }
- /**
- * @group :
- * @ver : 2007.04.30
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진술문 존재 여부 체크
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fExistStmtCd(pStmtCD, pStmtlist, pGrupCD){
- var sStmtList = pStmtlist.split("▩");
- var sStmtInfo;
-
- var iRtnMsg = 0;
- var sStmtCnts = "";
- sStmtCnts = model.getValue(xSaveSetInfoPath+"[stmtcd='"+pStmtCD+"']/stmtcnts");
- //간호진단내역의 진단코드의 그룹코드와 set조회에서 선택한 진단의 그룹코드가 같을때만...
- //선택한 간호진술문이 간호진단과는 연결되어 있지 않을경우는 그냥 저장. 간호진단과 연결된경우 메시지박스
- // var nodeList = instance1.selectNodes(xCareDiagListPath + "[stmtcd = '"+ pStmtCD +"' and grupcd4='"+pGrupCD+"'and todt ='']/recverno");
- //
- // if(nodeList != null && nodeList.length > 0 ){
- // iRtnMsg = messageBox("동일 간호과정 Set 분류에서 선택된 동일 진단이 존재합니다. 기록될 번호는\" "+nodeList.item(0).value+"\"","I009");
- //
- // return "Y";
- // }
- //
- // if(model.getValue(xNursingRecordListPath+"[recdd='"+sRecDD+"' and rectm='"+sRecTM+"' and stmtcd='"+pStmtCD+"']/stmtcd") != ""){
- // iRtnMsg = messageBox("동일 시간 때에 \""+sStmtCnts+"\" 문장이 존재합니다. 등록을","Q003");
- // if(iRtnMsg != "6"){
- // return "Y";
- // }
- // }
- for(var i=0; i<sStmtList.length; i++){
- if(getArrayData(pStmtlist,i,4)== pStmtCD){
- return "Y";
- }
- }
- return "N";
- }
- /**
- * @group :
- * @ver : 2007.06.22
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전송할 진술문 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSelectStmtInfo(){
- var sStmtCD = "";
- var sGrupCD = "";
- var sRAN = "";
- var sRAD = "";
- var sRAA = "";
- var sRAR = "";
- var sReplace = "replace";
- var sAfter = "after";
- //var sStmtCnt = grd_grupstmtinfo.rows - grd_grupstmtinfo.fixedrows;
- var iSelectStmtRow = 0;
-
- var sGrupCdPath = (gGrupFlag == '3'? xSmlGrupInfoPath2 : xSmlGrupInfoPath );
- model.removeNode(xStmtSetListPath);
- model.makeNode(xStmtSetListPath);
- copyNodesetType(xStmtSetListPath, xNStmtSetListPath, "replace", model, model);
- copyNodesetType(xStmtSetListPath, xDStmtSetListPath, "after", model, model);
- copyNodesetType(xStmtSetListPath, xAStmtSetListPath, "after", model, model);
- copyNodesetType(xStmtSetListPath, xRStmtSetListPath, "after", model, model);
- sGrupCD = gReturnGrupcd;
-
- for(var iRow=1; iRow<=getNodesetCount(xStmtSetListPath); iRow++){
- sDNARFlag = model.getValue(xStmtSetListPath+"["+iRow+"]/dnarflag");
- if(model.getValue(xStmtSetListPath+"["+iRow+"]/check") == "true"){
- sStmtCd = model.getValue(xStmtSetListPath+"["+iRow+"]/stmtcd");
- cnt = model.getValue(xStmtSetListPath+"["+iRow+"]/cnt");
-
- if(cnt < 1 || cnt == "" ){
-
- grd_stmtinfo.addRow(false);
- iSelectStmtRow = grd_stmtinfo.rows - grd_stmtinfo.fixedrows;
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/grupnm", model.getValue(sGrupCdPath+"[grupcd ='"+sGrupCD+"']/hngnm"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/dnarflag",model.getValue(xStmtSetListPath+"["+iRow+"]/dnarflag"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/stmtcnts",model.getValue(xStmtSetListPath+"["+iRow+"]/stmtcnts"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/stmtcd",sStmtCd);
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrcnt",model.getValue(xStmtSetListPath+"["+iRow+"]/attrcnt"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/grupcd",sGrupCD);
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrinfo1",model.getValue(xStmtSetListPath+"["+iRow+"]/attrinfo1"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrinfo2",model.getValue(xStmtSetListPath+"["+iRow+"]/attrinfo2"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attressnyn",model.getValue(xStmtSetListPath+"["+iRow+"]/attressnyn"));
- if(sDNARFlag == "2N" ){
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/diagstmtcd",sStmtCd);
- }else {
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/diagstmtcd","");
- }
- }else{
- //분류별 진단 코드 생성(추가이유 : 현재 분류별 진단코드를 생성하기 위함)
- var sChkStmtCd = fCreatDiag(sStmtCd);
- var sDiagStmtCd = sChkStmtCd.split("▦");
- for(i = 0; i < cnt ; i++){
- grd_stmtinfo.addRow(false);
- iSelectStmtRow = grd_stmtinfo.rows - grd_stmtinfo.fixedrows;
- sGrupCD = gReturnGrupcd;
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/grupnm", model.getValue(sGrupCdPath+"[grupcd ='"+sGrupCD+"']/hngnm"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/dnarflag",model.getValue(xStmtSetListPath+"["+iRow+"]/dnarflag"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/stmtcnts",model.getValue(xStmtSetListPath+"["+iRow+"]/stmtcnts"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/stmtcd",sStmtCd);
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrcnt",model.getValue(xStmtSetListPath+"["+iRow+"]/attrcnt"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/grupcd",sGrupCD);
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrinfo1",model.getValue(xStmtSetListPath+"["+iRow+"]/attrinfo1"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attrinfo2",model.getValue(xStmtSetListPath+"["+iRow+"]/attrinfo2"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/attressnyn",model.getValue(xStmtSetListPath+"["+iRow+"]/attressnyn"));
- model.setValue(xSelectedStmtListPath+"["+iSelectStmtRow+"]/diagstmtcd",sDiagStmtCd[i]);
- }
- }
- }
- }
- model.removenodeset(xNStmtSetListPath);
- model.removenodeset(xDStmtSetListPath);
- model.removenodeset(xAStmtSetListPath);
- model.removenodeset(xRStmtSetListPath);
- grd_stmtinfo.mergecells = "bycol";
- grd_stmtinfo.mergecol(3) = false;
- grd_stmtinfo.refresh();
-
- grp_dnarset.refresh();
- grp_dnarset.visible = false;
- }
- /**
- * @group :
- * @ver : 2007.09.14
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진술문 코드별 진단 코드 생성
- * @param : pStmtCd : 진술문코드
- * @return :
- * @---------------------------------------------------
- */
- function fCreatDiag(pStmtCd){
- var pSetDiagCd ="";
-
- for(var iRow=1; iRow<=getNodesetCount(xStmtSetListPath); iRow++){
- if( model.getValue(xStmtSetListPath+"["+iRow+"]/dnarflag") == "2N"
- && model.getValue(xStmtSetListPath+"["+iRow+"]/check")== "true" ){
- var sLnkStmt = model.getValue(xStmtSetListPath+"["+iRow+"]/lnkstmt");
- var sStmtCD = sLnkStmt.split(",");
-
- for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){
- if(pStmtCd == sStmtCD[iStmt]){
- pSetDiagCd += model.getValue(xStmtSetListPath+"["+iRow+"]/stmtcd")+"▦" ;
- }
- }
- }
- }
- return pSetDiagCd;
- }
- /**
- * @group :
- * @ver : 2007.06.22
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 전송할 진술문 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelSelectedStmtInfo(){
- //멀티삭제로 수정 20080702 김홍점
- // var iRow = grd_stmtinfo.row;
- //
- // if( iRow < 1) return;
- //
- // grd_stmtinfo.deleteRow(iRow);
- deleteSelectedRows(grd_stmtinfo,false);
- grd_stmtinfo.rebuild();
- }
- function fSettingLrgMdlSml(pFlag,pCntlObj,pPath,pGrupFlag){
- var sSupCd = "";
- var sDepth = 0;
- sGrupFlag = pGrupFlag;
- gGrupFlag = pGrupFlag;
-
- model.removenodeset(xHiddenGrupInfoPath);
- model.makeNode(xHiddenGrupInfoPath);
- if ( pFlag == "A"){
- sSupCd = "********";
- model.removenodeset(xLrgGrupInfoPath);
- model.removenodeset(xMdlGrupInfoPath);
- model.removenodeset(xSmlGrupInfoPath);
- model.removenodeset(xSmlGrupInfoPath2);
-
- model.removenode("/root/send");
- model.makeValue("/root/send/supcd",sSupCd);
- model.makeValue("/root/send/grupflag","-");
- model.makeValue("/root/send/flag","Y");//가로 그리드 조회임을 구분
-
- if(submit("TRMNR00701")){
- if (getNodesetCount(xHiddenGrupInfoPath) > 0){
- model.makeNode(xLrgGrupInfoPath);
- copyNodesetType(xLrgGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model);
- }
- }
-
- pCntlObj.refresh();
- model.refresh();
- }else if( pFlag == "L" && pCntlObj.row > 0){
-
- sSupCd = model.getValue(xLrgGrupInfoPath+"["+ pCntlObj.row +"]/grupcd");
- model.removenodeset(xMdlGrupInfoPath);
- model.removenodeset(xSmlGrupInfoPath);
- model.removenodeset(xSmlGrupInfoPath2);
- model.removenode("/root/send");
- model.makeValue("/root/send/supcd",sSupCd);
- model.makeValue("/root/send/grupflag","-");
- model.makeValue("/root/send/flag","Y");
- if(sGrupFlag == 3){ // 부서별은 자기의 부서만 조회
- grd_sml2.visible = true;
- grd_mdl.caption = "부서^grupcd^deptcd^depth^grupflag";
- grd_sml.caption = "중분류^grupcd^deptcd^depth^grupflag";
- grd_sml2.caption = "소분류^grupcd^deptcd^depth^grupflag";
- //model.makeValue("/root/send/deptcd", getUserInfo("dutplcecd") ); 20080723 소속부서만 조회되는게 아니라 해당 소속부서를 셀선택 해달라고 요청 김홍점
- }else{
- grd_sml2.visible = false;
- grd_mdl.caption = "중분류^grupcd^deptcd^depth^grupflag";
- grd_sml.caption = "소분류^grupcd^deptcd^depth^grupflag";
- }
-
- if(submit("TRMNR00701")){
- if (getNodesetCount(xHiddenGrupInfoPath) > 0){
- model.makeNode(xMdlGrupInfoPath);
- copyNodesetType(xMdlGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model);
- }
- }
-
- pCntlObj.refresh();
- model.refresh();
- }else if( pFlag == "M" && pCntlObj.row > 0){
- sSupCd = model.getValue(xMdlGrupInfoPath+"["+ pCntlObj.row +"]/grupcd");
- model.removenodeset(xSmlGrupInfoPath);
- model.removenodeset(xSmlGrupInfoPath2);
- model.removenode("/root/send");
- model.makeValue("/root/send/supcd",sSupCd);
- model.makeValue("/root/send/grupflag","-");
- model.makeValue("/root/send/flag","Y");
- // if(sGrupFlag == 3){ // 부서별은 자기의 부서만 조회 20080709 타부서도 봐야한대서 주석
- // model.makeValue("/root/send/deptcd", getUserInfo("dutplcecd") );
- // }
-
- if(submit("TRMNR00701")){
- if (getNodesetCount(xHiddenGrupInfoPath) > 0){
- model.makeNode(xSmlGrupInfoPath);
- copyNodesetType(xSmlGrupInfoPath, xHiddenGrupInfoPath, "replace", model, model);
- }
- }
-
- pCntlObj.refresh();
- model.refresh();
- }else if( pFlag == "S" && pCntlObj.row > 0){
- sSupCd = model.getValue(xSmlGrupInfoPath+"["+ pCntlObj.row +"]/grupcd");
- if(sGrupFlag == 3){ // 부서별은 자기의 부서만 조회
-
- model.removenodeset(xSmlGrupInfoPath2);
- model.removenode("/root/send");
- model.makeValue("/root/send/supcd",sSupCd);
- model.makeValue("/root/send/grupflag","-");
- model.makeValue("/root/send/flag","Y");
-
- if(submit("TRMNR00701")){
- if (getNodesetCount(xHiddenGrupInfoPath) > 0){
- model.makeNode(xSmlGrupInfoPath2);
- copyNodesetType(xSmlGrupInfoPath2, xHiddenGrupInfoPath, "replace", model, model);
- }
- }
- }else{
- gReturnGrupcd = sSupCd;
- fSearchSrchTool("StmtSet",pCntlObj.row, sSupCd );
- }
-
- pCntlObj.refresh();
- model.refresh();
- }else if( pFlag == "S2" && pCntlObj.row > 0){
- sSupCd = model.getValue(xSmlGrupInfoPath2+"["+ pCntlObj.row +"]/grupcd");
- gReturnGrupcd = sSupCd;
- fSearchSrchTool("StmtSet",pCntlObj.row, sSupCd );
- }
- }
-
- function fSearchSrchTool(pFlag,pRow,pGrupCd){
- var sGrupCd = pGrupCd;
- var sGrupRow = pRow;
- grp_dnarset.visible = true;
- model.removenode("/root/send");
-
- model.makeValue("/root/send/grupcd", sGrupCd);
- model.makeValue("/root/send/dnarflag","%");//전체
- //model.makeValue("/root/send/dnarflag",model.getValue(xSrchToolCondPath+"/dnarflag"));20080624 김홍점
- if(submit("TRMNR00702")){
- //fSettingStmtSet();
- fSettingStmtStyle("newsetinfo");
- }
- }
- //function fSettingStmtSet(pFlag){//pFlag : ND일경우 간호진단 검색 탭에서 카피한다.
- // model.removenodeset(xNStmtSetListPath);
- // model.removenodeset(xDStmtSetListPath);
- // model.removenodeset(xAStmtSetListPath);
- // model.removenodeset(xRStmtSetListPath);
- // model.refresh();
- //
- // if (getNodesetCount(xHiddenStmtSetInfoPath) > 0){
- //
- // if( getNodesetCount(xHiddenStmtSetInfoPath+"/nstmtsetlist") > 0 ){
- // model.makeNode(xNStmtSetListPath);
- // copyNodesetType(xNStmtSetListPath, xHiddenStmtSetInfoPath+"/nstmtsetlist", "replace", model, model);
- // grd_nursingd.resizeCells();
- // grd_nursingd.refresh();
- // }
- //
- // if( getNodesetCount(xHiddenStmtSetInfoPath+"/dstmtsetlist") > 0 ){
- // model.makeNode(xDStmtSetListPath);
- // copyNodesetType(xDStmtSetListPath, xHiddenStmtSetInfoPath+"/dstmtsetlist", "replace", model, model);
- // grd_data.resizeCells();
- // grd_data.refresh();
- // }
- //
- // if( getNodesetCount(xHiddenStmtSetInfoPath+"/astmtsetlist") > 0 ){
- // model.makeNode(xAStmtSetListPath);
- // copyNodesetType(xAStmtSetListPath, xHiddenStmtSetInfoPath+"/astmtsetlist", "replace", model, model);
- // grd_action.resizeCells();
- // grd_action.refresh();
- // }
- //
- // if( getNodesetCount(xHiddenStmtSetInfoPath+"/rstmtsetlist") > 0 ){
- // model.makeNode(xRStmtSetListPath);
- // copyNodesetType(xRStmtSetListPath, xHiddenStmtSetInfoPath+"/rstmtsetlist", "replace", model, model);
- // grd_result.resizeCells();
- // grd_result.refresh();
- // }
- // fSettingStmtStyle("newsetinfo");
- // }
- // //model.refresh();
- //}
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진술문 폰트 color 설정 - 속성이 있는 경우 진술문 폰트 색상을 변경한다.
- * @param : pFlag ( setinfo : set, stmtinfo : 진술문 검색)
- * @return :
- * @---------------------------------------------------
- */
- function fSettingStmtStyle(pFlag){
- switch(pFlag){
- case "newsetinfo" : // set DAR별로 속성이 존재하는것은 폰트색변경20080623 김홍점
- var iTgStmtRow = 0;
- grd_data.allstyle("data","color") = "#000000";
- var sStmtCDList = instance1.selectNodes(xDStmtSetListPath+"[attrcnt > 0]/stmtcd");
- for(var idx=0; idx < sStmtCDList.length; idx++){
- iTgStmtRow = grd_data.findRow(sStmtCDList.item(idx).value ,1,grd_data.colRef("stmtcd"),true,true);
-
- if(iTgStmtRow < 0){
- // 셋에 속성이 없을 경우 pass
- } else {
- grd_data.cellstyle("color",iTgStmtRow,grd_data.colRef("stmtcnts")) = "#6600ff";
- }
- }
- grd_action.allstyle("data","color") = "#000000";
- sStmtCDList = instance1.selectNodes(xAStmtSetListPath+"[attrcnt > 0]/stmtcd");
-
- for(var idx=0; idx < sStmtCDList.length; idx++){
- iTgStmtRow = grd_action.findRow(sStmtCDList.item(idx).value ,1,grd_action.colRef("stmtcd"),true,true);
-
- if(iTgStmtRow < 0){
- // 셋에 속성이 없을 경우 pass
- } else {
- grd_action.cellstyle("color",iTgStmtRow,grd_action.colRef("stmtcnts")) = "#6600ff";
- }
- }
- grd_result.allstyle("data","color") = "#000000";
- sStmtCDList = instance1.selectNodes(xRStmtSetListPath+"[attrcnt > 0]/stmtcd");
-
- for(var idx=0; idx < sStmtCDList.length; idx++){
- iTgStmtRow = grd_result.findRow(sStmtCDList.item(idx).value ,1,grd_result.colRef("stmtcd"),true,true);
-
- if(iTgStmtRow < 0){
- // 셋에 속성이 없을 경우 pass
- } else {
- grd_result.cellstyle("color",iTgStmtRow,grd_result.colRef("stmtcnts")) = "#6600ff";
- }
- }
- model.refresh();
- break;
- }
- }
- /**
- * @group :
- * @ver : 2008.06.23
- * @by : 김홍점
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택된 진술문 별로 표준간호과정 등록된 진술문에 바탕색을 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingGridBackColorNew(pRow){
- var iRow = pRow;//grd_nursingd.selectedRow;
- var sDNARFlag = model.getValue(xNStmtSetListPath+"["+iRow+"]/dnarflag");
- var sCheck = model.getValue(xNStmtSetListPath+"["+iRow+"]/check");
- var iTgStmtRow = 0;
- var sLnkStmt = model.getValue(xNStmtSetListPath+"["+iRow+"]/lnkstmt");
- if(sLnkStmt == "") return;
- var sStmtCD = sLnkStmt.split(",");
-
- for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){
- iTgStmtRow = grd_data.findRow(sStmtCD[iStmt],1,grd_data.colRef("stmtcd"),true,true);
- if(iTgStmtRow < 0){
- // 셋에 묶인 진단이 없을 경우 pass
- } else {
-
- chkcnt = model.getValue(xDStmtSetListPath + "["+iTgStmtRow+"]/cnt");
-
- if(sCheck == "true"){
- chkcnt ++;
- }else{
- chkcnt --;
- }
- model.setValue(xDStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt);
- if(model.getValue(xDStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){
- grd_data.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7";
- }else {
- grd_data.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF";
- }
- }
- }
- for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){
- iTgStmtRow = grd_action.findRow(sStmtCD[iStmt],1,grd_action.colRef("stmtcd"),true,true);
-
- if(iTgStmtRow < 0){
- // 셋에 묶인 진단이 없을 경우 pass
- } else {
-
- chkcnt = model.getValue(xAStmtSetListPath + "["+iTgStmtRow+"]/cnt");
- if(sCheck == "true"){
- chkcnt ++;
- }else{
- chkcnt --;
- }
- model.setValue(xAStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt);
- if(model.getValue(xAStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){
- grd_action.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7";
- }else {
- grd_action.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF";
- }
- }
- }
- for(var iStmt=0; iStmt < sStmtCD.length; iStmt++){
- iTgStmtRow = grd_result.findRow(sStmtCD[iStmt],1,grd_result.colRef("stmtcd"),true,true);
-
- if(iTgStmtRow < 0){
- // 셋에 묶인 진단이 없을 경우 pass
- } else {
-
- chkcnt = model.getValue(xRStmtSetListPath + "["+iTgStmtRow+"]/cnt");
- if(sCheck == "true"){
- chkcnt ++;
- }else{
- chkcnt --;
- }
- model.setValue(xRStmtSetListPath+"["+iTgStmtRow+"]/cnt", chkcnt);
- if(model.getValue(xRStmtSetListPath+"["+iTgStmtRow+"]/cnt") > 0 ){
- grd_result.rowstyle(iTgStmtRow,"data","background-color") = "#efd3e7";
- }else {
- grd_result.rowstyle(iTgStmtRow,"data","background-color") = "#FFFFFF";
- }
- }
- }
- }
|