123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:my="http://www.comsquare.co.kr/example" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
- <xhtml:head>
- <xhtml:title>응급실 재방문 환자 관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <patlist/>
- </main>
- <cond>
- <workdd/>
- <status>1</status>
- <pid/>
- </cond>
- <send>
- <patlist/>
- </send>
- <temp/>
- <init/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- <submission id="TRMNE09401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/main/patlist"/>
- <submission id="TRMNE09402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/srchdata" resultref="/root/temp/authinfo"/>
- <submission id="TRMNE09403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/smsinfo" resultref="/root/temp/drinfo"/>
- <submission id="TXMNE09401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/temp"/>
- <submission id="TXMNE00205" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/smsmsg" replace="instance" resultref="/root/temp"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/ENRSignEngine.js"/>
- <script type="javascript">
- <![CDATA[
- function fInit() {
- var workdd = getCurrentDate();
- model.setValue("/root/cond/workdd", workdd);
-
- fBtnStatus();
-
- model.refresh();
- }
-
- function fSearch() {
-
- //grd_patlist.rebuild();
- model.removeNodeset("/root/send/srchdata");
- model.makeValue("/root/send/srchdata/workdd", model.getValue("/root/cond/workdd"));
- model.makeValue("/root/send/srchdata/status", model.getValue("/root/cond/status"));
- model.makeValue("/root/send/srchdata/pid", model.getValue("/root/cond/pid"));
-
- submit("TRMNE09401");
-
- model.refresh();
- }
-
- function fSave(param) {
-
- if (param == "save") {
-
- var rtnval = messageBox("지정한 입실일시 이후 마감 전인 모든 식사 처방이 D/C처리 됩니다\r\n\r\n입실 처리 하시겠습니까?", "Q999");
-
- if (rtnval != "6") {
- return;
- }
- }
-
- model.removeNodeset("/root/send/savedata");
-
- var cnt = getNodesetCnt(model, "/root/main/patlist");
-
- var sHeader = "gbn▦pid▦hngnm▦indd▦cretno▦appdd▦todd▦instcd▦chosdd▦chostm▩";
- var sData = "";
- var pid, hngnm, chosdd, chostm;
-
- for(var i = 1; i <= cnt; i++) {
- if (model.getValue("/root/main/patlist[" + i + "]/chk") == "Y") {
-
- pid = model.getValue("/root/main/patlist[" + i + "]/pid");
- hngnm = model.getValue("/root/main/patlist[" + i + "]/hngnm");
- indd = model.getValue("/root/main/patlist[" + i + "]/indd");
- cretno = model.getValue("/root/main/patlist[" + i + "]/cretno");
- appdd = model.getValue("/root/main/patlist[" + i + "]/appdd");
- todd = "99991231";
- chosdd = model.getValue("/root/main/patlist[" + i + "]/chosdd");
- chostm = model.getValue("/root/main/patlist[" + i + "]/chostm");
- orddeptcd = model.getValue("/root/main/patlist[" + i + "]/orddeptcd");
-
- if (param == "save" && (chosdd == "" || chostm == "")) {
- messageBox("[" + pid + " " + hngnm + "] 환자의 입실일시가 없습니다.", "E999");
- return;
- }
-
- sData += param + "▦"
- + pid + "▦"
- + hngnm + "▦"
- + indd + "▦"
- + cretno + "▦"
- + appdd + "▦"
- + todd + "▦"
- + getUserInfo("dutplceinstcd") + "▦"
- + chosdd + "▦"
- + chostm + "▦"
- + orddeptcd + "▩";
-
- // 응급의학과 승인하면 퇴원시 주치의에게 SMS 전송 2014.01.13
- if (param == "acpt") {
- fSendSMS(i);
- }
- }
- }
-
- model.makeValue("/root/send/savedata", sHeader + sData);
-
- if (submit("TXMNE09401")) {
- fSearch();
- fBtnStatus();
- }
- }
-
- function fBtnStatus() {
-
- var drflag = "", nrflag="";
-
- model.removeNodeset("/root/send/srchdata");
- model.makeValue("/root/send/srchdata/workdd", model.getValue("/root/cond/workdd"));
-
- if ( submit("TRMNE09402") ) {
- drflag = model.getValue("/root/temp/authinfo/drflag");
- nrflag = model.getValue("/root/temp/authinfo/nrflag");
- }
-
- if (getUserInfo("userid") == "ENR") {
- drflag = 'Y';
- }
-
- var status = model.getValue("/root/cond/status");
-
- if (status == "3") {
-
- btn_acpt.disabled = true;
- btn_cncl.disabled = true;
- btn_save.disabled = true;
-
- } else if (status == "2") {
-
- btn_acpt.disabled = true;
-
- if (drflag == "Y") {
- btn_cncl.disabled = false;
- } else {
- btn_cncl.disabled = true;
- }
-
- if (nrflag == "Y") {
- btn_save.disabled = false;
- } else {
- btn_save.disabled = true;
- }
-
- } else {
-
- if (drflag == "Y") {
- btn_acpt.disabled = false;
- btn_cncl.disabled = false;
- } else {
- btn_acpt.disabled = true;
- btn_cncl.disabled = true;
- }
-
- if (nrflag == "Y") {
- btn_save.disabled = false;
- } else {
- btn_save.disabled = true;
- }
-
- }
-
- fSearch();
- }
-
- function fSendSMS(pRow) {
-
- if ( pRow > 0 ) {
- var pid = model.getValue("/root/main/patlist[" + pRow + "]/pid");
- var hngnm = model.getValue("/root/main/patlist[" + pRow + "]/hngnm");
- var indd = model.getValue("/root/main/patlist[" + pRow + "]/indd");
- var cretno = model.getValue("/root/main/patlist[" + pRow + "]/cretno");
- var drid = model.getValue("/root/main/patlist[" + pRow + "]/outdrid");
- var drnm = model.getValue("/root/main/patlist[" + pRow + "]/outdrnm");
- var phonno = model.getValue("/root/main/patlist[" + pRow + "]/outdrphone");
- var deptnm = model.getValue("/root/main/patlist[" + pRow + "]/orddeptnm");
- var userid = getUserInfo("userid");
-
- if (drnm != "" && phonno != "") {
-
- var msg = "금일 퇴원한 [" + deptnm + " " + pid + " " + hngnm + "] 환자 응급실 재방문";
-
- var erno = "";
- if (getUserInfo("dutplceinstcd") == "031") {
- erno = "86100";
- } else {
- erno = "0532002100";
- }
-
- var rtnMsg = messageBox("환자의 퇴원 당시 주치의인 " + deptnm + " " + drnm + " 선생님에게\r\n"
- + "환자 재방문 관련 SMS를 발송하시겠습니까?\r\n\r\n"
- + "※ 내용: " + msg + "\r\n"
- + " 회신번호: " + erno, "Q999");
-
- if (rtnMsg == "6") {
- model.makeValue("/root/send/smsmsg/recvr/usernm", drnm);
- model.makeValue("/root/send/smsmsg/recvr/userid", drid);
- model.makeValue("/root/send/smsmsg/recvr/mpphonno", phonno);
- model.makeValue("/root/send/smsmsg/recvr/usernm", "응급의료센터");
-
- model.makeValue("/root/send/smsmsg/req/calltype", "call");
- model.makeValue("/root/send/smsmsg/req/msgcnts", msg);
- model.makeValue("/root/send/smsmsg/req/calltelno", erno);
-
- model.makeValue("/root/send/smsmsg/info/pid", pid);
- model.makeValue("/root/send/smsmsg/info/indd", indd);
- model.makeValue("/root/send/smsmsg/info/cretno", cretno);
- model.makeValue("/root/send/smsmsg/info/userid", userid);
-
- if (submit("TXMNE00205") ) {
- messageBox("메시지 전송이 ", "I002");
- }
- }
- }
- }
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1025" pageheight="800" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:15px; ">응급실 재방문 환자 관리</caption>
- <group id="group1" style="left:0px; top:62px; width:1005px; height:700px; ">
- <datagrid id="grd_patlist" nodeset="/root/main/patlist" class="datagrid2" caption="^환자번호^이름^성별/나이^진료과^진료교수^주치의^퇴원시 주치의 전화번호^퇴원시 주치의 전화번호^신청병동^신청일^입실일시^입실일시^방문횟수^caption1^진료과^진료의^신청병동^indd^cretno" colsep="^" colwidth="30, 60, 60, 60, 100, 60, 60, 90, 65, 120, 80, 79, 60, 60, 0, 0, 0, 0, 0, 0" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:0px; width:1005px; height:700px; ">
- <col checkvalue="Y,N" ref="chk" type="checkbox"/>
- <col ref="pid"/>
- <col ref="hngnm"/>
- <col ref="sa" style="text-align:center; "/>
- <col ref="orddeptnm"/>
- <col ref="orddrnm"/>
- <col ref="outdrnm"/>
- <col ref="outdrphone"/>
- <col ref="outdrnzone"/>
- <col ref="prestwardnm"/>
- <col ref="appdd" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="chosdd" type="input" format="yyyy-mm-dd" style="text-align:center; "/>
- <col ref="chostm" type="inputbutton" format="hh:nn"/>
- <col ref="visitno" style="text-align:center; "/>
- <col ref="outdrid"/>
- <col ref="orddeptcd"/>
- <col ref="orddrid"/>
- <col ref="prestwardcd"/>
- <col ref="indd"/>
- <col ref="cretno"/>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var row = grd_patlist.mouseRow;
- var curdate = getCurrentDate();
- var curtime = getCurrentTime().substr(0, 4)
-
- if (row >= grd_patlist.fixedRows) {
- grd_patlist.valueMatrix(row, grd_patlist.colRef("chk")) = "Y";
- grd_patlist.valueMatrix(row, grd_patlist.colRef("chosdd")) = curdate;
- grd_patlist.valueMatrix(row, grd_patlist.colRef("chostm")) = curtime;
- grd_patlist.rowStatus(row) = 2;
- }
-
- grd_patlist.refresh();
-
- ]]>
- </script>
- </datagrid>
- </group>
- <group id="group3" style="left:0px; top:20px; width:1005px; height:35px; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1005px; height:35px; "/>
- <button id="btn_srchindxcd" class="btn1_letter2" navindex="5" style="left:714px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSearch();
- ]]>
- </script>
- </button>
- <caption id="caption40" class="search_name" visibility="hidden" style="left:504px; top:10px; width:86px; height:17px; vertical-align:middle; ">등록번호 :</caption>
- <input id="ipt_pid" ref="/root/cond/pid" class="input_s_essential" navindex="1" visibility="hidden" style="left:595px; top:10px; width:80px; height:19px; font-weight:bold; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keyCode == "13") {
- setInputNodeCurText();
- fSearch();
- }
- ]]>
- </script>
- </input>
- <line id="line27" class="line_4" style="x1:701px; y1:7px; x2:701px; y2:29px; "/>
- <caption id="caption1" class="search_name" style="left:19px; top:8px; width:86px; height:17px; vertical-align:middle; ">업무일자:</caption>
- <input id="input1" ref="/root/cond/workdd" class="input_s_essential" navindex="1" inputtype="date" style="left:110px; top:9px; width:105px; height:19px; font-weight:bold; text-align:center; "/>
- <caption id="caption3" class="search_name" style="left:248px; top:8px; width:86px; height:17px; vertical-align:middle; ">상 태:</caption>
- <select1 id="radio1" ref="/root/cond/status" appearance="full" cellspacing="10" cols="3" overflow="visible" style="left:313px; top:10px; width:167px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>신청</label>
- <value>1</value>
- </item>
- <item>
- <label>승인</label>
- <value>2</value>
- </item>
- <item>
- <label>완료</label>
- <value>3</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fBtnStatus();
- ]]>
- </script>
- </select1>
- <button id="btn_acpt" class="btn1_letter2" navindex="5" style="left:770px; top:7px; width:56px; height:22px; ">
- <caption>승인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSave("acpt");
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn1_letter4" style="left:906px; top:7px; width:80px; height:22px; ">
- <caption>입실확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSave("save");
- ]]>
- </script>
- </button>
- <button id="btn_cncl" class="btn1_letter4" navindex="5" style="left:826px; top:7px; width:80px; height:22px; ">
- <caption>승인취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSave("cancel");
- ]]>
- </script>
- </button>
- </group>
- <line id="line13" class="line_1" style="x1:0px; y1:57px; x2:1005px; y2:57px; "/>
- <caption id="caption2" style="left:960px; top:765px; width:45px; height:20px; text-align:right; ">[표]</caption>
- </xhtml:body>
- </xhtml:html>
|