123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496 |
- <?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>마감후식사처방수정승인</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <data>
- <check/>
- <h_pid/>
- <ward/>
- <room/>
- <hngnm/>
- <prcpdd/>
- <dietmeal/>
- <updtbfdiet/>
- <updtaftdiet/>
- <updtreqdt/>
- <reqflag/>
- <updtreqcnt/>
- <updtreqpsn/>
- <updtaprvyn/>
- <aprvpsn/>
- <aprvdt/>
- <drugpackflag/>
- <bfprcpdelivefact/>
- <prcpdelivefact/>
- <reqcancel/>
- <ordrslt/>
- <dschtype/>
- </data>
- </main>
- <send>
- <searchitem>
- <ward/>
- <reqfromdd/>
- <reqtodd/>
- <dietmeal/>
- <srchflag/>
- <hngnm/>
- <instcd/>
- <userid/>
- <sumdd/>
- <dietmeal2/>
- </searchitem>
- <data>
- <reqflag/>
- <aprvlist/>
- <reqclist/>
- </data>
- </send>
- <temp>
- <ret>
- <retmsg/>
- </ret>
- </temp>
- <init>
- <basecode>
- <meal>
- <A0055>
- <cdid/>
- <cdnm/>
- </A0055>
- </meal>
- <ward>
- <dept>
- <deptcd/>
- <depthngnm/>
- </dept>
- </ward>
- <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_save.disabled = !checkAuth("X");
- btn_aprv.disabled = !checkAuth("X");
- btn_excel.disabled = !checkAuth("P");
- btn_updtsum.disabled = !checkAuth("X");
- 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" ), new Array( "/root/init/basecode/meal", "/root/init/basecode/aprvrslt" ) );
- //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="TRANT01201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
- <submission id="TXANT01201" 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>
- <caption id="caption6" class="tit_1" visibility="hidden" 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("TRANT01201")) {
- 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;
- }
- }
- // ordrslt=4 사망환자 성명에 빨간색으로 표기_김금련 2012.12.10
- if(model.getValue("/root/main/data["+i+"]/ordrslt") == "4") {
- grd_data.cellStyle("background-color" , i , grd_data.colRef("hngnm") , i , grd_data.colRef("hngnm")) = "#FF8888"; //빨강
- } else if (model.getValue("/root/main/data["+i+"]/dschtype") == "G") {
- grd_data.cellStyle("background-color" , i , grd_data.colRef("hngnm") , i , grd_data.colRef("hngnm")) = "#FFCC66"; //주황
- }
-
- }
- 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>
- <select1 id="cmb_srchflag" ref="/root/send/searchitem/srchflag" class="combo_s_essential" appearance="minimal" style="left:1005px; top:8px; width:75px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/basecode/aprvrslt/A0433">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- </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>
- <button id="btn_aprv" class="btn2_letter4" visibility="hidden" style="left:1062px; top:49px; width:80px; height:19px; ">
- <caption>일괄승인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for ( i=1; i<grd_data.rows; i++ ) {
- model.setValue("/root/main/data["+ i +"]/updtaprvyn", "Y");
- }
- grd_data.refresh();
- ]]>
- </script>
- </button>
- <shape id="rectangle1" appearance="rectangle" style="left:10px; top:50px; width:15px; height:15px; background-color:#FF8888; "/>
- <caption id="caption7" style="left:25px; top:49px; width:55px; height:20px; ">사망환자</caption>
- <shape id="rectangle2" appearance="rectangle" style="left:85px; top:50px; width:15px; height:15px; background-color:#ffcc66; "/>
- <caption id="caption8" style="left:100px; top:49px; width:70px; height:20px; ">가퇴원환자</caption>
- </group>
- <datagrid id="grd_data" nodeset="/root/main/data" caption="선택^h_등록번호^병동^병실^환자명^처방일자^끼니^수정전^특이사항^수정후^수정요청시간^요청구분^요청횟수^요청자^처리결과^처리담당자^처리시간^수정사유^사유내역^보호자식구분^요청취소^사망여부^가퇴원여부" colsep="^" colwidth="32, 10, 79, 50, 70, 70, 45, 160, 117, 170, 105, 60, 58, 50, 60, 70, 105, 70, 80,10, 60, 20,20" 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="h_pid" visibility="hidden"/>
- <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="updtbfdiet" style="text-align:left; "/>
- <col ref="bfprcpdelivefact" style="text-align:left; "/>
- <col ref="updtaftdiet" style="text-align:left; "/>
- <col ref="updtreqdt" format="yyyy-mm-dd hh:nn"/>
- <col disabled="true" ref="reqflag" type="combo">
- <choices>
- <item>
- <label>신규</label>
- <value>I</value>
- </item>
- <item>
- <label>수정</label>
- <value>U</value>
- </item>
- <item>
- <label>삭제</label>
- <value>C</value>
- </item>
- </choices>
- </col>
- <col ref="updtreqcnt"/>
- <col ref="updtreqpsn"/>
- <col ref="updtaprvyn" type="combo">
- <choices>
- <item>
- <label/>
- <value/>
- </item>
- <item>
- <label>승인</label>
- <value>Y</value>
- </item>
- <item>
- <label>불허</label>
- <value>N</value>
- </item>
- </choices>
- </col>
- <col ref="aprvpsn" style="left:1156px; top:23px; width:70px; height:23px; "/>
- <col ref="aprvdt" format="yyyy-mm-dd hh:nn"/>
- <col ref="modreason"/>
- <col ref="modreasondesc"/>
- <col ref="drugpackflag" visibility="hidden"/>
- <col checkvalue="Y,N" ref="reqcancel" type="checkbox"/>
- <col ref="ordrslt" visibility="hidden"/>
- <col ref="dschtype"/>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
-
- //영양사 로그인
- if (dutplcecd.substr(0,3) == "325") {
- /*
- 일자를 막지 않으면 과거처방의 수정도 가능
- 과거일자 처방 수정시 활용 할 수 있음.
- */
- if ( grd_data.col == grd_data.colRef("updtaprvyn") ) { // 현재 선택한 열과 그리드상의 컬럼값에 의한 열의 인덱스를 비교
- //처방일자가 오늘이 아니면 처리결과 입력 불가능
- if ( model.getValue("/root/main/data["+ grd_data.row +"]/prcpdd") != getCurrentDate() ) {
- //messageBox("오늘 식사처방이 아니면 처리", "E001");
- //model.setValue("/root/main/data["+ grd_data.row +"]/updtaprvyn", "");
- //model.refresh();
- return;
- }
- //이미 승인 처리한 경우 처리결과 입력 불가능
- else if ( model.getValue("/root/main/data["+ grd_data.row +"]/updtaprvyn") == "Y" ) {
- messageBox("이미 승인한 건은 수정", "E001");
- return;
- }
- }
- }
- //간호사 로그인
- else {
- if ( grd_data.col == grd_data.colRef("reqcancel")) { // 현재 선택한 열과 그리드상의 컬럼값에 의한 열의 인덱스를 비교
- //처방일자가 오늘이 아니면 요청취소 불가능
- if ( model.getValue("/root/main/data["+ grd_data.row +"]/prcpdd") != getCurrentDate() ) {
- messageBox("오늘 식사처방이 아니면 취소", "E001");
- return;
- }
- //영양팀에서 이미 처리결과를 입력한 경우 요청취소 불가능
- else if ( model.getValue("/root/main/data["+ grd_data.row +"]/updtaprvyn") != "" ) {
- messageBox("영양팀에서 이미 처리한 건은 취소", "E001");
- return;
- }
- }
- }
- ]]>
- </script>
- </datagrid>
- <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="btn_dietprcpprint" class="btn4_letter6" style="left:1px; top:4px; width:128px; height:22px; ">
- <caption>식사처방출력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //navigate("SMANC00300", 0,100,150, "SMANC00300", "/root/send/openpopup", "/root/main/receivedata");
- //navigate("SMANT00100", 0,100,150, "SMANT00100");
- open("SMANT00100", "","","", "SMANT00100");
- ]]>
- </script>
- </button>
- <button id="btn_updtsum" class="btn4_letter4" visibility="hidden" style="left:134px; top:4px; width:80px; height:22px; ">
- <caption>변경집계</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- // if ( messageBox("변경집계를", "Q004") == 6 ) {
- // //필수입력항목 체크
- // if ( rdo_diet.value == "0" ) {
- // messageBox("승인한 식사처방의 집계를 위하여 조식,중식,석식 중", "C002");
- // return;
- // }
- // model.makeNode("/root/send/searchitem/batchflag");
- // model.setValue("/root/send/searchitem/batchflag", "manual"); //batch 실행구분=수동
- // submit("TXANT01202");
- // if ( model.getValue("/root/temp/ret/retmsg") == "OK" ) {
- // messageBox("변경집계가", "I002");
- // }
- // } else { return; }
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:1138px; top:4px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //rowStatus 체크
- // for (var i = 1; i < grd_data.rows; i ++) {
- // alert(grd_data.rowStatus(i));
- // }
-
- var temp = getGridUpdateData(grd_data);
- var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
-
- //로그인한 사용자가 영양팀일 경우
- 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", getCurrentDate());
- 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("TRANT01201"); //재조회
- }
- //로그인한 사용자가 간호팀인 경우
- 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("TRANT01201"); //재조회
- }
-
- btn_search.dispatch("DOMActivate");
- //btn_updtsum.dispatch("DOMActivate"); //저장후 변경집계 자동수행
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|