SMANT01300_식사처방집계조회승인.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>마감후식사처방수정승인</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <data>
  11. <check/>
  12. <pid/>
  13. <ward/>
  14. <room/>
  15. <hngnm/>
  16. <prcpdd/>
  17. <dietmeal/>
  18. <prcpnm/>
  19. <prcpstatcd/>
  20. <prcpno/>
  21. <prcphistno/>
  22. <execprcpuniqno/>
  23. </data>
  24. </main>
  25. <send>
  26. <searchitem>
  27. <ward/>
  28. <reqfromdd/>
  29. <reqtodd/>
  30. <dietmeal/>
  31. <srchflag/>
  32. <hngnm/>
  33. <instcd/>
  34. <userid/>
  35. <sumdd/>
  36. <dietmeal2/>
  37. <pid/>
  38. </searchitem>
  39. <data>
  40. <aprvlist>
  41. <pid/>
  42. <prcpdd/>
  43. <prcpno/>
  44. <prcphistno/>
  45. <dutplcecd/>
  46. <execprcpuniqno/>
  47. <dutplcecd/>
  48. </aprvlist>
  49. </data>
  50. </send>
  51. <temp>
  52. <ret>
  53. <retmsg/>
  54. </ret>
  55. </temp>
  56. <init>
  57. <basecode>
  58. <meal>
  59. <A0055>
  60. <cdid/>
  61. <cdnm/>
  62. </A0055>
  63. </meal>
  64. <ward>
  65. <dept>
  66. <deptcd/>
  67. <depthngnm/>
  68. </dept>
  69. </ward>
  70. <prcpstatcd>
  71. <M0011>
  72. <cdid/>
  73. <cdnm/>
  74. </M0011>
  75. </prcpstatcd>
  76. <aprvrslt>
  77. <A0433>
  78. <cdid/>
  79. <cdnm/>
  80. </A0433>
  81. </aprvrslt>
  82. </basecode>
  83. </init>
  84. </root>
  85. </instance>
  86. <script type="javascript" ev:event="xforms-ready">
  87. <![CDATA[
  88. finit();
  89. btn_search.disabled = !checkAuth("R");
  90. btn_aprv.disabled = !checkAuth("X");
  91. btn_excel.disabled = !checkAuth("P");
  92. model.setValue("/root/send/searchitem/instcd", getUserInfo("dutplceinstcd"));
  93. model.setValue("/root/send/searchitem/userid", getUserInfo("userid"));
  94. //var posdeptcd = getUserInfo("posdeptcd"); //소속부서코드
  95. var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
  96. //간호사가 로그인했을 경우
  97. if ( dutplcecd.substr(0,3) != "325" ) {
  98. //화면타이틀 다르게 보여주기
  99. document.title = "식사처방수정결과 조회";
  100. caption1.visible = false;
  101. // caption6.visible = true;
  102. // //조회,저장을 제외한 버튼 숨기기
  103. // btn_dietprcpprint.visible = false;
  104. btn_aprv.visible = false;
  105. // btn_updtsum.visible = false;
  106. //처리결과 콤보 비활성화
  107. grd_data.colDisabled(grd_data.colRef("updtaprvyn")) = true;
  108. //로그인한 간호사의 소속병동으로 데이터 자동조회
  109. model.setValue("/root/send/searchitem/ward", dutplcecd);
  110. model.setValue("/root/send/searchitem/dietmeal", "0");
  111. btn_search.dispatch("DOMActivate");
  112. }else{
  113. //요청취소 체크박스 비활성화
  114. grd_data.colDisabled(grd_data.colRef("reqcancel")) = true;
  115. }
  116. ]]>
  117. </script>
  118. <script type="javascript">
  119. <![CDATA[
  120. function finit() {
  121. var instcd = getUserInfo("dutplceinstcd");
  122. // 화면open시 공통코드 setting
  123. zbcfGetCodeList( new Array( "A0055", "A0433","M0011" ), new Array( "/root/init/basecode/meal", "/root/init/basecode/aprvrslt","/root/init/basecode/prcpstatcd" ) );
  124. //zbcfGetDeptCodeList( instcd, 'orduseyn', 'W', '/root/init/basecode/ward');
  125. zsdfGetWardDeptList(instcd, '/root/init/basecode/ward', 'depthngnm', 'asc', new Date().getDateFormat("YYYYMMDD"), 'after');
  126. model.setValue("/root/send/searchitem/reqfromdd", getCurrentDate());
  127. model.setValue("/root/send/searchitem/reqtodd", getCurrentDate());
  128. model.resetInstanceNode("/root/send/data");
  129. model.removeNodeset("/root/main/data");
  130. //화면open시 현재시간을 계산하여 끼니 자동setting
  131. //각 끼니별 2차 마감시간으로부터 2시간후까지는 이전끼니로 setting
  132. var tm = getCurrentTime();
  133. if ( tm.substr(0,4) <= 0830 ) { //조식 2차 마감시간은 06:30
  134. //if ( tm.substr(0,4) <= 0630 ) {
  135. model.setValue("/root/send/searchitem/dietmeal", "1");
  136. } else if ( (tm.substr(0,4) > 0830) && (tm.substr(0,4) <= 1330) ) { //중식 2차 마감시간은 11:30
  137. //} else if ( (tm.substr(0,4) > 0630) && (tm.substr(0,4) <= 1130) ) {
  138. model.setValue("/root/send/searchitem/dietmeal", "2");
  139. } else {
  140. model.setValue("/root/send/searchitem/dietmeal", "3");
  141. }
  142. model.refresh();
  143. }
  144. ]]>
  145. </script>
  146. <submission id="TRZBC00101"/>
  147. <submission id="TRZSD00109" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  148. <submission id="TRANT01301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/main"/>
  149. <submission id="TXANT01301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data" resultref="/root/temp"/>
  150. <submission id="TXANT01202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/searchitem" resultref="/root/temp"/>
  151. </model>
  152. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  153. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  154. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  155. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  156. <script type="javascript" src="../../../com/departmentcodeweb/js/ZSD001.js"/>
  157. <script type="javascript" src="../../../ast/commonweb/js/AST.js"/>
  158. </xhtml:head>
  159. <xhtml:body guideline="1,1194;2,747;1,899;1,966;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  160. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  161. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">식사처방집계 조회</caption>
  162. </group>
  163. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; color:#FF8888; ">
  164. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  165. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; "/>
  166. <caption id="caption2" class="search_name" style="left:556px; top:8px; width:64px; height:17px; ">병동 :</caption>
  167. <button id="btn_search" class="btn1_letter2" style="left:1122px; top:7px; width:56px; height:22px; ">
  168. <caption>조회</caption>
  169. <script type="javascript" ev:event="DOMActivate">
  170. <![CDATA[
  171. var fromdd = model.getValue("/root/send/searchitem/reqfromdd");
  172. var todd = model.getValue("/root/send/searchitem/reqtodd");
  173. if (getDateInterval(fromdd, todd) < 0) {
  174. messageBox("조회 시작일은 종료일보다 클 수", "I004");
  175. return;
  176. } else {
  177. if (submit("TRANT01301")) {
  178. var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
  179. grd_data.rebuildStyle();
  180. for (var i = 1; i < grd_data.rows; i ++) {
  181. //처방일자가 오늘이 아닌 경우 처리결과 및 요청취소 입력 불가능
  182. if (model.getValue("/root/main/data[" + i + "]/prcpdd") != getCurrentDate()) {
  183. grd_data.isReadOnly(i, 14) = true;
  184. grd_data.isReadOnly(i, 18) = true;
  185. }
  186. //영양사가 로그인한 경우 요청취소 입력 불가능
  187. //영양사가 로그인하고 이미 승인 처리한 경우 처리결과 입력 불가능
  188. else if (dutplcecd.substr(0,3) == "325") {
  189. grd_data.isReadOnly(i, 18) = true;
  190. if (model.getValue("/root/main/data["+ i +"]/updtaprvyn") == "Y") {
  191. grd_data.isReadOnly(i, 14) = true;
  192. } else {
  193. grd_data.isReadOnly(i, 14) = false;
  194. }
  195. }
  196. //간호사가 로그인한 경우 처리결과 입력 불가능
  197. //간호사가 로그인하고 영양팀에서 이미 처리결과를 입력한 경우 요청취소 입력 불가능
  198. else {
  199. grd_data.isReadOnly(i, 14) = true;
  200. if (model.getValue("/root/main/data["+ i +"]/updtaprvyn") != "") {
  201. grd_data.isReadOnly(i, 18) = true;
  202. } else {
  203. grd_data.isReadOnly(i, 18) = false;
  204. }
  205. }
  206. }
  207. model.refresh();
  208. }
  209. }
  210. ]]>
  211. </script>
  212. </button>
  213. <line id="line13" style="x1:1106px; y1:7px; x2:1106px; y2:29px; "/>
  214. <select1 id="cmb_ward" ref="/root/send/searchitem/ward" class="combo_s_essential" appearance="minimal" style="left:617px; top:7px; width:100px; height:19px; ">
  215. <choices>
  216. <itemset nodeset="/root/init/basecode/ward/dept">
  217. <label ref="depthngnm"/>
  218. <value ref="deptcd"/>
  219. </itemset>
  220. </choices>
  221. </select1>
  222. <caption id="caption3" class="search_name" style="left:11px; top:8px; width:64px; height:17px; ">일자 :</caption>
  223. <input id="ipt_reqfromdd" ref="/root/send/searchitem/reqfromdd" class="input_s_essential" inputtype="date" style="left:70px; top:7px; width:90px; height:19px; "/>
  224. <caption id="caption11" class="search_n_b" style="left:162px; top:9px; width:12px; height:17px; font-weight:bolder; ">~</caption>
  225. <input id="ipt_reqtodd" ref="/root/send/searchitem/reqtodd" class="input_s_essential" inputtype="date" style="left:175px; top:7px; width:90px; height:19px; "/>
  226. <caption id="caption4" class="search_name" style="left:291px; top:8px; width:64px; height:17px; ">끼니 :</caption>
  227. <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; ">
  228. <choices>
  229. <item>
  230. <label>조식</label>
  231. <value>1</value>
  232. </item>
  233. <item>
  234. <label>중식</label>
  235. <value>2</value>
  236. </item>
  237. <item>
  238. <label>석식</label>
  239. <value>3</value>
  240. </item>
  241. <item>
  242. <label>전체</label>
  243. <value>0</value>
  244. </item>
  245. </choices>
  246. </select1>
  247. <caption id="caption12" class="search_name" style="left:750px; top:8px; width:126px; height:17px; ">환자명 :</caption>
  248. <input id="ipt_hngnm" ref="/root/send/searchitem/hngnm" class="input_search" style="left:825px; top:8px; width:65px; height:19px; ">
  249. <script type="javascript" ev:event="onkeydown">
  250. <![CDATA[
  251. inputEnterKey("btn_search", "DOMActivate");
  252. ]]>
  253. </script>
  254. </input>
  255. <caption id="caption5" class="search_name" style="left:918px; top:8px; width:86px; height:17px; ">차트번호 :</caption>
  256. <input id="input1" ref="/root/send/searchitem/pid" style="left:1005px; top:10px; width:80px; height:20px; "/>
  257. </group>
  258. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  259. <button id="btn_excel" class="btn2_letter2" style="left:1145px; top:49px; width:42px; height:19px; ">
  260. <caption>엑셀</caption>
  261. <script type="javascript" ev:event="DOMActivate">
  262. <![CDATA[
  263. var filename = window.fileDialog("save", ",", false, "DietPrcpUpdtAprv_list", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  264. if (filename != "") {
  265. grd_data.saveExcel(filename, "grd_data", true, false, "", "", "");
  266. }
  267. ]]>
  268. </script>
  269. </button>
  270. </group>
  271. <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; ">
  272. <col checkvalue="Y,N" ref="check" type="checkbox" visibility="hidden" style="left:20px; top:23px; width:32px; height:23px; "/>
  273. <col ref="pid"/>
  274. <col disabled="true" ref="ward" type="combo">
  275. <choices>
  276. <itemset nodeset="/root/init/basecode/ward/dept">
  277. <label ref="depthngnm"/>
  278. <value ref="deptcd"/>
  279. </itemset>
  280. </choices>
  281. </col>
  282. <col ref="room"/>
  283. <col ref="hngnm"/>
  284. <col ref="prcpdd" format="yyyy-mm-dd"/>
  285. <col disabled="true" ref="dietmeal" type="combo">
  286. <choices>
  287. <itemset nodeset="/root/init/basecode/meal/A0055">
  288. <label ref="cdnm"/>
  289. <value ref="cdid"/>
  290. </itemset>
  291. </choices>
  292. </col>
  293. <col ref="prcpnm" style="text-align:center; "/>
  294. <col disabled="true" ref="prcpstatcd" type="combo">
  295. <choices>
  296. <itemset nodeset="/root/init/basecode/prcpstatcd/M0011">
  297. <label ref="cdnm"/>
  298. <value ref="cdid"/>
  299. </itemset>
  300. </choices>
  301. </col>
  302. <col ref="prcpno" style="text-align:center; "/>
  303. <col ref="prcphistno" style="text-align:center; "/>
  304. <col ref="execprcpuniqno" style="text-align:center; "/>
  305. <script type="javascript" ev:event="onclick">
  306. <![CDATA[
  307. var idx = grd_data.Row;
  308. if(idx < 1) return;
  309. var pid = model.getValue("/root/main/data["+idx+"]/pid");
  310. model.setValue("/root/send/data/aprvlist/pid", model.getValue("/root/main/data["+idx+"]/pid"));
  311. model.setValue("/root/send/data/aprvlist/prcpdd", model.getValue("/root/main/data["+idx+"]/prcpdd"));
  312. model.setValue("/root/send/data/aprvlist/prcpno", model.getValue("/root/main/data["+idx+"]/prcpno"));
  313. model.setValue("/root/send/data/aprvlist/prcphistno", model.getValue("/root/main/data["+idx+"]/prcphistno"));
  314. model.setValue("/root/send/data/aprvlist/execprcpuniqno", model.getValue("/root/main/data["+idx+"]/execprcpuniqno"));
  315. ]]>
  316. </script>
  317. </datagrid>
  318. <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  319. <button id="btn_aprv" class="btn4_letter2" style="left:1138px; top:4px; width:56px; height:22px; ">
  320. <caption>승인</caption>
  321. <script type="javascript" ev:event="DOMActivate">
  322. <![CDATA[
  323. var dutplcecd = getUserInfo("dutplcecd"); //소속부서코드
  324. var pid = model.getValue("/root/send/data/aprvlist/pid");
  325. if(pid == ''){
  326. messageBox("승인할 리스트를 선택", "I008");
  327. return;
  328. }else{
  329. model.setValue("/root/send/data/aprvlist/dutplcecd",dutplcecd);
  330. submit("TXANT01301");
  331. submit("TRANT01301"); //재조회
  332. messageBox("승인처리", "I001");
  333. }
  334. // var temp = getGridUpdateData(grd_data);
  335. //로그인한 사용자가 영양팀일 경우
  336. // if (dutplcecd.substr(0,3) == "325") {
  337. // if ( temp == "" ) {
  338. // messageBox("승인할 데이터가", "I004");
  339. // } else {
  340. // if ( messageBox("", "Q002") == 6 ) {
  341. // model.setValue("/root/send/data/reqflag", 'O'); //영양팀 구분자(O) 세팅
  342. // model.setValue("/root/send/data/aprvlist", grd_data.getUpdateData());
  343. // if (submit("TXANT01201")) { //승인여부 저장 및 식사처방 수정
  344. // model.setValue("/root/send/searchitem/sumdd", model.getValue("/root/main/data["+ grd_data.row +"]/prcpdd")); // 과거 식사처방 승인시 과거 처방일자 넘김. 2011.08.11_김금련
  345. // for ( i=1; i<4; i++ ) { //끼니별 변경집계 수행
  346. // model.setValue("/root/send/searchitem/dietmeal2", i);
  347. // submit("TXANT01202");
  348. // }
  349. // }
  350. // } else { return; }
  351. // }
  352. // submit("TRANT01301"); //재조회
  353. // }
  354. // //로그인한 사용자가 간호팀인 경우
  355. // else {
  356. // if ( temp == "" ) {
  357. // messageBox("취소 선택한 데이터가", "I004");
  358. // } else {
  359. // if ( messageBox("", "Q002") == 6 ) {
  360. // model.setValue("/root/send/data/reqflag", 'N'); //간호팀 구분자(N) 세팅
  361. // model.setValue("/root/send/data/reqclist", grd_data.getUpdateData());
  362. // submit("TXANT01201"); //취소 처리
  363. // } else { return; }
  364. // }
  365. // submit("TRANT01301"); //재조회
  366. // }
  367. // btn_search.dispatch("DOMActivate");
  368. ]]>
  369. </script>
  370. </button>
  371. </group>
  372. </xhtml:body>
  373. </xhtml:html>