123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161 |
- /*
-
- 혈액투석도관기록(SMMND01300.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
-
- //**전역변수**//
- var coduitrecinfoRow = "";
- var hdmatnpatRow = "";
- var XmlInstNm = "hmdlspipeinfolist" + " " // 혈액투석 도관관리 정보
- + "avfinfolist" + " " // 동정맥루 정보
- + "oprtinfolist" ; // 시술과 중재 정보
- /**
- * @group :
- * @ver : 2007.06.12
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDone(){
- //**그리드 초기화**//
- model.removeNodeset("/root/main/hdmatnpatlist/hdmatnpatinfo"); // 혈액투석 유지환자 리스트
- model.removeNodeset("/root/main/coduitreclist/coduitrecinfo"); // 혈액투석 도관기록 리스트
- model.removeNodeset("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo"); // 혈액투석 도관관리
- model.removeNodeset("/root/main/reclist/recinfo/avfinfolist/avfinfo"); // 동정맥루 관리
- model.removeNodeset("/root/main/reclist/recinfo/oprtinfolist/oprtinfo"); // 시술과 중재
- model.removeNodeset("/root/main/reclist/recinfo/bvipinfolist/bvipinfo"); // 혈관내압측정비 20120330 by kya
- model.refresh();
-
- //**공통코드 가져오기**//
- zbcfGetCodeList( new Array ( "M0133" // 도관관리 부위
- , "M0134" // 도관관리 종류1
- , "M0135" // 도관관리 종류2
- , "M0136" // 혈액투석도관 제거이유
- , "M0137" // 동정맥루 관리 종류
- , "M0138" // 동정맥루 관리 부위
- , "M0139" // 동정맥루 사용혈관
- , "M0140" // 시술종류
- , "M0141" // 시술원인
- , "M0133" // 부위방향(기타부분을 추가해야함으로 추가)-20091022-kys
- , "M0628" // 발적, 멍, 혈종 -20120327 kya
- , "M0629" // 고정 (Fix suture) -20120327 kya
- , "M0630" // Locking Heparin -20120327 kya
- , "M0758" // 청진소견1 -20150818 kya
- , "M0759" // 청진소견2 -20150818 kya
- )
- , new Array ( "/root/init/M0133list" // 도관관리 부위
- , "/root/init/M0134list" // 도관관리 종류1
- , "/root/init/M0135list" // 도관관리 종류2
- , "/root/init/M0136list" // 혈액투석도관 제거이유
- , "/root/init/M0137list" // 도관관리 종류1
- , "/root/init/M0138list" // 도관관리 종류2
- , "/root/init/M0139list" // 혈액투석도관 제거이유
- , "/root/init/M0140list" // 시술종류
- , "/root/init/M0141list" // 시술원인
- , "/root/init/M0999list" // 부위방향임의로 설정-20091022-kys
- , "/root/init/M0628list" // 발적, 멍, 혈종 -20120327 kya
- , "/root/init/M0629list" // 고정 (Fix suture) -20120327 kya
- , "/root/init/M0630list" // Locking Heparin -20120327 kya
- , "/root/init/M0758list" // 청진소견1 -20150818 kya
- , "/root/init/M0759list" // 청진소견2 -20150818 kya
- )
- );
-
- //셀병합하지 않는다
- /*
- grd_hmdlspipeinfo.mergeCol(0) = false;
- grd_hmdlspipeinfo.mergeCol(1) = true;
- grd_hmdlspipeinfo.mergeCol(2) = true;
- grd_hmdlspipeinfo.mergeCol(3) = true;
- grd_hmdlspipeinfo.mergeCol(4) = false;
- grd_hmdlspipeinfo.mergeCol(5) = false;
- grd_hmdlspipeinfo.mergeCol(6) = false;
- grd_hmdlspipeinfo.mergeCol(7) = false;
- grd_hmdlspipeinfo.mergeCol(8) = false;
- */
- //20091022 부위방향에 기타 추가-kys,
- addComboInstance("/root/init/M0999list", "cdid^cdnm", "03^기타", "M0133", "I"); //부위방향 콤보 기타추가
- // 20150818 kya 막음 addComboInstance("/root/init/M0138list", "cdid^cdnm", "03^기타", "M0138[3]", "D"); //부위 콤보 기타삭제
-
- //** 상단환자 화면설정 **//
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/temp/paminfo", node);
-
- if(getNodesetCount("/root/temp/paminfo/list") > 0) {
- var sSelPid = model.getValue("/root/temp/paminfo/list/pid"); // 등록번호
- var sMaintePatRgstDD = model.getValue("/root/temp/paminfo/list/maintepatrgstdd"); // 유지환자등록일자
- hdmatnpatRow = 1;
- model.setValue("/root/main/condition/pid", sSelPid);
-
- fSrchHDPatList(); // 혈액투석 유지환자 리스트 조회
- fSetHDPipeInfo(1); // 혈액투석 유지환자리스트에서 환자 선택 시 도관기록 리스트 및 누적조회, 환자정보를 설정
- }else{
- fSrchHDPatList(); // 혈액투석 유지환자 리스트 조회
- }
- }
- /**
- * @group :
- * @ver : 2007.06.12
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액투석 유지환자 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchHDMatnPatList(){
- model.removenode ("/root/send");
- model.makeNode ("/root/send");
- model.makeValue ("/root/send/reqdata/pid" , model.getValue("/root/main/condition/pid"));
- model.makeValue ("/root/send/reqdata/dialflag" , "H" ); // 투석구분 (H:혈액)
-
-
- //20090109 dhkim
- //내환자 추가
- model.makeValue("/root/send/reqdata/mypid",model.getValue("/root/main/condition/mypid"));
-
- //20130520 kya
- //혈액적성성평가 wardcd
- model.makeValue("/root/send/reqdata/wardcd",model.getValue("/root/main/condition/wardcd"));
-
- model.removeNodeset("/root/main/hdmatnpatlist");
-
- // 20130603 수정 TRMND01301 -> TRMN01305 로 변경함
- // 대상자를 혈액투석유지환자에서 당일 접수환자로 변경, 인증저장을 위해서
- submit("TRMND01301");
-
- //2008-08-19 양천덕 삭제 처리
- // if(model.getValue("/root/main/condition/pid") != "") {
- // grd_hdmatnpatinfo.cellstyle("background-color", 1, 1, 1, 3) = "#ffd9ff"; // 혈액투석 유지환자리스트 셀 색상 지정
- // for(var i=1; i<=grd_coduitrecinfo.rows; i++) {
- // grd_coduitrecinfo.cellstyle("background-color", i, 1, i, 3) = "white"; //fSaveHDPipeInfo 환자별 도관기록 리스트 셀 색상 초기화 (white)
- // }
- // fGetPatInfo(model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[1]/pid"), model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[1]/maintepatrgstdd")); // 혈액투석 유지환자 정보 설정
- // fSrchCoduitrecList(); // 환자별 도관기록 리스트 조회
- //}
- //model.refresh();
- }
- /**
- * @group :
- * @ver : 2013.06.02
- * @by : 권영애
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액투석 당일 스케줄 환자 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchHDPatList(){
- model.removenode ("/root/send");
- model.makeNode ("/root/send");
- model.makeValue ("/root/send/reqdata/pid" , model.getValue("/root/main/condition/pid"));
- model.makeValue ("/root/send/reqdata/dialflag" , "H" ); // 투석구분 (H:혈액)
- //20131007 kya 예약일자 추가
- model.makeValue ("/root/send/reqdata/rsrvdd" , model.getValue("/root/main/condition/rsrvdd"));
-
- //20090109 dhkim
- //내환자 추가
- model.makeValue("/root/send/reqdata/mypid",model.getValue("/root/main/condition/mypid"));
-
- //20130520 kya
- //혈액적성성평가 wardcd
- model.makeValue("/root/send/reqdata/wardcd",model.getValue("/root/main/condition/wardcd"));
-
- model.removeNodeset("/root/main/hdmatnpatlist");
-
- // 20130603 수정 TRMND01301 -> TRMN01305 로 변경함
- // 대상자를 혈액투석유지환자에서 당일 접수환자로 변경, 인증저장을 위해서
- submit("TRMND01305");
-
- //2008-08-19 양천덕 삭제 처리
- // if(model.getValue("/root/main/condition/pid") != "") {
- // grd_hdmatnpatinfo.cellstyle("background-color", 1, 1, 1, 3) = "#ffd9ff"; // 혈액투석 유지환자리스트 셀 색상 지정
- // for(var i=1; i<=grd_coduitrecinfo.rows; i++) {
- // grd_coduitrecinfo.cellstyle("background-color", i, 1, i, 3) = "white"; //fSaveHDPipeInfo 환자별 도관기록 리스트 셀 색상 초기화 (white)
- // }
- // fGetPatInfo(model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[1]/pid"), model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[1]/maintepatrgstdd")); // 혈액투석 유지환자 정보 설정
- // fSrchCoduitrecList(); // 환자별 도관기록 리스트 조회
- //}
- //model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.06.12
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액투석 유지환자 정보 설정
- * (혈액투석 유지환자 리스트 더블 클릭 시)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetPatInfo(sSelPid, sMaintePatRgstDD) {
- // 초기화
- model.removeNodeset("/root/main/reclist/recinfolists"); // 혈액투석도관기록
- model.removeNodeset("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo"); // 혈액투석 도관관리
- model.removeNodeset("/root/main/reclist/recinfo/avfinfolist/avfinfo" ); // 동정맥루 관리
- model.removeNodeset("/root/main/reclist/recinfo/oprtinfolist/oprtinfo" ); // 시술과 중재
-
- //기록자 정보 설정
- model.makeValue("/root/main/reclist/recinfolists/recid", getUserId()); // 현재 로그인한 사용자 ID
- model.makeValue("/root/main/reclist/recinfolists/recnm", getUserName()); // 현재 로그인한 사용자명
-
- // 기록일시 설정
- model.makeValue("/root/main/reclist/recinfolists/recdd", getCurrentDate()); // 기록일자
- model.makeValue("/root/main/reclist/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
-
- // 환자 정보 설정
- model.makeValue("/root/main/reclist/recinfolists/pid", sSelPid);
- model.makeValue("/root/main/reclist/recinfolists/maintepatrgstdd", sMaintePatRgstDD);
- }
- /**
- * @group :
- * @ver : 2007.06.12
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액투석도관정보 저장
- * @param : pFlag (T:임시저장, C:인증저장)
- * @return :
- * @---------------------------------------------------
- */
- function fSaveHDPipeInfo(pFlag){
- var sRecDD = model.getValue("/root/main/reclist/recinfolists/recdd"); // recdd
- var sRecTM = model.getValue("/root/main/reclist/recinfolists/rectm"); // rectm
- /*****start
- for(var i=1; i<grd_hmdlspipeinfo.rows; i++) {
- model.setValue("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo[" + i + "]/recdd", sRecDD);
- model.setValue("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo[" + i + "]/rectm", sRecTM);
- }
- for(var i=1; i<grd_bvipinfo.rows; i++) {
- model.setValue("/root/main/reclist/recinfo/bvipinfolist/bvipinfo[" + i + "]/recdd", sRecDD);
- model.setValue("/root/main/reclist/recinfo/bvipinfolist/bvipinfo[" + i + "]/rectm", sRecTM);
- }
-
- for(var i=1; i<grd_avfinfo.rows; i++) {
- model.setValue("/root/main/reclist/recinfo/avfinfolist/avfinfo[" + i + "]/recdd", sRecDD);
- model.setValue("/root/main/reclist/recinfo/avfinfolist/avfinfo[" + i + "]/rectm", sRecTM);
- }
- for(var i=1; i<grd_oprtinfo.rows; i++) {
- model.setValue("/root/main/reclist/recinfo/oprtinfolist/oprtinfo[" + i + "]/recdd", sRecDD);
- model.setValue("/root/main/reclist/recinfo/oprtinfolist/oprtinfo[" + i + "]/rectm", sRecTM);
- }
- end *******/
- //** 저장 데이터 없을 경우 **//
- if( getNodesetCount("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo") == 0
- && getNodesetCount("/root/main/reclist/recinfo/avfinfolist/avfinfo ") == 0
- && getNodesetCount("/root/main/reclist/recinfo/oprtinfolist/oprtinfo ") == 0
- && getNodesetCount("/root/main/reclist/recinfo/bvipinfolist/bvipinfo ") == 0) {
- messageBox("저장할 데이터가 ", "I004", "");
- return;
- }
- // 기록일시
- if(model.getValue("/root/main/reclist/recinfolists/recdd")=="") {
- messageBox("기록일자는", "I003", "");
- model.setFocus("ipt_recdd");
- return;
- }
- if(model.getValue("/root/main/reclist/recinfolists/rectm")=="") {
- messageBox("기록시간는", "I003", "");
- model.setFocus("ipt_rectm");
- return;
- }
- // 혈액투석 도관관리
- for(var i=1; i<=getNodesetCount("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo"); i++) {
- var sPart = model.getValue("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo["+i+"]/partflag" ); // 부위
- var sKind1 = model.getValue("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo["+i+"]/kindflag1"); // 종류1
- var sKind2 = model.getValue("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo["+i+"]/kindflag2"); // 종류2
- if(sPart == "" || sKind1 == "" || sKind2 == ""){
- messageBox("혈액투석 도관관리의 부위, 종류1, 종류2는", "I003", "");
- return;
- }
- }
-
- // 동정맥루 관리
- for(var i=1; i<=getNodesetCount("/root/main/reclist/recinfo/avfinfolist/avfinfo"); i++) {
- var sPart = model.getValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/partflag"); // 부위
- var sPartdirection = model.getValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/partdirection"); //기존null인 데이터로인해블럭킹 불가.
- var sKind = model.getValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/kindflag"); // 종류
-
- if(sPart == "" || sKind == ""){
- messageBox("동정맥루 관리 부위, 종류는", "I003", "");
- return;
- }
- if(sPartdirection == "01" || sPartdirection == "02"){ //부위방향이 기타인경우에만 부위에 text가 입력되도록..-20091023-kys
- if(sPart != "01" && sPart != "02"){
- messageBox("부위방향이 기타가 아닌경우에는 arm 혹은 leg를 선택 하셔야 합니다.", "I", "");
- return;
- }
- }
- /* if(sPartdirection == "03"){ //부위방향이 기타인경우 부위의 값을 비우고 remark로 저장한다-20091023-kys
- model.makeValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/remark", sPart); // remark
- model.makeValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/partflag", ""); // partflag
- }*/
- }
-
- // 시술과 중재
- for(var i=1; i<=getNodesetCount("/root/main/reclist/recinfo/oprtinfolist/oprtinfo"); i++) {
- var sPart = model.getValue("/root/main/reclist/recinfo/oprtinfolist/oprtinfo["+i+"]/oprtkindflag" ); // 시술종류
- if(sPart == ""){
- messageBox("시술과 중재의 시술종류는", "I003", "");
- return;
- }
- }
- //동정맥루 관리-부위(기타일경우처리)
- for(var i=1; i<=getNodesetCount("/root/main/reclist/recinfo/avfinfolist/avfinfo"); i++) {
- var sPart = model.getValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/partflag"); // 부위
- var sPartdirection = model.getValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/partdirection"); //부위방향.
- if(sPartdirection == "03"){ //부위방향이 기타인경우 부위의 값을 비우고 remark로 저장한다-20091023-kys
- model.makeValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/remark", sPart); // remark
- model.makeValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/partflag", ""); // partflag
- }
- }
- /* 처음부터 막힘
- // 신규등록일 경우 동일기록일자 도관기록 존재 확인 //
- alert("신규 ==="+ model.getValue("/root/main/chklist/chkinfo/cretfalg");
-
- if(model.getValue("/root/main/chklist/chkinfo/cretfalg") == "Y") {
- model.removenode("/root/send");
- model.makeNode ("/root/send");
- model.makeValue ("/root/send/reqdata/pid" , model.getValue("/root/main/reclist/recinfolists/pid") );
- model.makeValue ("/root/send/reqdata/recdd", model.getValue("/root/main/reclist/recinfolists/recdd"));
- model.makeValue ("/root/send/reqdata/rectm", model.getValue("/root/main/reclist/recinfolists/rectm"));
- model.removeNodeset("/root/main/chklist");
- submit("TRMND01404");
- // 동일기록일자에 도관기록 존재 할 경우
- if(model.getValue("/root/main/chklist/chkinfo/pid") != "") {
- messageBox("동일일자에 도관기록이 존재합니다.", "E");
- // 기록일시 설정
- model.makeValue("/root/main/reclist/recinfolists/recdd", getCurrentDate()); // 기록일자
- model.makeValue("/root/main/reclist/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
- model.refresh();
- return;
- }
- }
- */
- //** 저장실행 **//
- model.makeValue("/root/send/savedata/baseinfo/pid" , model.getValue("/root/main/reclist/recinfolists/pid"));
- //시작
- //20131022 kya 기록일자를 수진일자로 대체하도록 수정함. 과거일자 등록을 위해
- // model.makeValue("/root/send/savedata/baseinfo/recdd" , getCurrentDate());
- model.makeValue("/root/send/savedata/baseinfo/recdd" , model.getValue("/root/main/reclist/recinfolists/orddd"));
- //종료
- model.makeValue("/root/send/savedata/baseinfo/rectm" , getCurrentTime().substr(0,4));
- model.makeValue("/root/send/savedata/baseinfo/maintepatrgstdd", model.getValue("/root/main/reclist/recinfolists/maintepatrgstdd"));
- model.makeValue("/root/send/savedata/baseinfo/recid" , getUserId());
- model.makeValue("/root/send/savedata/baseinfo/recnm" , getUserName());
- model.makeValue("/root/send/savedata/baseinfo/dialflag" , "H");
- model.makeValue("/root/send/savedata/baseinfo/certflag" , pFlag); // 인증여부( T : 임시저장, C : 인증저장)
- doReplaceLtGt("/root/main/reclist/recinfo/avfinfolist/avfinfo"); // 특수문자 변환
-
- /*** 20130612 수정전
- model.makeValue("/root/send/savedata/hmdlspipeinfo", grd_hmdlspipeinfo.getupdatedataAll("i") );
- model.makeValue("/root/send/savedata/avfinfo" , grd_avfinfo.getupdatedataAll("i") );
- model.makeValue("/root/send/savedata/oprtinfo" , grd_oprtinfo.getupdatedataAll("i") );
- //20120330 by kya
- //model.makeValue("/root/send/savedata/bvipinfo" , grd_bvipinfo.getupdatedataAll("i") );
- ****/
-
-
-
- /** 20130612 추가 : 인증전에 "d"인 데이타 삭제 **/
-
-
- for(var i= grd_hmdlspipeinfo.fixedRows ; i< grd_hmdlspipeinfo.rows ; i++) {
- // var sStatusflag = model.getValue("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo["+i+"]/status");
- var sStatusflag = grd_hmdlspipeinfo.valueMatrix(i , grd_hmdlspipeinfo.colRef("status"));
- if ( sStatusflag == "d") {
- grd_hmdlspipeinfo.deleteRow(i);
- }
- }
-
- for(var i=1; i<grd_bvipinfo.rows; i++) {
- var sStatusflag = model.getValue("/root/main/reclist/recinfo/bvipinfolist/bvipinfo["+i+"]/status");
- if ( sStatusflag == "d") {
- grd_bvipinfo.deleteRow(i);
- }
- }
-
- for(var i=1; i<grd_avfinfo.rows; i++) {
- var sStatusflag = model.getValue("/root/main/reclist/recinfo/avfinfolist/avfinfo["+i+"]/status");
- if ( sStatusflag == "d") {
- grd_avfinfo.deleteRow(i);
- }
- }
-
- for(var i=1; i<grd_oprtinfo.rows; i++) {
- var sStatusflag = model.getValue("/root/main/reclist/recinfo/oprtinfolist/oprtinfo["+i+"]/status");
- if ( sStatusflag == "d") {
- grd_oprtinfo.deleteRow(i);
- }
- }
-
-
- /**** 20130612 수정후 kya ***/
- model.makeValue("/root/send/savedata/hmdlspipeinfo", getGridUpdateData(grd_hmdlspipeinfo) );
- model.makeValue("/root/send/savedata/avfinfo" , getGridUpdateData(grd_avfinfo) );
- model.makeValue("/root/send/savedata/oprtinfo" , getGridUpdateData(grd_oprtinfo) );
- model.makeValue("/root/send/savedata/bvipinfo" , getGridUpdateData(grd_bvipinfo) );
-
- // 인증저장일 경우
- if(pFlag == "C"){
- // 인증 로직 호출
- if(Sign.signprocess() == true){
- model.removeNodeset("/root/send/savedata/signinfo");
- model.makeValue("/root/send/savedata/signinfo/pid" , model.getValue("/root/main/reclist/recinfolists/pid") ); // 등록번호
- model.makeValue("/root/send/savedata/signinfo/orddd" , model.getValue("/root/main/reclist/recinfolists/orddd") ); // 진료일자
- model.makeValue("/root/send/savedata/signinfo/signno" , model.getValue("/root/main/reclist/recinfolists/signno") ); // 서명번호
- model.makeValue("/root/send/savedata/signinfo/cretno" , model.getValue("/root/main/reclist/recinfolists/cretno") ); // 생성번호
- model.makeValue("/root/send/savedata/signinfo/recdd" , model.getValue("/root/main/reclist/recinfolists/recdd") ); //기록일자
- model.makeValue("/root/send/savedata/signinfo/rectm" , getCurrentTime().substr(0,4) ); // 실제 기록이 이루어진 기록시간(통합기록에서 보여짐)
- model.makeValue("/root/send/savedata/signinfo/recsaveflag" , "Y" ); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우: Y, 그외: N)
- model.makeValue("/root/send/savedata/signinfo/signflag" , "02"); // 서명자료구분(01 : 진료, 02 : 간호)
- model.makeValue("/root/send/savedata/signinfo/signgenrflag", model.getValue("/root/main/reclist/recinfolists/histstat")); // 서명발생구분 (코드정의서 M0010 참조)
- model.makeValue("/root/send/savedata/signinfo/formcd" , "0000002497"); // 각 기록지별 서식코드
- model.makeValue("/root/send/savedata/signinfo/orddeptcd" , model.getValue("/root/main/reclist/recinfolists/orddeptcd")); // 진료부서코드
- model.makeValue("/root/send/savedata/signinfo/orddrid" , model.getValue("/root/main/reclist/recinfolists/orddrid") ); // 진료의사ID
- model.makeValue("/root/send/savedata/signinfo/signbfcnts" , Sign.signedInfos[1]); // 인증할 데이터 정보(미기록 노드 제거된 정보)
- model.makeValue("/root/send/savedata/signinfo/signaftcnts" , Sign.signedInfos[2]); // 공인인증 처리후 데이터
- }else{
- messageBox("인증저장이 완료되지", "I001", "");
- return;
- // return false;
- }
- }
- submit("TXMND01301");
-
- fSrchCoduitrecList(hdmatnpatRow); // 환자별 도관기록 리스트 조회
- //fSrchHDPipeInfo("X"); // 혈액투석 도관기록 조회
- fSrchHDPipeInfo(); // 혈액투석 도관기록 조회
- }
- /* ------------------------------------------------- */
- /* desc : 인증데이터 만들기 */
- /* param : pModel - Model */
- /* tNode - Target Node */
- /* sNode - Source Node */
- /* return : */
- /* -------------------------------------------------- */
- function fMake_SignData(){
- Sign.addnode("/root/main/reclist/recinfo"); //기록 관련 인스턴스 전체를 copy
- // 인스턴스 copy 후에 콤보나 체크박스 같은 경우 코드값은 명칭으로 변경
- var xRecinfoPath = Sign.XPATH_SIGNINFO+"/recinfo";
-
- //** 혈액투석 도관관리 **//
- var xHmdlsPipePath = xRecinfoPath + "/hmdlspipeinfolist/hmdlspipeinfo";
- for(var i=1;i<grd_hmdlspipeinfo.rows;i++){
- // 부위
- var sPartFlag = model.getValue(xHmdlsPipePath +"["+i+"]/partflag");
- if(sPartFlag != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/partflag", model.getValue("/root/init/M0133list/M0133[cdid='"+sPartFlag+"']/cdnm"));
- }
- // 종류1
- var sKindFlag1 = model.getValue(xHmdlsPipePath +"["+i+"]/kindflag1");
- if(sKindFlag1 != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/kindflag1", model.getValue("/root/init/M0134list/M0134[cdid='"+sKindFlag1+"']/cdnm"));
- }
- // 종류2
- var sKindFlag2 = model.getValue(xHmdlsPipePath +"["+i+"]/kindflag2");
- if(sKindFlag2 != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/kindflag2", model.getValue("/root/init/M0135list/M0135[cdid='"+sKindFlag2+"']/cdnm"));
- }
- // 발적 20120403 by kya
- var sRedness= model.getValue(xHmdlsPipePath +"["+i+"]/redness");
- if(sRedness != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/redness", model.getValue("/root/init/M0628list/M0628[cdid='"+sRedness+"']/cdnm"));
- }
- // 멍 20120403 by kya
- var sBruise= model.getValue(xHmdlsPipePath +"["+i+"]/bruise");
- if(sBruise != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/bruise", model.getValue("/root/init/M0628list/M0628[cdid='"+sBruise+"']/cdnm"));
- }
- // 고정 20120403 by kya
- var sFixsuture= model.getValue(xHmdlsPipePath +"["+i+"]/fixsuture");
- if(sFixsuture != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/fixsuture", model.getValue("/root/init/M0629list/M0629[cdid='"+sFixsuture+"']/cdnm"));
- }
- // 혈종 20120403 by kya
- var sHematoma= model.getValue(xHmdlsPipePath +"["+i+"]/hematoma");
- if(sHematoma != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/hematoma", model.getValue("/root/init/M0135list/M0628[cdid='"+sHematoma+"']/cdnm"));
- }
- // A Locking Heparin 20120403 by kya
- var sALH= model.getValue(xHmdlsPipePath +"["+i+"]/alh");
- if(sALH != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/alh", model.getValue("/root/init/M0630list/M0630[cdid='"+sALH+"']/cdnm"));
- }
- // V Locking Heparin 20120403 by kya
- var sVLH= model.getValue(xHmdlsPipePath +"["+i+"]/vlh");
- if(sVLH != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/vlh", model.getValue("/root/init/M0630list/M0630[cdid='"+sVLH+"']/cdnm"));
- }
- // 상태
- var sStatusflag = model.getValue(xHmdlsPipePath +"["+i+"]/statusflag");
- if(sStatusflag == "1"){
- model.makeValue(xHmdlsPipePath+"["+i+"]/statusflag", "삽입");
- }else if(sStatusflag == "2"){
- model.makeValue(xHmdlsPipePath+"["+i+"]/statusflag", "제거");
- }else if(sStatusflag == "3"){
- model.makeValue(xHmdlsPipePath+"["+i+"]/statusflag", "유지");
- }
-
- // 제거이유
- var sElmnResnFlag = model.getValue(xHmdlsPipePath +"["+i+"]/elmnresnflag");
- if(sElmnResnFlag != ""){
- model.makeValue(xHmdlsPipePath+"["+i+"]/elmnresnflag", model.getValue("/root/init/M0136list/M0136[cdid='"+sElmnResnFlag+"']/cdnm"));
- }
- }
-
-
- //** 동정맥루 관리 **//
- var xAvfInfoPath = xRecinfoPath + "/avfinfolist/avfinfo";
- for(var i=1;i<grd_avfinfo.rows;i++){
- // 부위
- var sPartFlag = model.getValue(xAvfInfoPath +"["+i+"]/partflag");
- if(sPartFlag != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/partflag", model.getValue("/root/init/M0138list/M0138[cdid='"+sPartFlag+"']/cdnm"));
- }
- // 방향-20091016-kys
- var sPartDirection = model.getValue(xAvfInfoPath +"["+i+"]/partdirection");
- if(sPartDirection != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/partdirection", model.getValue("/root/init/M0999list/M0133[cdid='"+sPartDirection+"']/cdnm"));
- }
- // 종류
- var sKindFlag = model.getValue(xAvfInfoPath +"["+i+"]/kindflag");
- if(sKindFlag != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/kindflag", model.getValue("/root/init/M0137list/M0137[cdid='"+sKindFlag+"']/cdnm"));
- }
- // 사용혈관
- var sUseveslFlag = model.getValue(xAvfInfoPath +"["+i+"]/useveslflag");
- if(sUseveslFlag != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/useveslflag", model.getValue("/root/init/M0139list/M0139[cdid='"+sUseveslFlag+"']/cdnm"));
- }
- // 발적 20150820 by kya
- var sRedness= model.getValue(xAvfInfoPath +"["+i+"]/redness");
- if(sRedness != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/redness", model.getValue("/root/init/M0628list/M0628[cdid='"+sRedness+"']/cdnm"));
- }
- // 멍 20150820 by kya
- var sBruise= model.getValue(xAvfInfoPath +"["+i+"]/bruise");
- if(sBruise != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/bruise", model.getValue("/root/init/M0628list/M0628[cdid='"+sBruise+"']/cdnm"));
- }
- // 떨림 20150820 by kya
- var sThrill= model.getValue(xAvfInfoPath +"["+i+"]/thrill");
- if(sThrill != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/thrill", model.getValue("/root/init/M0628list/M0628[cdid='"+sThrill+"']/cdnm"));
- }
- // 청진소견1 20150820 by kya
- var sBruit1= model.getValue(xAvfInfoPath +"["+i+"]/bruit1");
- if(sBruit1 != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/bruit1", model.getValue("/root/init/M0758list/M0758[cdid='"+sBruit1+"']/cdnm"));
- }
- // 청진소견2 20150820 by kya
- var sBruit2= model.getValue(xAvfInfoPath +"["+i+"]/bruit2");
- if(sBruit2 != ""){
- model.makeValue(xAvfInfoPath+"["+i+"]/bruit2", model.getValue("/root/init/M0759list/M0759[cdid='"+sBruit2+"']/cdnm"));
- }
- }
-
- //** 시술과 중재 **//
- var xOprtInfoPath = xRecinfoPath + "/oprtinfolist/oprtinfo";
- for(var i=1;i<grd_oprtinfo.rows;i++){
- // 시술종류
- var sOprtKindFlag = model.getValue(xOprtInfoPath +"["+i+"]/oprtkindflag");
- if(sOprtKindFlag != ""){
- model.makeValue(xOprtInfoPath+"["+i+"]/oprtkindflag", model.getValue("/root/init/M0140list/M0140[cdid='"+sOprtKindFlag+"']/cdnm"));
- }
- // 시술원인
- var sOprtCasFlag = model.getValue(xOprtInfoPath +"["+i+"]/oprtcasflag");
- if(sOprtCasFlag != ""){
- model.makeValue(xOprtInfoPath+"["+i+"]/oprtcasflag", model.getValue("/root/init/M0141list/M0141[cdid='"+sOprtCasFlag+"']/cdnm"));
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.06.12
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자별 도관기록 리스트 조회
- * (혈액투석 유지환자 리스트 더블 클릭 시)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchCoduitrecList(iRow){
- // 환자별 도관기록 리스트 셀 색상 초기화 (white)
- for(var i=1; i<=grd_coduitrecinfo.rows; i++) {
- grd_coduitrecinfo.cellstyle("background-color", i, 1, i, 4) = "white";
- }
- if(iRow==""){
- iRow=1;
- }
- model.removenode ("/root/send");
- model.makeNode ("/root/send");
- model.makeValue ("/root/send/reqdata/pid", model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[" + iRow + "]/pid"));
- model.makeValue ("/root/send/reqdata/dialflag", "H"); // 투석구분 ( "H":혈액투석 )
- model.removeNodeset("/root/main/coduitreclist");
-
- // 20130603 막음
- // model.removeNodeset("/root/main/signinfo");
-
- submit("TRMND01302");
-
-
- // 인증저장 정보 설정
- /*
- model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/orddd" , model.getValue("/root/main/signinfo/orddd" ));
- model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/cretno" , model.getValue("/root/main/signinfo/cretno" ));
- model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/histstat" , model.getValue("/root/main/signinfo/histstat" ));
- model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/orddeptcd", model.getValue("/root/main/signinfo/orddeptcd"));
- model.makeValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/orddrid" , model.getValue("/root/main/signinfo/orddrid" ));
- grd_hdmatnpatinfo.refresh();
- */
-
- }
- /**
- * @group :
- * @ver : 2007.08.23
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액투석 도관기록 조회
- * (환자별 도관기록 리스트 더블 클릭 시 또는 누적조회 시)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchHDPipeInfo(srchFlag){
- // 신규등록 Flag
- model.makeValue("/root/main/chklist/chkinfo/cretfalg", "N");
-
- grp_hdpipeinfo.disabled = false; // 혈액투석도관관리 그룹 활성화
-
- if(srchFlag == "X"){ // 전체 내역 조회
- coduitrecinfoRow = -1;
- // grp_hdpipeinfo.disabled = true; // 혈액투석도관관리 그룹 비활성화
-
- // 버튼 비활성화
- btn_tempsavehdpipeinfo.disabled = true;
- btn_certsavehdpipeinfo.disabled = true;
- btn_addhmdlspipeinfo.disabled = true;
- btn_delhmdlspipeinfo.disabled = true;
- btn_addavfinfo.disabled = true;
- btn_delavfinfo.disabled = true;
- btn_addoprtinfo.disabled = true;
- btn_deloprtinfo.disabled = true;
- } else {
- coduitrecinfoRow = grd_coduitrecinfo.row;
- }
-
- //start
- // 인증저장 된 기록인지 체크
- if(model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/signno")!= ""){
- btn_tempsavehdpipeinfo.disabled = true;
- }
- var sRecDD = model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/recdd"); // 기록일자
- var sRecTM = model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/rectm"); // 기록시간
- var sRecNM = model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/recnm"); // 기록자명
- var sMaintepatrgstdd = model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/maintepatrgstdd");
- //end
- // 혈액투석 도관기록 리스트 셀 색상 초기화 (white)
- for(var i=grd_coduitrecinfo.fixedRows; i<=grd_coduitrecinfo.rows; i++) {
- grd_coduitrecinfo.cellstyle("background-color", i, 1, i, 3) = "white";
- }
-
- // i u d 아이콘 초기화
- for(i=grd_hmdlspipeinfo.fixedRows ; i < grd_hmdlspipeinfo.rows ; i++){
- grd_hmdlspipeinfo.cellStyle("background-image", + i , grd_hmdlspipeinfo.colRef("stu")) = "../../../com/commonweb/images/icon_n.gif";
- }
- for(i=grd_avfinfo.fixedRows ; i < grd_avfinfo.rows ; i++){
- grd_avfinfo.cellStyle("background-image", + i , grd_avfinfo.colRef("stu")) = "../../../com/commonweb/images/icon_n.gif"; //방향추가로 10->11로변경-20091016-kys
- }
- for(i=grd_oprtinfo.fixedRows ; i < grd_oprtinfo.rows ; i++){
- grd_oprtinfo.cellStyle("background-image", + i , grd_oprtinfo.colRef("stu")) = "../../../com/commonweb/images/icon_n.gif"; //비고추가로 6->7로변경-20091021-kys
- }
- //20120329 by kya
- for(i=grd_bvipinfo.fixedRows ; i < grd_bvipinfo.rows ; i++){
- grd_bvipinfo.cellStyle("background-image", + i , grd_bvipinfo.colRef("stu")) = "../../../com/commonweb/images/icon_n.gif"; //방향추가로 10->11로변경-20091016-kys
- }
- // 선택 행 셀 색상 지정
- grd_coduitrecinfo.cellstyle("background-color", coduitrecinfoRow, 1, coduitrecinfoRow, 3) = "#ffd9ff";
-
- model.removenode("/root/send");
- model.makeNode ("/root/send");
- // model.makeValue ("/root/send/reqdata/pid" , model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+grd_hdmatnpatinfo.row+"]/pid"));
- // model.makeValue ("/root/send/reqdata/maintepatrgstdd" , model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+grd_hdmatnpatinfo.row+"]/maintepatrgstdd"));
- model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/main/reclist/recinfolists/pid"));
- model.makeValue("/root/send/reqdata/maintepatrgstdd", model.getValue("/root/main/reclist/recinfolists/maintepatrgstdd"));
-
-
- /*
- model.makeValue ("/root/send/reqdata/recdd", sRecDD);
- model.makeValue ("/root/send/reqdata/rectm", sRecTM);
- model.makeValue ("/root/send/reqdata/maintepatrgstdd", sMaintepatrgstdd);
- */
-
- model.removeNodeset("/root/main/reclist/recinfo/hmdlspipeinfolist");
- model.removeNodeset("/root/main/reclist/recinfo/avfinfolist" );
- model.removeNodeset("/root/main/reclist/recinfo/oprtinfolist" );
-
- //20120329 by kya
- model.removeNodeset("/root/main/reclist/recinfo/bvipinfolist" );
-
- submit("TRMND01303");
-
- for(i=grd_hmdlspipeinfo.fixedRows ; i < grd_hmdlspipeinfo.rows ; i++){
- grd_hmdlspipeinfo.isReadOnly(i, grd_hmdlspipeinfo.colRef("partflag")) = true;
- grd_hmdlspipeinfo.isReadOnly(i, grd_hmdlspipeinfo.colRef("kindflag2")) = true;
- grd_hmdlspipeinfo.isReadOnly(i, grd_hmdlspipeinfo.colRef("kindflag3")) = true;
- grd_hmdlspipeinfo.isReadOnly(i, grd_hmdlspipeinfo.colRef("redness")) = true;
- if(grd_hmdlspipeinfo.valueMatrix(i,grd_hmdlspipeinfo.colRef("statusflag")) == "2"){ // 상태 제거시 제거이유 활성화
- grd_hmdlspipeinfo.isReadOnly(i, grd_hmdlspipeinfo.colRef("elmnresnflag")) = false;
- }else{
- grd_hmdlspipeinfo.isReadOnly(i, grd_hmdlspipeinfo.colRef("elmnresnflag")) = true;
- }
- }
-
-
- /*
- // 기록정보 설정
- if(grd_coduitrecinfo.rows > 1) {
- model.makeValue("/root/main/reclist/recinfolists/recdd" , model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/recdd"));
- model.makeValue("/root/main/reclist/recinfolists/rectm" , model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/rectm"));
- model.makeValue("/root/main/reclist/recinfolists/maintepatrgstdd", model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/maintepatrgstdd"));
- model.makeValue("/root/main/reclist/recinfolists/signno" , model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/signno"));
- model.refresh();
- }
- */
-
- }
- /**
- * @group :
- * @ver : 2007.06.22
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 신규등록버튼 클릭 시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetNewRecInfo(){
- if(model.getValue("/root/main/reclist/recinfolists/pid") == "") {
- messageBox("혈액투석 유지환자를 선택한 후", "I", "신규등록을 할 수 있습니다.");
- return;
- }
-
- grp_hdpipeinfo.disabled = false; // 혈액투석 도관관리 그룹 활성화
-
- // 기록일시 설정
- model.makeValue("/root/main/reclist/recinfolists/recdd", getCurrentDate()); // 기록일자
- model.makeValue("/root/main/reclist/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
- model.refresh();
-
- // 환자별 도관기록 리스트 행 추가
- grd_coduitrecinfo.addItem(); // 행 추가
- grd_coduitrecinfo.textmatrix((grd_coduitrecinfo.rows-1), 1) = model.getValue("/root/main/reclist/recinfolists/recdd");
- grd_coduitrecinfo.textmatrix((grd_coduitrecinfo.rows-1), 2) = model.getValue("/root/main/reclist/recinfolists/rectm");
- grd_coduitrecinfo.textmatrix((grd_coduitrecinfo.rows-1), 3) = model.getValue("/root/main/reclist/recinfolists/recnm");
- grd_coduitrecinfo.textmatrix((grd_coduitrecinfo.rows-1), 4) = model.getValue("/root/main/reclist/recinfolists/pid");
- grd_coduitrecinfo.textmatrix((grd_coduitrecinfo.rows-1), 5) = model.getValue("/root/main/reclist/recinfolists/maintepatrgstdd");
-
- // 초기화
- for(var i=1; i<=grd_coduitrecinfo.rows; i++) {
- grd_coduitrecinfo.cellstyle("background-color", i, 1, i, 3) = "white"; // 환자별 도관기록 리스트 셀 색상 초기화 (white)
- }
- model.removeNodeset("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo"); // 혈액투석 도관관리
- model.removeNodeset("/root/main/reclist/recinfo/avfinfolist/avfinfo"); // 동정맥루 관리
- model.removeNodeset("/root/main/reclist/recinfo/oprtinfolist/oprtinfo"); // 시술과 중재
-
- // 신규등록 flag
- model.makeValue("/root/main/chklist/chkinfo/cretfalg", "Y");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.07.18
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투석도관기록 마스터정보 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelPipeMasterInfo(){
- //** 데이터 모두 삭제 되어 해당일시에 기록정보 없을 경우 **//
- if( getNodesetCount("/root/main/reclist/recinfo/hmdlspipeinfolist/hmdlspipeinfo") == 0
- && getNodesetCount("/root/main/reclist/recinfo/avfinfolist/avfinfo") == 0
- && getNodesetCount("/root/main/reclist/recinfo/oprtinfolist/oprtinfo") == 0) {
-
- messageBox("해당일시에 데이터가 존재하지 않습니다", "I", "마스터 정보를 삭제합니다.");
-
- model.makeValue("/root/send/savedata/pid" , model.getValue("/root/main/reclist/recinfolists/pid"));
- model.makeValue("/root/send/savedata/recdd" , model.getValue("/root/main/reclist/recinfolists/recdd"));
- model.makeValue("/root/send/savedata/rectm" , model.getValue("/root/main/reclist/recinfolists/rectm"));
- model.makeValue("/root/send/savedata/maintepatrgstdd", model.getValue("/root/main/reclist/recinfolists/maintepatrgstdd"));
- model.makeValue("/root/send/savedata/dialflag" , "H");
-
- submit("TXMND01302");
-
- fSrchCoduitrecList(); // 환자별 도관기록 리스트 조회
- }
- }
- /**
- * @group :
- * @ver : 2008.05.16
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 혈액투석 유지환자리스트에서 환자 선택 시
- 도관기록 리스트 및 누적조회, 환자정보를 설정.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetHDPipeInfo(iRow){
- // hdmatnpatRow = grd_hdmatnpatinfo.row;
-
- var sSelPid = model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/pid"); // 선택환자 등록번호
- var sMaintePatRgstDD = model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo["+iRow+"]/maintepatrgstdd"); // 선택환자 유지환자등록일자
- var sOrddd = model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[" +iRow+ "]/orddd");
- var sCretno = model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[" +iRow+ "]/cretno");
- var sHiststat = model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[" +iRow+ "]/histstat");
- var sOrddeptcd = model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[" +iRow+ "]/orddeptcd");
- var sOrddrid = model.getValue("/root/main/hdmatnpatlist/hdmatnpatinfo[" +iRow+ "]/orddrid");
-
- model.makeValue("/root/main/reclist/recinfolists/pid",sSelPid);
- model.makeValue("/root/main/reclist/recinfolists/maintepatrgstdd",sMaintePatRgstDD);
- model.makeValue("/root/main/reclist/recinfolists/orddd",sOrddd);
- model.makeValue("/root/main/reclist/recinfolists/cretno",sCretno);
- model.makeValue("/root/main/reclist/recinfolists/histstat",sHiststat);
- model.makeValue("/root/main/reclist/recinfolists/orddeptcd",sOrddeptcd);
- model.makeValue("/root/main/reclist/recinfolists/orddrid",sOrddrid);
-
-
- // btn_srchccmlinfo.disabled = false; // 누적조회버튼 활성화
-
- // 유지환자 리스트 셀 색상 초기화 (white)
- for(var i=grd_hdmatnpatinfo.fixedRows; i<=grd_hdmatnpatinfo.rows; i++) {
- grd_hdmatnpatinfo.cellstyle("background-color", i, 1, i, 4) = "white";
- }
-
- // 선택 행 셀 색상 지정
- grd_hdmatnpatinfo.cellstyle("background-color", iRow, 1, iRow, 4) = "#ffd9ff";
-
- //**** fGetPatInfo(sSelPid, sMaintePatRgstDD); // 혈액투석 유지환자 정보 설정
-
- fSrchCoduitrecList(iRow); // 당일 혈관 접근로 리스트 조회
-
- //////fSrchHDPipeInfo("X"); // 혈액투석 도관기록 조회
-
- fSrchHDPipeInfo(); // 혈액투석 도관기록 조회
-
- /*
- // 환자별 도관기록 등록번호, 유지환자 등록일자 설정
- if(getNodesetCount("/root/main/coduitreclist/coduitrecinfo")>0) {
- model.makeValue("/root/main/coduitreclist/coduitrecinfo[1]/pid" , sSelPid);
- model.makeValue("/root/main/coduitreclist/coduitrecinfo[1]/maintepatrgstdd", sMaintePatRgstDD);
- }
- model.makeValue("/root/main/reclist/recinfolists/maintepatrgstdd", sMaintePatRgstDD); // 유지환자등록일자설정
- */
-
- /*20130306 kya 환자별 도관기록 기록번호 가장 최근값으로 설정*/
- /*20130531 kya 수정 : 일자별 등록을 위해 */
- var sSignn = "";
- if(getNodesetCount("/root/main/coduitreclist/coduitrecinfo")>0) {
- sSignno = model.getValue("/root/main/coduitreclist/coduitrecinfo[1]/signno")
- model.makeValue("/root/main/reclist/recinfolists/signno",sSignno);
- }
-
- //기록자 정보 설정
- model.makeValue("/root/main/reclist/recinfolists/recid", getUserId()); // 현재 로그인한 사용자 ID
- model.makeValue("/root/main/reclist/recinfolists/recnm", getUserName()); // 현재 로그인한 사용자명
-
- // 기록일시 설정
- //20131011 kya 기록일자를 수진일자로 일치시킴
- //수정전
- //model.makeValue("/root/main/reclist/recinfolists/recdd", getCurrentDate()); // 기록일자
- //수정후
- model.makeValue("/root/main/reclist/recinfolists/recdd", sOrddd);
- model.makeValue("/root/main/reclist/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
-
- model.refresh();
- }
-
- /* ------------------------------------------------- */
- /* desc : Instance NodeCopy 하기 (SMMNP007.js 참조) */
- /* param : pModel - Model */
- /* tNode - Target Node */
- /* sNode - Source Node */
- /* return : */
- /* -------------------------------------------------- */
-
- function InstanceNodeCopy(pModel, tNode, sNode) {
-
- pModel.copyNode(tNode, sNode );
- }
-
- /* ------------------------------------------------- */
- /* desc : Instance NodeCopy 하기(SMMNP007.js 참조) */
- /* param : pModel - Model */
- /* tNode - Target Node */
- /* sNode - Source Node */
- /* return : */
- /* -------------------------------------------------- */
-
- function XmlDataCheck(XmlInstNm) {
- XmlInstNm = XmlInstNm.split(" ");
- var tNode = "";
- var sNode = "";
-
- for (var i=0; i < XmlInstNm.length; i++){
- tNode = "/root/main/reclist/recinfo/" + XmlInstNm[i];
- if (instance1.selectSingleNode(tNode).childNodes.length < 1) {
- sNode = "/root/main/xmlformatlist/" + XmlInstNm[i];
- InstanceNodeCopy(model, tNode, sNode);
- }
- }
- }
- /* ------------------------------------------------- */
- /* desc : 해당 경로의 >,< 문자 를 <,>로 변환 */
- /* param : path - 대상경로 */
- /* return : */
- /* -------------------------------------------------- */
- function doReplaceLtGt(path)
- {
- var nodelist = model.instances(0).selectNodes(path + "/shapeimgedata");
-
- var shape = "";
- for (var i=0; i<nodelist.length; i++){
- shape = nodelist.item(i).text.replace(/</gi, "<");
- nodelist.item(i).text = shape.replace(/>/gi, ">");
- }
- }
- /**
- * creat : 20090108
- * author : dhkim
- * desc : 내환자세팅된 간호사 load
- */
- function fLoadMyPatSetting(){
-
- model.removenode('/root/send');
- model.makeValue('/root/send/wardcd', getUserInfo('dutplcecd'));
-
- //submit 호출
- if(!submit('TRMND03402')){
- messageBox('조회를 실패하였습니다.', 'E999');
- return;
- }
-
- }
-
- /**
- * @desc : 콤보박스에 원하는 instance node와 value를 설정
- * @
- * @param :20091022에 추가-kys
- * @event :
- * @return :
- * @---------------------------------------------------
- */
- function addComboInstance(combopath, nodename, nodeval, parentnode, appdelyn){
- nodename = nodename.split("^");
- nodeval = nodeval.split("^");
- if(nodename.length != nodeval.length){
- return;
- }
-
- var label = model.instances(0).createElement(nodename[0]);
- var val = model.instances(0).createElement(nodename[1]);
- var combo = model.instances(0).createElement(parentnode);
- label.value = "" + nodeval[0] + "";
- val.value = "" + nodeval[1] + "";
-
- combo.appendChild(label);
- combo.appendChild(val);
-
-
- chkNode = model.instances(0).selectSingleNode(combopath);
- if(chkNode == null){
- model.makeNode(combopath);
- srcNode = model.instances(0).selectSingleNode(combopath);
- }else{
- srcNode = model.instances(0).selectSingleNode(combopath);
- }
-
- desNode = model.instances(0).selectSingleNode(combopath + "/" + parentnode);
- //srcNode.insertBefore(combo, desNode); 젤상단에 붙히기
- //srcNode.insertAfter(combo, desNode); //2번째 붙히기
- if(appdelyn == "I"){
- srcNode.appendChild(combo); //마지막에 붙히기
- }else if(appdelyn == "D"){
- srcNode.removeChild(desNode); //삭제
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.06.01
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 특이사항 리스트 수정시 상태값 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSpcfFactList(vGrdObj){
- var iRow = vGrdObj.row;
- if(vGrdObj.textmatrix(iRow, vGrdObj.colRef("stu")) == "s") { // 선택 행이 조회된 행(DB에 존재) 일때 (상태값 :s)
- vGrdObj.textmatrix(iRow, vGrdObj.colRef("stu")) = "u"; // 상태값 지정 (update)
- }
- }
- /**
- * @group :
- * @ver : 2007.05.31
- * @vGrdObj : 그리드명
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 특이사항 리스트 행추가 화면 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddRowSpcfFact(vGrdObj){
- if (vGrdObj == null) return;
- if (vGrdObj.rows == 1){
- vGrdObj.addItem();
- }else{
- vGrdObj.insertItem(1);
- }
- var sCurrentDate = getCurrentDate();
- var iRow = 1;
-
- var xPath = "/root/main/reclist/recinfo/bvipinfolist/bvipinfo";
- var itemflag = "09"; //혈관내압측정비
-
- var sSelPid = model.getValue("/root/main/reclist/recinfolists/pid"); // 등록번호
- var sRecId = model.getValue("/root/main/reclist/recinfolists/recid"); // 기록자 아이디
-
- var sBvipvalue = model.getValue("/root/main/condition/bvipvalue"); // Access Flow(ml/min) OR SIAPR
-
- vGrdObj.cellStyle("background-image", + vGrdObj.row, vGrdObj.colRef("stu")) = "../../../com/commonweb/images/icon_i.gif"; //insert 상태값이미지-방향추가로 10->11로 변경-20091016-kys
-
- model.makeValue( xPath +"[" + iRow + "]/pid" , sSelPid);
- model.makeValue( xPath +"[" + iRow + "]/recid", sRecId );
-
- if(iRow == 1){
- model.makeValue(xPath + "[" + iRow + "]/seqno", 1);
- } else{
- model.makeValue(xPath +"[" + iRow + "]/seqno", Number(model.getValue( xPath +"[" + (iRow-1) + "]/seqno"))+1);
- }
-
- // alert(" iRow = " + iRow);
- model.makeValue(xPath +"[" + iRow + "]/recdd" , getCurrentDate() ); // 기록일자 지정(현재일자)
- model.makeValue(xPath +"[" + iRow + "]/rectm" , getCurrentTime().substr(0,4)); // 기록시간 지정(현재시간)
- model.makeValue(xPath +"[" + iRow + "]/status", "i" ); // 상태값 지정 (i)
- model.makeValue(xPath +"[" + iRow + "]/itemflag", itemflag ); // 상태값 지정 (i)
- model.makeValue(xPath +"[" + iRow + "]/spcffact", sBvipvalue ); // 특이사항 (i)
- }
- /**
- * @desc : 그리드 콤보박스 input으로변환
- * @
- * @param :20091022에 추가-kys
- * @event :
- * @return :
- * @---------------------------------------------------
- */
- function fCellchgnged()
- {
- if(grd_avfinfo.row >= grd_avfinfo.fixedRows){
- var combopath = "";
- if(grd_avfinfo.col == 2){ //종류
- combopath = "/root/init/M0137list/M0137";
- }else if(grd_avfinfo.col == 1){ //부위(팔,다리)
- combopath = "/root/init/M0138list/M0138";
- }else if(grd_avfinfo.col == 3){ //동정맥루 사용혈관
- combopath = "/root/init/M0139list/M0139";
- }else if(grd_avfinfo.col == 0){ //부위방향(왼쪽,오른쪽,기타)
- combopath = "/root/init/M0999list/M0133";
- }
- var idx = grd_avfinfo.valueMatrix(grd_avfinfo.row,0);
-
- if ( idx == "03" && grd_avfinfo.col == 1){ //부위방향(왼쪽,오른쪽)이 기타이고 부위(팔,다리)컬럼이면
- grd_avfinfo.combo.button.visible = false;
- grd_avfinfo.combo.input.attribute("width") = grd_avfinfo.colWidth(grd_avfinfo.col);
- }else{
- grd_avfinfo.combo.button.visible = true;
- grd_avfinfo.combo.input.attribute("width") = grd_avfinfo.colWidth(grd_avfinfo.col) - 20;
- grd_avfinfo.cellComboNodeset(grd_avfinfo.row, grd_avfinfo.col) = combopath;
- }
- }
- }
|