123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <!--
- * 제 목 : SPMNO02200_처방선택.xrw
- * 설 명 : 기준자료 처방선택
- * 수정이력 :
- * 기 타 :
- -->
- <?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>기준자료 처방선택</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <prcpinfo>
- <prcplist>
- <check/>
- <prcpcd/>
- <prcpnm/>
- <applstage/>
- <deptcd/>
- <deptnm/>
- </prcplist>
- </prcpinfo>
- <cond>
- <prcpcd/>
- <prcpnm/>
- <deptcd/>
- <deptnm/>
- <ordtype/>
- <baseflag/>
- <ordtypenm/>
- </cond>
- </main>
- <send>
- <req/>
- <prcpinfo/>
- </send>
- <hidden>
- </hidden>
- <temp>
- <prcpinfo/>
- </temp>
- </root>
- </instance>
- <script type="javascript">
- <![CDATA[
- var sACTPRCPLIST_PATH = "/root/main/prcpinfo/prcplist";
-
- function fInitialize()
- {
- if(checkOpener()){
- opener.javascript.setParameter("SPMNO02200_ReturnFlag","");
- var sParamMsg = opener.javascript.getParameter("SPMNO02200_Param");
-
- model.setValue("/root/main/cond/prcpcd", getArrayData(sParamMsg,0,0));
- model.setValue("/root/main/cond/prcpnm", getArrayData(sParamMsg,0,1));
- model.setValue("/root/main/cond/deptcd", getArrayData(sParamMsg,0,2));
- model.setValue("/root/main/cond/deptnm", getArrayData(sParamMsg,0,3));
- model.setValue("/root/main/cond/ordtype", getArrayData(sParamMsg,0,4));
- model.setValue("/root/main/cond/baseflag", getArrayData(sParamMsg,0,5));
- if(model.getValue("/root/main/cond/ordtype") == "O"){ // 진료형태
- model.setValue("/root/main/cond/ordtypenm", "외래");
- } else if(model.getValue("/root/main/cond/ordtype") == "I"){
- model.setValue("/root/main/cond/ordtypenm", "입원");
- }
- model.removeNodeset(sACTPRCPLIST_PATH);
-
- fSrchPrcpInfo();
- } else {
- alert("본 화면은 팝업으로만 사용할수 있습니다.");
- model.close();
- }
- }
- function fSrchPrcpInfo(){
- model.removenode("/root/send/req");
- model.makeValue("/root/send/req", "");
- model.copynode("/root/send/req", "/root/main/cond");
- submit("TRMNO02201");
- if(model.getValue("/root/main/cond/baseflag") == "B"){ // 기준구분
- grd_prcpinfo.isReadOnly(1,4, grd_prcpinfo.rows-1, 4) = true;
- }
- }
-
- function fSavePrcpInfo(){
- var iIdx = 0;
- if(!checkGridUpdate(grd_prcpinfo)) {
- messageBox("선택 대상이 ", "I004")
- return;
- }
- for(var iRow = grd_prcpinfo.fixedrows; iRow <= grd_prcpinfo.rows - grd_prcpinfo.fixedrows; iRow++){
- if(model.getValue(sACTPRCPLIST_PATH+"["+iRow+"]/check") == "true") iIdx++;
- }
- if(iIdx == 0) {
- messageBox("선택 대상이 ", "I004")
- return;
- }
- var updatedata = grd_prcpinfo.getUpdateData("update");
- var sRtnMsg = messageBox("간호 기준자료를 ", "Q003");
- if(sRtnMsg != 6) return;
-
- model.makeValue("/root/send/prcpinfo",updatedata);
- if(submit("TXMNO02201")){
- if(model.getValue("/root/temp/prcpinfo/prcplist/inscnt") == "0"){
- messageBox("기준자료 저장중 ", "E009")
- } else {
- opener.javascript.setParameter("SPMNO02200_ReturnFlag","Y");
- model.close();
- }
- }
- }
- function checkGridUpdate(grid)
- {
- var uData = grid.getUpdateDataXml("update");
- if (uData=="") return false;
- else return true;
- }
- function fPrcpListSrch() {
- if ((model.getValue("/root/main/cond/prcpcd").length >= 2) ||
- (model.getValue("/root/main/cond/prcpnm").length >= 2)){
- inputEnterKey("btn_search", "DOMActivate");
- } else {
- messageBox("검색어는 2자 이상","C001");
- model.setFocus("ipt_prcpcd");
- return;
- }
- }
- function fClickedGridRow() {
- var iRow = 0;
- var iCol = 0;
- iRow = grd_prcpinfo.row;
- iCol = grd_prcpinfo.col;
- if(iCol == 1) return;
- if(iRow < 1) return;
- if(model.getValue("/root/main/prcpinfo/prcplist["+iRow+"]/check") == "true"){
- model.setValue("/root/main/prcpinfo/prcplist["+iRow+"]/check","false");
- grd_prcpinfo.removeStatus(iRow, "update");
- }else{
- model.setValue("/root/main/prcpinfo/prcplist["+iRow+"]/check", "true");
- grd_prcpinfo.rowStatus(iRow) = 2;
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TRMNO02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/req" replace="instance" resultref="/root/main/prcpinfo"/>
- <submission id="TXMNO02201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/prcpinfo"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../emr/carecomweb/js/CareCom.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="600" pageheight="400" guideline="1,21;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="grp_biz" scroll="auto" style="left:0px; top:35px; width:580px; height:326px; ">
- <caption id="caption1" class="tit_2" style="left:5px; top:10px; width:194px; height:14px; ">처방 조회</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:25px; x2:576px; y2:25px; "/>
- <datagrid id="grd_prcpinfo" nodeset="/root/main/prcpinfo/prcplist" class="datagrid2" caption="선택^처방코드^처방명^적용^부서^진료과^prcpcd" colsep="^" colwidth="32, 77, 263, 61, 100, 0, 0" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:1px; top:30px; width:576px; height:290px; ">
- <col ref="check" type="checkbox"/>
- <col ref="prcpcd"/>
- <col ref="prcpnm" style="text-align:left; "/>
- <col ref="applstage" type="combo">
- <choices>
- <item>
- <label>전체</label>
- <value>A</value>
- </item>
- <item>
- <label>재원</label>
- <value>I</value>
- </item>
- <item>
- <label>퇴원</label>
- <value>T</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- ]]>
- </script>
- </col>
- <col ref="deptnm"/>
- <col ref="deptcd"/>
- <col ref="prcpcd" visibility="hidden"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- fClickedGridRow();
- ]]>
- </script>
- </datagrid>
- </group>
- <group id="group2" style="left:0px; top:0px; width:581px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:580px; height:35px; "/>
- <line id="line13" class="line_4" style="x1:515px; y1:7px; x2:515px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <button id="btn_search" class="btn1_letter2" style="left:520px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSrchPrcpInfo();
- ]]>
- </script>
- </button>
- <caption id="caption4" class="search_name" style="left:0px; top:9px; width:80px; height:17px; ">검색어 :</caption>
- <input id="ipt_prcpcd" ref="/root/main/cond/prcpcd" class="input_default" navindex="2" imemode="alpha" maxlength="12" style="left:80px; top:8px; width:105px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keycode == "13"){
- fPrcpListSrch();
- }
- ]]>
- </script>
- </input>
- <input id="ipt_prcpnm" ref="/root/main/cond/prcpnm" class="input_default" style="left:190px; top:8px; width:250px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- if(event.keycode == "13"){
- fPrcpListSrch();
- }
- ]]>
- </script>
- </input>
- <output id="output1" ref="/root/main/cond/ordtypenm" style="left:445px; top:8px; width:60px; height:19px; text-align:center; "/>
- </group>
- <group id="group1" scroll="auto" style="left:0px; top:356px; width:580px; height:27px; ">
- <button id="btn_select" class="btn4_letter2" style="left:461px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSavePrcpInfo();
- ]]>
- </script>
- </button>
- <button id="btn_close" class="btn4_letter2" style="left:520px; top:3px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.close();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|