123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818 |
- /*
- 호스피스 환자관리(SMMNH02900.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var currentdate = getCurrentDate();//현재일자
- var sdate = ((currentdate.toDate()).getAddDate(-1, "M")).getDateFormat(); //보름전
- /**
- * @group :
- * @ver : 2007.04.10
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호스피스 환자관리 조회
- * 조회조건 (조회시작,종료일, 환자구분) 필수
- * @param :
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fSearch(){
- 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");
- }
- model.makeValue("/root/send/hospicegubun", gubun);
- model.makeValue("/root/send/pamcgubun", model.getValue("/root/temp/pamcgubun"));
- //환자구분이 제외(O)이면 제외사유 조회조건 추가
- if(model.getValue("/root/temp/pamcgubun")=="O"){
- model.makeValue("/root/send/M0066list",model.getValue("/root/init/M0066list"));
- }
- model.makeValue("/root/send/pid", model.getValue("/root/temp/pid"));
- model.removenode('/root/main/hospice');
- if(submit("TRMNH02901")){
- var RowCnt = grd_hospicelist.rows - grd_hospicelist.fixedRows;
- if(RowCnt < 1){
- model.removeNodeset("/root/main/hospiceinfo/hospicedetl");
- messageBox("조회된 자료가 ","I004");
- }
- //종결처리 되지않은 임종환자에 대한 메세지를 출력한다.
- var dethMsg = '';//임종환자메세지변수
- var dethNm, dethPid, dethDt; //임종환자 이름, 등록번호, 임종일 변수
- for(var i = 1; i <= RowCnt ; i++){
- //DETHYN이 Y(AGONALDD는 null이고 DETHDT가 있을때)
- 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';
- }
- }
- if(dethMsg != ''){
- //alert(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 등록번호
- + "▦cretdt" //02 생성일자
- + "▦reqdeptcd" //03 의뢰과
- + "▦reqdd" //04 의뢰일
- + "▦instcd" //05 병원기관코드
- + "▦stat" //06 호스피스상태
- + "▦dethdt" //07 사망시간
- + "▦exptresn" //08 제외사유
- + "▦dschtype" //09 퇴원사유
- + "▩" ;
- for(var i = 1; i <= RowCnt ; i++){
- //DETHYN이 Y(AGONALDD는 null이고 DETHDT가 있을때)
- if(model.getValue(xHospiceListPath + "[" + i + "]/dethyn") == 'Y'){
- // 제외사유(exptresn)가 임종(03)
- // 퇴실사유(dschtype)가 병원임종(01)
- sDethData +=
- model.getValue(xHospiceListPath + "[" + i + "]/pid") //01 등록번호
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/cretdt") //02 생성일자
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/reqdeptcd") //03 의뢰과
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/reqdd") //04 의뢰일
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/instcd") //05 병원기관코드
- + "▦" + model.getValue(xHospiceListPath + "[" + i + "]/stat") //06 호스피스상태
- + "▦" + (model.getValue(xHospiceListPath + "[" + i + "]/dethdt")).substring(0, 8) //07 사망시간
- + "▦" + "03" //08 제외사유
- + "▦" + "01" //09 퇴원사유
- + "▩" ;
- }
- }
- 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(){
- 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/cretdt", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/cretdt"));
- model.makeValue("/root/send/reqformrecseq", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/reqformrecseq"));
- model.makeValue("/root/send/pamcgubun", model.getValue("/root/main/hospice/hospicelist"+"["+iRow+"]/stat"));
- 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"));
- if(submit("TRMNH02902")){
- //진단명
- cmb_diagcd1.dispatch("xforms-value-changed");
- /*
- var indd = model.getValue('/root/main/hospiceinfo/hospicedetl/indd');
- if(indd == '00000000'){
- cmb_exptresn.disabled = false;
- cmb_dschtype.disabled = true;
- }else{
- cmb_exptresn.disabled = true;
- cmb_dschtype.disabled = false;
- }
- */
- //본원타원
- if(cmb_reqtypeflag.value=="1"){
- cmb_reqhospnm.disabled=true;
- }else if(cmb_reqtypeflag.value=="2"){
- cmb_reqhospnm.disabled=false;
- }
- if(ipt_intvdd.value == ""){
- ipt_intvdd.value = getCurrentDate();
- }
- }else{
- messageBox('조회를', 'E009');
- return 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 :
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- var xDetlPath = '/root/main/hospiceinfo/hospicedetl';
- function fSave(waitstat){
- if(fIsValid(waitstat)){
- 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 :
- * @return :
- * @desc : 호스피스 환자관리내역을 저장하기 전 유효성 체크를 실행한다.
- * R (의뢰) : 면담일이(intvdd)입력된상태
- * W (대기) : 대기자로 저장 버튼 클릭해서 들어온 경우 (의뢰컨설트로 들어온 환자인경우나 외래입원예약을 하여 입원해 있는 환자의 경우)
- * 대기일자(waitdt)는 현재일자, 입실일자(inrmdt), 퇴실(제외)일(enddd), 제외사유(exptresn), 퇴실사유(dschtype), 임종일자(agonaldd)를 null로 넘긴다.
- * I (입실) : 입실일자(inrmdt)가 입력되어있는 상태, 실제입원되어 있는 환자중 호스피스 병동(병동코드 : '3050136000')이 아닐때 입실일자가 입력되면 경고메세지를 출력한다.
- * L (퇴실) : 퇴실(제외)일이 입력되고, 퇴원사유가 입력된 상태..
- * O (제외) : 제외사유가 입력되고 퇴실(제외)일이 입력된 상태...
- *
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fIsValid(saveWaitStat){
- var agonaldd = model.getValue(xDetlPath + "/agonaldd"); //임종일 체크
- var enddd = model.getValue(xDetlPath + "/enddd"); //종결일
- var status = model.getValue(xDetlPath + "/status"); //상태(컨설트의뢰O, 입원예약만I, 입원예약해서 재원S)
- var dschtype = model.getValue(xDetlPath + "/dschtype"); //퇴원사유
- var exptresn = model.getValue(xDetlPath + "/exptresn"); //제외사유
- var inrmdt = model.getValue(xDetlPath + "/inrmdt"); //입실일자
- var inrmtm = model.getValue(xDetlPath + "/inrmtm"); //입실시간
- if((inrmdt == "")||(inrmdt == null)){
- model.setValue(xDetlPath + "/inrmtm", ""); //입실시간
- }else{
- model.setValue(xDetlPath + "/inrmtm", getCurrentTime().substr(0,4)); //입실시간
- }
- var intvdd = model.getValue(xDetlPath + "/intvdd"); //면담일자
- var wardcd = model.getValue(xDetlPath + "/wardcd"); //병실코드
- var waitstat = model.getValue(xDetlPath + "/waitstat"); //대기상태(의뢰R, 대기W, 입실I, 퇴실L, 제외O)
- if(model.getValue("/root/main/hospiceinfo/hospicedetl/pid") == ""){
- messageBox("저장할 환자를 ","C002");
- return false;
- }
- //대기자저장
- if(saveWaitStat == "W"){
- if(model.getValue(xDetlPath + "/waitstat") == "W") {
- messageBox("대기자인 환자입니다.","E");
- return;
- }
- if(messageBox("대기자로 전환하시겠습니까?","Q") != 6) return;
- //대기상태 일때 의뢰컨설트, 입원예약+입원환자의 경우
- //대기상태는 W, 대기일자는 currentDate,
- //면담일, 종결일, 제외사유, 퇴원사유, 임종일, 임종장소 null처리
- model.setValue(xDetlPath + "/waitstat", "W");
- model.setValue(xDetlPath + "/waitdt", getCurrentDate());
- model.setValue(xDetlPath + "/inrmdt", "");
- model.setValue(xDetlPath + "/inrmtm", "");
- model.setValue(xDetlPath + "/enddd", "");
- model.setValue(xDetlPath + "/exptresn", "");
- model.setValue(xDetlPath + "/dschtype", "");
- model.setValue(xDetlPath + "/agonaldd", "");
- model.setValue(xDetlPath + "/agonaldd", "");
- }
- //saveWaitStat가 W(대기)상태 빼고는 전부 S임....(면담, 입원, 종결 , 퇴실)
- else if(saveWaitStat == "S"){
- if(messageBox("","Q002") != 6) return;
- //면담일자가 입력되면 waitstat는 R(의뢰)
- if(intvdd != "" && waitstat != "W"){
- model.setValue(xDetlPath + "/waitstat", "R");
- model.setValue(xDetlPath + "/waitdt", "");
- }
- //입실일자 있으면 waitstat는 I(입실),
- //종결일이 입력되어있지 않으면 제외사유, 퇴원사유, 임종일 null처리
- if(inrmdt!=""){
- //실제입원되어 있는 환자중 호스피스 병동(병동코드 : '3050136000')이 아닐때 입실일자가 입력되면 경고메세지를 출력한다.
- if(wardcd == '3050136000'){
- model.setValue(xDetlPath + "/waitstat","I") ;
- }else{
- messageBox('호스피스병동에 입원한 환자가 아니므로 입실일을 입력', 'E001');
- model.setValue(xDetlPath + "/inrmdt", "");
- model.setValue(xDetlPath + "/inrmtm", "");
- return false;
- }
- }
- //제외일(enddd)이 입력되어 있으면 제외사유(exptresn)나 퇴원사유(dschtype)중 하나가 반드시 입력되어야한다.
- //제외일(enddd)이 입력되어 있을때 제외사유(exptresn)가 임종(03)이면 agonaldd에 enddd넣어줌..
- //제외일(enddd)이 입력되어 있을때 퇴실사유(dschtype)가 병원임종(01)이면 agonaldd에 enddd넣어줌..
- if(enddd==""){
- model.setValue(xDetlPath + "/exptresn","")
- model.setValue(xDetlPath + "/dschtype","")
- model.setValue(xDetlPath + "/agonaldd","")
- }else if(enddd!=""){
- //퇴실일
- if(dschtype!=""){
- if(dschtype == '01'){
- model.setValue(xDetlPath + "/agonaldd", enddd);
- }
- model.setValue(xDetlPath + "/waitstat","O");
- }
- //제외일
- if(exptresn!=""){
- if(exptresn == '03'){
- model.setValue(xDetlPath + "/agonaldd", enddd);
- }
- model.setValue(xDetlPath + "/waitstat","O");
- }
- if(dschtype == '' && exptresn == ''){//퇴실일,제외일이 널일때)
- messageBox("제외사유나 퇴원사유를 ","C001");
- return false;
- }
- }
- }
- 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("cretdt", model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/cretdt"));
- 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("SMMNH01500",1,50,50); //호스피스기록지
- }
- /**
- * @group :
- * @ver : 2007.05.14
- * @by : 하재륜
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자구분에따라 인풋박스활성화 여부
- * @param :
- * @return :
- * @--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- */
- function fPamcChange() {
- var idx = model.getValue("/root/temp/pamcgubun");
- if(idx=="A"){//전체
- caption26.visible = false;
- cmb_expt.visible = false; //제외사유
- caption30.visible = false;
- ipt_pid.visible = false; //등록번호
- cmb_exptresn.disabled = false;
- cmb_dschtype.disabled = true;
- }else if(idx=="R"){//의뢰
- caption26.visible = false;
- cmb_expt.visible = false; //제외사유
- caption30.visible = false;
- ipt_pid.visible = false; //등록번호
- cmb_exptresn.disabled = false;
- cmb_dschtype.disabled = true;
- }else if(idx=="W"){//대기
- caption26.visible = false;
- cmb_expt.visible = false; //제외사유
- caption30.visible = false;
- ipt_pid.visible = false; //등록번호
- cmb_exptresn.disabled = false;
- cmb_dschtype.disabled = true;
- }else if(idx=="I"){//입실
- caption26.visible = false;
- cmb_expt.visible = false; //제외사유
- caption30.visible = false;
- ipt_pid.visible = false; //등록번호
- cmb_exptresn.disabled = true;
- cmb_dschtype.disabled = false;
- }else if(idx=="L"){//퇴실
- caption26.visible = false;
- cmb_expt.visible = false; //제외사유
- caption30.visible = true;
- ipt_pid.visible = true; //등록번호
- cmb_exptresn.disabled = true;
- cmb_dschtype.disabled = false;
- }else if(idx=="O"){//제외
- caption26.visible = true;
- cmb_expt.visible = true; //제외사유
- caption30.visible = false;
- ipt_pid.visible = false; //등록번호
- cmb_exptresn.disabled = false;
- cmb_dschtype.disabled = true;
- }
- model.removenodeset("/root/main/hospice/hospicelist");
- model.resetInstanceNode("/root/main/hospiceinfo/hospicedetl");
- 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 + "]/inrmdt") == ""
- && model.getValue("/root/main/hospice/hospicelist["+ grd_hospicelist.row + "]/waitdt") == "" ){
- 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 cretdt = setParameter("cretdt",model.getValue("/root/main/hospice/hospicelist"+"["+grd_hospicelist.row+"]/cretdt"));
- 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 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);
- 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 != "O" ){
- messageBox(hngnm +" 환자는 컨설트 의뢰환자가 아니므로 회신기록 화면을 볼 수 ","I004");
- return;
- }
- //setParameter("openmode", "recform");
- //setParameter("formrecseq", reqformrecseq);
- setParameter("openmode", "reccnstform");
- setParameter("formrecseq", reqformrecseq); //서식기록테이블의 formrecseq(기록순번)
- setParameter("userdeptcd", "2390000000");
- 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.removenode("/root/hidden");
- model.makeValue("/root/send/fbrthdd", model.getValue("/root/main/cond/fbrthdd"));
- model.makeValue("/root/send/lbrthdd", model.getValue("/root/main/cond/lbrthdd"));
- if(!submit("TRMNH02904")){
- messageBox('조회를', 'E009');
- return false;
- }else{
- model.makeValue("/root/hidden/cnt", model.getValue("/root/temp/htfa/htfacnt/rownum"));
- opt_cnt.refresh();
- fromdd = model.getValue("/root/main/cond/fbrthdd");
- todd = model.getValue("/root/main/cond/lbrthdd");
- var cnt = opt_cnt.value;
- if(Number(cnt) > 0)
- 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;
- }
- }
|