123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680 |
- /*
-
- 복막투석도관기록(SMMND01400.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
-
- //**전역변수**//
- var coduitrecinfoRow = "";
- var pdmatnpatRow = "";
- var XmlInstNm = "peritcoduitspeclist" + " " // 복막투석 도관관리 정보
- + "t_setspeclist" + " " // T-set관리
- + "infcspeclist" ; // 감염관리
- /**
- * @group :
- * @ver : 2007.06.13
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDone(){
- //**그리드 초기화**//
- model.removeNodeset("/root/main/pdmatnpatlist/pdmatnpatinfo"); // 복막투석 유지환자 리스트
- model.removeNodeset("/root/main/coduitreclist/coduitrecinfo"); // 환자별 도관기록 리스트
- model.removeNodeset("/root/main/reclist/recinfo/peritcoduitlist"); // 복막투석 도관관리
- model.removeNodeset("/root/main/reclist/recinfo/t_setlist"); // T-set 관리
- model.removeNodeset("/root/main/reclist/recinfo/infclist"); // 감염관리
- model.refresh();
-
- //**공통코드 가져오기**//
- zbcfGetCodeList( new Array ( "M0142" // Cath종류
- , "M0133" // 부위
- , "M0144" // 복막투석도관 제거이유
- , "M0145" // 감염종류
- , "M0146" // 원인균
- , "M0147" // 예후
- )
- , new Array ( "/root/init/M0142list" // Cath종류
- , "/root/init/M0133list" // 부위
- , "/root/init/M0144list" // 복막투석도관 제거이유
- , "/root/init/M0145list" // 감염종류
- , "/root/init/M0146list" // 원인균
- , "/root/init/M0147list" // 예후
- )
- );
-
- //** 상단환자 화면설정 **//
- 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"); // 유지환자등록일자
- pdmatnpatRow = 1;
- model.setValue("/root/main/condition/pid", sSelPid);
-
- fSrchPDMatnPatList(); // 복막투석 유지환자 리스트 조회
- fSetPDPipeInfo(1); // 복막투석 유지환자리스트에서 환자 선택 시 도관기록 리스트 및 누적조회, 환자정보를 설정
- }else{
- fSrchPDMatnPatList(); // 복막투석 유지환자 리스트 조회
- }
- }
- /**
- * @group :
- * @ver : 2007.06.13
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 복막투석 유지환자 리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSrchPDMatnPatList(){
- 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", "P"); // 투석구분 (P:복막)
- model.removeNodeset("/root/main/pdmatnpatlist");
-
- submit("TRMND01401");
-
- //if(model.getValue("/root/main/condition/pid") != "") {
- // grd_pdmatnpatinfo.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"; // 환자별 도관기록 리스트 셀 색상 초기화 (white)
- // }
- // // fGetPatInfo(model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[1]/pid"), model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[1]/maintepatrgstdd")); // 복막투석 유지환자 정보 설정
- // // fSrchCoduitrecList(); // 환자별 도관기록 리스트 조회
- //}
- //model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.06.13
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 복막투석 유지환자 정보 설정
- * (복막투석 유지환자 리스트 더블 클릭 시)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetPatInfo(sSelPid, sMaintePatRgstDD){
- // 초기화
- model.removeNodeset("/root/main/reclist/recinfo/recinfolists"); // 복막투석도관기록
- model.removeNodeset("/root/main/reclist/recinfo/peritcoduitlist"); // 복막투석 도관관리
- model.removeNodeset("/root/main/reclist/recinfo/t_setlist"); // T-set 관리
- model.removeNodeset("/root/main/reclist/recinfo/infclist"); // 감염관리
- // fClearChildNode("/root/main/reclist/recinfo");
- // fClearChildNode("/root/main/chklist/chkinfo");
-
- //기록자 정보 설정
- 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/recdd", getCurrentDate()); // 기록일자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
-
- // 환자 정보 설정
- // model.makeValue("/root/main/reclist/recinfo/recinfolists/pid", sSelPid);
- // model.makeValue("/root/main/reclist/recinfo/recinfolists/maintepatrgstdd", sMaintePatRgstDD);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/pid",sSelPid);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/maintepatrgstdd",sMaintePatRgstDD);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/orddd",sOrddd);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/cretno",sCretno);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/histstat",sHiststat);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/orddeptcd",sOrddeptcd);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/orddrid",sOrddrid);
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.06.13
- * @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/reclist/recinfo/recinfolists/pid"));
- model.makeValue ("/root/send/reqdata/dialflag", "P"); // 투석구분 ( "P":복막투석 )
- model.removeNodeset("/root/main/coduitreclist");
-
- submit("TRMND01402");
-
- // 인증저장 정보 설정
- model.makeValue("/root/main/pdmatnpatlist/pdmatnpatinfo["+iRow+"]/orddd" , model.getValue("/root/main/signinfo/orddd" ));
- model.makeValue("/root/main/pdmatnpatlist/pdmatnpatinfo["+iRow+"]/cretno" , model.getValue("/root/main/signinfo/cretno" ));
- model.makeValue("/root/main/pdmatnpatlist/pdmatnpatinfo["+iRow+"]/histstat" , model.getValue("/root/main/signinfo/histstat" ));
- model.makeValue("/root/main/pdmatnpatlist/pdmatnpatinfo["+iRow+"]/orddeptcd", model.getValue("/root/main/signinfo/orddeptcd"));
- model.makeValue("/root/main/pdmatnpatlist/pdmatnpatinfo["+iRow+"]/orddrid" , model.getValue("/root/main/signinfo/orddrid" ));
- grd_pdmatnpatinfo.refresh();
- }
- /**
- * @group :
- * @ver : 2007.06.13
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 복막투석도관정보 저장
- * @param : pFlag (T:임시저장, C:인증저장)
- * @return :
- * @---------------------------------------------------
- */
- function fSavePDPipeInfo(pFlag){
- var sRecDD = model.getValue("/root/main/reclist/recinfo/recinfolists/recdd"); // recdd
- var sRecTM = model.getValue("/root/main/reclist/recinfo/recinfolists/rectm"); // rectm
- /*
- for(var i=1; i<grd_peritcoduit.rows; i++) {
- model.setValue("/root/main/reclist/recinfo/peritcoduitlist/peritcoduitinfo[" + i + "]/recdd", sRecDD);
- model.setValue("/root/main/reclist/recinfo/peritcoduitlist/peritcoduitinfo[" + i + "]/rectm", sRecTM);
- }
-
- for(var i=1; i<grd_t_set.rows; i++) {
- model.setValue("/root/main/reclist/recinfo/t_setlist/t_setinfo[" + i + "]/recdd", sRecDD);
- model.setValue("/root/main/reclist/recinfo/t_setlist/t_setinfo[" + i + "]/rectm", sRecTM);
- }
-
- for(var i=1; i<grd_infc.rows; i++) {
- model.setValue("/root/main/reclist/recinfo/infclist/infcinfo[" + i + "]/recdd", sRecDD);
- model.setValue("/root/main/reclist/recinfo/infclist/infcinfo[" + i + "]/rectm", sRecTM);
- }
- */
-
- //** 저장 데이터 없을 경우 **//
- if( getNodesetCount("/root/main/reclist/recinfo/peritcoduitlist/peritcoduitinfo") == 0
- && getNodesetCount("/root/main/reclist/recinfo/t_setlist/t_setinfo") == 0
- && getNodesetCount("/root/main/reclist/recinfo/infclist/infcinfo") == 0) {
- messageBox("저장할 데이터가 ", "I004", "");
- return;
- }
-
- /*
- // 기록일시
- if(model.getValue("/root/main/reclist/recinfo/recinfolists/recdd")=="") {
- messageBox("기록일자는", "I003", "");
- model.setFocus("ipt_recdd");
- return;
- }
- if(model.getValue("/root/main/reclist/recinfo/recinfolists/rectm")=="") {
- messageBox("기록시간는", "I003", "");
- model.setFocus("ipt_rectm");
- return;
- }
- */
- // 복막투석 도관관리
- for(var i=1; i<=getNodesetCount("/root/main/reclist/recinfo/peritcoduitlist/peritcoduitinfo"); i++) {
- var sStatus = model.getValue("/root/main/reclist/recinfo/peritcoduitlist/peritcoduitinfo["+i+"]/statusflag" ); // 상태
- var sPart = model.getValue("/root/main/reclist/recinfo/peritcoduitlist/peritcoduitinfo["+i+"]/partflag" ); // 부위
-
- if(sStatus == "" || sPart == ""){
- messageBox("복막투석 도관관리의 상태, 부위는", "I003", "");
- return;
- }
- }
-
- // T-set 관리
- for(var i=1; i<=getNodesetCount("/root/main/reclist/recinfo/t_setlist/t_setinfo"); i++) {
- var sExchdd = model.getValue("/root/main/reclist/recinfo/t_setlist/t_setinfo["+i+"]/exchdd" ); // 교환일
-
- if(sExchdd == ""){
- messageBox("T-set 관리의 교환일은", "I003", "");
- return;
- }
- }
-
- // 감염관리
- for(var i=1; i<=getNodesetCount("/root/main/reclist/recinfo/infclist/infcinfo"); i++) {
- var sInfckind = model.getValue("/root/main/reclist/recinfo/infclist/infcinfo["+i+"]/infckindflag"); // 감염종류
-
- if(sInfckind == ""){
- messageBox("감염관리의 감염종류는", "I003", "");
- return;
- }
- }
-
- /*
- 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/recinfo/recinfolists/pid") );
- model.makeValue ("/root/send/reqdata/recdd", model.getValue("/root/main/reclist/recinfo/recinfolists/recdd"));
- model.makeValue ("/root/send/reqdata/rectm", model.getValue("/root/main/reclist/recinfo/recinfolists/rectm"));
- model.removeNodeset("/root/main/chklist");
- submit("TRMND01404");
-
- // 동일기록일자에 도관기록 존재 할 경우
- if(model.getValue("/root/main/chklist/chkinfo/pid") != "") {
- messageBox("동일일자에 도관기록이 존재합니다.", "E");
- // 기록일시 설정
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recdd", getCurrentDate()); // 기록일자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
- model.refresh();
- return;
- }
- }
- */
- //** 저장실행 **//
- model.removenode("/root/send");
- model.makeNode ("/root/send");
- model.makeValue ("/root/send/savedata/baseinfo/pid" , model.getValue("/root/main/reclist/recinfo/recinfolists/pid"));
- model.makeValue ("/root/send/savedata/baseinfo/recdd" , getCurrentDate());
- model.makeValue ("/root/send/savedata/baseinfo/rectm" , getCurrentTime().substr(0,4));
- model.makeValue ("/root/send/savedata/baseinfo/maintepatrgstdd", model.getValue("/root/main/reclist/recinfo/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" , "P");
- model.makeValue("/root/send/savedata/baseinfo/certflag" , pFlag); // 인증여부( T : 임시저장, C : 인증저장)
- model.makeValue ("/root/send/savedata/peritcoduitinfo" , grd_peritcoduit.getupdatedataAll("i"));
- model.makeValue ("/root/send/savedata/t_setinfo" , grd_t_set.getupdatedataAll("i"));
- model.makeValue ("/root/send/savedata/infcinfo" , grd_infc.getupdatedataAll("i"));
-
-
- // 인증저장일 경우
- if(pFlag == "C"){
- // 인증 로직 호출
- if(Sign.signprocess() == true){
- model.removeNodeset("/root/send/savedata/signinfo");
- model.makeValue("/root/send/savedata/signdata/pid" , model.getValue("/root/main/reclist/recinfo/recinfolists/pid") ); // 등록번호
- model.makeValue("/root/send/savedata/signdata/orddd" , model.getValue("/root/main/reclist/recinfo/recinfolists/orddd") ); // 진료일자
- model.makeValue("/root/send/savedata/signdata/signno" , model.getValue("/root/main/reclist/recinfo/recinfolists/signno") ); // 서명번호
- model.makeValue("/root/send/savedata/signdata/cretno" , model.getValue("/root/main/reclist/recinfo/recinfolists/cretno") ); // 생성번호
- model.makeValue("/root/send/savedata/signdata/recdd" , getCurrentDate() ); // 실제 기록이 이루어진 기록일자(통합기록에서 보여짐)
- model.makeValue("/root/send/savedata/signdata/rectm" , getCurrentTime().substr(0,4) ); // 실제 기록이 이루어진 기록시간(통합기록에서 보여짐)
- model.makeValue("/root/send/savedata/signdata/recsaveflag" , "Y" ); // 전자서명 인적정보 변경여부(기록일시 변경되는 경우: Y, 그외: N)
- model.makeValue("/root/send/savedata/signdata/signflag" , "02"); // 서명자료구분(01 : 진료, 02 : 간호)
- model.makeValue("/root/send/savedata/signdata/signgenrflag", model.getValue("/root/main/reclist/recinfo/recinfolists/histstat")); // 서명발생구분 (코드정의서 M0010 참조)
- model.makeValue("/root/send/savedata/signdata/formcd" , "0000002498"); // 각 기록지별 서식코드
- model.makeValue("/root/send/savedata/signdata/orddeptcd" , model.getValue("/root/main/reclist/recinfo/recinfolists/orddeptcd")); // 진료부서코드
- model.makeValue("/root/send/savedata/signdata/orddrid" , model.getValue("/root/main/reclist/recinfo/recinfolists/orddrid") ); // 진료의사ID
- model.makeValue("/root/send/savedata/signdata/signbfcnts" , Sign.signedInfos[1]); // 인증할 데이터 정보(미기록 노드 제거된 정보)
- model.makeValue("/root/send/savedata/signdata/signaftcnts" , Sign.signedInfos[2]); // 공인인증 처리후 데이터
- }else{
- return false;
- }
- }
- submit("TXMND01401");
-
- fSrchCoduitrecList(pdmatnpatRow); // 환자별 도관기록 리스트 조회
- //fSrchPDPipeInfo("X"); // 복막투석 도관기록 조회
- fSrchPDPipeInfo();
- }
- /**
- * @group :
- * @ver : 2008.05.16
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 복막투석 유지환자리스트에서 환자 선택 시
- 도관기록 리스트 및 누적조회, 환자정보를 설정.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetPDPipeInfo(iRow){
- // pdmatnpatRow = grd_pdmatnpatinfo.row;
- var sSelPid = model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[" +iRow+ "]/pid"); // 선택환자 등록번호
- var sMaintePatRgstDD = model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[" +iRow+ "]/maintepatrgstdd"); // 선택환자 유지환자등록일자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/pid",sSelPid);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/maintepatrgstdd",sMaintePatRgstDD);
-
- // btn_srchccmlinfo.disabled = false; // 누적조회버튼 활성화
-
- // 유지환자 리스트 셀 색상 초기화 (white)
- for(var i=1; i<=grd_pdmatnpatinfo.rows; i++) {
- grd_pdmatnpatinfo.cellstyle("background-color", i, 1, i, 4) = "white";
- }
-
- for(var i=1; i<=grd_coduitrecinfo.rows; i++) {
- grd_coduitrecinfo.cellstyle("background-color", i, 1, i, 3) = "white"; // 환자별 도관기록 리스트 셀 색상 초기화 (white)
- }
-
- // 선택 행 셀 색상 지정
- grd_pdmatnpatinfo.cellstyle("background-color", iRow, 1, iRow, 4) = "#ffd9ff";
- // fGetPatInfo(sSelPid, sMaintePatRgstDD); // 복막투석 유지환자 정보 설정
- fSrchCoduitrecList(iRow); // 환자별 도관기록 리스트 조회
- // fSrchPDPipeInfo("X"); // 복막투석 도관기록 조회
-
- var sOrddd = model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[" +iRow+ "]/orddd");
- var sCretno = model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[" +iRow+ "]/cretno");
- var sHiststat = model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[" +iRow+ "]/histstat");
- var sOrddeptcd = model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[" +iRow+ "]/orddeptcd");
- var sOrddrid = model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo[" +iRow+ "]/orddrid");
- model.makeValue("/root/main/reclist/recinfo/recinfolists/orddd",sOrddd);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/cretno",sCretno);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/histstat",sHiststat);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/orddeptcd",sOrddeptcd);
- model.makeValue("/root/main/reclist/recinfo/recinfolists/orddrid",sOrddrid);
-
- fSrchPDPipeInfo();
-
- /*
- // 환자별 도관기록 등록번호, 유지환자 등록일자 설정
- 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/recinfo/recinfolists/maintepatrgstdd", sMaintePatRgstDD); // 유지환자등록일자설정
- */
- model.refresh();
- }
- /* ------------------------------------------------- */
- /* 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 xPeritCoduitPath = xRecinfoPath + "/peritcoduitlist/peritcoduitinfo";
- for(var i=1;i<grd_peritcoduit.rows;i++){
- // 상태
- var sStatusFlag = model.getValue(xPeritCoduitPath +"["+i+"]/statusflag");
- switch(sStatusFlag){
- case '1':
- model.makeValue(xPeritCoduitPath+"["+i+"]/statusflag", "삽입"); break;
- case '2':
- model.makeValue(xPeritCoduitPath+"["+i+"]/statusflag", "제거"); break;
- }
-
- // Cath.종류
- var sCathKindFlag = model.getValue(xPeritCoduitPath +"["+i+"]/cathkindflag");
- if(sCathKindFlag != ""){
- model.makeValue(xPeritCoduitPath+"["+i+"]/cathkindflag", model.getValue("/root/init/M0142list/M0142[cdid='"+sCathKindFlag+"']/cdnm"));
- }
-
- // 부위
- var sPartFlag = model.getValue(xPeritCoduitPath +"["+i+"]/partflag");
- if(sPartFlag != ""){
- model.makeValue(xPeritCoduitPath+"["+i+"]/partflag", model.getValue("/root/init/M0133list/M0133[cdid='"+sPartFlag+"']/cdnm"));
- }
-
- // 제거사유
- var sElmnResnFlag = model.getValue(xPeritCoduitPath +"["+i+"]/elmnresnflag");
- if(sElmnResnFlag != ""){
- model.makeValue(xPeritCoduitPath+"["+i+"]/elmnresnflag", model.getValue("/root/init/M0144list/M0144[cdid='"+sElmnResnFlag+"']/cdnm"));
- }
- }
-
- //** 감염관리 **//
- var xInfcInfoPath = xRecinfoPath + "/infclist/infcinfo";
- for(var i=1;i<grd_infc.rows;i++){
- // 감염종류
- var sInfcKindFlag = model.getValue(xInfcInfoPath +"["+i+"]/infckindflag");
- if(sInfcKindFlag != ""){
- model.makeValue(xInfcInfoPath+"["+i+"]/infckindflag", model.getValue("/root/init/M0145list/M0145[cdid='"+sInfcKindFlag+"']/cdnm"));
- }
-
- // 원인균
- var sCasBacFlag = model.getValue(xInfcInfoPath +"["+i+"]/casbacflag");
- if(sCasBacFlag != ""){
- model.makeValue(xInfcInfoPath+"["+i+"]/casbacflag", model.getValue("/root/init/M0146list/M0146[cdid='"+sCasBacFlag+"']/cdnm"));
- }
-
- // 예후
- var sAfterFlag = model.getValue(xInfcInfoPath +"["+i+"]/afterflag");
- if(sAfterFlag != ""){
- model.makeValue(xInfcInfoPath+"["+i+"]/afterflag", model.getValue("/root/init/M0147list/M0147[cdid='"+sAfterFlag+"']/cdnm"));
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.06.14
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 복막투석 도관기록 조회
- * (환자별 도관기록 리스트 더블 클릭 시)
- * @param
- * @return
- * @---------------------------------------------------
- */
- function fSrchPDPipeInfo(srchFlag){
- // 신규등록 Flag
- model.makeValue("/root/main/chklist/chkinfo/cretfalg", "N");
-
- grp_pdpipeinfo.disabled = false; // 복막투석 도관관리 그룹 활성화
-
- if(srchFlag == "X"){
- coduitrecinfoRow = -1;
- // grp_pdpipeinfo.disabled = true; // 복막투석도관관리 그룹 비활성화
-
- // 버튼 비활성화
- btn_tempsavepdpipeinfo.disabled = true;
- btn_certsavepdpipeinfo.disabled = true;
- btn_addpdpipeinfo.disabled = true;
- btn_delpdpipeinfo.disabled = true;
- btn_addtset.disabled = true;
- btn_deltset.disabled = true;
- btn_addinfc.disabled = true;
- btn_delinfc.disabled = true;
- } else {
- coduitrecinfoRow = grd_coduitrecinfo.row; // 전역변수
- }
- /*
- // 인증저장 된 기록인지 체크
- if(model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/signno")!= ""){
- btn_tempsavepdpipeinfo.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"); // 기록자명
- */
- for(var i=1; i<=grd_coduitrecinfo.rows; i++) {
- grd_coduitrecinfo.cellstyle("background-color", i, 1, i, 3) = "white";
- }
- // i u d 아이콘 초기화
- for(i=1 ; i < grd_peritcoduit.rows ; i++){
- grd_peritcoduit.cellStyle("background-image", + i , 8) = "../../../com/commonweb/images/icon_n.gif";
- }
- for(i=1 ; i < grd_t_set.rows ; i++){
- grd_t_set.cellStyle("background-image", + i , 3) = "../../../com/commonweb/images/icon_n.gif";
- }
- for(i=1 ; i < grd_infc.rows ; i++){
- grd_infc.cellStyle("background-image", + i , 7) = "../../../com/commonweb/images/icon_n.gif";
- }
-
- // 선택 행 셀 색상 지정
- 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/pdmatnpatlist/pdmatnpatinfo["+grd_pdmatnpatinfo.row+"]/pid"));
- // model.makeValue("/root/send/reqdata/maintepatrgstdd", model.getValue("/root/main/pdmatnpatlist/pdmatnpatinfo["+grd_pdmatnpatinfo.row+"]/maintepatrgstdd"));
- model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/main/reclist/recinfo/recinfolists/pid"));
- model.makeValue("/root/send/reqdata/maintepatrgstdd", model.getValue("/root/main/reclist/recinfo/recinfolists/maintepatrgstdd"));
- model.removeNodeset("/root/main/reclist/recinfo/peritcoduitlist"); // 복막투석 도관관리 정보
- model.removeNodeset("/root/main/reclist/recinfo/t_setlist"); // T-set관리
- model.removeNodeset("/root/main/reclist/recinfo/infclist"); // 감염관리
-
- submit("TRMND01403");
-
- for(i=1 ; i < grd_peritcoduit.rows ; i++){
- grd_peritcoduit.isReadOnly(i, 1) = true;
- grd_peritcoduit.isReadOnly(i, 2) = true;
- grd_peritcoduit.isReadOnly(i, 3) = true;
- if(grd_peritcoduit.valueMatrix(i,3) == "2"){ // 상태 제거시 제거이유 활성화
- grd_peritcoduit.isReadOnly(i, 5) = false;
- }else{
- grd_peritcoduit.isReadOnly(i, 5) = true;
- }
- }
- /* if(grd_coduitrecinfo.rows > 1) {
- // 기록정보 설정
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recdd" , model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/recdd"));
- model.makeValue("/root/main/reclist/recinfo/recinfolists/rectm" , model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/rectm"));
- model.makeValue("/root/main/reclist/recinfo/recinfolists/maintepatrgstdd", model.getValue("/root/main/coduitreclist/coduitrecinfo[" + coduitrecinfoRow + "]/maintepatrgstdd"));
- model.makeValue("/root/main/reclist/recinfo/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/recinfo/recinfolists/pid") == "") {
- messageBox("복막투석 유지환자를 선택한 후", "I", "신규등록을 할 수 있습니다.");
- return;
- }
-
- grp_pdpipeinfo.disabled = false; // 복막투석 도관관리 그룹 활성화
-
- // 기록일시 설정
- model.makeValue("/root/main/reclist/recinfo/recinfolists/recdd", getCurrentDate()); // 기록일자
- model.makeValue("/root/main/reclist/recinfo/recinfolists/rectm", getCurrentTime().substr(0,4)); // 기록시간
- model.refresh();
-
- // 환자별 도관기록 리스트 행 추가
- grd_coduitrecinfo.addItem(); // 행 추가
- grd_coduitrecinfo.textmatrix((grd_coduitrecinfo.rows-1), 1) = model.getValue("/root/main/reclist/recinfo/recinfolists/recdd");
- grd_coduitrecinfo.textmatrix((grd_coduitrecinfo.rows-1), 2) = model.getValue("/root/main/reclist/recinfo/recinfolists/rectm");
- grd_coduitrecinfo.textmatrix((grd_coduitrecinfo.rows-1), 3) = model.getValue("/root/main/reclist/recinfo/recinfolists/recnm");
- // 초기화
- 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/peritcoduitlist/peritcoduitinfo"); // 복막투석 도관관리
- model.removeNodeset("/root/main/reclist/recinfo/t_setlist/t_setinfo"); // T-set 관리
- model.removeNodeset("/root/main/reclist/recinfo/infclist/infcinfo"); // 감염관리
-
- // 신규등록 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/peritcoduitlist/peritcoduitinfo") == 0
- && getNodesetCount("/root/main/reclist/recinfo/t_setlist/t_setinfo") == 0
- && getNodesetCount("/root/main/reclist/recinfo/infclist/infcinfo") == 0) {
- messageBox("해당일시에 데이터가 존재하지 않습니다", "I", "마스터 정보를 삭제합니다.");
-
- model.makeValue("/root/send/savedata/pid" , model.getValue("/root/main/reclist/recinfo/recinfolists/pid"));
- model.makeValue("/root/send/savedata/recdd" , model.getValue("/root/main/reclist/recinfo/recinfolists/recdd"));
- model.makeValue("/root/send/savedata/rectm" , model.getValue("/root/main/reclist/recinfo/recinfolists/rectm"));
- model.makeValue("/root/send/savedata/maintepatrgstdd", model.getValue("/root/main/reclist/recinfo/recinfolists/maintepatrgstdd"));
- model.makeValue("/root/send/savedata/dialflag" , "P");
-
- submit("TXMND01302");
-
- fSrchCoduitrecList(); // 환자별 도관기록 리스트 조회
- }
-
- }
- /* ------------------------------------------------- */
- /* 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);
- }
- }
- }
|