123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>사망등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <dethinfo>
- <dethinfo>
- <pid/>
- <indd/>
- <hngnm/>
- <dethdd/>
- <dethtm/>
- <dethdt/>
- <dethspec/>
- <dethyn/>
- <ioflag/>
- <ordrslt/>
- <rgstflag/>
- <cnclid/>
- <cncldt/>
- <dethdeptcd/>
- <inerflag/>
- </dethinfo>
- </dethinfo>
- <cond>
- <pid/>
- <hngnm/>
- <indd/>
- <dethdd/>
- <dethtm/>
- <dethyn/>
- <infyn/>
- <infetc/>
- <infetc1/>
- </cond>
- <paminfo/>
- <retinfo>
- <retinfo>
- <retmsg/>
- <dethdd/>
- <dethtm/>
- <dethdt/>
- <dethspec/>
- <dethyn/>
- </retinfo>
- </retinfo>
- </main>
- <send>
- <req/>
- </send>
- <init/>
- <hidden>
- <zsd>
- <resultref/>
- </zsd>
- </hidden>
- <temp>
- <pat_info/>
- <pid/>
- <orddd/>
- <ordtm/>
- <cretno/>
- <orddeptcd/>
- <orddrid/>
- <hngnm/>
- <mpphontel/>
- </temp>
- <tmp>
- <dethprtlist/>
- </tmp>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- function fInitialize()
- {
- // 환자정보 조회
- var sPamInfo = getGlobalVariable("paminfo");
- setCSVToNode("/root/main/paminfo",sPamInfo,"pamlist");
-
- if(sPamInfo != ""){
- ipt_pid.value = model.getValue("/root/main/paminfo/pamlist/pid");
- //ipt_rsvdd.value = model.getValue("/root/main/paminfo/pamlist/indd");
- var sPatname = model.getValue("/root/main/paminfo/pamlist/hngnm");
- sPatname = sPatname + " (" + model.getValue("/root/main/paminfo/pamlist/sex");
- sPatname = sPatname + "/" + model.getValue("/root/main/paminfo/pamlist/age") + ")";
- opt_hngnm.value = sPatname;
- fDethSearch(); //환자및 사망정보 조회
-
- } else {
- btn_dethcnfm.disabled = true ;// 사망확인 비활성화 시킨다.
- btn_dethcncl.disabled = true ;// 사망취소 비활성화 시킨다.
- model.setfocus("ipt_pid");
- }
-
- }
- function fDethSearch()
- {
- model.copynode("/root/send/req", "/root/main/cond");
- if (submit("TRMNW01401")) {
- //model.setValue("/root/main/dethinfo/dethinfo/pid", model.getValue("/root/main/cond/pid"));
- model.setValue("/root/main/cond/indd", model.getValue("/root/main/dethinfo/dethinfo/indd"));
- model.setValue("/root/main/cond/hngnm", model.getValue("/root/main/dethinfo/dethinfo/hngnm"));
-
- model.setValue(rdo_infyn.attribute("ref"), model.getValue("/root/main/dethinfo/dethinfo/infyn"));
- model.setValue(tar_infetc.attribute("ref"), model.getValue("/root/main/dethinfo/dethinfo/infetc"));
- model.setValue(opt_infetc1.attribute("ref"), model.getValue("/root/main/dethinfo/dethinfo/infetc1"));
-
- if (model.getValue("/root/main/dethinfo/dethinfo/dethyn") == "Y") {
- if(model.getValue("/root/main/dethinfo/dethinfo/rgstflag") == "doct") {
- model.makeValue("/root/main/dethinfo/dethinfo/dethspec", model.getValue("/root/main/dethinfo/dethinfo/dethspec") + " - 의사등록(수정불가)");
- btn_clock.disabled = false ;
- ipt_dethdd.disabled = false ;
- ipt_dethtm.disabled = false ;
- btn_clock.disabled = false;
- ipt_pid.disabled = false;
- ipt_dethdd.disabled = true;
- ipt_dethtm.disabled = true;
- btn_clock.disabled = true;
- btn_dethcnfm.disabled = true ; // 사망확인 비활성화 시킨다.
- btn_dethcncl.disabled = true ; // 사망취소 비활성화 시킨다.
- } else {
- btn_clock.disabled = true;
- ipt_dethdd.disabled = true ;
- ipt_dethtm.disabled = true ;
- btn_clock.disabled = true;
- btn_dethcnfm.disabled = true ;// 사망확인 비활성화 시킨다.
- btn_dethcncl.disabled = false ;// 사망취소 활성화 시킨다.
- }
- } else {
- if (model.getValue("/root/main/cond/hngnm") > "") {
- btn_clock.disabled = false ;
- ipt_dethdd.disabled = false ;
- ipt_dethtm.disabled = false ;
- btn_clock.disabled = false;
- btn_dethcnfm.disabled = false ;// 사망확인 활성화 시킨다.
- btn_dethcncl.disabled = true ;// 사망취소 비활성화 시킨다.
- } else {
- //model.setvalue("/root/main/dethinfo/dethinfo/dethspec", "");
- btn_dethcnfm.disabled = true ;// 사망확인 비활성화 시킨다.
- btn_dethcncl.disabled = true ;// 사망취소 비활성화 시킨다.
- opt_spec.value = "";
- messageBox("해당 환자번호가 ","I004");
- model.setfocus("ipt_pid");
- }
- model.makeValue("/root/main/dethinfo/dethinfo/dethdd", getCurrentDate());
- model.makeValue("/root/main/dethinfo/dethinfo/dethtm", getCurrentTime().substr(0,4));
- ipt_dethdd.refresh();
- ipt_dethtm.refresh();
- btn_clock.refresh();
- }
- ipt_pid.disabled = true ;
- }
- model.refresh();
- }
- function fDethSave(pDethyn)
- {
- if (pDethyn == "N") { // 사망취소인 경우
- model.makeValue("/root/main/dethinfo/dethinfo/dethdt", "-");
- model.makeValue("/root/main/dethinfo/dethinfo/ordrslt", "-");
- model.makeValue("/root/main/dethinfo/dethinfo/dethdd", "-");
- model.makeValue("/root/main/dethinfo/dethinfo/dethtm", "-");
- model.makeValue("/root/main/dethinfo/dethinfo/cnclid", getUserId()); // 사망취소자 ID
- model.makeValue("/root/main/dethinfo/dethinfo/cncldt", getCurrentDate() + getCurrentTime()); // 사망취소일시
- model.makeValue("/root/main/dethinfo/dethinfo/infyn", "");
- model.makeValue("/root/main/dethinfo/dethinfo/infetc", "");
-
- } else {
- var sDethdt = model.getValue("/root/main/dethinfo/dethinfo/dethdd") + model.getValue("/root/main/dethinfo/dethinfo/dethtm");
- model.makeValue("/root/main/dethinfo/dethinfo/dethdt", sDethdt);
- model.makeValue("/root/main/dethinfo/dethinfo/ordrslt", "4"); // 진료결과(4:사망)
- model.makeValue("/root/main/dethinfo/dethinfo/cnclid", "");
- model.makeValue("/root/main/dethinfo/dethinfo/cncldt", "");
-
- //20110426_KNUH_Start 감염정보, 감염정보기타 값 추가.
- model.makeValue("/root/main/dethinfo/dethinfo/infyn", model.getValue("/root/main/cond/infyn"));
- model.makeValue("/root/main/dethinfo/dethinfo/infetc", model.getValue("/root/main/cond/infetc"));
-
-
- //20110426_KNUH_Start
-
- if (model.getValue("/root/main/dethinfo/dethinfo/dethdt") == "") {
- messageBox("사망시간을 입력하지 ","E007");
- return;
- }
-
- var sCurdt = getCurrentDate() + getCurrentTime();
- if (sDethdt.substr(0, 12) > sCurdt.substr(0, 12)) {
- messageBox("사망시간을 미래일시로 등록할 수 없습니다.", "E999");
- return;
- }
- }
-
- var sRtnMsg = messageBox("","Q003");
- if(sRtnMsg != 6) return;
- model.makeValue("/root/main/dethinfo/dethinfo/dethyn", pDethyn); // 사망여부
- model.makeValue("/root/main/dethinfo/dethinfo/dethdeptcd", getUserInfo("dutplcecd")); // 사망등록부서
-
- // model.copynode("/root/send/req", "/root/main/dethinfo/dethinfo");
- model.makeValue("/root/send/req/pid" , model.getValue("/root/main/dethinfo/dethinfo/pid" ));
- model.makeValue("/root/send/req/dethdt" , model.getValue("/root/main/dethinfo/dethinfo/dethdt" ));
- model.makeValue("/root/send/req/dethyn" , model.getValue("/root/main/dethinfo/dethinfo/dethyn" ));
- model.makeValue("/root/send/req/ioflag" , model.getValue("/root/main/dethinfo/dethinfo/ioflag" ));
- model.makeValue("/root/send/req/inerflag" , model.getValue("/root/main/dethinfo/dethinfo/inerflag"));
- model.makeValue("/root/send/req/indd" , model.getValue("/root/main/dethinfo/dethinfo/indd" ));
- model.makeValue("/root/send/req/ordrslt" , model.getValue("/root/main/dethinfo/dethinfo/ordrslt" ));
- model.makeValue("/root/send/req/dethdd" , model.getValue("/root/main/dethinfo/dethinfo/dethdd" ));
- model.makeValue("/root/send/req/dethtm" , model.getValue("/root/main/dethinfo/dethinfo/dethtm" ));
- model.makeValue("/root/send/req/cnclid" , model.getValue("/root/main/dethinfo/dethinfo/cnclid" ));
- model.makeValue("/root/send/req/cncldt" , model.getValue("/root/main/dethinfo/dethinfo/cncldt" ));
- model.makeValue("/root/send/req/dethdeptcd", model.getValue("/root/main/dethinfo/dethinfo/dethdeptcd"));
-
- model.makeValue("/root/send/req/infyn" , model.getValue("/root/main/dethinfo/dethinfo/infyn"));
- model.makeValue("/root/send/req/infetc", model.getValue("/root/main/dethinfo/dethinfo/infetc"));
-
- model.removeNodeset("/root/main/retinfo");
-
- if (submit("TXMNW01402")) {
- if(model.getValue("/root/main/retinfo/retinfo/retmsg") != ""){
- messageBox(model.getValue("/root/main/retinfo/retinfo/retmsg"), "E");
-
- model.makeValue("/root/main/dethinfo/dethinfo/dethdd", model.getValue("/root/main/retinfo/retinfo/dethdd"));
- model.makeValue("/root/main/dethinfo/dethinfo/dethtm", model.getValue("/root/main/retinfo/retinfo/dethtm"));
- model.makeValue("/root/main/dethinfo/dethinfo/dethspec", model.getValue("/root/main/retinfo/retinfo/dethspec") + " - 의사등록(수정불가)" );
- ipt_dethdd.disabled = true;
- ipt_dethtm.disabled = true;
- btn_clock.disabled = true;
- btn_dethcnfm.disabled = true ;// 사망확인 비활성화 시킨다.
- btn_dethcncl.disabled = true ;// 사망취소 비활성화 시킨다.
- model.refresh();
- }else{
- btn_dethcnfm.disabled = true ;// 사망확인 비활성화 시킨다.
- btn_dethcncl.disabled = true ;// 사망취소 비활성화 시킨다.
- messageBox("", "I002");
- fDethSearch(); //환자및 사망정보 조회
- // fInit(); // 초기화
- // model.close();
- }
- }
- }
-
- //** 초기화 **//
- function fInit() {
- clearGroup(group3);
- //opt_hngnm.value = "";
- model.makeValue("/root/main/cond/hngnm", "");
- model.makeValue("/root/main/dethinfo/dethinfo/dethspec", "");
- ipt_pid.disabled = false ;
- btn_clock.disabled = true ;
- ipt_dethdd.disabled = true ;
- ipt_dethtm.disabled = true ;
- btn_clock.disabled = true;
- btn_dethcnfm.disabled = true ; // 사망확인 비활성화 시킨다.
- btn_dethcnfm.disabled = true ; // 사망확인 비활성화 시킨다.
- btn_dethcncl.disabled = true ; // 사망취소 비활성화 시킨다.
- model.setfocus("ipt_pid");
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TRMNW01401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/dethinfo"/>
- <submission id="TRMNW01402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/tmp/dethprtlist"/>
- <submission id="TXMNW01402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" resultref="/root/main/retinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="330" pageheight="400" guideline="1,0;2,0;1,130;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <group id="group3" scroll="auto" style="left:0px; top:0px; width:301px; height:350px; ">
- <caption id="caption7" class="tit_2" style="left:8px; top:10px; width:87px; height:13px; ">사망 등록</caption>
- <line id="line1" class="line_2" style="x1:0px; y1:85px; x2:300px; y2:85px; "/>
- <line id="line2" class="line_2" style="x1:0px; y1:56px; x2:300px; y2:56px; "/>
- <caption id="caption15" class="cell_1" style="left:0px; top:29px; width:74px; height:28px; text-align:center; vertical-align:middle; ">등록번호</caption>
- <line id="line4" class="line_3" style="x1:0px; y1:349px; x2:300px; y2:349px; "/>
- <line id="line5" class="line_1" style="x1:0px; y1:25px; x2:300px; y2:25px; "/>
- <input id="ipt_rsvdd" ref="/root/main/cond/indd" class="input_search" disabled="true" navindex="2" format="yyyy-mm-dd" style="left:79px; top:62px; width:92px; height:19px; "/>
- <button id="btn_clock" class="icon_clock" style="left:218px; top:92px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.makeValue("/root/main/dethinfo/dethinfo/dethdd", getCurrentDate());
- model.makeValue("/root/main/dethinfo/dethinfo/dethtm", getCurrentTime().substr(0,4));
- ipt_dethdd.refresh();
- ipt_dethtm.refresh();
- btn_clock.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_dethtm" ref="/root/main/dethinfo/dethinfo/dethtm" class="input_default" navindex="4" format="hh:nn" style="left:174px; top:91px; width:39px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var dethtm = model.getValue("/root/main/dethinfo/dethinfo/dethtm");
- if(dethtm.length == 4){
- model.setValue("/root/main/dethinfo/dethinfo/dethtm", dethtm+"00");
- } else if(dethtm.length < 4) {
- messageBox("올바른 시간표시가 아닙니다.","E", '사망시간을 다시 입력하십시오.');
- model.setValue("/root/main/dethinfo/dethinfo/dethtm", "");
- model.setFocus("ipt_dethtm");
- ipt_dethtm.refresh();
- }
- ]]>
- </script>
- </input>
- <input id="ipt_dethdd" ref="/root/main/dethinfo/dethinfo/dethdd" class="input_search" navindex="3" inputtype="date" style="left:79px; top:91px; width:92px; height:19px; "/>
- <input id="ipt_pid" ref="/root/main/cond/pid" class="input_search" navindex="1" maxlength="10" style="left:79px; top:33px; width:81px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- if(event.keyCode == "13"){
- model.setvalue("/root/main/cond/pid", ipt_pid.currentText);
- fDethSearch(); //환자및 사망정보 조회
-
- var IOFlag;
- // 상단정보존재여부 확인
- if(getNodesetCount("/root/main/paminfo/pamlist") > 0) {
- IOFlag = model.getValue("/root/main/paminfo/pamlist/ioflag");
- } else{
- if(model.getValue("/root/main/dethinfo/dethinfo/indd")==""){
- IOFlag = "O";
- }else{
- IOFlag = "I";
- }
- }
-
- model.makeValue("/root/main/dethinfo/dethinfo/ioflag", IOFlag); // 입원외래구분지정
- }
- ]]>
- </script>
- </input>
- <output id="opt_hngnm" ref="/root/main/cond/hngnm" class="output_fix" style="left:164px; top:33px; width:135px; height:19px; "/>
- <output id="opt_spec" ref="/root/main/dethinfo/dethinfo/dethspec" style="left:0px; top:323px; width:299px; height:19px; font-weight:bold; text-align:center; "/>
- <button id="button22" class="btn2_letter3" style="left:248px; top:4px; width:53px; height:19px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInit(); // 초기화
- ]]>
- </script>
- </button>
- <caption id="caption1" class="cell_1" style="left:0px; top:58px; width:74px; height:28px; text-align:center; vertical-align:middle; ">입원일자</caption>
- <line id="line3" class="line_2" style="x1:0px; y1:114px; x2:300px; y2:114px; "/>
- <line id="line6" class="line_2" style="x1:0px; y1:143px; x2:300px; y2:143px; "/>
- <caption id="caption2" class="cell_1" style="left:0px; top:87px; width:74px; height:28px; text-align:center; vertical-align:middle; ">사망시간</caption>
- <caption id="caption3" class="cell_1" style="left:0px; top:116px; width:74px; height:28px; text-align:center; vertical-align:middle; ">전염성</caption>
- <caption id="caption4" class="cell_1" style="left:0px; top:174px; width:74px; height:147px; text-align:center; vertical-align:middle; ">기타</caption>
- <textarea id="tar_infetc" ref="/root/main/cond/infetc" style="left:77px; top:176px; width:222px; height:145px; "/>
- <select1 id="rdo_infyn" ref="/root/main/cond/infyn" appearance="full" cellspacing="10" cols="2" overflow="visible" style="left:77px; top:122px; width:68px; height:13px; border-style:none; ">
- <choices>
- <item>
- <label>Y</label>
- <value>Y</value>
- </item>
- <item>
- <label>N</label>
- <value>N</value>
- </item>
- </choices>
- </select1>
- <line id="line7" class="line_2" style="x1:0px; y1:172px; x2:300px; y2:172px; "/>
- <caption id="caption5" class="cell_1" style="left:0px; top:145px; width:74px; height:28px; text-align:center; vertical-align:middle; ">격리질환명</caption>
- <output id="opt_infetc1" ref="/root/main/cond/infetc1" class="output_fix" style="left:77px; top:149px; width:221px; height:19px; "/>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:350px; width:301px; height:30px; ">
- <button id="button9" class="btn4_letter2" navindex="7" style="left:241px; top:5px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:300px; y2:0px; "/>
- <button id="btn_dethcnfm" class="btn4_letter4" navindex="5" style="left:75px; top:5px; width:80px; height:22px; ">
- <caption>사망확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDethSave("Y");
- ]]>
- </script>
- </button>
- <button id="btn_dethcncl" class="btn4_letter4" navindex="6" style="left:158px; top:5px; width:80px; height:22px; ">
- <caption>사망취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDethSave("N");
- ]]>
- </script>
- </button>
- <button id="button1" class="btn4_letter2" navindex="5" style="left:17px; top:5px; width:56px; height:22px; ">
- <caption>출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var dethyn = model.getValue("/root/main/dethinfo/dethinfo/dethyn") ;
-
- if(dethyn == "Y") {
-
- model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/main/dethinfo/dethinfo/pid"));
- model.makeValue("/root/send/reqdata/ioflag", model.getValue("/root/main/dethinfo/dethinfo/ioflag"));
-
- submit("TRMNW01402");
-
- model.makeNode("/root/main/rexinfo");
-
- model.copyNode("/root/main/rexinfo", "/root/tmp/dethprtlist");
-
- model.makeValue("/root/main/rexinfo/dethprtinfo/infyn", model.getValue("/root/main/cond/infyn"));
- model.makeValue("/root/main/rexinfo/dethprtinfo/infetc", model.getValue("/root/main/cond/infetc"));
- model.makeValue("/root/main/rexinfo/dethprtinfo/infetc1", model.getValue("/root/main/cond/infetc1"));
- model.makeValue("/root/main/rexinfo/dethprtinfo/dethdd", model.getValue(ipt_dethdd.attribute("ref")));
- model.makeValue("/root/main/rexinfo/dethprtinfo/dethtm", model.getValue(ipt_dethtm.attribute("ref")));
-
- exeReportPreview("RPMNW01400", "XMLSTR");
- } else {
- messageBox("사망환자가 아니라 출력할 수 없습니다." , "E");
- return;
- }
-
- ]]>
- </script>
- </button>
- </group>
- <caption id="caption6" style="left:270px; top:381px; width:30px; height:16px; ">[표]</caption>
- </xhtml:body>
- </xhtml:html>
|