123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <?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>
- <data>
- <check/>
- <pid/>
- <ward/>
- <room/>
- <hngnm/>
- <prcpdd/>
- <dietmeal/>
- <prcpnm/>
- <prcpstatcd/>
- <prcpno/>
- <prcphistno/>
- <execprcpuniqno/>
- </data>
- </main>
- <send>
- <searchitem>
- <ward/>
- <reqfromdd/>
- <reqtodd/>
- <dietmeal/>
- <srchflag/>
- <hngnm/>
- <instcd/>
- <userid/>
- <sumdd/>
- <dietmeal2/>
- <pid/>
- </searchitem>
- <data>
- <aprvlist>
- <pid/>
- <prcpdd/>
- <prcpno/>
- <prcphistno/>
- <dutplcecd/>
- <execprcpuniqno/>
- <dutplcecd/>
- </aprvlist>
- </data>
- </send>
- <temp>
- <ret>
- <retmsg/>
- </ret>
- </temp>
- <init>
- <basecode>
- <meal>
- <A0055>
- <cdid/>
- <cdnm/>
- </A0055>
- </meal>
- <ward>
- <dept>
- <deptcd/>
- <depthngnm/>
- </dept>
- </ward>
- <prcpstatcd>
- <M0011>
- <cdid/>
- <cdnm/>
- </M0011>
- </prcpstatcd>
- <aprvrslt>
- <A0433>
- <cdid/>
- <cdnm/>
- </A0433>
- </aprvrslt>
- </basecode>
- </init>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- finit();
- btn_search.disabled = !checkAuth("R");
- btn_aprv.disabled = !checkAuth("X");
- btn_excel.disabled = !checkAuth("P");
- model.setValue("/root/send/searchitem/instcd", getUserInfo("dutplceinstcd"));
- model.setValue("/root/send/searchitem/userid", getUserInfo("userid"));
- //var posdeptcd = getUserInfo("posdeptcd"); //소속부서코드
- var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
- //간호사가 로그인했을 경우
- if ( dutplcecd.substr(0,3) != "325" ) {
- //화면타이틀 다르게 보여주기
- document.title = "식사처방수정결과 조회";
- caption1.visible = false;
- // caption6.visible = true;
- // //조회,저장을 제외한 버튼 숨기기
- // btn_dietprcpprint.visible = false;
- btn_aprv.visible = false;
- // btn_updtsum.visible = false;
- //처리결과 콤보 비활성화
- grd_data.colDisabled(grd_data.colRef("updtaprvyn")) = true;
- //로그인한 간호사의 소속병동으로 데이터 자동조회
- model.setValue("/root/send/searchitem/ward", dutplcecd);
- model.setValue("/root/send/searchitem/dietmeal", "0");
- btn_search.dispatch("DOMActivate");
- }else{
- //요청취소 체크박스 비활성화
- grd_data.colDisabled(grd_data.colRef("reqcancel")) = true;
- }
-
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- function finit() {
- var instcd = getUserInfo("dutplceinstcd");
- // 화면open시 공통코드 setting
- zbcfGetCodeList( new Array( "A0055", "A0433","M0011" ), new Array( "/root/init/basecode/meal", "/root/init/basecode/aprvrslt","/root/init/basecode/prcpstatcd" ) );
- //zbcfGetDeptCodeList( instcd, 'orduseyn', 'W', '/root/init/basecode/ward');
- zsdfGetWardDeptList(instcd, '/root/init/basecode/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), 'after');
- model.setValue("/root/send/searchitem/reqfromdd", getCurrentDate());
- model.setValue("/root/send/searchitem/reqtodd", getCurrentDate());
- model.resetInstanceNode("/root/send/data");
- model.removeNodeset("/root/main/data");
- //화면open시 현재시간을 계산하여 끼니 자동setting
- //각 끼니별 2차 마감시간으로부터 2시간후까지는 이전끼니로 setting
- var tm = getCurrentTime();
- if ( tm.substr(0,4) <= 0830 ) { //조식 2차 마감시간은 06:30
- //if ( tm.substr(0,4) <= 0630 ) {
- model.setValue("/root/send/searchitem/dietmeal", "1");
- } else if ( (tm.substr(0,4) > 0830) && (tm.substr(0,4) <= 1330) ) { //중식 2차 마감시간은 11:30
- //} else if ( (tm.substr(0,4) > 0630) && (tm.substr(0,4) <= 1130) ) {
- model.setValue("/root/send/searchitem/dietmeal", "2");
- } else {
- model.setValue("/root/send/searchitem/dietmeal", "3");
- }
- model.refresh();
- }
- ]]>
- </script>
- <submission id="TRZBC00101"/>
- <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRANT01301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
- <submission id="TXANT01301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/temp"/>
- <submission id="TXANT01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" 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/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
- <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
- </xhtml:head>
- <xhtml:body guideline="1,1194;2,747;1,899;1,966;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">식사처방집계 조회</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; color:#FF8888; ">
- <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; "/>
- <caption id="caption2" class="search_name" style="left:556px; top:8px; width:64px; height:17px; ">병동 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:1122px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fromdd = model.getValue("/root/send/searchitem/reqfromdd");
- var todd = model.getValue("/root/send/searchitem/reqtodd");
- if (getDateInterval(fromdd, todd) < 0) {
- messageBox("조회 시작일은 종료일보다 클 수", "I004");
- return;
- } else {
- if (submit("TRANT01301")) {
- var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
- grd_data.rebuildStyle();
- for (var i = 1; i < grd_data.rows; i ++) {
- //처방일자가 오늘이 아닌 경우 처리결과 및 요청취소 입력 불가능
- if (model.getValue("/root/main/data[" + i + "]/prcpdd") != getCurrentDate()) {
- grd_data.isReadOnly(i, 14) = true;
- grd_data.isReadOnly(i, 18) = true;
- }
- //영양사가 로그인한 경우 요청취소 입력 불가능
- //영양사가 로그인하고 이미 승인 처리한 경우 처리결과 입력 불가능
- else if (dutplcecd.substr(0,3) == "325") {
- grd_data.isReadOnly(i, 18) = true;
- if (model.getValue("/root/main/data["+ i +"]/updtaprvyn") == "Y") {
- grd_data.isReadOnly(i, 14) = true;
- } else {
- grd_data.isReadOnly(i, 14) = false;
- }
- }
- //간호사가 로그인한 경우 처리결과 입력 불가능
- //간호사가 로그인하고 영양팀에서 이미 처리결과를 입력한 경우 요청취소 입력 불가능
- else {
- grd_data.isReadOnly(i, 14) = true;
- if (model.getValue("/root/main/data["+ i +"]/updtaprvyn") != "") {
- grd_data.isReadOnly(i, 18) = true;
- } else {
- grd_data.isReadOnly(i, 18) = false;
- }
- }
- }
- model.refresh();
- }
- }
- ]]>
- </script>
- </button>
- <line id="line13" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
- <select1 id="cmb_ward" ref="/root/send/searchitem/ward" class="combo_s_essential" appearance="minimal" style="left:617px; top:7px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/basecode/ward/dept">
- <label ref="depthngnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption3" class="search_name" style="left:11px; top:8px; width:64px; height:17px; ">일자 :</caption>
- <input id="ipt_reqfromdd" ref="/root/send/searchitem/reqfromdd" class="input_s_essential" inputtype="date" style="left:70px; top:7px; width:90px; height:19px; "/>
- <caption id="caption11" class="search_n_b" style="left:162px; top:9px; width:12px; height:17px; font-weight:bolder; ">~</caption>
- <input id="ipt_reqtodd" ref="/root/send/searchitem/reqtodd" class="input_s_essential" inputtype="date" style="left:175px; top:7px; width:90px; height:19px; "/>
- <caption id="caption4" class="search_name" style="left:291px; top:8px; width:64px; height:17px; ">끼니 :</caption>
- <select1 id="rdo_diet" ref="/root/send/searchitem/dietmeal" class="radio_search" appearance="full" cellspacing="2" cols="4" rows="1" overflow="visible" style="left:351px; top:8px; width:189px; height:19px; ">
- <choices>
- <item>
- <label>조식</label>
- <value>1</value>
- </item>
- <item>
- <label>중식</label>
- <value>2</value>
- </item>
- <item>
- <label>석식</label>
- <value>3</value>
- </item>
- <item>
- <label>전체</label>
- <value>0</value>
- </item>
- </choices>
- </select1>
- <caption id="caption12" class="search_name" style="left:750px; top:8px; width:126px; height:17px; ">환자명 :</caption>
- <input id="ipt_hngnm" ref="/root/send/searchitem/hngnm" class="input_search" style="left:825px; top:8px; width:65px; height:19px; ">
- <script type="javascript" ev:event="onkeydown">
- <![CDATA[
- inputEnterKey("btn_search", "DOMActivate");
- ]]>
- </script>
- </input>
- <caption id="caption5" class="search_name" style="left:918px; top:8px; width:86px; height:17px; ">차트번호 :</caption>
- <input id="input1" ref="/root/send/searchitem/pid" style="left:1005px; top:10px; width:80px; height:20px; "/>
- </group>
- <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
- <button id="btn_excel" class="btn2_letter2" style="left:1145px; top:49px; width:42px; height:19px; ">
- <caption>엑셀</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var filename = window.fileDialog("save", ",", false, "DietPrcpUpdtAprv_list", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (filename != "") {
- grd_data.saveExcel(filename, "grd_data", true, false, "", "", "");
- }
- ]]>
- </script>
- </button>
- </group>
- <datagrid id="grd_data" nodeset="/root/main/data" caption="선택^등록번호^병동^병실^환자명^처방일자^끼니^처방명^처방상태^prcpno^prcphistno^execprcpuniqno" colsep="^" colwidth="32, 80, 79, 50, 70, 70, 45, 160, 80, 82, 68, 101" explorerbar="sortshow" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:88px; width:1194px; height:659px; text-align:center; ">
- <col checkvalue="Y,N" ref="check" type="checkbox" visibility="hidden" style="left:20px; top:23px; width:32px; height:23px; "/>
- <col ref="pid"/>
- <col disabled="true" ref="ward" type="combo">
- <choices>
- <itemset nodeset="/root/init/basecode/ward/dept">
- <label ref="depthngnm"/>
- <value ref="deptcd"/>
- </itemset>
- </choices>
- </col>
- <col ref="room"/>
- <col ref="hngnm"/>
- <col ref="prcpdd" format="yyyy-mm-dd"/>
- <col disabled="true" ref="dietmeal" type="combo">
- <choices>
- <itemset nodeset="/root/init/basecode/meal/A0055">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="prcpnm" style="text-align:center; "/>
- <col disabled="true" ref="prcpstatcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/basecode/prcpstatcd/M0011">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="prcpno" style="text-align:center; "/>
- <col ref="prcphistno" style="text-align:center; "/>
- <col ref="execprcpuniqno" style="text-align:center; "/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
-
- var idx = grd_data.Row;
- if(idx < 1) return;
-
- var pid = model.getValue("/root/main/data["+idx+"]/pid");
- model.setValue("/root/send/data/aprvlist/pid", model.getValue("/root/main/data["+idx+"]/pid"));
- model.setValue("/root/send/data/aprvlist/prcpdd", model.getValue("/root/main/data["+idx+"]/prcpdd"));
- model.setValue("/root/send/data/aprvlist/prcpno", model.getValue("/root/main/data["+idx+"]/prcpno"));
- model.setValue("/root/send/data/aprvlist/prcphistno", model.getValue("/root/main/data["+idx+"]/prcphistno"));
- model.setValue("/root/send/data/aprvlist/execprcpuniqno", model.getValue("/root/main/data["+idx+"]/execprcpuniqno"));
- ]]>
- </script>
- </datagrid>
- <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="btn_aprv" class="btn4_letter2" style="left:1138px; top:4px; width:56px; height:22px; ">
- <caption>승인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
- var pid = model.getValue("/root/send/data/aprvlist/pid");
-
- if(pid == ''){
- messageBox("승인할 리스트를 선택", "I008");
- return;
- }else{
- model.setValue("/root/send/data/aprvlist/dutplcecd",dutplcecd);
- submit("TXANT01301");
-
- submit("TRANT01301"); //재조회
- messageBox("승인처리", "I001");
- }
- // var temp = getGridUpdateData(grd_data);
-
- //로그인한 사용자가 영양팀일 경우
- // if (dutplcecd.substr(0,3) == "325") {
- // if ( temp == "" ) {
- // messageBox("승인할 데이터가", "I004");
- // } else {
- // if ( messageBox("", "Q002") == 6 ) {
- // model.setValue("/root/send/data/reqflag", 'O'); //영양팀 구분자(O) 세팅
- // model.setValue("/root/send/data/aprvlist", grd_data.getUpdateData());
- // if (submit("TXANT01201")) { //승인여부 저장 및 식사처방 수정
- // model.setValue("/root/send/searchitem/sumdd", model.getValue("/root/main/data["+ grd_data.row +"]/prcpdd")); // 과거 식사처방 승인시 과거 처방일자 넘김. 2011.08.11_김금련
- // for ( i=1; i<4; i++ ) { //끼니별 변경집계 수행
- // model.setValue("/root/send/searchitem/dietmeal2", i);
- // submit("TXANT01202");
- // }
- // }
- // } else { return; }
- // }
- // submit("TRANT01301"); //재조회
- // }
- // //로그인한 사용자가 간호팀인 경우
- // else {
- // if ( temp == "" ) {
- // messageBox("취소 선택한 데이터가", "I004");
- // } else {
- // if ( messageBox("", "Q002") == 6 ) {
- // model.setValue("/root/send/data/reqflag", 'N'); //간호팀 구분자(N) 세팅
- // model.setValue("/root/send/data/reqclist", grd_data.getUpdateData());
- // submit("TXANT01201"); //취소 처리
- // } else { return; }
- // }
- // submit("TRANT01301"); //재조회
- // }
- // btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|