123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139 |
- /*
- 호스피스 환자관리(SMMNH02900.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var currentdate = getCurrentDate();//현재일자
- var sdate = ((currentdate.toDate()).getAddDate(-1, "M")).getDateFormat(); //보름전
- var top_pid = "";
- /**
- * @group :
- * @ver : 2007.04.10
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호스피스 환자관리 조회
- * 조회조건 (조회시작,종료일, 환자구분) 필수
- * @param :
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fSearch(){
- //20090819 dhkim 신환등록버튼 의뢰선택시에만 visible
- var pamcgubun = model.getValue("/root/temp/pamcgubun");
- fShowNewPatient(false);
- if(pamcgubun == 'R'){
- btn_newpat.attribute('visibility') = 'visible';
- }else{
- btn_newpat.attribute('visibility') = 'hidden';
- }
-
- //fPamcChange();//구분에 따른 그리드 컬럼 정의
- var gubun = "";
- //xpath
- var xHospiceListPath = '/root/main/hospice/hospicelist';
- if(model.getValue("/root/temp/pamcgubun") == ""){
- messageBox("환자구분을 ","C002");
- return;
- }
- //상세내역 영역 초기화
- model.resetInstanceNode("/root/main/hospiceinfo/hospicedetl");
- grp_buttom.refresh();
- //조회조건 set
- model.removenodeset(xHospiceListPath);
- model.removenode("/root/send");
- model.makeValue("/root/send/fbrthdd", model.getValue("/root/main/cond/fbrthdd"));
- model.makeValue("/root/send/lbrthdd", model.getValue("/root/main/cond/lbrthdd"));
- //일반 산재 구분
- if((model.getValue("/root/temp/hospicegubun") == "1 2")||(model.getValue("/root/temp/hospicegubun") == "2 1")){
- gubun = "3"
- }else if(model.getValue("/root/temp/hospicegubun") == ""){
- gubun = "0";
- }else {
- gubun = model.getValue("/root/temp/hospicegubun");
- }
-
- //2017.08.21 자문형 호스피스 서비스 추가
- if( model.getValue("/root/temp/hospicestsgb") != "1" && model.getValue("/root/temp/hospicestsgb") != "2"){
- model.setValue("/root/temp/hospicestsgb", "");
- }
- model.makeValue("/root/send/hospicegubun", gubun);
- model.makeValue("/root/send/pamcgubun", model.getValue("/root/temp/pamcgubun"));
- model.makeValue("/root/send/hospicestsgb", model.getValue("/root/temp/hospicestsgb"));
- model.makeValue("/root/send/resncd", model.getValue("/root/temp/resncd"));
- model.makeValue("/root/send/refflag", model.getValue("/root/temp/refflag"));
- model.makeValue("/root/send/refnm", model.getValue("/root/temp/refnm"));
- model.removenode("/root/main/hospice");
-
- if(submit("TRMNH02901")){
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- if(RowCnt < 1){
- model.resetInstanceNode("/root/main/hospiceinfo/hospicedetl");
- messageBox("조회된 자료가 ","I004");
- }
-
- //20090925 dhkim 호스피스환자 consult취소시 취소현황알림 팝업창 생성 (변경요청 itc김숙인)
- var cstCancelMsg = "";//컨설트취소환자메세지변수
- var cstCancelCnt = 0;
- var cstpid, cstNm, cstDt;
- //종결처리 되지않은 임종환자에 대한 메세지를 출력한다.
- var dethMsg = '';//임종환자메세지변수
- var dethNm, dethPid, dethDt; //임종환자 이름, 등록번호, 임종일 변수
- for(var i = 1; i <= RowCnt ; i++){
- //서비스종료,대기종료,퇴실은 사망프로세스 안태운다.
- //if( (model.getValue(xHospiceListPath + "[" + i + "]/enddd") != "") ||
- // (model.getValue(xHospiceListPath + "[" + i + "]/waitenddd") != "") ||
- // (model.getValue(xHospiceListPath + "[" + i + "]/dschdd") != "") )
- //{
- // continue;
- //}
- //DETHYN이 Y(AGONALDD는 null이고 DETHDT가 있을때)
- if( pamcgubun == "R"|| pamcgubun == "W" || pamcgubun == "D"|| pamcgubun == "I") {//의뢰, 대기, 분산, 입실
- if(model.getValue(xHospiceListPath + "[" + i + "]/dethyn") == "Y"){
- dethPid = model.getValue(xHospiceListPath + "[" + i + "]/pid");
- dethNm = model.getValue(xHospiceListPath + "[" + i + "]/hngnm");
- dethDt = model.getValue(xHospiceListPath + "[" + i + "]/dethdt");
- dethDt = dethDt.substring(0, 4) + '/' + dethDt.substring(4, 6) + '/' + dethDt.substring(6,8);
- dethMsg += dethPid + ' ' + dethNm+ '님 임종. 임종일:' + dethDt + '\r\n';
- }
- }
-
- //20090925 dhkim 호스피스환자 consult취소시 취소현황알림 팝업창 생성 (변경요청 itc김숙인)
- //의뢰/대기/분산/입실 조회시에만 알릴것
- cstCancelCnt = model.getValue(xHospiceListPath + "[" + i + "]/cstcancel");
- if(pamcgubun == "R" || pamcgubun == "W" || pamcgubun == "D" || pamcgubun == "I"){//의뢰, 대기, 분산, 입실
- if(cstCancelCnt > 0){
- cstpid = model.getValue(xHospiceListPath + "[" + i + "]/pid");
- cstNm = model.getValue(xHospiceListPath + "[" + i + "]/hngnm");
- cstDt = model.getValue(xHospiceListPath + "[" + i + "]/cstcanceldt");
-
- cstCancelMsg += cstpid + ' ' + cstNm+ '님 취소. 취소일:' + cstDt + '\r\n';
- }
- }
-
-
- }
- //var nodeCnt = parseInt(getNodesetCount("/root/main/hospice/reqcncllist"))+1;
- //if( nodeCnt > 1 ) {
- // var reqcnclMsg = "", pid, hngnm, cncldd;
- // for( var j = 1; j < nodeCnt; j++ ) {
- // pid = model.getValue("/root/main/hospice/reqcncllist[" + j + "]/pid");
- // hngnm = model.getValue("/root/main/hospice/reqcncllist[" + j + "]/hngnm");
- // cncldd = model.getValue("/root/main/hospice/reqcncllist[" + j + "]/cncldd");
- //
- // reqcnclMsg += pid + " " + hngnm + "님 의뢰취소일 : " + cncldd.substring(0,4) + "/" + cncldd.substring(4,6) + "/" + cncldd.substring(6,8) + "\r\n";
- // }
- //}
- if( dethMsg != "" ) {
- messageBox("사망등록현황\r\n" + dethMsg, "I000");
- }
-
-
- //20090925 dhkim 호스피스환자 consult취소시 취소현황알림 팝업창 생성 (변경요청 itc김숙인)
- if( cstCancelMsg != "" ) {
- messageBox("의뢰취소현황\r\n" + cstCancelMsg, "I000");
- }
-
-
- //if( reqcnclMsg != "" ) {
- // messageBox("의뢰취소현황\r\n" + reqcnclMsg, "I000");
- //}
- //2009.02.11 메세지창만 보이고 개별적으로 퇴실, 대기종료, 서비스종료 처리함
- //if(dethMsg != ''){
- // if(messageBox("사망등록현황"+ '\r\n'+dethMsg+ '\r\n'+"사망처리 하시겠습니까?","Q") != 6) return;
- // fAgonalUpdate();
- // fSearch();
- // }
- //입실대기자수를 조회한다.
- fCntSearch();
- }else{
- messageBox('조회를', 'E009');
- return false;
- }
- }
- /**
- * @group :
- * @ver : 2008.05.22
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사망등록 처리가 된 환자를 호스피스 테이블에 사망등록을업데이트 한다.
- * @param :
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fAgonalUpdate(){
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- var xHospiceListPath = '/root/main/hospice/hospicelist';
- var sDethData =
- "pid" //01 등록번호
- + "▦cretdd" //02 생성일자
- + "▦crettm" //03 생성시간
- + "▦instcd" //04 병원기관코드
- + "▦waitstat" //05 호스피스상태
- + "▦status" //05_1 입원경로
- + "▦dethdt" //06 사망시간
- + "▦exptresn" //07 서비스종료사유
- + "▦waitendresn" //08 대기종료사유
- + "▦dschtype" //09 퇴실형태
- + "▦dschresn" //10 퇴실사유
- + "▦cretno" //11 생성번호
- + "▦indd" //12 입원일
- + "▦reqdeptcd" //13 의뢰과
- + "▦reqdd" //14 의뢰일
- + "▦atdoctid" //15 주치의ID
- + "▦atdoctnm" //16 주치의명
- + "▦reqtypeflags" //17 의뢰형태
- + "▩" ;
- for(var i = 1; i <= RowCnt ; i++){
- //DETHYN이 Y(AGONALDD는 null이고 DETHDT가 있을때)
- if(model.getValue(xHospiceListPath + "[" + i + "]/dethyn") == 'Y'){
- // 서비스종료사유(exptresn) 가 임종(03)
- // 대기종료사유 (waitendresn)가 병원임종(04)
- // 퇴실형태 (dschtype) 가 병원임종(02)
- // 퇴실사유 (dschresn") 가 병원임종(02)
- sDethData +=
- model.getValue(xHospiceListPath + "[" + i + "]/pid") //01 등록번호
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/cretdd") //02 생성일자
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/crettm") //03 생성시간
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/instcd") //04 병원기관코드
- + "▦" + model.getValue("/root/temp/pamcgubun") //05 호스피스상태
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/status") //05_1 입원경로
- + "▦" + (model.getValue(xHospiceListPath + "[" + i + "]/dethdt")).substring(0, 8) //06 사망시간
- + "▦" + "03" //07 서비스종료사유
- + "▦" + "04" //08 대기종료사유
- + "▦" + "02" //09 퇴실형태
- + "▦" + "02" //10 퇴원사유
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/cretno") //11 퇴실사유
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/indd") //12 입원일
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/reqdeptcd") //13 의뢰과
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/reqdd") //14 의뢰일
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/atdoctid") //15 주치의ID
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/atdoctnm") //16 주치의명
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/reqtypeflags") //17 의뢰형태
- + "▩" ;
- }
- }
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/sDethData" ,sDethData );
- submit("TXMNH02906");
- }
- /**
- * @group :
- * @ver : 2007.04.10
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 클릭시..환자상세정보 조회
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fClicedGrid(){
- var pamcgubn = model.getValue("/root/temp/pamcgubun");//구분
- var nsgbn = model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/nsgbn");//의뢰경로
- var roomcd = model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/roomcd");//의뢰경로
- if( pamcgubn == "R"||pamcgubn == "W"||pamcgubn == "I" ) {
- if( nsgbn == "외래" ) {//외래환자의 경우 대기로만 할수있음 분산자전환 버튼 비활성화
- if( roomcd == "" ) {//현병실이 없으면
- btn_districhg.disabled = true; //분산자전환
- }else {
- btn_districhg.disabled = false; //분산자전환
- }
- }else {
- btn_districhg.disabled = false;//분산자전환
- }
- }else if( pamcgubn == "D" ){//2009.01.21 분산자이면 대기자전환 활성화
- btn_waitchg.disabled = true;//대기자전환
- }
- if(grd_hospicelist.row == 0){
- return;
- }
- model.resetInstanceNode("/root/main/hospiceinfo/hospicedetl");
- //model.refresh();
- var iRow = -1;
- iRow = grd_hospicelist.row;
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- if(RowCnt < 1){
- grd_hospicelist.row = 1;
- return;
- }
- model.removenode("/root/send");
- model.makeValue("/root/send/pid", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/pid"));
- model.makeValue("/root/send/indd", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/indd"));
- model.makeValue("/root/send/cretno", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/cretno"));
- model.makeValue("/root/send/cretdd", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/cretdd"));
- model.makeValue("/root/send/crettm", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/crettm"));
- //model.makeValue("/root/send/reqformrecseq", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/reqformrecseq"));
- model.makeValue("/root/send/pamcgubun", model.getValue("/root/temp/pamcgubun"));
- model.makeValue("/root/send/reqdeptcd", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/reqdeptcd"));
- model.makeValue("/root/send/reqdd", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/reqdd"));
- model.makeValue("/root/send/refflag", model.getValue("/root/temp/refflag"));
- model.makeValue("/root/send/refnm", model.getValue("/root/temp/refnm"));
- model.makeValue("/root/send/refflag", "1");//상위 진단 조회
- submit("TRMNH02905", false);
- // if(submit("TRMNH02902")){
- submit("TRMNH02902", false);
- var status = model.getValue("/root/main/hospiceinfo/hospicedetl/status");
- var reqdd = model.getValue("/root/main/hospiceinfo/hospicedetl/reqdd");
- var waitdd = model.getValue("/root/main/hospiceinfo/hospicedetl/waitdd");
- var inrmdd = model.getValue("/root/main/hospiceinfo/hospicedetl/inrmdd");
- var enddd = model.getValue("/root/main/hospiceinfo/hospicedetl/enddd");
- var waitenddd = model.getValue("/root/main/hospiceinfo/hospicedetl/waitenddd");
- var dschdd = model.getValue("/root/main/hospiceinfo/hospicedetl/dschdd");
- //종교 가톨릭시 세레명 활성화
- if ( cmb_religncd.value == "1" ){
- ipt_baptnm.disabled = false;
- }else{
- ipt_baptnm.disabled = true;
- }
- //의뢰사유 기타선택시 기타사유명입력칸활성화
- if ( cmb_reqresnflag.value == "99" ){
- ipt_reqresnetc.disabled = false;
- }else{
- ipt_reqresnetc.disabled = true;
- }
- //관리현황 의뢰와 대기시만 활성화
- if (( pamcgubn == "R" )||( pamcgubn == "W" )){
- cmb_mngtprescd.disabled = false;
- }else{
- cmb_mngtprescd.disabled = true;
- }
- //본원타원
- if( cmb_reqtypeflag.value == "01" ){//본원
- cmb_reqhospnm.visible = false;//타 병원 리스트
- cmb_reqdeptnm.visible = true;//본원 진료과 리스트
- model.removenode("/root/send");
- model.makeValue("/root/send/orddeptcd", model.getValue("/root/main/hospiceinfo/hospicedetl/reqtypespec"));
- submit("TRMNH02903");
- cmb_drlist.visible = true;//의사리스트
- opt_reqtypespec.visible = false;
- }else if( cmb_reqtypeflag.value == "02"){
- cmb_reqhospnm.visible = true;
- cmb_reqdeptnm.visible = false;//본원 진료과 리스트
- cmb_drlist.visible = false;//의사리스트
- opt_reqtypespec.visible = false;
- }else if( cmb_reqtypeflag.value == "03"){
- cmb_reqhospnm.visible = false;//타 병원 리스트
- cmb_reqdeptnm.visible = true;//본원 진료과 리스트
- model.removenode("/root/send");
- model.makeValue("/root/send/orddeptcd", model.getValue("/root/main/hospiceinfo/hospicedetl/reqhospnm"));
- submit("TRMNH02903");
- cmb_drlist.visible = true;//의사리스트
- opt_reqtypespec.visible = false;
- }
- var diagcd1 = model.getValue("/root/main/hospiceinfo/hospicedetl/diagcd1");
- model.removenode("/root/send");
- model.makeValue("/root/send/diagcd1", diagcd1);
- model.makeValue("/root/send/refflag", "2");//하위 진단 조회
- submit("TRMNH02906", false);
- cmb_calcscoryn.disabled = true;//수가대상
- if( pamcgubn == "R" ) {//의뢰
- if(ipt_intvdd.value == ""){//면담일
- ipt_intvdd.value = getCurrentDate();
- }
- ipt_inrmdd.disabled = true;//입실일
- ipt_waitdd.disabled = false;//대기전환일
- ipt_waitenddd.disabled = true;//대기 종료일
- cmb_waitendresn.disabled = true;//대기 종료 사유
- ipt_waitendresnetc.disabled = true;//기타 사유
- ipt_enddd.disabled = true;//서비스 종료
- model.setValue("/root/main/hospiceinfo/hospicedetl/enddd","");
- cmb_exptresn.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/exptresn","");
- ipt_exptresnetc.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/exptresnetc","");
- ipt_dschdd.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschdd","");
- cmb_dschresn.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschresn","");
- ipt_dschresnetc.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschresnetc","");
- cmb_dschtype.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschtype","");
- cmb_dschlnk.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschlnk","");
- ipt_dschlnketc.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschlnketc","");
- }else if( pamcgubn == "W" ) {//대기
-
- /*
- if( nsgbn == "외래" ) {
- ipt_waitenddd.disabled = false;//대기종료일
- cmb_waitendresn.disabled = false;
- if(cmb_waitendresn.value == "99"){//대기종료사유
- ipt_waitendresnetc.disabled = false;
- }else{
- ipt_waitendresnetc.value = "";
- ipt_waitendresnetc.disabled = true;
- }
-
- ipt_enddd.disabled = true;//서비스 종료일
- cmb_exptresn.disabled = true;
- ipt_exptresnetc.disabled = true;
- }else if( nsgbn == "입원" ) {
-
- ipt_waitenddd.disabled = false;
- cmb_waitendresn.disabled = false;
- if(cmb_waitendresn.value == "99"){//대기종료사유
- ipt_waitendresnetc.disabled = true;
- }else{
- ipt_waitendresnetc.disabled = false;
- }
-
- ipt_enddd.disabled = false;//서비스 종료일
- cmb_exptresn.disabled = false;
- if(cmb_exptresn.value == "99"){
- ipt_exptresnetc.disabled = false;
- }else{
- ipt_exptresnetc.disabled = true;
- }
- }
- */
-
- ipt_waitenddd.disabled = true;//대기종료일
- cmb_waitendresn.disabled = true;
- ipt_waitendresnetc.disabled = true;
-
- ipt_enddd.disabled = false;//서비스 종료일
- cmb_exptresn.disabled = false;
- if(cmb_exptresn.value == "99"){
- ipt_exptresnetc.disabled = false;
- }else{
- ipt_exptresnetc.disabled = true;
- }
-
- if( model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/inrmflag") == "Y" ) {//호스피스 병동 입원
- ipt_inrmdd.disabled = false;
- }else {
- ipt_inrmdd.disabled = true;
- }
- ipt_dschdd.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschdd","");
- cmb_dschresn.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschresn","");
- ipt_dschresnetc.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschresnetc","");
- cmb_dschtype.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschtype","");
- cmb_dschlnk.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschlnk","");
- ipt_dschlnketc.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschlnketc","");
- }else if( pamcgubn == "D" ) {//분산 -> 자문
- ipt_waitenddd.disabled = false;
- cmb_waitendresn.disabled = false;
- if(cmb_waitendresn.value == "99"){
- ipt_waitendresnetc.disabled = false;
- }else{
- ipt_waitendresnetc.disabled = true;
- }
-
-
- ipt_enddd.disabled = true;//서비스 종료일
- cmb_exptresn.disabled = true;
- ipt_exptresnetc.disabled = true;
- /*
- if(cmb_exptresn.value == "99"){
- ipt_exptresnetc.disabled = false;
- }else{
- ipt_exptresnetc.disabled = true;
- }
- */
- if( model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/inrmflag") == "Y" ) {//호스피스 병동 입원
- ipt_inrmdd.disabled = false;
- }else {
- ipt_inrmdd.disabled = true;
- }
- ipt_dschdd.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschdd","");
- cmb_dschresn.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschresn","");
- ipt_dschresnetc.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschresnetc","");
- cmb_dschtype.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschtype","");
- cmb_dschlnk.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschlnk","");
- ipt_dschlnketc.disabled = true;
- model.setValue("/root/main/hospiceinfo/hospicedetl/dschlnketc","");
-
- btn_waitchg.disabled = false;//대기자로 전환
- }else if( pamcgubn == "I" ) {//입실
- cmb_waitendresn.disabled = true;
- ipt_waitenddd.disabled = true;
- ipt_waitendresnetc.disabled = true;
- ipt_enddd.disabled = true;//서비스 종료일
- cmb_exptresn.disabled = true;
- ipt_exptresnetc.disabled = true;
- ipt_dschdd.disabled = false;//퇴실일
- cmb_dschresn.disabled = false;//퇴실사유
- cmb_dschtype.disabled = false;//퇴실형태
- cmb_dschlnk.disabled = false;//퇴실 후 연계
- cmb_calcscoryn.disabled = false;//수가대상
-
- if(model.getValue("/root/main/hospiceinfo/hospicedetl/status") == 'D'){
- btn_waitchg.disabled = true;//대기자로 전환
- }else{
- btn_waitchg.disabled = false;//대기자로 전환
- }
- }else if( pamcgubn == "L" ) {//퇴실
- cmb_waitendresn.disabled = true;
- ipt_waitenddd.disabled = true;//대기 종료
- ipt_waitendresnetc.disabled = true;
- ipt_enddd.disabled = true;//서비스 종료일
- cmb_exptresn.disabled = true;
- ipt_exptresnetc.disabled = true;
- }else if( pamcgubn == "O" ) {//서비스종료
- cmb_waitendresn.disabled = true;
- ipt_waitenddd.disabled = true;//대기 종료
- ipt_waitendresnetc.disabled = true;
- }else if( pamcgubn == "P" ) {//대기종료
- ipt_waitenddd.disabled = false;//대기종료일
- cmb_waitendresn.disabled = false;
- if(cmb_waitendresn.value == "99"){//대기종료사유
- ipt_waitendresnetc.disabled = false;
- }else{
- ipt_waitendresnetc.value = "";
- ipt_waitendresnetc.disabled = true;
- }
- ipt_enddd.disabled = true;//서비스 종료일
- cmb_exptresn.disabled = true;
- ipt_exptresnetc.disabled = true;
- }
-
- if(cmb_exptresn.value == "99") {
- ipt_exptresnetc.disabled = false;
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.04.10
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 로드시
- * @param : 7일
- * @return : 현재날짜에서 -7일한 날짜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function getAddDay(addend){
- var backDate ="";
- var Now = new Date();
- // (오늘날짜의 Time - (하루 * 7))
- Now.setTime(Now.getTime()-(86400000*addend));
- NowYear = Now.getYear();// 년
- NowMonth = Now.getMonth()+1;// 월
- NowDay = Now.getDate(); // 일
- backDate += NowYear ; //년도
- if (NowMonth < 10 ) backDate += "0" + NowMonth ;
- else backDate += (Now.getMonth() + 1);
- if (NowDay < 10 ) backDate += "0" + NowDay ;
- else backDate += (Now.getDate());
- return backDate ;
- }
- /**
- * @group :
- * @ver : 2007.04.10
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호스피스 환자관리 저장
- * @param : endSaveStat(20091009 dhkim 종료버튼별저장구분추가)- true이면 해당 메세지 없이 저장한다.
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- var xDetlPath = '/root/main/hospiceinfo/hospicedetl';
- function fSave(waitstat, endSaveStat){
- var calcscoryn = model.getValue("/root/main/hospiceinfo/hospicedetl/calcscoryn_tmp");
- var dschdd = model.getValue("/root/main/hospiceinfo/hospicedetl/dschdd");
- var pamcgubn = model.getValue("/root/temp/pamcgubun");//구분
- if ( calcscoryn == "Y" && dschdd != "" ) {
- messageBox('수가대상 적용환자입니다.', 'E');
- return ;
- }
-
- //2017.08.21 자문형 호스피스 서비스 추가
- if(waitstat == "D"){
- model.setValue("/root/main/hospiceinfo/hospicedetl/status", "E");
- }
-
- //자문에서 대기자 전환 시 :둘다 WAITDD 현재일자 , status 대기자 D, 자문형 : E
- iRow = grd_hospicelist.row;
- var rowChk = model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/status");
-
- /*
- if(pamcgubn == 'I'){
- if(waitstat == "W"){
- if(rowChk == "E"){
- model.setValue("/root/main/hospiceinfo/hospicedetl/status", "D");
- }
- }
- }
- */
- if(waitstat == "W"){
- if(rowChk == "E"){
- model.setValue("/root/main/hospiceinfo/hospicedetl/status", "D");
- }
- }
-
- //
- if(fIsValid(waitstat, endSaveStat)){
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.copyNode("/root/send", xDetlPath);
- if( submit("TXMNH02903") ){
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- if(RowCnt < 1) return;
- }
- fSearch();
- }
- }
- /**
- * @group :
- * @ver : 2007.11.19
- * @by : dhkim, 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @param : saveWaitStat(환자관리내역저장구분 : S, 대기자전환구분 : W)
- * @param : endSaveStat(20091009 dhkim 종료버튼별저장구분추가)- true이면 해당 메세지 없이 저장한다.
- * @return :
- * @desc : 호스피스 환자관리내역을 저장하기 전 유효성 체크를 실행한다.
- * R (의뢰) : 면담일이(intvdd)입력된상태
- * W (대기) : 대기자로 저장 버튼 클릭해서 들어온 경우 (의뢰컨설트로 들어온 환자인경우나 외래입원예약을 하여 입원해 있는 환자의 경우)
- * I (입실) : 입실일자(inrmdd)가 입력되어있는 상태, 실제입원되어 있는 환자중 호스피스 병동(병동코드 : '3050136000')이 아닐때 입실일자가 입력되면 경고메세지를 출력한다.
- * L (퇴실) : 퇴실일이 입력되고, 퇴실사유가 입력된 상태..
- * O (서비스종료) : 서비스종료가 입력되고 서비스종료일이 입력된 상태...
- * P (대기종료) : 대기종료가 입력되고 대기종료일이 입력된 상태...
- *
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fIsValid(saveWaitStat, endSaveStat){
- var status = model.getValue(xDetlPath + "/status"); //상태(컨설트의뢰O, 입원예약만I, 입원예약해서 재원S)
- var enddd = model.getValue(xDetlPath + "/enddd"); //서비스종료일
- var waitdd = model.getValue(xDetlPath + "/waitdd"); //대기일
- var waitdd2 = model.getValue(xDetlPath + "/waitdd2"); //대기일
- var exptresn = model.getValue(xDetlPath + "/exptresn"); //서비스종료사유
- var waitenddd = model.getValue(xDetlPath + "/waitenddd"); //대기종료일
- var waitendresn = model.getValue(xDetlPath + "/waitendresn"); //대기종료사유
- var dschdd = model.getValue(xDetlPath + "/dschdd"); //퇴실일
- var dschresn = model.getValue(xDetlPath + "/dschresn"); //퇴실사유
- var inrmdd = model.getValue(xDetlPath + "/inrmdd"); //입실일자
- var inrmtm = model.getValue(xDetlPath + "/inrmtm"); //입실시간
- if((inrmdd == "")||(inrmdd == null)){
- model.setValue(xDetlPath + "/inrmtm", ""); //입실시간
- }else{
- if((inrmtm == "")||(inrmtm == null)){
- model.setValue(xDetlPath + "/inrmtm", getCurrentTime().substr(0,4)); //입실시간
- }
- }
- var intvdd = model.getValue(xDetlPath + "/intvdd"); //면담일자
- var waitdd = model.getValue(xDetlPath + "/waitdd"); //대기일자
- var wardcd = model.getValue(xDetlPath + "/wardcd"); //병실코드
- //var waitstat = model.getValue(xDetlPath + "/waitstat"); //대기상태(의뢰R, 대기W, 입실I, 퇴실L, 서비스종료O,대기종료P)
- if(model.getValue("/root/main/hospiceinfo/hospicedetl/pid") == ""){
- messageBox("저장할 환자를 ","C002");
- return;
- }
- //대기자저장
- if(saveWaitStat == "W"){
- if( model.getValue("/root/temp/pamcgubun") == "I" ) {//입실에서 대기자전환일때
- if( messageBox("대기자로 전환하시겠습니까?","Q" ) != 6) return;
- model.setValue(xDetlPath + "/waitstat","IW");
- }else if( model.getValue("/root/temp/pamcgubun") == "D" ) {//분산에서 대기자전환일때
- if( messageBox("대기자로 전환하시겠습니까?","Q" ) != 6) return;
- model.setValue(xDetlPath + "/waitstat","W");
- model.setValue(xDetlPath + "/waitdd", getCurrentDate());
- }else {//의뢰에서 대기자전환
- if( waitdd != "" ) {
- messageBox("대기자인 환자입니다.","E");
- return;
- }
- if( messageBox("대기자로 전환하시겠습니까?","Q" ) != 6) return;
- model.setValue(xDetlPath + "/waitstat", "W");
- model.setValue(xDetlPath + "/waitdd", getCurrentDate());
- model.setValue(xDetlPath + "/inrmdd", "");
- model.setValue(xDetlPath + "/inrmtm", "");
- model.setValue(xDetlPath + "/enddd", "");
- model.setValue(xDetlPath + "/exptresn", "");
- model.setValue(xDetlPath + "/exptresnetc", "");
- model.setValue(xDetlPath + "/waitenddd", "");
- model.setValue(xDetlPath + "/waitendresn", "");
- model.setValue(xDetlPath + "/waitendresnetc", "");
- model.setValue(xDetlPath + "/dschdd", "");
- model.setValue(xDetlPath + "/dschtype", "");
- model.setValue(xDetlPath + "/dschresn", "");
- model.setValue(xDetlPath + "/dschresnetc", "");
- model.setValue(xDetlPath + "/dschlnk", "");
- model.setValue(xDetlPath + "/dschlnketc", "");
- model.setValue(xDetlPath + "/agonaldd", "");
- model.setValue(xDetlPath + "/agonalplcecd", "");
- }
- }else if(saveWaitStat == "S"){//환자관리내역저장구분 //saveWaitStat가 W(대기)상태 빼고는 전부 S임....(면담, 입원, 종결 , 퇴실)
-
- //20091009 dhkim 저장구분메세지 변경 (대기종료, 서비스종료, 퇴실등록 버튼을 이용하여 들어올 경우 메세지 제외)
- if(endSaveStat == false){
- if(messageBox("","Q002") != 6) return;
- }
- //면담일자가 입력되면 waitstat는 R(의뢰)
- if(intvdd != ""){
- model.setValue(xDetlPath + "/waitstat", "R");
- }
- //대기일자가 입력되면 waitstat는 W(대기)
- if(waitdd != ""){
- model.setValue(xDetlPath + "/waitstat", "W");
- }
- //입실일자 있으면 waitstat는 I(입실)
- if(inrmdd == ""){
- model.setValue(xDetlPath + "/inrmdd", "");
- model.setValue(xDetlPath + "/inrmtm", "");
- }else if(inrmdd != ""){
- model.setValue(xDetlPath + "/waitstat","I");
- //실제입원되어 있는 환자중 호스피스 병동(병동코드 : '3050136000')이 아닐때 입실일자가 입력되면 경고메세지를 출력한다.
- //if(wardcd == '3050136000'){
- // model.setValue(xDetlPath + "/waitstat","I");
- //}else{
- // messageBox('호스피스병동에 입원한 환자가 아니므로 입실일을 입력', 'E001');
- // model.setValue(xDetlPath + "/inrmdd", "");
- // model.setValue(xDetlPath + "/inrmtm", "");
- // return;
- //}
- }
- //서비스종료일자 있으면 waitstat는 O(서비스종료)
- if( enddd == "" ){
- model.setValue(xDetlPath + "/exptresn","")
- model.setValue(xDetlPath + "/exptresnetc","")
- }else if( enddd != "" ){
- if( exptresn != "" ){
- if(exptresn == '03'){
- model.setValue(xDetlPath + "/agonaldd", enddd);
- }else{
- model.setValue(xDetlPath + "/agonaldd","")
- model.setValue(xDetlPath + "/agonalplcecd","")
- }
- model.setValue(xDetlPath + "/waitstat","O");
- }
- if(exptresn == ''){
- messageBox("서비스종료사유를 ","C001");
- return false;
- }
- }
- //대기종료일자 있으면 waitstat는 P(대기종료)
- if( waitenddd == "" ){
- model.setValue(xDetlPath + "/waitendresn","")
- model.setValue(xDetlPath + "/waitendresnetc","")
- }else if(waitenddd != ""){
- if(waitendresn!=""){
- if(waitendresn == '04'){
- model.setValue(xDetlPath + "/agonaldd", waitenddd);
- }else{
- model.setValue(xDetlPath + "/agonaldd","")
- model.setValue(xDetlPath + "/agonalplcecd","")
- }
- model.setValue(xDetlPath + "/waitstat","P");
- }
- /*
- if(waitendresn == ''){
- messageBox("대기종료사유를 ","C001");
- return false;
- }
- */
- }
- //퇴실일자 있으면 waitstat는 L(퇴실)
- if(dschdd == ""){
- model.setValue(xDetlPath + "/dschtype","")
- model.setValue(xDetlPath + "/dschresn","")
- model.setValue(xDetlPath + "/dschresnetc","")
- model.setValue(xDetlPath + "/dschlnk","")
- model.setValue(xDetlPath + "/dschlnketc","")
- }else if(dschdd != ""){
- if(dschresn!=""){
- if(dschresn == '02'){
- model.setValue(xDetlPath + "/agonaldd", dschdd);
- }else{
- model.setValue(xDetlPath + "/agonaldd","")
- model.setValue(xDetlPath + "/agonalplcecd","")
- }
- model.setValue(xDetlPath + "/waitstat","L");
- }
- if(dschresn == ''){
- messageBox("퇴실사유를 ","C001");
- return false;
- }
- }
- }
- if( saveWaitStat == "D" ) {//분산전환
- //2017.08.21 자문형 호스피스 서비스 추가
- if( messageBox("자문등록으로 전환하시겠습니까?","Q") != 6 ) return;
- if( model.getValue("/root/temp/pamcgubun") == "I" ) {//입실에서 분산자전환일때
- model.setValue(xDetlPath + "/waitstat","ID");
- }else {//대기에서 분산자전환일때
- model.setValue(xDetlPath + "/waitstat","D");
- model.setValue(xDetlPath + "/waitdd", getCurrentDate());
- model.setValue(xDetlPath + "/inrmdd", "");
- model.setValue(xDetlPath + "/inrmtm", "");
- model.setValue(xDetlPath + "/enddd", "");
- model.setValue(xDetlPath + "/exptresn", "");
- model.setValue(xDetlPath + "/exptresnetc", "");
- model.setValue(xDetlPath + "/waitenddd", "");
- model.setValue(xDetlPath + "/waitendresn", "");
- model.setValue(xDetlPath + "/waitendresnetc", "");
- model.setValue(xDetlPath + "/dschdd", "");
- model.setValue(xDetlPath + "/dschtype", "");
- model.setValue(xDetlPath + "/dschresn", "");
- model.setValue(xDetlPath + "/dschresnetc", "");
- model.setValue(xDetlPath + "/dschlnk", "");
- model.setValue(xDetlPath + "/dschlnketc", "");
- model.setValue(xDetlPath + "/agonaldd", "");
- model.setValue(xDetlPath + "/agonalplcecd", "");
- }
- }
- return true;
- }
- /**
- * @group :
- * @ver : 2007.05.14
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : popup 기록지등록화면을 호출한다.
- * inpt에 등록되어 있는 환자만 (status : O, S) 기록지를 호출 할 수 있다.
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fhospice_popmenu(){
- var hngnm = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/hngnm");
- //if(model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/status") == "I"){
- // messageBox(hngnm +" 환자는 입실환자가 아니므로 기록지를 열 수","I004");
- // return;
- //}//else if(model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/stat") == "R" ){
- // messageBox(hngnm +" 환자는 대기(입실)환자가 아니므로 기록지를 열 수","I004");
- // return;
- // }
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- if(RowCnt < 1){
- grd_hospicelist.row = 1;
- return;
- }
- //호스피스 기록지를 띄울때 pid, cretdt가 필요함...
- setParameter("pid", model.getValue("/root/main/hospice/hospicelist"+"["+(grd_hospicelist.row)+"]/pid")); //환자번호
- setParameter("cretdd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/cretdd")); //생성일자
- setParameter("crettm", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/crettm")); //생성시간
- setParameter("reqdeptcd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/reqdeptcd")); //의뢰과
- setParameter("reqdd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/reqdd"));//의뢰일
- setParameter("wardcd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/wardcd"));//
-
-
- //사용자 테스트 버젼
- //if(model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/reqdd") > currentdate){
- if(model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/inrmdd") > '20160726'){
- modal("SMMNH01501",1,50,50); //호스피스기록지
- }else{
- modal("SMMNH01500",1,50,50); //호스피스기록지
- }
-
- }
- /**
- * @group :
- * @ver : 2009.05.25
- * @by : K. J. M
- * @-------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 상태복원
- * @param :
- * @return :
- * @-------------------------------------------------------------------------------------
- */
- function fStatRecvr() {
- var chkcnfm = "false";
- var pamcgubun = model.getValue("/root/temp/pamcgubun");//조회구분
- var pid = model.getValue("/root/main/hospiceinfo/hospicedetl/pid");
- var cretdd = model.getValue("/root/main/hospiceinfo/hospicedetl/cretdd");
- var crettm = model.getValue("/root/main/hospiceinfo/hospicedetl/crettm");
- var status = model.getValue("/root/main/hospiceinfo/hospicedetl/status");
- if( pid == "" ) {
- pid = model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/pid");
- cretdd = model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/cretdd");
- crettm = model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/crettm");
- status = model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/status");
- }
- model.removenode("/root/send");
- model.makeValue("/root/send/reqdata/pid", pid);
- model.makeValue("/root/send/reqdata/cretdd", cretdd);
- model.makeValue("/root/send/reqdata/crettm", crettm);
- model.makeValue("/root/send/reqdata/pamcgubun", pamcgubun);
- switch(pamcgubun) {
- case "L" : //퇴실
- if( messageBox("입실자로 대상자를 이동하시겠습니까?","Q000") != 6 ) return;
- chkcnfm = "true";
- break;
- case "O" : //서비스종료
- if( status == "O"||status == "S"||status == "I" ) {
- if( messageBox("대기자로 대상자를 이동하시겠습니까?","Q000") != 6 ) return;
- chkcnfm = "true";
- }else {
- if( messageBox("자문형으로 대상자를 이동하시겠습니까?","Q000") != 6 ) return;
- chkcnfm = "true";
- }
- break;
- case "P" : //대기종료
- if(status == 'E'){
- if( messageBox("자문형으로 대상자를 이동하시겠습니까?","Q000") != 6 ) return;
- }else{
- if( messageBox("대기자로 대상자를 이동하시겠습니까?","Q000") != 6 ) return;
- }
- chkcnfm = "true";
- break;
- }
- if( chkcnfm == "true" ) {
- submit("TXMNH02901", false);
- fSearch();
- }
- }
- /**
- * @group :
- * @ver : 2007.05.14
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자구분에따라 인풋박스활성화 여부
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fPamcChange() {
- if (model.getValue("/root/temp/pamcgubun") == "R") { //의뢰
- grd_hospicelist.colhidden(1) = false; //의뢰경로
- grd_hospicelist.colhidden(3) = false; //등록번호
- grd_hospicelist.colhidden(4) = false; //환자명
- grd_hospicelist.colhidden(5) = false; //S/A
- grd_hospicelist.colhidden(6) = false; //진단명
- grd_hospicelist.colhidden(7) = false; //의뢰일
- grd_hospicelist.colhidden(8) = false; //의뢰형태
- grd_hospicelist.colhidden(9) = false; //의뢰과의뢰병원
- grd_hospicelist.colhidden(10) = false; //의뢰의사
- grd_hospicelist.colhidden(11) = false; //면담일
- grd_hospicelist.colhidden(12) = false; //의뢰사유
- grd_hospicelist.colhidden(13) = false; //관리현황
- grd_hospicelist.colhidden(14) = true; //대기전환일
- grd_hospicelist.colhidden(15) = true; //분산전환일
- grd_hospicelist.colhidden(16) = true; //현병실
- grd_hospicelist.colhidden(17) = true; //입실일자
- grd_hospicelist.colhidden(18) = true; //서비스종료일
- grd_hospicelist.colhidden(19) = true; //서비스종료사유
- grd_hospicelist.colhidden(20) = true; //대기종료일
- grd_hospicelist.colhidden(21) = true; //대기종료사유
- grd_hospicelist.colhidden(22) = true; //퇴실일
- grd_hospicelist.colhidden(23) = true; //퇴실형태
- grd_hospicelist.colhidden(24) = true; //퇴실사유
- grd_hospicelist.colhidden(25) = true; //퇴실후연계
- grd_hospicelist.colhidden(26) = true; //입원일자
- grd_hospicelist.colhidden(27) = true; //생성번호
- grd_hospicelist.colhidden(28) = true; //기관코드
- grd_hospicelist.colhidden(29) = true; //생성일자
- grd_hospicelist.colhidden(30) = true; //생성시간
- grd_hospicelist.colhidden(31) = true; //환자구분
- grd_hospicelist.colhidden(32) = true; //입실경로
- grd_hospicelist.colhidden(33) = true; //컨설트입원예약키
- grd_hospicelist.colhidden(34) = true; //주민번호
- grd_hospicelist.colhidden(35) = false; //사망여부
- grd_hospicelist.colhidden(36) = true; //사망일시
- grd_hospicelist.colhidden(37) = true; //의뢰과
- grd_hospicelist.colhidden(38) = true; //주치의ID
- grd_hospicelist.colhidden(39) = true; //의뢰형태
- grd_hospicelist.colhidden(40) = true; //병동코드
- grd_hospicelist.colhidden(41) = true; //상위진단코드
- grd_hospicelist.colhidden(42) = true; //하위진단코드
- grd_hospicelist.colhidden(43) = true; //입실여부
- btn_recvr.disabled = true; //복원버튼
- caption5.visible = false; // 조회기간
- ipt_fbrthdd.visible = false;
- caption2.visible = false;
- ipt_lbrthdd.visible = false;
- caption21.value = "대기/분산전환일";
- btn_districhg.disabled = true;//분산자전환
- btn_waitchg.disabled = false;//대기자전환
- lb_resncd.visible = false; //제외사유
- cmb_resncd.visible = false;
- ipt_inrmdd.disabled = true;
- ipt_enddd.disabled = true; //서비스종료일
- cmb_exptresn.disabled = true; // 서비스종료사유
- }else if (model.getValue("/root/temp/pamcgubun") == "W") { //대기
- var nsgbn = model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/nsgbn");//의뢰경로
- grd_hospicelist.colhidden(1) = false; //의뢰경로
- grd_hospicelist.colhidden(3) = false; //등록번호
- grd_hospicelist.colhidden(4) = false; //환자명
- grd_hospicelist.colhidden(5) = false; //S/A
- grd_hospicelist.colhidden(6) = false; //진단명
- grd_hospicelist.colhidden(7) = false; //의뢰일
- grd_hospicelist.colhidden(8) = false; //의뢰형태
- grd_hospicelist.colhidden(9) = false; //의뢰과의뢰병원
- grd_hospicelist.colhidden(10) = false; //의뢰의사
- grd_hospicelist.colhidden(11) = false; //면담일
- grd_hospicelist.colhidden(12) = false; //의뢰사유
- grd_hospicelist.colhidden(13) = false; //관리현황
- grd_hospicelist.colhidden(14) = false; //대기전환일
- grd_hospicelist.colhidden(15) = true; //분산전환일
- grd_hospicelist.colhidden(16) = false; //현병실
- grd_hospicelist.colhidden(17) = true; //입실일자
- grd_hospicelist.colhidden(18) = true; //서비스종료일
- grd_hospicelist.colhidden(19) = true; //서비스종료사유
- grd_hospicelist.colhidden(20) = true; //대기종료일
- grd_hospicelist.colhidden(21) = true; //대기종료사유
- grd_hospicelist.colhidden(22) = true; //퇴실일
- grd_hospicelist.colhidden(23) = true; //퇴실형태
- grd_hospicelist.colhidden(24) = true; //퇴실사유
- grd_hospicelist.colhidden(25) = true; //퇴실후연계
- grd_hospicelist.colhidden(26) = true; //입원일자
- grd_hospicelist.colhidden(27) = true; //생성번호
- grd_hospicelist.colhidden(28) = true; //기관코드
- grd_hospicelist.colhidden(29) = true; //생성일자
- grd_hospicelist.colhidden(30) = true; //생성시간
- grd_hospicelist.colhidden(31) = true; //환자구분
- grd_hospicelist.colhidden(32) = true; //입실경로
- grd_hospicelist.colhidden(33) = true; //컨설트입원예약키
- grd_hospicelist.colhidden(34) = true; //주민번호
- grd_hospicelist.colhidden(35) = false; //사망여부
- grd_hospicelist.colhidden(36) = true; //사망일시
- grd_hospicelist.colhidden(37) = true; //의뢰과
- grd_hospicelist.colhidden(38) = true; //주치의ID
- grd_hospicelist.colhidden(39) = true; //의뢰형태
- grd_hospicelist.colhidden(40) = true; //병동코드
- grd_hospicelist.colhidden(41) = true; //상위진단코드
- grd_hospicelist.colhidden(42) = true; //하위진단코드
- grd_hospicelist.colhidden(43) = true; //입실여부
- btn_recvr.disabled = true; //복원버튼
- caption5.visible = false; // 조회기간
- ipt_fbrthdd.visible = false;
- caption2.visible = false;
- ipt_lbrthdd.visible = false;
- lb_resncd.visible = false; //제외사유
- caption21.value = "대기전환일";
- cmb_resncd.visible = false;
- ipt_inrmdd.disabled = false;
- btn_districhg.disabled = true;//분산자전환
- btn_waitchg.disabled = true;//대기자전환
- if( nsgbn == "입원" ) {//입원일경우 서비스 종료
- ipt_waitenddd.disabled = true;//대기종료일
- cmb_waitendresn.disabled = true//대기종료사유
- ipt_enddd.disabled = false; //서비스종료일
- cmb_exptresn.disabled = false; // 서비스종료사유
- }else {
- ipt_waitenddd.disabled = false;//대기종료일
- cmb_waitendresn.disabled = false//대기종료사유
- ipt_enddd.disabled = true; //서비스종료일
- cmb_exptresn.disabled = true; // 서비스종료사유
- }
- }else if (model.getValue("/root/temp/pamcgubun") == "D") { //분산 //20170821 - 자문형 호스피스 개편에 따른 분산->자문으로 변경
- var nsgbn = model.getValue("/root/main/hospice/hospicelist[" + grd_hospicelist.row + "]/nsgbn");//의뢰경로
- grd_hospicelist.colhidden(1) = false; //의뢰경로
- grd_hospicelist.colhidden(3) = false; //등록번호
- grd_hospicelist.colhidden(4) = false; //환자명
- grd_hospicelist.colhidden(5) = false; //S/A
- grd_hospicelist.colhidden(6) = false; //진단명
- grd_hospicelist.colhidden(7) = false; //의뢰일
- grd_hospicelist.colhidden(8) = false; //의뢰형태
- grd_hospicelist.colhidden(9) = false; //의뢰과의뢰병원
- grd_hospicelist.colhidden(10) = false; //의뢰의사
- grd_hospicelist.colhidden(11) = false; //면담일
- grd_hospicelist.colhidden(12) = false; //의뢰사유
- grd_hospicelist.colhidden(13) = false; //관리현황
- grd_hospicelist.colhidden(14) = true; //대기전환일
- grd_hospicelist.colhidden(15) = false; //분산전환일
- grd_hospicelist.colhidden(16) = false; //현병실
- grd_hospicelist.colhidden(17) = true; //입실일자
- grd_hospicelist.colhidden(18) = true; //서비스종료일
- grd_hospicelist.colhidden(19) = true; //서비스종료사유
- grd_hospicelist.colhidden(20) = true; //대기종료일
- grd_hospicelist.colhidden(21) = true; //대기종료사유
- grd_hospicelist.colhidden(22) = true; //퇴실일
- grd_hospicelist.colhidden(23) = true; //퇴실형태
- grd_hospicelist.colhidden(24) = true; //퇴실사유
- grd_hospicelist.colhidden(25) = true; //퇴실후연계
- grd_hospicelist.colhidden(26) = true; //입원일자
- grd_hospicelist.colhidden(27) = true; //생성번호
- grd_hospicelist.colhidden(28) = true; //기관코드
- grd_hospicelist.colhidden(29) = true; //생성일자
- grd_hospicelist.colhidden(30) = true; //생성시간
- grd_hospicelist.colhidden(31) = true; //환자구분
- grd_hospicelist.colhidden(32) = true; //입실경로
- grd_hospicelist.colhidden(33) = true; //컨설트입원예약키
- grd_hospicelist.colhidden(34) = true; //주민번호
- grd_hospicelist.colhidden(35) = false; //사망여부
- grd_hospicelist.colhidden(36) = true; //사망일시
- grd_hospicelist.colhidden(37) = true; //의뢰과
- grd_hospicelist.colhidden(38) = true; //주치의ID
- grd_hospicelist.colhidden(39) = true; //의뢰형태
- grd_hospicelist.colhidden(40) = true; //병동코드
- grd_hospicelist.colhidden(41) = true; //상위진단코드
- grd_hospicelist.colhidden(42) = true; //하위진단코드
- grd_hospicelist.colhidden(43) = true; //입실여부
- btn_recvr.disabled = true; //복원버튼
- caption5.visible = false; // 조회기간
- ipt_fbrthdd.visible = false;
- caption2.visible = false;
- ipt_lbrthdd.visible = false;
- caption21.value = "분산전환일";
- lb_resncd.visible = false; //제외사유
- cmb_resncd.visible = false;
- ipt_inrmdd.disabled = false;
- ipt_enddd.disabled = false; //서비스종료일
- cmb_exptresn.disabled = false; //서비스종료사유
- btn_districhg.disabled = true;//분산자전환 //자문등록 활성화
- btn_waitchg.disabled = true;//대기자전환
- btn_waitend.disabled = false;//자문종료
- }else if (model.getValue("/root/temp/pamcgubun") == "I") {//입실
- grd_hospicelist.colhidden(1) = false; //의뢰경로
- grd_hospicelist.colhidden(3) = false; //등록번호
- grd_hospicelist.colhidden(4) = false; //환자명
- grd_hospicelist.colhidden(5) = false; //S/A
- grd_hospicelist.colhidden(6) = false; //진단명
- grd_hospicelist.colhidden(7) = false; //의뢰일
- grd_hospicelist.colhidden(8) = false; //의뢰형태
- grd_hospicelist.colhidden(9) = false; //의뢰과의뢰병원
- grd_hospicelist.colhidden(10) = false; //의뢰의사
- grd_hospicelist.colhidden(11) = false; //면담일
- grd_hospicelist.colhidden(12) = false; //의뢰사유
- grd_hospicelist.colhidden(13) = false; //관리현황
- grd_hospicelist.colhidden(14) = true; //대기전환일
- grd_hospicelist.colhidden(15) = true; //분산전환일
- grd_hospicelist.colhidden(16) = false; //현병실
- grd_hospicelist.colhidden(17) = false; //입실일자
- grd_hospicelist.colhidden(18) = true; //서비스종료일
- grd_hospicelist.colhidden(19) = true; //서비스종료사유
- grd_hospicelist.colhidden(20) = true; //대기종료일
- grd_hospicelist.colhidden(21) = true; //대기종료사유
- grd_hospicelist.colhidden(22) = true; //퇴실일
- grd_hospicelist.colhidden(23) = true; //퇴실형태
- grd_hospicelist.colhidden(24) = true; //퇴실사유
- grd_hospicelist.colhidden(25) = true; //퇴실후연계
- grd_hospicelist.colhidden(26) = true; //입원일자
- grd_hospicelist.colhidden(27) = true; //생성번호
- grd_hospicelist.colhidden(28) = true; //기관코드
- grd_hospicelist.colhidden(29) = true; //생성일자
- grd_hospicelist.colhidden(30) = true; //생성시간
- grd_hospicelist.colhidden(31) = true; //환자구분
- grd_hospicelist.colhidden(32) = true; //입실경로
- grd_hospicelist.colhidden(33) = true; //컨설트입원예약키
- grd_hospicelist.colhidden(34) = true; //주민번호
- grd_hospicelist.colhidden(35) = false; //사망여부
- grd_hospicelist.colhidden(36) = true; //사망일시
- grd_hospicelist.colhidden(37) = true; //의뢰과
- grd_hospicelist.colhidden(38) = true; //주치의ID
- grd_hospicelist.colhidden(39) = true; //의뢰형태
- grd_hospicelist.colhidden(40) = true; //병동코드
- grd_hospicelist.colhidden(41) = true; //상위진단코드
- grd_hospicelist.colhidden(42) = true; //하위진단코드
- grd_hospicelist.colhidden(43) = true; //입실여부
- btn_recvr.disabled = true; //복원버튼
- caption5.visible = false; // 조회기간
- ipt_fbrthdd.visible = false;
- caption2.visible = false;
- ipt_lbrthdd.visible = false;
- caption21.value = "대기전환일";
- lb_resncd.visible = false; //제외사유
- cmb_resncd.visible = false;
- ipt_inrmdd.disabled = false;
- ipt_enddd.disabled = true; //서비스종료일
- cmb_exptresn.disabled = true; // 서비스종료사유
- btn_districhg.disabled = false;//분산자전환
- btn_waitchg.disabled = false;//대기자전환
- }else if (model.getValue("/root/temp/pamcgubun") == "L") {//퇴실
- grd_hospicelist.colhidden(1) = false; //의뢰경로
- grd_hospicelist.colhidden(3) = false; //등록번호
- grd_hospicelist.colhidden(4) = false; //환자명
- grd_hospicelist.colhidden(5) = false; //S/A
- grd_hospicelist.colhidden(6) = false; //진단명
- grd_hospicelist.colhidden(7) = false; //의뢰일
- grd_hospicelist.colhidden(8) = false; //의뢰형태
- grd_hospicelist.colhidden(9) = false; //의뢰과의뢰병원
- grd_hospicelist.colhidden(10) = false; //의뢰의사
- grd_hospicelist.colhidden(11) = false; //면담일
- grd_hospicelist.colhidden(12) = false; //의뢰사유
- grd_hospicelist.colhidden(13) = false; //관리현황
- grd_hospicelist.colhidden(14) = true; //대기전환일
- grd_hospicelist.colhidden(15) = true; //분산전환일
- grd_hospicelist.colhidden(16) = true; //현병실
- grd_hospicelist.colhidden(17) = true; //입실일자
- grd_hospicelist.colhidden(18) = true; //서비스종료일
- grd_hospicelist.colhidden(19) = true; //서비스종료사유
- grd_hospicelist.colhidden(20) = true; //대기종료일
- grd_hospicelist.colhidden(21) = true; //대기종료사유
- grd_hospicelist.colhidden(22) = false; //퇴실일
- grd_hospicelist.colhidden(23) = false; //퇴실형태
- grd_hospicelist.colhidden(24) = false; //퇴실사유
- grd_hospicelist.colhidden(25) = false; //퇴실후연계
- grd_hospicelist.colhidden(26) = true; //입원일자
- grd_hospicelist.colhidden(27) = true; //생성번호
- grd_hospicelist.colhidden(28) = true; //기관코드
- grd_hospicelist.colhidden(29) = true; //생성일자
- grd_hospicelist.colhidden(30) = true; //생성시간
- grd_hospicelist.colhidden(31) = true; //환자구분
- grd_hospicelist.colhidden(32) = true; //입실경로
- grd_hospicelist.colhidden(33) = true; //컨설트입원예약키
- grd_hospicelist.colhidden(34) = true; //주민번호
- grd_hospicelist.colhidden(35) = false; //사망여부
- grd_hospicelist.colhidden(36) = true; //사망일시
- grd_hospicelist.colhidden(37) = true; //의뢰과
- grd_hospicelist.colhidden(38) = true; //주치의ID
- grd_hospicelist.colhidden(39) = true; //의뢰형태
- grd_hospicelist.colhidden(40) = true; //병동코드
- grd_hospicelist.colhidden(41) = true; //상위진단코드
- grd_hospicelist.colhidden(42) = true; //하위진단코드
- grd_hospicelist.colhidden(43) = true; //입실여부
- btn_recvr.disabled = false; //복원버튼
- caption5.visible = true; // 조회기간
- ipt_fbrthdd.visible = true;
- caption2.visible = true;
- ipt_lbrthdd.visible = true;
- caption21.value = "대기전환일";
- lb_resncd.visible = false; //제외사유
- cmb_resncd.visible = false;
- ipt_inrmdd.disabled = false;
- ipt_enddd.disabled = true; //서비스종료일
- cmb_exptresn.disabled = true; // 서비스종료사유
- btn_districhg.disabled = true;//분산자전환
- btn_waitchg.disabled = true;//대기자전환
- }else if (model.getValue("/root/temp/pamcgubun") == "O") {//서비스종료
- model.setValue("/root/temp/resncd", "");
- grd_hospicelist.colhidden(1) = false; //의뢰경로
- grd_hospicelist.colhidden(3) = false; //등록번호
- grd_hospicelist.colhidden(4) = false; //환자명
- grd_hospicelist.colhidden(5) = false; //S/A
- grd_hospicelist.colhidden(6) = false; //진단명
- grd_hospicelist.colhidden(7) = false; //의뢰일
- grd_hospicelist.colhidden(8) = false; //의뢰형태
- grd_hospicelist.colhidden(9) = false; //의뢰과의뢰병원
- grd_hospicelist.colhidden(10) = false; //의뢰의사
- grd_hospicelist.colhidden(11) = false; //면담일
- grd_hospicelist.colhidden(12) = false; //의뢰사유
- grd_hospicelist.colhidden(13) = false; //관리현황
- grd_hospicelist.colhidden(14) = true; //대기전환일
- grd_hospicelist.colhidden(15) = true; //분산전환일
- grd_hospicelist.colhidden(16) = true; //현병실
- grd_hospicelist.colhidden(17) = true; //입실일자
- grd_hospicelist.colhidden(18) = false; //서비스종료일
- grd_hospicelist.colhidden(19) = false; //서비스종료사유
- grd_hospicelist.colhidden(20) = true; //대기종료일
- grd_hospicelist.colhidden(21) = true; //대기종료사유
- grd_hospicelist.colhidden(22) = true; //퇴실일
- grd_hospicelist.colhidden(23) = true; //퇴실형태
- grd_hospicelist.colhidden(24) = true; //퇴실사유
- grd_hospicelist.colhidden(25) = true; //퇴실후연계
- grd_hospicelist.colhidden(26) = true; //입원일자
- grd_hospicelist.colhidden(27) = true; //생성번호
- grd_hospicelist.colhidden(28) = true; //기관코드
- grd_hospicelist.colhidden(29) = true; //생성일자
- grd_hospicelist.colhidden(30) = true; //생성시간
- grd_hospicelist.colhidden(31) = true; //환자구분
- grd_hospicelist.colhidden(32) = true; //입실경로
- grd_hospicelist.colhidden(33) = true; //컨설트입원예약키
- grd_hospicelist.colhidden(34) = true; //주민번호
- grd_hospicelist.colhidden(35) = false; //사망여부
- grd_hospicelist.colhidden(36) = true; //사망일시
- grd_hospicelist.colhidden(37) = true; //의뢰과
- grd_hospicelist.colhidden(38) = true; //주치의ID
- grd_hospicelist.colhidden(39) = true; //의뢰형태
- grd_hospicelist.colhidden(40) = true; //병동코드
- grd_hospicelist.colhidden(41) = true; //상위진단코드
- grd_hospicelist.colhidden(42) = true; //하위진단코드
- grd_hospicelist.colhidden(43) = true; //입실여부
- btn_recvr.disabled = false; //복원버튼
- caption5.visible = true; // 조회기간
- ipt_fbrthdd.visible = true;
- caption2.visible = true;
- ipt_lbrthdd.visible = true;
- caption21.value = "대기전환일";
- lb_resncd.visible = true;
- cmb_resncd.visible = true;
- ipt_inrmdd.disabled = true; //입실일
- ipt_enddd.disabled = false; //서비스종료일
- cmb_exptresn.disabled = false; // 서비스종료사유
- btn_districhg.disabled = true;//분산자전환
- btn_waitchg.disabled = true;//대기자전환
- lb_resncd.attribute("text") = "종료사유 : ";
- cmb_resncd.choices.itemset.attribute("nodeset") = "/root/init/M0469detl/M0469"; // 서비스종료사유
- }else if (model.getValue("/root/temp/pamcgubun") == "P") {//대기종료
- model.setValue("/root/temp/resncd", "");
- grd_hospicelist.colhidden(1) = false; //의뢰경로
- grd_hospicelist.colhidden(3) = false; //등록번호
- grd_hospicelist.colhidden(4) = false; //환자명
- grd_hospicelist.colhidden(5) = false; //S/A
- grd_hospicelist.colhidden(6) = false; //진단명
- grd_hospicelist.colhidden(7) = false; //의뢰일
- grd_hospicelist.colhidden(8) = false; //의뢰형태
- grd_hospicelist.colhidden(9) = false; //의뢰과의뢰병원
- grd_hospicelist.colhidden(10) = false; //의뢰의사
- grd_hospicelist.colhidden(11) = false; //면담일
- grd_hospicelist.colhidden(12) = false; //의뢰사유
- grd_hospicelist.colhidden(13) = false; //관리현황
- grd_hospicelist.colhidden(14) = true; //대기전환일
- grd_hospicelist.colhidden(15) = true; //분산전환일
- grd_hospicelist.colhidden(16) = true; //현병실
- grd_hospicelist.colhidden(17) = true; //입실일자
- grd_hospicelist.colhidden(18) = true; //서비스종료일
- grd_hospicelist.colhidden(19) = true; //서비스종료사유
- grd_hospicelist.colhidden(20) = false; //대기종료일
- grd_hospicelist.colhidden(21) = false; //대기종료사유
- grd_hospicelist.colhidden(22) = true; //퇴실일
- grd_hospicelist.colhidden(23) = true; //퇴실형태
- grd_hospicelist.colhidden(24) = true; //퇴실사유
- grd_hospicelist.colhidden(25) = true; //퇴실후연계
- grd_hospicelist.colhidden(26) = true; //입원일자
- grd_hospicelist.colhidden(27) = true; //생성번호
- grd_hospicelist.colhidden(28) = true; //기관코드
- grd_hospicelist.colhidden(29) = true; //생성일자
- grd_hospicelist.colhidden(30) = true; //생성시간
- grd_hospicelist.colhidden(31) = true; //환자구분
- grd_hospicelist.colhidden(32) = true; //입실경로
- grd_hospicelist.colhidden(33) = true; //컨설트입원예약키
- grd_hospicelist.colhidden(34) = true; //주민번호
- grd_hospicelist.colhidden(35) = false; //사망여부
- grd_hospicelist.colhidden(36) = true; //사망일시
- grd_hospicelist.colhidden(37) = true; //의뢰과
- grd_hospicelist.colhidden(38) = true; //주치의ID
- grd_hospicelist.colhidden(39) = true; //의뢰형태
- grd_hospicelist.colhidden(40) = true; //병동코드
- grd_hospicelist.colhidden(41) = true; //상위진단코드
- grd_hospicelist.colhidden(42) = true; //하위진단코드
- grd_hospicelist.colhidden(43) = true; //입실여부
- btn_recvr.disabled = false; //복원버튼
- caption5.visible = true; // 조회기간
- ipt_fbrthdd.visible = true;
- caption2.visible = true;
- ipt_lbrthdd.visible = true;
- caption21.value = "대기전환일";
- lb_resncd.visible = true;
- cmb_resncd.visible = true;
- ipt_inrmdd.disabled = true;
- ipt_enddd.disabled = true; //서비스종료일
- cmb_exptresn.disabled = true; // 서비스종료사유
- btn_districhg.disabled = true;//분산자전환
- btn_waitchg.disabled = true;//대기자전환
- lb_resncd.attribute("text") = "종료사유 : ";
- cmb_resncd.choices.itemset.attribute("nodeset") = "/root/init/M0470detl/M0470"; // 대기종료사유
- }
- //cmb_resncd.value = "";
- //model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.11.19
- * @by : dhkim
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type :
- * @access : public
- * @desc : 제외사유입력시 퇴원사유입력불가처리,
- * 퇴원사유입려시 제외사유입력불가처리
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fIsExptresnDisabledYn(){
- //제외사유
- var exptresn = model.getValue('/root/main/hospiceinfo/hospicedetl/exptresn');
- if(exptresn != ''){
- model.setValue('/root/main/hospiceinfo/hospicedetl/dschtype', '');
- model.setValue('/root/main/hospiceinfo/hospicedetl/enddd', currentdate);
- cmb_dschtype.disabled = false;
- cmb_exptresn.disabled = true;
- }else{
- cmb_dschtype.disabled = true;
- cmb_exptresn.disabled = false;
- }
- //퇴원사유
- var dschtype = model.getValue('/root/main/hospiceinfo/hospicedetl/dschtype');
- if(dschtype != ''){
- model.setValue('/root/main/hospiceinfo/hospicedetl/exptresn', '');
- model.setValue('/root/main/hospiceinfo/hospicedetl/enddd', currentdate);
- cmb_exptresn.disabled = false;
- cmb_dschtype.disabled = true;
- }else{
- cmb_exptresn.disabled = true;
- cmb_dschtype.disabled = false;
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.06.29
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Hospice follow up sheet
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fhospice_follow(){
- var hngnm = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/hngnm");
- if( model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/inrmdd") == ""
- && model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/waitdd") == "" ){
- messageBox(hngnm +" 환자는 대기(입실) 이력이 없으므로 Hospice follow up sheet를 열 수","I004");
- return;
- }
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- if(RowCnt < 1){
- grd_hospicelist.row = 1;
- return;
- }
- var pid = setParameter("pid",model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/pid"));
- var cretno = setParameter("cretno",model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/cretno"));
- var cretdd = setParameter("cretdt",model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/cretdd"));
- var crettm = setParameter("cretdt",model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/crettm"));
- var indd = setParameter("indd",model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/indd"));
- modal("SMMNH01400",1,50,50);
- }
- /*
- * @group :
- * @ver : 2007.06.29
- * @by : 하재륜
- * @---------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사별가족 관리
- * @param :
- * @return :
- * @---------------------------------------------------------------------------
- */
- function fhospice_agonal(){
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- if(RowCnt < 1){
- grd_hospicelist.row = 1;
- return;
- }
- modal("SMMNH00700",1,50,50);
- }
- /*
- * @group :
- * @ver : 2007.06.29
- * @by : 하재륜
- * @----------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자가족 등록
- * @param :
- * @return :
- * @----------------------------------------------------------------------------
- */
- function fhospice_famy(){
- var pid = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/pid");
- var hngnm = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/hngnm");
- var sexage = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/sexage");
- var rrgstno = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/rrgstno");
- var indd = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/indd");
- var cretno = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/cretno");
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- if(RowCnt < 1){
- grd_hospicelist.row = 1;
- return;
- }
- setParameter("pid", pid);
- setParameter("hngnm", hngnm);
- setParameter("sexage", sexage);
- setParameter("rrgstno", rrgstno);
- setParameter("cretno", cretno);
- setParameter("indd", indd);
- modal("SMMNH03500",1,50,50);
- }
- /**
- * @group :
- * @ver : 2007.06.29
- * @by : 하재륜
- * @-----------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호스피스 회신기록
- * @param :
- * @return :
- * @-----------------------------------------------------------------------------
- */
- function fhospice_rec(){
- var hngnm = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/hngnm");
- var status = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/status");
- var reqformrecseq = model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/reqformrecseq");
- if( (status == "B")||(status == "C")||(status == "I")||(status == "S") ){
- messageBox(hngnm +" 환자는 컨설트 의뢰환자가 아니므로 회신기록 화면을 볼 수 ","I004");
- return;
- }
- setParameter("openmode", "reccnstform");
- setParameter("formrecseq", reqformrecseq); //서식기록테이블의 formrecseq(기록순번)
- setParameter("userdeptcd", "3050312000");
- setParameter("btndisableyn", "Y"); //버튼 비활성화 매개변수
- modal("../../../emr/medirecweb/xrw/SSMMR01100_서식로더.xrw", 1, 0, 0 ,"", "", "");
- }
- /**
- * @group :
- * @ver : 2007.07.19
- * @by : 하재륜
- * @-------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호스피스 입실대기 환자수를 조회
- * 입실대기자수를 조회하여 입실대기자수필드에 카운트시킨다.
- * 입실대기자수는 대기자명단중에 입실 병동이 호스피스인 것만 카운트 시킨다.
- * 입실대기자수가 1보다 작으면 입실등록버튼을 비활성화하고 0보다크면 활성화 시킨다.
- * @param :
- * @param :
- * @return :
- * @-------------------------------------------------------------------------------------------------
- */
- function fCntSearch(){
- if((model.getValue("/root/main/cond/fbrthdd")=='')||(model.getValue("/root/main/cond/lbrthdd")=='')){
- messageBox("조회기간의 날짜를 ","C001");
- return;
- }
- model.removenode("/root/send");
- model.makeValue("/root/send/fbrthdd", model.getValue("/root/main/cond/fbrthdd"));
- model.makeValue("/root/send/lbrthdd", model.getValue("/root/main/cond/lbrthdd"));
- model.makeValue("/root/send/pamcgubun", model.getValue("/root/temp/pamcgubun"));
- if(!submit("TRMNH02904")){
- messageBox('조회를', 'E009');
- return false;
- }else{
- model.makeValue("/root/hidden/cnt", model.getValue("/root/temp/htfa/htfacnt/inwaitcnt"));
- opt_cnt.refresh();
- fromdd = model.getValue("/root/main/cond/fbrthdd");
- todd = model.getValue("/root/main/cond/lbrthdd");
- var cnt = opt_cnt.value;
- if(parseInt(cnt) > 0) {
- if( model.getValue("/root/temp/pamcgubun") == "R" ) {//의뢰일 경우 입실자가 있어도 입실등록버튼 비활성화
- btn_ipt.disabled = true;
- }else {
- btn_ipt.disabled = false;
- }
- }else {
- btn_ipt.disabled = true;
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.12.16
- * @by : dhkim
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 입실대기자가 있을때 입실등록버튼을 클릭하면 호출된다.<b>
- * 입실대기자수는 따로 조회를 해 와서 입실등록 버튼을 누르면 해당 대기환자들 정보를 가지고 있다가
- * 입실상태 waitstat : I, 입실일을 등록일자로 바꿔준다.
- * 입실대기자수가 1보다 작으면 입실등록버튼을 비활성화하고 0보다크면 활성화 시킨다.
- * @param :
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fWaitPsnInRoom(){
- //model.removenode('/root/send');
- //model.makeValue('/root/send/htfacnt', grd_htfawaitInfo.getUpdateDataAll('u'));
- //
- //if(!submit('TXMNH02905')){
- // messageBox('조회를', 'E009');
- // return false;
- //}
- setParameter("fbrthdd", model.getValue("/root/main/cond/fbrthdd"));
- setParameter("fbrthdd", model.getValue("/root/main/cond/lbrthdd"));
- setParameter("pamcgubun", model.getValue("/root/temp/pamcgubun"));
- modal("SPMNH02900", "1", event.screenX, event.screenY-300);
- }
- /**
- * 20090819 dhkim
- * 신규환자등록화면을 보여준다
- */
- function fShowNewPatient(isShow){
-
- //노드 재구성
- model.removenode('/root/main/newpatientinfo');
- model.makenode('/root/main/newpatientinfo/newpatinfo');
-
- if(isShow){
- grp_newpatientinput.visible = true;
- }else{
- grp_newpatientinput.visible = false;
- }
-
- model.refresh();
-
- }
-
-
- /**
- * 20090821 dhkim
- * 환자조회팝업을 띄운다
- */
- function fPopPat(pid){
-
- model.makeNode("/root/main/patinfo/patinfolist");
- //원무팀의 환자명을 받아오는 팝업창을 띄운다.
- if(pid != null && pid != ''){
- //환자정보 조회팝업에 기본 정보 넘겨준다.
- model.makeValue("/root/tmp/pid", pid);
- model.makeValue("/root/tmp/srchcond","1");
- model.makeValue("/root/tmp/autoflag","Y"); // 1건인경우 자동으로닫힘
- }
-
- modal("SPPMC02500", 1, 10, 10, "SPPMC02500", "/root/tmp", "/root/send");
- //input박스에 데이타를 받아온다.
- var popupendflag = model.getValue("/root/main/popupendflag");
-
- if (popupendflag == "ok"){
-
- var pid = model.getValue("/root/main/patinfo/patinfolist/pid") ;
-
- //해당환자가 호스피스의뢰 등록가능한 환자인지 조회한다.
- model.removenode('/root/send');
- model.makeValue('/root/send/pid', pid);
- model.removenode('/root/main/newpatientinfo/newpatinfo');
- model.makenode('/root/main/newpatientinfo/newpatinfo');
- if(submit('TRMNH02907')){
-
- //등록가능여부 체크
- var cnt = getNodesetCount('/root/main/newpatientinfo/newpatinfo');
- if(cnt > 0){
- fIsValidRgstNewPat();
- }else{
- messageBox('해당환자는 재원중이 아니므로 호스피스 환자로 신환등록 할 수 없습니다.', 'I');
- return;
- }
- }else{
- messageBox('호스피스의뢰 등록가능한지 여부 조회를', 'E009');
- return;
- }
-
- } else {
- model.resetInstanceNode("/root/main/newpatientinfo/patinfo");
- }
- model.refresh();
- }
-
-
- /**
- * 20090825 dhkim
- * 신규환자를등록한다
- */
- function fRgstNewPat(){
-
- if(fIsValidRgstNewPat()){
-
- model.removenode('/root/send');
- model.makeValue('/root/send/pid', model.getValue('/root/main/newpatientinfo/newpatinfo/pid'));
- model.makeValue('/root/send/indd', model.getValue('/root/main/newpatientinfo/newpatinfo/indd'));
- model.makeValue('/root/send/cretno', model.getValue('/root/main/newpatientinfo/newpatinfo/cretno'));
- model.makeValue('/root/send/orddrid', model.getValue('/root/main/newpatientinfo/newpatinfo/orddrid'));
- model.makeValue('/root/send/orddrnm', model.getValue('/root/main/newpatientinfo/newpatinfo/orddrnm'));
- model.makeValue('/root/send/orddeptcd', model.getValue('/root/main/newpatientinfo/newpatinfo/orddeptcd'));
-
- if(submit('TXMNH02907')){
- messageBox('의뢰환자로 등록되었습니다.', 'I');
- fSearch();
- }else{
- messageBox('신환등록을 실패하였습니다.', 'E');
- return false;
- }
-
- }
-
- }
-
- /**
- * 20090825 dhkim
- * 신규환자등록유효성을 체크한다
- */
- function fIsValidRgstNewPat(){
-
- var pid, dschdd, dschtype, enddd, exptresn, orddeptcd, orddrid;
- var indschacptstat, status, inrmdd, reqdd, waitdd;
- var hngnm;
- for(var i = 1; i <= getNodesetCount('/root/main/newpatientinfo/newpatinfo'); i++){
-
- pid = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/pid');
- dschdd = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/dschdd');
- enddd = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/enddd');
- waitenddd = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/waitenddd');
- orddeptcd = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/orddeptcd');
- orddrid = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/orddrid');
-
- indschacptstat = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/indschacptstat');
- inrmdd = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/inrmdd');
- status = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/status');
- reqdd = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/reqdd');
- waitdd = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/waitdd');
-
- hngnm = model.getValue('/root/main/newpatientinfo/newpatinfo[' + i + ']/hngnm');
-
-
- //확인
- if(indschacptstat != 'A'){
- messageBox('현재 병동에 재원중인 환자가 아닌경우 신환등록을 할 수 없습니다.', 'I');
- return false;
- }
-
- if(pid == null || pid == ''){
- messageBox('신환등록을 위한 등록번호 정보가 존재하지 않습니다.', 'I');
- return false;
- }
-
- if(orddeptcd == null || orddeptcd == ''){
- messageBox('신환등록을 위한 진료과 정보가 존재하지 않습니다.', 'I');
- return false;
- }
-
- if(orddrid == null || orddrid == ''){
- messageBox('신환등록을 위한 진료의 정보가 존재하지 않습니다.', 'I');
- return false;
- }
-
-
- //저장
- if(dschdd == '-' && enddd == '-' && waitenddd == '-'){
- return true;
- }
-
- //호스피스관리중인 환자(의뢰/대기/분산/입실 상태)와 현재 재원중이 아닌 환자는 등록불가
- if(dschdd == '19000101' && enddd == '19000101' && waitenddd == '19000101'){
-
- //확인
- if(inrmdd != '19000101'){
- messageBox('(' + hngnm + ') 환자는 이미 호스피스 입실상태로 관리중인 환자이므로 신환등록을 할 수 없습니다.', 'I');
- return false;
- }else{
-
- //확인
- if(waitdd == '19000101' && reqdd != '19000101'){
- messageBox('(' + hngnm + ') 환자는 이미 호스피스 의뢰상태로 관리중인 환자이므로 신환등록을 할 수 없습니다.', 'I');
- return false;
- }
-
-
- if(waitdd != '19000101'){
- //확인
- if(status == 'O' || status == 'S' || status == 'I'){
- messageBox('(' + hngnm + ') 환자는 이미 호스피스 대기상태로 관리중인 환자이므로 신환등록을 할 수 없습니다.', 'I');
- return false;
- }
- //확인
- else if(status == 'A' || status == 'B' || status == 'C'){
- messageBox('(' + hngnm + ') 환자는 이미 호스피스 분산상태로 관리중인 환자이므로 신환등록을 할 수 없습니다.', 'I');
- return false;
- }
- }
- }
-
- }
-
- }
-
- return true;
-
- }
-
-
- /**
- * date : 2009.10.09
- * author : dhkim
- * desc : 호스피스 환자관리 프로그램 종료사유 상태별 종료입력
- * param : state-(W:대기종료, S:서비스종료, D:퇴실등록)
- *
- */
- function fEndSave(state){
-
- var resn;
- var saveStr;
-
- //state에 따라서 사유 미입력시 저장 blocking
- if(state == 'W'){
-
- resn = model.getValue('/root/main/hospiceinfo/hospicedetl/waitendresn');
- saveStr = '자문종료 하시겠습니까?';
- model.setValue('/root/main/hospiceinfo/hospicedetl/waitenddd',getCurrentDate());
- /*
- if(resn == ''){
- messageBox('대기종료 사유를 입력하십시요.', 'E');
- return ;
- }
- */
-
- } else
- if (state == 'S'){
-
- resn = model.getValue('/root/main/hospiceinfo/hospicedetl/exptresn');
- saveStr = '서비스종료 하시겠습니까?';
-
- if(resn == ''){
- messageBox('서비스종료 사유를 입력하십시요.', 'E');
- return ;
- }
-
- } else if (state == 'D'){
-
- var calcscoryn = model.getValue("/root/main/hospiceinfo/hospicedetl/calcscoryn_tmp");
- if ( calcscoryn == "Y" ) {
- messageBox('수가대상 적용환자입니다.', 'E');
- return ;
- }
- resn = model.getValue('/root/main/hospiceinfo/hospicedetl/dschresn');
- saveStr = '퇴실등록 하시겠습니까?';
-
- if(resn == ''){
- messageBox('퇴실등록 사유를 입력하십시요.', 'E');
- return ;
- }
- }
-
- if( messageBox(saveStr, "Q000") != 6 ) return;
-
- fSave('S', true);
-
- }
-
-
- /**
- * date : 2009.10.09
- * author : dhkim
- * desc : 종료버튼들 상태값 초기화 (비활성화)
- *
- */
- function fInitEndBtn_kdg(chkFlag){
- if(chkFlag == "DC"){
- var pamcgubn = model.getValue("/root/main/hospiceinfo/hospicedetl/status");//구분
- }else{
- var pamcgubn = model.getValue("/root/temp/pamcgubun");//구분
- }
-
- if(pamcgubn == 'D'){
- btn_waitend.disabled = false;
- btn_svcend.disabled = true;
- btn_dschend.disabled = true;
- }else{
- btn_waitend.disabled = true;
- btn_svcend.disabled = true;
- btn_dschend.disabled = true;
- }
-
- }
- function fInitEndBtn(){
-
- /*var iRow = -1;
- iRow = grd_hospicelist.row;
- var rowChk = model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/status");
-
- if(rowChk == 'E'){
- btn_waitend.disabled = false;
- btn_waitchg.disabled = false;
- btn_svcend.disabled = true;
- btn_dschend.disabled = true;
- }else{
- btn_waitend.disabled = true;
- btn_svcend.disabled = true;
- btn_dschend.disabled = true;
- }
- */
- btn_waitend.disabled = true;
- btn_svcend.disabled = true;
- btn_dschend.disabled = true;
- }
- /**
- * date : 2009.10.13
- * author : dhkim
- * desc : 일자가 입력됨에 따른 버튼 활성화및 비활성화 처리
- *
- */
- function fChangeDisabledEndBtn(state){
-
- if(state == 'W'){//대기종료버튼활성화
-
- if( model.getValue("/root/main/hospiceinfo/hospicedetl/waitenddd") != "" ) {
- cmb_waitendresn.disabled = "false";
- btn_waitend.disabled = "false";
- btn_svcend.disabled = true;
- btn_dschend.disabled = true;
- }else {
- cmb_waitendresn.disabled = "true";
- btn_waitend.disabled = "true";
- btn_svcend.disabled = true;
- btn_dschend.disabled = true;
- }
-
- } else if (state == 'S'){//서비스종료버튼활성화
-
- //20091009 dhkim
- if(model.getValue("/root/main/hospiceinfo/hospicedetl/enddd") != ""){
- btn_svcend.disabled = "false";
- btn_waitend.disabled = true;
- btn_dschend.disabled = true;
- }else{
- btn_svcend.disabled = "true";
- btn_waitend.disabled = true;
- btn_dschend.disabled = true;
- }
-
- } else if (state == 'D'){//퇴실등록버튼활성화
-
- //20091009 dhkim 퇴실일 입력시 퇴실등록버튼 활성화
- if(model.getValue("/root/main/hospiceinfo/hospicedetl/dschdd") != ""){
- btn_dschend.disabled = "false";
- btn_svcend.disabled = true;
- btn_waitend.disabled = true;
- }else{
- btn_dschend.disabled = "true";
- btn_svcend.disabled = true;
- btn_waitend.disabled = true;
- }
- } else {
-
- fInitEndBtn();//종료버튼들 비활성화처리
-
- }
-
- }
- function fhospice_agonalrec() {
-
- //호스피스 기록지를 띄울때 pid, cretdt가 필요함...
- setParameter("pid", model.getValue("/root/main/hospice/hospicelist"+"["+(grd_hospicelist.row)+"]/pid"));
- setParameter("cretdd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/cretdd"));
- setParameter("crettm", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/crettm"));
- setParameter("reqdeptcd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/reqdeptcd"));
- setParameter("reqdd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/reqdd"));
- setParameter("wardcd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/wardcd"));
-
- modal("SMMNH06700");
- }
- //호스피스 가족상담 화면 호출
- function fhospice_famyconsult() {
-
- //indd, cretdd 정보는 필수로 넘김
- setParameter("pid", model.getValue("/root/main/hospice/hospicelist"+"["+(grd_hospicelist.row)+"]/pid"));
- setParameter("indd", model.getValue("/root/main/hospice/hospicelist"+"["+(grd_hospicelist.row)+"]/indd"));
- setParameter("hngnm", model.getValue("/root/main/hospice/hospicelist"+"["+(grd_hospicelist.row)+"]/hngnm"));
- setParameter("sexage", model.getValue("/root/main/hospice/hospicelist"+"["+(grd_hospicelist.row)+"]/sexage"));
- setParameter("cretdd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/cretdd"));
- setParameter("crettm", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/crettm"));
- setParameter("cretno", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/cretno"));
- setParameter("wardcd", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/wardcd"));
- setParameter("atdoctid", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/atdoctid"));
-
- modal("SMMNH01600");
- }
- //상단정보셋팅
- function fSetPatInfo(pid, indd, cretno, instcd, orddd, ordtype){
- condparam = "I" + "▦" + pid
- + "▦" + indd
- + "▦" + cretno
- + "▦" + instcd
- + "▦" + orddd;
- setParameter("condparam", condparam);
-
- //상단 세팅 화면 사이즈 작게 띄움
- //----------------------(20080618이전버젼)
- //modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- //top_pid = pid;
- //----------------------(20080618이후버젼)
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- var useyn = getParameter("SPMMO08900_rtn_useyn"); // 입원,외래 원무환자정보 존재 "Y" / 존재하지 않을 경우 "N"
- //---------------------
-
- }
|