123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864 |
- /*
-
- 가정간호 방문기록(SMMNF00400.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
-
- //**전역변수**//
- var selRsrvdd = "";
- var selPid = "";
- var sXml = "";
- var XmlInstNm = "aterlprelist/aterlprespec" + " " // AP
- + "veinprecntslist/veinprecntsspec" + " " // VP
- + "cruedrugspeclist" + " " // 처치 및 투약 내역
- + "nbpsinspspeclist" + " " // 임상검사 내역
- + "dialrecspeclist" + " " // 투석기록 내역
- + "dialvitalsigninspspeclist" ; // Vital Sign 내역
-
- /**
- * @group :
- * @ver : 2007.05.31
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDone(){
- //**그리드 초기화**//
- model.removeNodeset("/root/main/rsrvpatlist" ); // 예약환자 리스트
- model.removeNodeset("/root/main/spcffactlist"); // 특이사항 리스트
- model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist/cruedrugspec"); // 처치 및 투약 리스트
- model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist/nbpsinspspec"); // 임상검사 리스트
- model.removeNodeset("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec" ); // 투석기록 리스트
- model.removeNodeset("/root/main/reclist/recinfo/dialvitalsigninspspeclist/dialvitalsigninspspec"); // Vital Sign 리스트
- //**공통코드 가져오기**//
- zbcfGetCodeList( new Array ( "M0083" // 혈관종류
- , "M0127" // 혈액투석기종류
- , "M0128" // 혈액투석기
- , "M0129" // 투석장소
- , "M0345" // 혈액투석액
- )
- , new Array ( "/root/init/M0083list" // 혈관종류
- , "/root/init/M0127list" // 혈액투석기종류
- , "/root/init/M0128list" // 혈액투석기
- , "/root/init/M0129list" // 투석장소
- , "/root/init/M0345list" // 혈액투석액
- )
- );
-
- //** 상단환자 화면설정 **//
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/temp/paminfo", node);
-
- if(getNodesetCount("/root/temp/paminfo/list") > 0) {
- model.makeValue("/root/main/condition/pid", model.getValue("/root/temp/paminfo/list/pid")); // 등록번호
- } else {
- model.makeValue("/root/main/condition/rsrvdd", getCurrentDate()); // 예약일자(default) 설정
- }
-
- fSrchRsrvPatList(); // 예약환자 리스트 조회
- if(getNodesetCount("/root/temp/paminfo/list") > 0) {
- fInitInfo(); // 화면 초기화
- fGetSelPatInfo("2"); // 환자정보설정
- fPastDialRecInfo(); // 이전 혈액투석간호기록 조회
- fSrchSpcfFactList(); // 특이사항 리스트 조회
- // fDialRecSpecList(); // 투석기록 리스트 조회
- }
- }
- /**
- * @group :
- * @ver : 2007.06.19
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면상단 정보설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetHngBaseInfo(){
- var iRow = grd_rsrvpatinfo.row -1;
- // 상단 환자정보 parameter
- var sIoflag = model.getValue("/root/main/rsrvpatlist/rsrvpatinfo["+iRow+"]/ioflag");
- var sPid = model.getValue("/root/main/rsrvpatlist/rsrvpatinfo["+iRow+"]/pid");
- var sRsrvdd = model.getValue("/root/main/rsrvpatlist/rsrvpatinfo["+iRow+"]/rsrvdd");
-
- model.removenode ("/root/send");
- model.makeNode ("/root/send");
- model.makeValue ("/root/send/reqdata/pid" , sPid );
- model.makeValue ("/root/send/reqdata/ioflag", sIoflag);
- model.makeValue ("/root/send/reqdata/rsrvdd", sRsrvdd);
- model.removeNodeset("/root/temp/gettoplist");
- submit("TRMND00707");
-
- var sCretno = model.getValue("/root/temp/gettoplist/gettopinfo/cretno" ); //생성번호
- var sSeqno = model.getValue("/root/temp/gettoplist/gettopinfo/seqno" ); //일련번호
- var sInstcd = model.getValue("/root/temp/gettoplist/gettopinfo/instcd" ); //기관코드
- var sIndd = model.getValue("/root/temp/gettoplist/gettopinfo/indd" ); //입원일자
- var sOrddd = model.getValue("/root/temp/gettoplist/gettopinfo/orddd" ); //진료일자
- var sAcptseqno = model.getValue("/root/temp/gettoplist/gettopinfo/acptseqno"); //등록일련번호
- var sOrgorddd = model.getValue("/root/temp/gettoplist/gettopinfo/orgorddd" ); //원진료일자
- var sParam;
-
- if(sIoflag == "O") { //외래환자일 경우(histstat : "O")
- sParam = (sIoflag + "▦" + sPid + "▦" + sOrddd + "▦" + sCretno + "▦" + sInstcd + "▦" + sAcptseqno + "▦" + sOrgorddd );
- } else { //입원/응급환자일 경우(histstat : "I", "E")
- sParam = (sIoflag + "▦" + sPid + "▦" + sIndd + "▦" + sCretno + "▦" + sInstcd + "▦" );
- }
- setParameter("condparam", sParam);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- model.removeNode("/root/temp/paminfo");
- model.makeNode("/root/temp/paminfo");
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/temp/paminfo", node);
- selPid = model.getValue("/root/temp/paminfo/list/pid"); // 선택환자 등록번호
- }
- /**
- * @group :
- * @ver : 2007.06.19
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투석기록 팝업
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPopDialRec(){
- var ioflag = model.getValue("/root/main/reclist/recinfo/recinfolists/ioflag");
-
- var sPid = model.getValue("/root/main/reclist/recinfo/recinfolists/pid");
- var sRsrvdd = model.getValue("/root/main/reclist/recinfo/recinfolists/rsrvdd");
- var sDialfalg = model.getValue("/root/main/reclist/recinfo/recinfolists/dialflag");
- var sInstcd = model.getValue("/root/main/reclist/recinfo/recinfolists/instcd");
- parammsg = "recflag▦dutplaccd▦reclnkkey▩L▦▦"+sPid+","+sRsrvdd+","+sDialfalg+","+sInstcd+"▩";
- setParameter("SMMNR00700_ParamBase", parammsg); // 파라미터 설정
- modal("SMMNR00700",1,"5","5"); // 간호일지I 화면 팝업
- }
- /**
- * @group :
- * @ver : 2007.06.03
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투석기록 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDialRecSpecList(){
- var sPid = model.getValue("/root/main/reclist/recinfo/recinfolists/pid");
- var sRsrvdd = model.getValue("/root/main/reclist/recinfo/recinfolists/rsrvdd");
- var sDialfalg = model.getValue("/root/main/reclist/recinfo/recinfolists/dialflag");
- var sInstcd = model.getValue("/root/main/reclist/recinfo/recinfolists/instcd");
- model.removeNode("/root/temp/paminfo");
- model.makeNode("/root/temp/paminfo");
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/temp/paminfo", node);
-
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/temp/paminfo/list/pid" )); // 등록번호 - 필수
- model.makeValue("/root/send/reqdata/indd" , model.getValue("/root/temp/paminfo/list/indd" )); // 입원일자 (입원환자의 경우)
- model.makeValue("/root/send/reqdata/orddd" , model.getValue("/root/temp/paminfo/list/orddd" )); // 진료일자 (외래환자의 경우)
- model.makeValue("/root/send/reqdata/cretno" , model.getValue("/root/temp/paminfo/list/cretno")); // 생성번호 - 필수
- model.makeValue("/root/send/reqdata/ioflag" , model.getValue("/root/temp/paminfo/list/ioflag")); // I/O 구분 (I : 입원일자, O : 진료일자 필수 입력) - 필수
- model.makeValue("/root/send/reqdata/dnarflag" , "%" ); // dnar구분 (전체 : %) - 필수
- model.makeValue("/root/send/reqdata/sortseq" , "D" ); // 정렬순서 (오름차순 : A, 내림차순 : D) - 필수
- model.makeValue("/root/send/reqdata/recflag" , "L" ); // 기록구분 - 필수 (L: 인공신장실)
- model.makeValue("/root/send/reqdata/reclnkkey", sPid+","+sRsrvdd+","+sDialfalg+","+sInstcd ); // 기록연계키 - 필수
- model.makeValue("/root/send/reqdata/instcd" , model.getValue("/root/temp/paminfo/list/instcd")); // 기관코드 - 필수
- model.makeValue("/root/send/reqdata/prestdt" , getCurrentDate()+getCurrentTime() ); // 현재일시(14자리) - 필수
-
- model.removeNodeset("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec/dialrec");
- //** 투석기록 리스트 조회 **//
- submit("TRMND00703");
- }
- /**
- * @group :
- * @ver : 2007.05.31
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 예약환자 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchRsrvPatList(){
- //** 초기화 **//
- var xPath = "/root/main/reclist/recinfo/recinfolists/";
- fInitInfo(); // 화면 초기화
-
- // 예약환자 리스트 셀 색상 초기화 (white)
- for(var i=1; i<=grd_rsrvpatinfo.rows; i++) {
- grd_rsrvpatinfo.cellstyle("background-color", i, 1, i, 5) = "white";
- }
-
- 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/rsrvdd",model.getValue("/root/main/condition/rsrvdd"));
- model.removeNodeset("/root/main/rsrvpatlist");
-
- submit("TRMND00701");
- }
- /**
- * @group :
- * @ver : 2007.05.31
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 선택환자 등록번호, 예약일자 얻어옴
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetSelPatInfo(iRow){
- selPid = grd_rsrvpatinfo.textmatrix(iRow, 1); // 선택한 환자의 등록번호
- selRsrvdd = grd_rsrvpatinfo.textmatrix(iRow, 5); // 선택한 환자의 예약일자(전역변수)
- var sIoflag = grd_rsrvpatinfo.textmatrix(iRow, 6); // 선택한 환자의 입원외래구분
-
- // 예약환자 리스트 셀 색상 초기화 (white)
- for(var i=1; i<=grd_rsrvpatinfo.rows; i++) {
- grd_rsrvpatinfo.cellstyle("background-color", i, 1, i, 5) = "white";
- }
-
- // 선택 행 셀 색상 지정
- grd_rsrvpatinfo.cellstyle("background-color", iRow, 1, iRow, 5) = "#ffd9ff";
-
- // 선택한 환자의 등록번호 및 예약일자, 입원외래구분 지정
- model.removenode("root/temp/pid");
- model.makeValue("root/temp/pid", selPid);
-
- model.removenode("/root/main/reclist/recinfo/recinfolists/pid");
- model.makeValue("/root/main/reclist/recinfo/recinfolists/pid", selPid);
-
- model.removenode("/root/main/reclist/recinfo/recinfolists/rsrvdd");
- model.makeValue("/root/main/reclist/recinfo/recinfolists/rsrvdd", selRsrvdd);
-
- model.removenode("/root/main/reclist/recinfo/recinfolists/ioflag");
- model.makeValue("/root/main/reclist/recinfo/recinfolists/ioflag", sIoflag);
-
- model.makeValue("/root/main/reclist/recinfo/recinfolists/dialflag", "H"); //투석구분
-
- // 특이사항 리스트 버튼 활성화
- btn_addrowspcffact.disabled = false;
- btn_delrowspcffact.disabled = false;
- btn_savespcffact.disabled = false;
-
- // 투석기록 버튼 활성화
- btn_dialrec.disabled = false;
- }
- /**
- * @group :
- * @ver : 2007.06.01
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 특이사항 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchSpcfFactList(){
- model.removenode("/root/send");
- model.makeNode ("/root/send");
- model.makeValue("/root/send/reqdata/pid", selPid);
- model.removeNodeset("/root/main/spcffactlist");
-
- submit("TRMND00702");
- }
- /**
- * @group :
- * @ver : 2007.06.05
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 이전 혈액투석간호기록 정보 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPastDialRecInfo(srchflag){
- var xPath = "/root/main/reclist/recinfo/recinfolists/"; // 투석기록정보 경로
- var xTmpPath = "/root/temp/recinfolists/"; // 투석기록정보 임시저장 경로
-
- // model.makeValue("/root/main/reclist/recinfo/recinfolists/pid", selPid);
- var currentDD = getCurrentDateTime();
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/reqdata/pid" , selPid);
- model.makeValue("/root/send/reqdata/dialflag", "H");
- model.makeValue("/root/send/reqdata/rsrvdd" , model.getValue(xPath + "rsrvdd"));
-
- //** 신규등록시 **//
- if(srchflag == "New"){
- model.makeValue("/root/send/reqdata/srchflag", "New");
- submit("TRMND00704");
-
- // model.copyNode("/root/main/reclist", "/root/temp/reclist");
- var sTmpNode = "dryweig hprnfst hprnmatn bfrcd durationflag angiokindcd angiokindnm dialliqd dialmach dialmachno dialmachnm dialplaccd hdkindflag";
- sTmpNode = sTmpNode.split(" ");
-
- for(var i=0; i<sTmpNode.length; i++) {
- model.makeValue(xPath + sTmpNode[i], model.getValue(xTmpPath + sTmpNode[i]));
- }
-
- if(model.getValue("/root/main/reclist/recinfo/recinfolists/dialplaccd") == ""){
- model.makeValue("/root/main/reclist/recinfo/recinfolists/dialplaccd", "01"); // 투석장소 ("01":인공신장실)
- }
- if(model.getValue("/root/main/reclist/recinfo/recinfolists/hdkindflag") == ""){
- model.makeValue("/root/main/reclist/recinfo/recinfolists/hdkindflag", "01"); // 투석구분 ("01":일반HD)
- }
-
- //** 그리드 초기화 **//
- model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist/cruedrugspec"); // 처치 및 투약 초기화
- model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist/nbpsinspspec"); // 임상검사 초기화
- model.removeNodeset("/root/main/reclist/recinfo/dialvitalsigninspspeclist/dialvitalsigninspspec"); // Vital Sign 초기화
- // fClearChildNode("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec" ); // 투석기록 초기화
- // model.removeNodeset("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec"); // 투석기록 초기화
-
- model.makeValue("/root/main/reclist/recinfo/recinfolists/pid" , selPid);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/dialflag" , "H")
- model.makeValue("/root/main/reclist/recinfo/recinfolists/rsrvdd" , selRsrvdd); // 선택한 환자의 예약일자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recid" , getUserId() ); // 현재 로그인한 사용자 ID
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm" , getUserName()); // 현재 로그인한 사용자명
- model.makeValue("/root/main/reclist/recinfo/recinfolists/instcd" , getUserInfo("dutplceinstcd")); // 현재 로그인한 사용자의 기관코드
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recdd" , currentDD.substr(0,8)); // 기록일자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/rectm" , currentDD.substr(9,4)); // 기록시간
- model.makeValue("/root/main/reclist/recinfo/recinfolists/dialfromdd", currentDD.substr(0,8)); // 투석시작일자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/dialfromtm", currentDD.substr(9,4)); // 투석시작시간
- model.makeValue("/root/main/reclist/recinfo/recinfolists/dialtodd" , currentDD.substr(0,8)); // 투석종료일자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/dialtotm" , currentDD.substr(9,4)); // 투석종료시간
- model.makeNode("/root/main/reclist/recinfo/recinfolists/signno"); // 인증번호
-
- //기록자 정보 설정
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recid" , getUserId()); // 현재 로그인한 사용자 ID
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm" , getUserName()); // 현재 로그인한 사용자명
- model.makeValue("/root/main/reclist/recinfo/recinfolists/instcd", getUserInfo("dutplceinstcd")); // 현재 로그인한 사용자의 기관코드
- //** 시작간호사, 종료간호사 현재 로그인한 간호사로 Defalt 설정 **//
- model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgid", getUserId() );
- model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgnm", getUserName());
- model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgid" , getUserId() );
- model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgnm" , getUserName());
- model.refresh();
- } else {
- //** 기록조회시 **//
- model.removeNodeset("/root/main/reclist/recinfo");
- submit("TRMND00708");
-
- if(model.getValue("/root/main/reclist/recinfo/recinfolists/duplchkyn") == "Y") { // 혈액투석간호기록 중복여부("Y":중복 / "N":중복안됨)
- grp_recinfo.disabled = false; // 혈액투석간호기록 그룹 활성화
- btn_new.disabled = true; // 신규등록버튼 비활성화
- model.makeValue("/root/main/reclist/recinfo/recinfolists/status", "u"); // 상태값 설정 (update)
- } else if(model.getValue("/root/main/reclist/recinfo/recinfolists/duplchkyn") == "N") {
- grp_recinfo.disabled = true; // 혈액투석간호기록 그룹 비활성화
- btn_new.disabled = false; // 신규등록버튼 활성화
- }
-
- if(model.getValue("/root/main/reclist/recinfo/recinfolists/signno") != ""){ // 인증저장 된 기록일 경우
- btn_tempsave.disabled = true;
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.06.08
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitInfo(){
- //** 초기화 **//
- var xPath = "/root/main/reclist/recinfo/recinfolists/"; // 투석기록정보 경로
- var sNode = "pid rsrvdd dialflag ioflag dialfromdd dialfromtm dialtodd dialtotm dryweig idbdwtval ufval prebodyweig postbodyweig trgtweig hprnfst hprnmatn bfrcd durationflag angiokindcd angiokindnm dialmachno dialliqd dialmach dialmachnm dialplaccd nigtflag fromnurgid fromnurgnm tonurgid tonurgnm hdkindflag duplchkyn status";
- sNode = sNode.split(" ");
-
- for(var i=0; i<sNode.length; i++) {
- model.makeValue(xPath + sNode[i], ""); // 투석기록정보
- }
-
- fClearChildNode("/root/main/reclist/recinfo/aterlprelist/aterlprespec");
- fClearChildNode("/root/main/reclist/recinfo/veinprecntslist/veinprecntsspec");
- model.removeNodeset("/root/main/reclist/recinfo/dialvitalsigninspspeclist");
- model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist"); // 처치 및 투약정보
- model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist"); // 임상검사
- model.removeNodeset("/root/main/reclist/recinfo/dialvitalsigninspspeclist"); // Vital Sign
- model.removeNodeset("/root/main/spcffactlist"); // 특이사항
- model.removeNodeset("/root/main/reclist/recinfo/dialrecspeclist"); // 투석기록
-
- // 예약환자 리스트 셀 색상 초기화 (white)
- for(var i=1; i<=grd_rsrvpatinfo.rows; i++) {
- grd_rsrvpatinfo.cellstyle("background-color", i, 1, i, 5) = "white";
- }
- grp_recinfo.disabled = true;
- btn_new.disabled = true;
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.30
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투석기록초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fRecInitInfo(){
- var xPath = "/root/main/reclist/recinfo/recinfolists/"; // 투석기록정보 경로
- var sNode = "dialfromdd dialfromtm dialtodd dialtotm dryweig idbdwtval ufval prebodyweig postbodyweig trgtweig hprnfst hprnmatn bfrcd durationflag angiokindcd angiokindnm dialmachno dialliqd dialmach dialmachnm dialplaccd nigtflag fromnurgid fromnurgnm tonurgid tonurgnm hdkindflag duplchkyn status";
- sNode = sNode.split(" ");
-
- for(var i=0; i<sNode.length; i++) {
- model.makeValue(xPath + sNode[i], ""); // 투석기록정보
- }
-
- fClearChildNode("/root/main/reclist/recinfo/aterlprelist/aterlprespec");
- fClearChildNode("/root/main/reclist/recinfo/veinprecntslist/veinprecntsspec");
-
- grp_recinfo.refresh();
- }
- /**
- * @group :
- * @ver : 2007.05.31
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 특이사항 리스트 행추가 화면 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAddRowSpcfFact(){
- grd_spcffactinfo.addItem(); // 그리드 행추가
-
- var sSelPid = selPid; //선택환자 등록번호
- var sRecId = model.getValue("/root/main/reclist/recinfo/recinfolists/recid"); // 기록자 아이디
- var iRow = grd_spcffactinfo.rows-1;
-
- model.makeValue("/root/main/spcffactlist/spcffactinfo[" + iRow + "]/pid" , sSelPid);
- model.makeValue("/root/main/spcffactlist/spcffactinfo[" + iRow + "]/recid", sRecId );
-
- if(iRow == 1){
- model.makeValue("/root/main/spcffactlist/spcffactinfo[" + iRow + "]/seqno", 1);
- } else{
- model.makeValue("/root/main/spcffactlist/spcffactinfo[" + iRow + "]/seqno", Number(model.getValue("/root/main/spcffactlist/spcffactinfo[" + (iRow-1) + "]/seqno"))+1);
- }
-
- model.makeValue("/root/main/spcffactlist/spcffactinfo[" + iRow + "]/recdd" , getCurrentDate() ); // 기록일자 지정(현재일자)
- model.makeValue("/root/main/spcffactlist/spcffactinfo[" + iRow + "]/rectm" , getCurrentTime().substr(0,4)); // 기록시간 지정(현재시간)
- model.makeValue("/root/main/spcffactlist/spcffactinfo[" + iRow + "]/status", "i" ); // 상태값 지정 (i)
- }
- /**
- * @group :
- * @ver : 2007.05.31
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 특아사항 리스트 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveSpcfFactList(){
- model.makeValue("/root/send/savedata",grd_spcffactinfo.getupdatedataAll("i"));
- submit("TXMND00701");
-
- // 특이사항 리스트 상태값 초기화
- for(var i=1; i<=grd_spcffactinfo.rows; i++) {
- grd_spcffactinfo.textmatrix(i, 1) = "";
- //model.makeValue("/root/main/spcffactlist/spcffactinfo[" + i + "]/status", "");
- }
- }
- /**
- * @group :
- * @ver : 2007.05.31
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 특아사항 리스트 행삭제 화면 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelRowSpcfFact(){
- var iRow = grd_spcffactinfo.row;
- var sStatus = grd_spcffactinfo.textmatrix(iRow, 1);
-
- if( sStatus != "i") { //** 선택 행이 조회된 행(DB에 존재) 일때 (상태값 :s) **//
- grd_spcffactinfo.textmatrix(iRow, 1) = "d"; // 상태값 지정 (d)
- if(messageBox("", "Q001", "") == 6) { // 메세지박스 ("삭제 하시겠습니까?") (return : yes=6, no=7)
- fSaveSpcfFactList(); //삭제저장
- fSrchSpcfFactList(); // 특이사항 리스트 조회
- } else {
- grd_spcffactinfo.textmatrix(iRow, 1) =sStatus; // 이전 상태값으로 복구
- return;
- }
- } else if( sStatus == "i") { //** 선택 행이 화면상에만 존재하는 행 일때 (상태값 :i) **//
- grd_spcffactinfo.deleteItem(iRow); // 그리드 행 삭제
- }
- }
- /**
- * @group :
- * @ver : 2007.06.01
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 특이사항 리스트 수정시 상태값 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetSpcfFactList(){
- var iRow = grd_spcffactinfo.row;
- if(grd_spcffactinfo.textmatrix(iRow, 1) == "s") { // 선택 행이 조회된 행(DB에 존재) 일때 (상태값 :s)
- grd_spcffactinfo.textmatrix(iRow, 1) = "u"; // 상태값 지정 (update)
- }
- }
- /**
- * @group :
- * @ver : 2007.12.12
- * @by : 문창곤
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 가정간호 방문기록 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveVisitRec(pFlag){
- /* if(model.getValue("/root/main/reclist/recinfo/recinfolists/dialplaccd") == ""){
- messageBox("투석장소는 필수입력 항목입니다.", "E"); model.setFocus("cmb_dialplaccd"); return;
- }
- if(model.getValue("/root/main/reclist/recinfo/recinfolists/hdkindflag") == ""){
- messageBox("투석구분은 필수입력 항목입니다.", "E"); model.setFocus("cmb_hdkindflag"); return;
- }
- */
- var retMsg = messageBox("저장하시겠습니까?", "S"); //yes=6, no=7
- if(retMsg == "6"){
-
- /* XmlDataCheck(XmlInstNm);
-
- var xPath = "/root/main/reclist/recinfo/recinfolists/";
- model.makeValue(xPath+"recdt" , model.getValue(xPath+"recdd") + model.getValue(xPath+"rectm")); // 기록일시
- model.makeValue(xPath+"dialfromdt", model.getValue(xPath+"dialfromdd") + model.getValue(xPath+"dialfromtm")); // 투석시작일시
- model.makeValue(xPath+"dialtodt" , model.getValue(xPath+"dialtodd") + model.getValue(xPath+"dialtotm")); // 투석종료일시
- model.makeValue(xPath+"dialfromdt", model.getValue(xPath+"dialfromdd") + model.getValue(xPath+"dialfromtm"));
-
- model.removenode("/root/send");
- model.makeNode("/root/send/savedata");
- copyNodeType("/root/send/savedata", "/root/main/reclist/recinfo/recinfolists");
- */
- model.makeValue("/root/send/savedata/certflag", pFlag); // 인증여부( T : 임시저장, C : 인증저장)
-
- // 인증저장일 경우
- if(pFlag == "C"){
- // 인증 로직 호출
- if(Sign.signprocess() == true){
- model.removeNodeset("/root/send/savedata/signinfo");
-
- var sIOFlag = model.getValue("/root/send/ioflag"); // I/O 구분
-
- model.makeValue("/root/send/signdata/pid", model.getValue("/root/main/visitrecord/recinfo/pid")); // 등록번호
-
- if(sIOFlag == "I" || sIOFlag == "E"){ // 진료일자
- model.makeValue("/root/send/signdata/orddd", model.getValue("/root/main/visitrecord/recinfo/visitdd"));
- }else if(sIOFlag == "O"){
- model.makeValue("/root/send/signdata/orddd", model.getValue("/root/main/visitrecord/recinfo/visitdd"));
- }
-
- model.makeValue("/root/send/signdata/signno" , model.getValue("/root/main/reclist/recinfo/recinfolists/signno")); // 서명번호
- model.makeValue("/root/send/signdata/cretno" , model.getValue("/root/temp/paminfo/list/cretno")); // 생성번호
-
- model.makeValue("/root/send/signdata/recdd" , getCurrentDate()); // 실제 기록이 이루어진 기록일자(통합기록에서 보여짐)
- model.makeValue("/root/send/signdata/rectm" , getCurrentTime()); // 실제 기록이 이루어진 기록시간(통합기록에서 보여짐)
- model.makeValue("/root/send/signdata/recsaveflag" , "Y"); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우 : Y, 그외 : N)
- model.makeValue("/root/send/signdata/signflag" , "02"); // 서명자료구분(01 : 진료, 02 : 간호)
- model.makeValue("/root/send/signdata/signgenrflag", sIOFlag); // 서명발생구분 (코드정의서 M0010 참조)
- model.makeValue("/root/send/signdata/formcd" , "0000002471"); // 각 기록지별 서식코드(0000002471 - 가정간호 방문기록)
- model.makeValue("/root/send/signdata/orddeptcd" , model.getValue("/root/temp/paminfo/list/orddeptcd")); // 진료부서코드
- model.makeValue("/root/send/signdata/orddrid" , model.getValue("/root/temp/paminfo/list/orddrid")); // 진료의사ID
-
- model.makeValue("/root/send/signdata/signbfcnts" , Sign.signedInfos[1]); // 인증할 데이터 정보(미기록 노드 제거된 정보)
- model.makeValue("/root/send/signdata/signaftcnts" , Sign.signedInfos[2]); // 공인인증 처리후 데이터
- } else{
- return false;
- }
- }
-
- model.removeNodeset("/root/send/savedata/aterlprelist");
- sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/aterlprelist/aterlprespec"); //AP
- model.makeValue("/root/send/savedata/aterlprelist", sXml);
-
- model.removeNodeset("/root/send/savedata/veinprecntslist");
- sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/veinprecntslist/veinprecntsspec"); //VP
- model.makeValue("/root/send/savedata/veinprecntslist", sXml);
-
- model.removeNodeset("/root/send/savedata/cruedrugspeclist");
- sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/cruedrugspeclist/cruedrugspec"); //처치 및 투약 리스트
- model.makeValue("/root/send/savedata/cruedrugspeclist", sXml);
-
- model.removeNodeset("/root/send/savedata/nbpsinspspeclist");
- sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/nbpsinspspeclist/nbpsinspspec"); //임상검사 리스트
- model.makeValue("/root/send/savedata/nbpsinspspeclist", sXml);
-
- model.removeNodeset("/root/send/savedata/dialvitalsigninspspeclist");
- sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/dialvitalsigninspspeclist/dialvitalsigninspspec"); //Vital Sign 리스트
- model.makeValue("/root/send/savedata/dialvitalsigninspspeclist", sXml);
-
- model.removeNodeset("/root/send/savedata/dialrecspeclist");
- sXml = instance1.selectNodesXml("/root/main/reclist/recinfo/dialrecspeclist/dialrecspec"); //투석기록 리스트
- model.makeValue("/root/send/savedata/dialrecspeclist", sXml);
-
- submit("TXMND00702");
- }
- }
- /* ------------------------------------------------- */
- /* desc : 인증데이터 만들기 */
- /* param : pModel - Model */
- /* tNode - Target Node */
- /* sNode - Source Node */
- /* return : */
- /* -------------------------------------------------- */
- function fMake_SignData(){
- Sign.addnode("/root/main/reclist/recinfo");
- var xRecinfoPath = Sign.XPATH_SIGNINFO+"/recinfo/recinfolists";
- // 투석장소
- var sDialPlacCd = model.getValue(xRecinfoPath+"/dialplaccd");
- if(sDialPlacCd != ""){
- model.makeValue(xRecinfoPath+"/dialplaccd",model.getValue("/root/init/M0129list/M0129[cdid='"+sDialPlacCd+"']/cdnm"));
- }
- // 투석액
- var sDialliqd = model.getValue(xRecinfoPath+"/dialliqd");
- if(sDialliqd != ""){
- model.makeValue(xRecinfoPath+"/dialliqd", model.getValue("/root/init/M0345list/M0345[cdid='"+sDialliqd+"']/cdnm"));
- }
-
- // 혈과종류
- var sAngioKindCd = model.getValue(xRecinfoPath+"/angiokindcd");
- if(sAngioKindCd != ""){
- model.makeValue(xRecinfoPath+"/angiokindcd", model.getValue("/root/init/M0083list/M0083[cdid='"+sAngioKindCd+"']/cdnm"));
- }
-
- // 투석기
- var sDialMach = model.getValue(xRecinfoPath+"/dialmach");
- if(sDialMach != ""){
- model.makeValue(xRecinfoPath+"/dialmach", model.getValue("/root/init/M0128list/M0128[cdid='"+sDialMach+"']/cdnm"));
- }
- var sDialMachNm = model.getValue(xRecinfoPath+"/dialmachnm");
- if(sDialMachNm != ""){
- model.makeValue(xRecinfoPath+"/dialmachnm", model.getValue("/root/init/M0127list/M0127[cdid='"+sDialMachNm+"']/cdnm"));
- }
-
- // 투석구분
- var sHdKindFlag = model.getValue(xRecinfoPath+"/hdkindflag");
- if(sHdKindFlag != ""){
- model.makeValue(xRecinfoPath+"/hdkindflag", model.getValue("/root/init/hdkindflaglist/hdkindflag[cd='"+sHdKindFlag+"']/nm"));
- }
- }
- /* ------------------------------------------------- */
- /* 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 : Instance NodeCopy 하기 (SMMNP007.js 참조) */
- /* param : pModel - Model */
- /* tNode - Target Node */
- /* sNode - Source Node */
- /* return : */
- /* -------------------------------------------------- */
-
- function InstanceNodeCopy(pModel, tNode, sNode) {
- pModel.copyNode(tNode, sNode );
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자팝업
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchNurs(userid){
- model.makeValue("/root/main/reclist/recinfo/recinfolists/userpopupinfo/param" , "_OneS"); // 한 사용자 선택 팝업을 띄울시 "팝업에 전달할 노드"/param 의 값 설정
- model.makeValue("/root/main/reclist/recinfo/recinfolists/userpopupinfo/flag" , "userid"); // 한 사용자 선택 팝업을 띄울시 "팝업에 전달할 노드"/flag 의 값 설정
- model.makeValue("/root/main/reclist/recinfo/recinfolists/userpopupinfo/searchitem", userid); // 한 사용자 선택 팝업을 띄울시 "팝업에 전달할 노드"/searchitem 의 값 설정
-
- modal("../../userdeptinfoweb/xrw/SPZSU10103_사용자부서선택조회", 1, "200", "200", "SPZSU10103","/root/main/reclist/recinfo/recinfolists/userpopupinfo","/root/main/temp");
-
- var iParam = getParameter("SPZSU10103_");
- model.makeNode("/root/main/reclist/recinfo/recinfolists/onerowselect");
- setCSVToNode("/root/main/reclist/recinfo/recinfolists/onerowselect", iParam);
- clearParameter("SPZSU10103_");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.06.14
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 처치 및 투약 / 임상검사 처방정보조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchPrcp(prcpflag){
- model.removenode("/root/send");
- model.makeNode("/root/send");
-
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/reclist/recinfo/recinfolists/pid")); // 등록번호
- model.makeValue("/root/send/reqdata/rsrvdd", model.getValue("/root/main/reclist/recinfo/recinfolists/rsrvdd"));// 예약일자
- model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/main/reclist/recinfo/recinfolists/ioflag"));// 입원외래구분
- model.makeValue("/root/send/reqdata/prcpflag", prcpflag); // 처방구분 ( cruedrug:처치 및 투약 / nbpsinsp:임상검사 )
-
- if(prcpflag == "cruedrug") { // 처치 및 투약
- model.removeNodeset("/root/main/reclist/recinfo/cruedrugspeclist");
- submit("TRMND00705");
- } else if(prcpflag == "nbpsinsp") { // 임상검사
- model.removeNodeset("/root/main/reclist/recinfo/nbpsinspspeclist");
- submit("TRMND00706");
- }
- }
- /**
- * @group :
- * @ver : 2007.07.25 // 수정일자 : 2007.09.21
- * @by : 최경용 // 수정자 : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 참여자 정보 팝업 조회
- * @param : originalNode
- * @param : copyNode
- * @return : "true"/"false"
- * @---------------------------------------------------
- */
- function fClickUserBtn(setflag, userflag){
- var jobkindcd = "11";
- var deptcd = "2010702070"; // 인공신장실Unit 부서코드:"2010702070"
- var titlenm = "인공신장실 간호사 리스트";
-
- setParameter("SPMNN02100_deptcd" , deptcd);
- setParameter("SPMNN02100_jobkindcd", jobkindcd);
- setParameter("SPMNN02100_titlenm" , titlenm);
-
- modal("SPMNN02100", 1);
-
- var userid = getParameter("SPMNN02100_userid");
- var usernm = getParameter("SPMNN02100_usernm");
- if(userid != ""){
- if(setflag == "start"){ // 시작간호사
- model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgid", userid);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgnm", usernm);
- } else if(setflag == "to"){ // 종료간호사
- model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgid", userid);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgnm", usernm);
- } else if(setflag == "user"){ // 기록자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recid", userid);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm", usernm);
- }
- }
- else{
- if(setflag == "start"){ // 시작간호사
- model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgid", "");
- model.makeValue("/root/main/reclist/recinfo/recinfolists/fromnurgnm", "");
- model.setFocus("ipt_startnurseid");
- } else if(setflag == "to"){ // 종료간호사
- model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgid", "");
- model.makeValue("/root/main/reclist/recinfo/recinfolists/tonurgnm", "");
- model.setFocus("ipt_endnurseid");
- } else if(setflag == "user"){ // 기록자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recid", "");
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recnm", "");
- model.setFocus("ipt_recid");
- }
- }
-
- setParameter("SPMNN02100_userid", "");
- setParameter("SPMNN02100_usernm", "");
- model.refresh();
- }
|