123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432 |
- <?xml version="1.0" encoding="UTF-8"?>
- <?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>
- <trcallinfo>
- <trcalllist/>
- </trcallinfo>
- <cond>
- <maindeptcd/>
- <patinfo>
- <pid/>
- <nm/>
- <indd/>
- <intm/>
- <cretno/>
- <visitno/>
- </patinfo>
- </cond>
- </main>
- <init>
- <userlist/>
- <residentinfo/>
- </init>
- </root>
- </instance>
- <submission id="TRMMO08001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/trcallinfo"/>
- <submission id="TRMMO06703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/patinfo"/>
- <submission id="TXMNE05204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata/inscallinfo" resultref="/root/tmp/result"/>
- <submission id="TXMNE05202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/tmp2" resultref="/root"/>
- <submission id="TRMNE05203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqchk" resultref="/root/tmp/calling"/>
- <submission id="TRMMB04102" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRMMO08002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/resinfo" resultref="/root/init/userlist"/>
- </model>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInit();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- var xSaveSetInfoPath = "/root/main/trcallinfo/trcalllist";
-
- function fInit() {
- // model.setValue("/root/main/cond/patinfo/pid", '3145797');
- // model.setValue("/root/main/cond/patinfo/nm", '김응급');
- // model.setValue("/root/main/cond/patinfo/indd", '20130314');
- // model.setValue("/root/main/cond/patinfo/intm", '1442');
- // model.setValue("/root/main/cond/patinfo/cretno", 1);
- // model.setValue("/root/main/cond/patinfo/visitno", 0);
- var param = opener.javascript.getParameter("SPMMO08000_param");
- gPARAM = param.split("▦");
-
- model.makeValue("/root/main/cond/patinfo/pid" , gPARAM[0]);
- model.makeValue("/root/main/cond/patinfo/nm" , gPARAM[1]);
- model.makeValue("/root/main/cond/patinfo/indd" , gPARAM[2]);
- model.makeValue("/root/main/cond/patinfo/intm" , gPARAM[3]);
- model.makeValue("/root/main/cond/patinfo/cretno" , gPARAM[4]);
- model.makeValue("/root/main/cond/patinfo/visitno", gPARAM[5]);
- model.removeNodeset("/root/send/reqdata");
-
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/cond/patinfo/pid"));
- model.makeValue("/root/send/reqdata/indd", model.getValue("/root/main/cond/patinfo/indd"));
- model.makeValue("/root/send/reqdata/cretno", model.getValue("/root/main/cond/patinfo/cretno"));
- model.makeValue("/root/send/reqdata/visitno", model.getValue("/root/main/cond/patinfo/visitno"));
-
- submit("TRMMO06703");
- model.refresh();
-
- fGetTraDrCallList();
- }
-
- function fGetTraDrCallList() {
- submit("TRMMO08001");
- //grd_erdrcalllist.fixedcellcheckbox(0, grd_erdrcalllist.colRef("checked")) = true;
- }
-
- function fClkBtnCall() {
- var vSCnt = 0;
- var vMCnt = 0;
- var vRCnt = 0;
- var sDeptCd = "";
-
- for (var iRow = 1; iRow <= getNodesetCount(xSaveSetInfoPath); iRow++) {
- if (model.getValue(xSaveSetInfoPath+"["+iRow+"]/checked") == "Y") {
- if (model.getValue(xSaveSetInfoPath+"["+iRow+"]/mainyn") == "M") {
- model.makeValue("/root/main/cond/maindeptcd", model.getValue(xSaveSetInfoPath+"["+iRow+"]/deptcd"));
- vMCnt ++;
- }
-
- if (model.getValue(xSaveSetInfoPath+"["+iRow+"]/resid") == ""
- && model.getValue(xSaveSetInfoPath+"["+iRow+"]/deptcd") != "2090000000" // 마취통증의학과
- && model.getValue(xSaveSetInfoPath+"["+iRow+"]/deptcd") != "2280000000" // 응급의학과
- && model.getValue(xSaveSetInfoPath+"["+iRow+"]/gbn") == "당직") {
-
- sDeptCd = model.getValue(xSaveSetInfoPath+"["+iRow+"]/deptcd");
- var nNodeCnt = getNodesetCount( xSaveSetInfoPath + "[deptcd='" + sDeptCd + "' and resid != '']" );
- if(nNodeCnt == 0) {
- vRCnt ++;
- }
- }
-
- vSCnt ++;
- }
- }
-
- if (vSCnt == 0) {
- messageBox("선택된 정보가 없습니다", "I999");
- return;
- }
-
- if (vMCnt == 0) {
- messageBox("구분이 '주'인 진료과가 반드시 존재해야 합니다", "I999");
- return;
- } else if (vMCnt > 1) {
- messageBox("구분이 '주'인 진료과는 1개만 가능합니다", "I999");
- return;
- } else {
-
- }
-
- if (vRCnt > 0) {
- messageBox("함께 호출할 전공의를 반드시 선택하세요 (응급의학과, 마취통증의학과 제외)", "I999");
- return;
- }
-
- //환자정보
- var pid = model.getValue("/root/main/cond/patinfo/pid");
- var patnm = model.getValue("/root/main/cond/patinfo/nm");
- var indd = model.getValue("/root/main/cond/patinfo/indd");
- var intm = model.getValue("/root/main/cond/patinfo/intm");
- var cretno = model.getValue("/root/main/cond/patinfo/cretno");
- var visitno = model.getValue("/root/main/cond/patinfo/visitno");
-
- //응급의학과 전화번호
- var cntctel = "0532006166";
- //주진료과
- var maindeptcd = model.getValue("/root/main/cond/maindeptcd");
-
- //호출구분 :
- var grtype = "1";
- var grtypenm = "";
-
- //호출전 유효성체크
- var params = pid + '|' + indd + '|' + cretno + '|' + visitno + '|' + intm + '|' + grtype ;
- if(!fIsValidErCallDr(params)) return;
-
- //==========================================================================
- var sSrchData = "";
- var sSrchHeader = "pid" + "▦"
- + "patnm" + "▦"
- + "indd" + "▦"
- + "cretno" + "▦"
- + "visitno" + "▦"
- + "intm" + "▦"
- + "grtype" + "▦" //호출구분
- + "grtypenm" + "▦"
- + "cntctel" + "▦"
- + "mainyn" + "▦"
- + "orddeptcd" + "▦"
- + "drid" + "▦"
- + "drnm" + "▦"
- + "mpphone" + "▦"
- + "gbn" + "▦"
- + "callgbn" + "▩" ;
-
- //체크된 각 협진과에 환자정보 attach
- for (var iRow = 1; iRow <= getNodesetCount(xSaveSetInfoPath); iRow++) {
-
- if (model.getValue(xSaveSetInfoPath+"["+iRow+"]/checked") == "Y") {
-
- mainyn = model.getValue(xSaveSetInfoPath+"["+iRow+"]/mainyn") ;
- orddeptcd = model.getValue(xSaveSetInfoPath+"["+iRow+"]/deptcd") ;
- drid = model.getValue(xSaveSetInfoPath+"["+iRow+"]/drid") ;
- drnm = model.getValue(xSaveSetInfoPath+"["+iRow+"]/drnm") ;
- mpphone = model.getValue(xSaveSetInfoPath+"["+iRow+"]/mpphone") ;
- gbn = model.getValue(xSaveSetInfoPath+"["+iRow+"]/gbn") ;
- callgbn = "TT";
-
- sSrchData = sSrchData
- + pid + "▦"
- + patnm + "▦"
- + indd + "▦"
- + cretno + "▦"
- + visitno + "▦"
- + intm + "▦"
- + grtype + "▦"
- + grtypenm + "▦"
- + cntctel + "▦"
- + mainyn + "▦"
- + orddeptcd + "▦"
- + drid + "▦"
- + drnm + "▦"
- + mpphone + "▦"
- + gbn + "▦"
- + callgbn + "▩" ;
- }
- }
-
- //전공의 호출정보 추가
- for (var iRow = 1; iRow <= getNodesetCount(xSaveSetInfoPath); iRow++) {
-
- if (model.getValue(xSaveSetInfoPath+"["+iRow+"]/checked") == "Y"
- && model.getValue(xSaveSetInfoPath+"["+iRow+"]/deptcd") != "2090000000"
- && model.getValue(xSaveSetInfoPath+"["+iRow+"]/deptcd") != "2280000000"
- && !isNull(model.getValue(xSaveSetInfoPath+"["+iRow+"]/resid") )
- && model.getValue(xSaveSetInfoPath+"["+iRow+"]/gbn") == "당직") {
-
- mainyn = "S";
- orddeptcd = model.getValue(xSaveSetInfoPath+"["+iRow+"]/deptcd") ;
- drid = model.getValue(xSaveSetInfoPath+"["+iRow+"]/resid") ;
- drnm = model.getValue(xSaveSetInfoPath+"["+iRow+"]/resnm") ;
- mpphone = model.getValue(xSaveSetInfoPath+"["+iRow+"]/resno") ;
- gbn = model.getValue(xSaveSetInfoPath+"["+iRow+"]/gbn") ;
- callgbn = "TT";
-
- sSrchData = sSrchData
- + pid + "▦"
- + patnm + "▦"
- + indd + "▦"
- + cretno + "▦"
- + visitno + "▦"
- + intm + "▦"
- + grtype + "▦"
- + grtypenm + "▦"
- + cntctel + "▦"
- + mainyn + "▦"
- + orddeptcd + "▦"
- + drid + "▦"
- + drnm + "▦"
- + mpphone + "▦"
- + gbn + "▦"
- + callgbn + "▩" ;
- }
- }
-
- model.makeValue("/root/send/reqdata/inscallinfo", sSrchHeader + sSrchData);
- submit("TXMNE05204");
-
- fInit();
- }
-
- function fIsValidErCallDr (params) {
-
- var paramArr = params.split('|');
- var pid = paramArr[0];
- var indd = paramArr[1];
- var cretno = paramArr[2];
- var visitno = paramArr[3];
- var intm = paramArr[4];
- var grtype = paramArr[5];
-
- //환자정보가 존재하지 않으면 호출 되지 않게 blocking
- if(pid == '' || indd == '' || cretno == '' || visitno == '' || intm == ''){
- messageBox('환자정보가 존재하지 않아 호출 할 수 없습니다.', 'E');
- return false;
- }
-
- //호출구분선택
- if(grtype == ''){
- messageBox('호출구분을 선택하십시오.', 'E');
- return false;
- }
-
- //=========================================================================
- //호출진행중이면 호출이 되지않게 blocking-20090618
- var callingyn = "";
- model.makeValue("/root/send/reqchk/pid", pid);
- model.makeValue("/root/send/reqchk/indd", indd);
- model.makeValue("/root/send/reqchk/cretno", cretno);
- model.makeValue("/root/send/reqchk/visitno", visitno);
- model.makeValue("/root/send/reqchk/grtype", grtype);
-
- if(!submit("TRMNE05203")){
- messageBox('호출 중 체크를 실패하였습니다.', 'E999');
- return false;
- } else{
- callingyn = model.getValue("/root/tmp/calling/calling/callingyn");
- if(callingyn == "Y"){
- messageBox("호출이 진행중입니다.\n 잠시 후 다시 시도해 주시기 바랍니다.", "I");
- return false;
- }
- }
-
- return true;
- }
- ]]>
- </script>
- <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/prcpmngtweb/js/MMO001.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="840" pageheight="400" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <datagrid id="grd_erdrcalllist" nodeset="/root/main/trcallinfo/trcalllist" allowselection="false" autoresize="true" backcoloralternate="#ffffff" caption="선택^구분^의사^의사^진료과^전화번호^근무형태^duty^당직일자^전공의^전공의^전공의|선택^구분^사번^이름^진료과^전화번호^근무형태^duty^당직일자^사번^이름^전화번호" colsep="^" colwidth="50, 45, 50, 65, 100, 80, 70, 60, 80, 50, 70, 80" mergecellsfixedrows="bycolrec" rowsep="|" navindex="5" style="left:0px; top:65px; width:820px; height:275px; ">
- <col checkvalue="Y,N" disabled="true" ref="checked" type="checkbox"/>
- <col checkvalue="M,S" ref="mainyn" type="combo" style="text-align:center; ">
- <choices>
- <item>
- <label>주</label>
- <value>M</value>
- </item>
- <item>
- <label>부</label>
- <value>S</value>
- </item>
- </choices>
- </col>
- <col ref="drid"/>
- <col ref="drnm"/>
- <col ref="deptnm"/>
- <col ref="mpphone"/>
- <col ref="gbn"/>
- <col ref="duty"/>
- <col ref="workdd" format="yyyy-mm-dd"/>
- <col ref="resid"/>
- <col ref="resnm" type="inputbutton"/>
- <col ref="resno"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- for (var iRow = 1; iRow <= getNodesetCount(xSaveSetInfoPath); iRow++) {
- if (model.getValue(xSaveSetInfoPath+"["+iRow+"]/gbn") != "당직" && model.getValue(xSaveSetInfoPath+"["+iRow+"]/gbn") != "OnCall") {
- model.setValue(xSaveSetInfoPath+"["+iRow+"]/checked", "Y");
- model.setValue(xSaveSetInfoPath+"["+iRow+"]/mainyn", "S");
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onbuttonclick">
- <![CDATA[
- var row = grd_erdrcalllist.row - 1;
- var deptcd = model.getValue(xSaveSetInfoPath+"[" + row + "]/deptcd");
- var workdd = model.getValue(xSaveSetInfoPath+"[" + row + "]/workdd");
- var resid = model.getValue(xSaveSetInfoPath+"[" + row + "]/resid");
-
- var nNodeCnt = getNodesetCount( xSaveSetInfoPath + "[deptcd='" + deptcd + "' and resid != '']" );
- if(isNull(resid) && nNodeCnt > 0) {
- messageBox("해당과에 등록된 전공의가 존재 합니다.", "I999");
- return;
- }
-
- model.removeNodeset("/root/send/resinfo");
- model.makeValue("/root/send/resinfo/deptcd", deptcd);
- model.makeValue("/root/send/resinfo/workdd", workdd);
- submit("TRMMO08002");
- //mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist", deptcd, "0330", '', 'A');
-
- model.refresh();
-
- group1.visible = true;
-
- ]]>
- </script>
- </datagrid>
- <caption id="caption2" class="tit_2" style="left:0px; top:39px; width:290px; height:16px; vertical-align:middle; ">권역외상센터 당직 및 OnCall 의사 호출</caption>
- <line id="line5" class="line_1" style="x1:0px; y1:60px; x2:820px; y2:60px; "/>
- <button id="btn_call" class="btn5_letter2" navindex="4" style="left:778px; top:35px; width:42px; height:19px; ">
- <caption>호출</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClkBtnCall();
- ]]>
- </script>
- </button>
- <caption id="caption1" style="left:10px; top:350px; width:278px; height:20px; ">※ 구분이 '주'인 진료과가 반드시 존재해야 합니다.</caption>
- <caption id="cap_patinfo" ref="/root/main/patinfo/patinfo" style="left:0px; top:10px; width:730px; height:20px; font-size:12pt; font-weight:bold; color:#3366ff; vertical-align:middle; "/>
- <button id="button1" class="btn2_letter13" navindex="4" style="left:613px; top:35px; width:163px; height:19px; ">
- <caption>호출 현황 조회 및 도착 등록</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var pid = model.getValue("/root/send/reqdata/pid" );
- var orddd = model.getValue("/root/send/reqdata/indd" );
- var cretno = model.getValue("/root/send/reqdata/cretno" );
- var visitno = model.getValue("/root/send/reqdata/visitno" );
- var param = pid + "▦" + orddd + "▦" + cretno + "▦" + visitno;
- setParameter("SPMMO06700_param", param);
- modal("SPMMO06700");
- ]]>
- </script>
- </button>
- <group id="group1" visibility="hidden" style="left:525px; top:135px; width:280px; height:40px; background-color:#ccffcc; border-color:#99cc00; border-style:solid; ">
- <select1 id="combo1" ref="/root/init/residentinfo" appearance="minimal" style="left:80px; top:10px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/userlist">
- <label ref="drnm"/>
- <value ref="drid"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption3" class="tit_2" style="left:15px; top:10px; width:80px; height:20px; ">전공의</caption>
- <button id="button3" class="btn2_letter2" navindex="16" style="left:184px; top:10px; width:42px; height:19px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_erdrcalllist.row - 1;
-
- var drid = combo1.value;
- var drnm = model.getValue("/root/init/userlist[drid = " + drid + "]/drnm");
- var mpphonno = model.getValue("/root/init/userlist[drid = " + drid + "]/mpphonno");
-
- if (drnm == "") {
- model.makeValue(xSaveSetInfoPath+"[" + row + "]/resid", "");
- model.makeValue(xSaveSetInfoPath+"[" + row + "]/resnm", "");
- model.makeValue(xSaveSetInfoPath+"[" + row + "]/resno", "");
- } else {
- model.makeValue(xSaveSetInfoPath+"[" + row + "]/resid", drid);
- model.makeValue(xSaveSetInfoPath+"[" + row + "]/resnm", drnm);
- model.makeValue(xSaveSetInfoPath+"[" + row + "]/resno", mpphonno);
- }
-
- grd_erdrcalllist.refresh();
- group1.visible = false;
- ]]>
- </script>
- </button>
- <button id="button4" class="btn2_letter2" navindex="17" style="left:228px; top:10px; width:42px; height:19px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- group1.visible = false;
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|