123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>응급실 의사호출 Addition</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <erdrcalllist>
- <erdrcalllist/>
- </erdrcalllist>
- <erdrinfo>
- <orddeptcd/>
- <orddrid/>
- <mainyn>M</mainyn>
- <call1/>
- <call2/>
- <call3/>
- <call4/>
- <callcnts/>
- <callcnts2/>
- <callnm/>
- </erdrinfo>
- </main>
- <send>
- <reqdata/>
- <savedata/>
- </send>
- <hidden/>
- <init>
- <orddept/>
- <userlist/>
- <erdeptcd/>
- <macaddr/>
- </init>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize_SPMMO32300();
- ]]>
- </script>
- <submission id="TRMMB04101" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TRMMB04102" mediatype="application/x-www-form-urlencoded" method="post"/>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- group1.attribute("height") = 0;
- ]]>
- </script>
- <submission id="TRMMO32301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/reqdata" resultref="/root/main/erdrcalllist"/>
- <submission id="TRMMB04103" mediatype="application/x-www-form-urlencoded" method="post"/>
- <submission id="TXMMO32301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/erdrcalllist"/>
- <submission id="TXMMO32303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/savedata" resultref="/root/main/erdrcalllist"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../emr/prcpmngtweb/js/MMO001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript">
- <![CDATA[
- var sERDRCALLLIST_PATH = "/root/main/erdrcalllist/erdrcalllist"
-
- /**
- * @desc : 초기화
- * @
- * @param :
- * @return :
- * @author :
- * @---------------------------------------------------
- */
- function fInitialize_SPMMO32300() {
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept", "D");
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist" , getUserInfo("dutplcecd"), "0330");
- mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/erdeptcd" , 1);
- mmbfGetHardCodeInfo("/root/send/reqdata" , "/root/init/macaddr" , 46);
- fReqCallDrList() ;
- }
-
- /**
- * @desc : 조회
- * @
- * @param :
- * @return :
- * @author :
- * @---------------------------------------------------
- */
- function fReqCallDrList() {
- var param = opener.javascript.getParameter("SPMMO32400_param");
- gPARAM = param.split("▦");
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid" , gPARAM[0]);
- model.makeValue("/root/send/reqdata/indd" , gPARAM[1]);
- model.makeValue("/root/send/reqdata/cretno" , gPARAM[2]);
- model.makeValue("/root/send/reqdata/visitno" , gPARAM[3]);
- if (submit("TRMMO32301") == true) {
-
- }
-
- }
-
- /**
- * @desc : 삭제
- * @
- * @param :
- * @return :
- * @author :
- * @---------------------------------------------------
- */
- function fDelERCallInfo(){
- var currow = grd_erdrcalllist.row;
- if(currow < 1){
- return;
- }
- if (grd_erdrcalllist.rows >2) {
- if (grd_erdrcalllist.row ==1 ) {
- messageBox("부유형이 있을때 주 유형은 삭제할수", "I004");
- return;
- }
- }
-
- for (i = grd_erdrcalllist.selectedRow(0) ; i < grd_erdrcalllist.selectedRows + grd_erdrcalllist.selectedRow(0); i++ ) {
- var status = model.getValue(sERDRCALLLIST_PATH + "[" + i + "]/status");
- if(status == "i"){
- grd_erdrcalllist.deleteRow(i);
- }else{
- model.setValue(sERDRCALLLIST_PATH + "[" + i + "]/status", "d");
- }
- }
-
- /*
- //호출한 사람 +응급의학과만 삭제할 수 있도록 로직 추가
- var callpsnid = model.getValue(sERDRCALLLIST_PATH + "[" + currow + "]/callpsnid");
- var userid = getUserId()
- var erdeptcd = model.getValue("/root/init/erdeptcd/hardcd/hardcd");
- if(callpsnid == userid || getUserInfo("dutplcecd") == erdeptcd) {
- var savedata = getNodeListCSV(instance1.selectNodes(sERDRCALLLIST_PATH));
- model.setValue("/root/send/savedata", savedata);
- if(submit("TXMMO32301")){
- fReConCPhone();
- }
- } else {
- messageBox("호출한 사람과", "E004");
- }
- */
- model.refresh();
- }
-
- /**
- * @desc : 주/부 유형 클릭
- * @
- * @param :
- * @return :
- * @author :
- * @---------------------------------------------------
- */
- function fClkColMainYN(){
- var currow = grd_erdrcalllist.row;
- var curcol = grd_erdrcalllist.col;
- var status = model.getValue(sERDRCALLLIST_PATH + "[" + currow + "]/status");
-
- if(curcol == grd_erdrcalllist.colRef("mainyn")){ //주부유형 클릭한 경우
- if(status == "i" || status == "d"){ //신규, 삭제가 아닌 경우
- return;
- }else{
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/status", "u");
- }
- }
- model.refresh();
- }
-
- /**
- * @desc : 저장
- * @
- * @param :
- * @return :
- * @author :
- * @---------------------------------------------------
- */
- function fSaveERCallInfo(){
- var statusCnts = 0;
- for (i = 1; i < grd_erdrcalllist.rows; i++ ) {
- var status = model.getValue(sERDRCALLLIST_PATH + "[" + i + "]/status");
- if (status != "-") {
- statusCnts ++
- }
- }
-
- if (statusCnts < 1) {
- messageBox("변경된 정보가 없습니다", "I");
- return;
- }
- var savedata = getNodeListCSV(instance1.selectNodes(sERDRCALLLIST_PATH));
- model.setValue("/root/send/savedata", savedata);
-
- if(submit("TXMMO32301")){
- }
- }
- /**
- * @desc : 추가버튼 클릭
- * @
- * @param :
- * @return :
- * @author :
- * @---------------------------------------------------
- */
- function fClkBtnAdd(){
- if ( grd_erdrcalllist.rows <= 1 ) {
- messageBox("호출내역이 있을 경우에만 추가할 수 있습니다.", "I");
- return;
- }
- model.resetInstanceNode("/root/main/erdrinfo");
- group1.attribute("height")=95;
- model.setFocus("cmb_orddeptcd");
- model.refresh();
- }
-
- /**
- * @desc : 취소버튼 클릭
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkBtnCncl(){
- group1.attribute("height")=0;
- model.refresh();
- }
-
- /**
- * @desc : 확인버튼 클릭
- * @
- * @param :
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- function fClkBtnCnfm(){
- var orddoct = model.getValue("/root/main/erdrinfo/orddrid"); // 담당의
- if (isNull(orddoct)) {
- messageBox("담당의를 ", "C002");
- return;
- }
- grd_erdrcalllist.addItem();
- var currow = grd_erdrcalllist.row;
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/status" , "i");
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/instcd" , getUserInfo("dutplceinstcd"));
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/pid" , gPARAM[0]);
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/indd" , gPARAM[1]);
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/cretno" , gPARAM[2]);
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/visitno" , gPARAM[3]);
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/erorddoctcd" , cmb_orddrid.value);
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/erorddeptcd" , cmb_orddeptcd.value);
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/erorddoctnm" , cmb_orddrid.label);
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/erorddeptnm" , cmb_orddeptcd.label);
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/mainyn" , "S");
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/callpsnid" , getUserInfo("userid"));
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/callpsnnm" , getUserInfo("usernm"));
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/grtype" , "-");
- model.setValue(sERDRCALLLIST_PATH + "[" + currow + "]/grtypenm" , "Call-Visit");
-
- group1.attribute("height")= 0;
- model.refresh();
-
- //저장
- fSaveERCallInfo();
- }
-
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="814" pageheight="400" guideline="1,797;1,815;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
- <button id="btn_del" class="btn2_letter2" navindex="1" visibility="hidden" style="left:663px; top:8px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fDelERCallInfo();
- ]]>
- </script>
- </button>
- <line id="line5" class="line_1" style="x1:0px; y1:30px; x2:797px; y2:30px; "/>
- <caption id="caption2" class="tit_2" style="left:0px; top:14px; width:161px; height:14px; vertical-align:middle; ">응급실의사 호출 List</caption>
- <button id="btn_exit" class="btn4_letter2" navindex="3" style="left:736px; top:368px; width:56px; height:22px; ">
- <caption>종료</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- <datagrid id="grd_erdrcalllist" nodeset="/root/main/erdrcalllist/erdrcalllist" caption="상태^instcd^pid^hngnm^indd^cretno^visitno^erorddeptcd^주/부^진료과^담당의^담당의ID^Gr Type^Call 유형^호출자^호출자ID^호출시간^도착시간^등록자^등록자ID" colsep="^" colwidth="46, 0, 0, 0, 0, 0, 0, 0, 40, 100, 75, 0, 0, 100, 74, 0, 129, 127, 79, 0" mergecellsfixedrows="bycolrec" rowsep="|" navindex="5" style="left:0px; top:35px; width:797px; height:325px; ">
- <col disabled="true" ref="status" type="combo">
- <choices>
- <item>
- <label>-</label>
- <value/>
- </item>
- <item>
- <label>신규</label>
- <value>i</value>
- </item>
- <item>
- <label>수정</label>
- <value>u</value>
- </item>
- <item>
- <label>삭제</label>
- <value>d</value>
- </item>
- </choices>
- </col>
- <col ref="instcd" visibility="hidden"/>
- <col ref="pid" visibility="hidden"/>
- <col ref="hngnm" visibility="hidden"/>
- <col ref="indd" visibility="hidden"/>
- <col ref="cretno" visibility="hidden"/>
- <col ref="visitno" visibility="hidden"/>
- <col ref="erorddeptcd" visibility="hidden"/>
- <col ref="mainyn" type="combo">
- <choices>
- <item>
- <label>주</label>
- <value>M</value>
- </item>
- <item>
- <label>부</label>
- <value>S</value>
- </item>
- </choices>
- </col>
- <col ref="erorddeptnm"/>
- <col ref="erorddoctnm"/>
- <col ref="erorddoctcd" visibility="hidden"/>
- <col ref="grtype" visibility="hidden"/>
- <col ref="grtypenm"/>
- <col ref="callpsnnm"/>
- <col ref="callpsnid" visibility="hidden"/>
- <col ref="calldt" format="yyyy-mm-dd hh:nn:ss"/>
- <col ref="arrivdt" format="yyyy-mm-dd hh:nn:ss"/>
- <col ref="visitrgstrnm"/>
- <col ref="visitrgstrid" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- fClkColMainYN();
- ]]>
- </script>
- </datagrid>
- <button id="btn_save" class="btn5_letter2" navindex="2" style="left:753px; top:8px; width:42px; height:19px; ">
- <caption>수정</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveERCallInfo();
- ]]>
- </script>
- </button>
- <button id="btn_add" class="btn2_letter2" navindex="1" style="left:708px; top:8px; width:42px; height:19px; ">
- <caption>추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClkBtnAdd();
- ]]>
- </script>
- </button>
- <group id="group1" style="left:300px; top:145px; width:205px; height:95px; background-color:#ffffff; border-color:transparent; border-style:solid; ">
- <caption id="caption4" class="cell_1" style="left:3px; top:22px; width:70px; height:22px; vertical-align:middle; ">진료과</caption>
- <button id="btn_cnfm" class="btn5_letter2" navindex="7" style="left:112px; top:69px; width:42px; height:19px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClkBtnCnfm();
- ]]>
- </script>
- </button>
- <caption id="caption5" class="tit_2" style="left:5px; top:3px; width:151px; height:14px; vertical-align:middle; ">응급실 호출의사 정보</caption>
- <caption id="caption3" class="cell_1" style="left:3px; top:45px; width:70px; height:20px; vertical-align:middle; ">담당의</caption>
- <line id="line4" class="line_1" style="x1:3px; y1:17px; x2:198px; y2:17px; "/>
- <button id="btn_cncl" class="btn2_letter2" navindex="8" style="left:156px; top:69px; width:42px; height:19px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClkBtnCncl();
- ]]>
- </script>
- </button>
- <select1 id="cmb_orddeptcd" ref="/root/main/erdrinfo/orddeptcd" navindex="4" appearance="minimal" style="left:74px; top:24px; width:124px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/orddept/dept">
- <label ref="depthngnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist", cmb_orddeptcd.value, "0330");
- model.refresh();
- ]]>
- </script>
- </select1>
- <select1 id="cmb_orddrid" ref="/root/main/erdrinfo/orddrid" navindex="5" appearance="minimal" style="left:74px; top:44px; width:124px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/userlist/usercombo">
- <label ref="usernm"/>
- <value ref="userid"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- var orddrid = model.getValue(sERDRCALLLIST_PATH + "[erorddoctcd='" + cmb_orddrid.value + "']/erorddoctcd");
- if(orddrid != ""){
- messageBox("[" + cmb_orddrid.label + "]은(는) 이미 호출한 의사", "E008");
- model.setValue("/root/main/erdrinfo/orddrid", "");
- return;
- }
- ]]>
- </script>
- </select1>
- </group>
- </xhtml:body>
- </xhtml:html>
|