SMRSO20300_처방집계작업(경북대).xrw 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet ype="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:ex="http://www.comsquare.co.kr/xforms/excel" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://www.comsquare.co.kr/example" xmlns:ms="urn:schemas-microsoft-com:xslt" 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" xmlns:cs="http://www.comsquare.co.kr/xforms">
  4. <xhtml:head>
  5. <xhtml:title>처방 집계 작업</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <workdate>
  11. <sumdd/>
  12. <fromdd/>
  13. <todd/>
  14. </workdate>
  15. <worklist/>
  16. </main>
  17. <send>
  18. <search>
  19. <instcd/>
  20. <wareflag/>
  21. <sumdeptcd/>
  22. <sumdd/>
  23. <fromdd/>
  24. <todd/>
  25. <gubun/>
  26. </search>
  27. <save/>
  28. </send>
  29. <init>
  30. </init>
  31. <hidden/>
  32. <temp>
  33. <sumflag>
  34. <datacount/>
  35. </sumflag>
  36. </temp>
  37. <popdelive>
  38. <instcd/>
  39. <wareflag/>
  40. <wareflagnm/>
  41. <sumdd/>
  42. <selectyn/>
  43. </popdelive>
  44. <popgood>
  45. <instcd/>
  46. <wareflag/>
  47. <selectyn/>
  48. <goodcd/>
  49. </popgood>
  50. <popreq>
  51. <instcd/>
  52. <wareflag/>
  53. <wareflagnm/>
  54. <sumdd/>
  55. <reqdeptcd/>
  56. <reqdeptnm/>
  57. <saveyn/>
  58. </popreq>
  59. </root>
  60. </instance>
  61. <script type="javascript" ev:event="xforms-ready">
  62. <![CDATA[
  63. //화면 Control을 초기화한다
  64. //misfGridInit : model.removeNodeset(grd_work.nodeset); grid.refresh();
  65. misfGridInit(grd_work);
  66. misfMsterDetailSet(grd_work, null, "TRRSO20302" ,"N");
  67. misfComboInstCdListMulti("cmb_instcd",getCurrentDate(),"","N");
  68. //====> 창고 : 본 프로그램에서는 2(진료재료창고), 3(수술재료창고) 만 hard coding 했음
  69. //misfComboComCdList("030M0001",cmb_wareflag); //창고
  70. model.setValue("/root/send/search/instcd", getUserInfo("dutplceinstcd")); //기관 설정
  71. model.refresh();
  72. ]]>
  73. </script>
  74. <submission id="TRRSO20302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main"/>
  75. <submission id="TRRSO20303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/temp"/>
  76. <submission id="TXRSO20302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/temp">"</submission>
  77. </model>
  78. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  79. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  80. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  81. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  82. <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
  83. <script type="javascript" src="../../../mis/miscommonweb/js/RSZ001.js"/>
  84. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  85. <script type="javascript">
  86. <![CDATA[
  87. // parameter validation check
  88. function fValidCheck() {
  89. //창고에 선택된 값이 없으면, 창고를 선택하라고 alert함
  90. if(cmb_wareflag.value == "") {
  91. messageBox("창고가 선택되지 않았습니다. \n\n먼저 창고를 선택하십시요.", "E999", "");
  92. model.setFocus("cmb_wareflag");
  93. return -1;
  94. }
  95. //집계일자에 선택된 값이 없으면, 집계일자를 선택하라고 alert함
  96. if(ipt_sumdd.value.length < 8) {
  97. messageBox("집계일자가 올바로 선택되지 않았습니다. \n\n먼저 집계일자를 선택하십시요.", "E999", "");
  98. model.setFocus("ipt_sumdd");
  99. return -1;
  100. }
  101. //처방일자에 선택된 값이 없으면, 처방일자를 선택하라고 alert함
  102. if(ipt_fromdd.value.length < 8) {
  103. messageBox("처방일자가 올바로 선택되지 않았습니다. \n\n먼저 처방일자를 선택하십시요.", "E999", "");
  104. model.setFocus("ipt_fromdd");
  105. return -1;
  106. }
  107. if(ipt_todd.value.length < 8) {
  108. messageBox("처방일자가 올바로 선택되지 않았습니다. \n\n먼저 처방일자를 선택하십시요.", "E999", "");
  109. model.setFocus("ipt_todd");
  110. return -1;
  111. }
  112. //처방일자의 fromdd, todd 의 크기를 비교하여 alert함
  113. if(ipt_fromdd.value > ipt_todd.value) {
  114. messageBox("기간의 시작일자가 끝일자보다 클 수 없습니다. \n\n먼저 처방일자를 올바로 선택하십시요.", "E999", "");
  115. model.setFocus("ipt_fromdd");
  116. return -1;
  117. }
  118. return 0;
  119. }
  120. ]]>
  121. </script>
  122. </xhtml:head>
  123. <xhtml:body pagewidth="1220px" pageheight="800px" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  124. <group id="grp_tle" style="left:0px; top:0px; width:1195px; height:13px; ">
  125. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:243px; height:14px; ">처방 집계 작업</caption>
  126. </group>
  127. <group id="group1" style="left:0px; top:12; width:1195px; height:27px; ">
  128. <button id="btn_cancel" class="btn4_letter2" style="left:1079px; top:3px; width:56px; height:22px; ">
  129. <caption>취소</caption>
  130. <script type="javascript" ev:event="DOMActivate">
  131. <![CDATA[
  132. //parameter validation check
  133. if( fValidCheck() < 0 ) return;
  134. //실행전 확인
  135. //return : yes=6, no=7, cancel=2
  136. var rtn = messageBox("취소 작업을", "Q004");
  137. if ( rtn != 6 ) {
  138. return;
  139. }
  140. //실행전 parameter설정
  141. model.setValue("/root/send/search/sumdd", model.getValue("/root/main/workdate/sumdd"));
  142. model.setValue("/root/send/search/fromdd", model.getValue("/root/main/workdate/fromdd"));
  143. model.setValue("/root/send/search/todd", model.getValue("/root/main/workdate/todd"));
  144. model.setValue("/root/send/search/gubun", "D"); // I: 집계작업, D:취소작업
  145. /* 2012.07.10 박준범 - 취소시에는 check 생략
  146. //이미 집계작업이 이루어진 것인지 아닌지 data의 count를 조회한다.
  147. if( submit("TRRSO20303") ) {
  148. if( parseFloat(model.getValue("/root/temp/sumflag/datacount")) == 0 ) {
  149. messageBox("취소 작업할 데이타가 없습니다. \n\n집계일자를 확인하십시오.", "E999", "");
  150. model.setFocus("ipt_sumdd");
  151. return;
  152. }
  153. }
  154. */
  155. // misfSave : submit 후, grid.clearStatus() 함
  156. if( submit("TXRSO20302") ) {
  157. //집계대상 처방일자 및 처방집계내역 조회
  158. misfMsterDetailRetrieve();
  159. messageBox("취소 작업이 완료되었습니다.", "I999", "");
  160. }
  161. ]]>
  162. </script>
  163. </button>
  164. <line id="line17" class="line_6" style="x1:0px; y1:25; x2:1195px; y2:25px; "/>
  165. <button id="btn_exec" class="btn4_letter2" navindex="8" style="left:1138px; top:3px; width:56px; height:22px; ">
  166. <caption>실행</caption>
  167. <script type="javascript" ev:event="DOMActivate">
  168. <![CDATA[
  169. //parameter validation check
  170. if( fValidCheck() < 0 ) return;
  171. //실행전 확인
  172. //return : yes=6, no=7, cancel=2
  173. var rtn = messageBox("처방 집계 작업을", "Q004");
  174. if ( rtn != 6 ) {
  175. return;
  176. }
  177. //실행전 parameter설정
  178. model.setValue("/root/send/search/sumdd", model.getValue("/root/main/workdate/sumdd"));
  179. model.setValue("/root/send/search/fromdd", model.getValue("/root/main/workdate/fromdd"));
  180. model.setValue("/root/send/search/todd", model.getValue("/root/main/workdate/todd"));
  181. model.setValue("/root/send/search/gubun", "I"); // I: 집계작업, D:취소작업
  182. //이미 집계작업이 이루어진 것인지 아닌지 data의 count를 조회한다.
  183. if( submit("TRRSO20303") ) {
  184. if( parseFloat(model.getValue("/root/temp/sumflag/datacount")) > 0 ) {
  185. messageBox("이미 집계 작업을 한 일자입니다. \n\n집계일자를 확인하십시오.", "E999", "");
  186. model.setFocus("ipt_sumdd");
  187. return;
  188. }
  189. }
  190. // misfSave : submit 후, grid.clearStatus() 함
  191. if( submit("TXRSO20302") ) {
  192. //집계대상 처방일자 및 처방집계내역 조회
  193. misfMsterDetailRetrieve();
  194. messageBox("집계 작업이 완료되었습니다.", "I999", "");
  195. }
  196. ]]>
  197. </script>
  198. </button>
  199. </group>
  200. <group id="group3" scroll="auto" style="left:0px; top:40; width:1195px; height:744px; ">
  201. <group id="grp_search" style="left:0px; top:9px; width:1195px; height:48px; vertical-align:top; ">
  202. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1195px; height:40px; background-color:#fffbf2; border-color:#ffd799; "/>
  203. <select1 id="cmb_instcd" ref="/root/send/search/instcd" class="combo_default" disabled="true" navindex="1" appearance="minimal" style="left:112px; top:10px; width:136px; height:19px; ">
  204. <choices>
  205. <itemset nodeset="/root/main/init">
  206. <label ref="cnstnm"/>
  207. <value ref="cnstcd"/>
  208. </itemset>
  209. </choices>
  210. </select1>
  211. <caption id="cap_instcd" class="search_name" style="left:33px; top:10px; width:86px; height:17px; ">기관코드</caption>
  212. <input id="ipt_sumdd" ref="/root/main/workdate/sumdd" navindex="5" inputtype="date" style="left:746px; top:10px; width:89px; height:19px; "/>
  213. <caption id="caption2" class="search_name" style="left:280px; top:10px; width:106px; height:17px; ">창고</caption>
  214. <select1 id="cmb_wareflag" ref="/root/send/search/wareflag" class="combo_default" navindex="4" appearance="minimal" style="left:334px; top:10px; width:99px; height:19px; ">
  215. <choices>
  216. <item>
  217. <label>물류관리창고</label>
  218. <value>1</value>
  219. </item>
  220. <item>
  221. <label>진료재료창고</label>
  222. <value>2</value>
  223. </item>
  224. <item>
  225. <label>수술재료창고</label>
  226. <value>3</value>
  227. </item>
  228. </choices>
  229. <script type="javascript" ev:event="xforms-value-changed">
  230. <![CDATA[
  231. //집계부서 setting
  232. //2013.01.30 박준범 - 칠곡병원은 1번 창고의 집계를 사용하기 위해서 집계부서를 중앙공급실로 설정하도록 변경
  233. //if(cmb_wareflag.value == "1") //1 : 물류관리창고
  234. // cmb_sumdeptcd.value = "2010302030"; //2010302030 : 내시경실
  235. if(cmb_wareflag.value == "1") { //1 : 물류관리창고
  236. if(cmb_instcd.value == "031") {
  237. cmb_sumdeptcd.value = "2010302030"; //2010302030 : 내시경실
  238. } else if(cmb_instcd.value == "032") {
  239. cmb_sumdeptcd.value = "3080000000"; //3080000000 : 중앙공급실 -> 실제로는 진료재료파트 코드입니다.
  240. }
  241. }
  242. else if(cmb_wareflag.value == "2") //2 : 진료재료창고
  243. cmb_sumdeptcd.value = "3080000000"; //3080000000 : 중앙공급실 -> 실제로는 진료재료파트 코드입니다.
  244. else if(cmb_wareflag.value == "3") //3 : 수술재료창고
  245. cmb_sumdeptcd.value = "3070000000"; //3070000000 : 수술실
  246. else
  247. cmb_sumdeptcd.value = "";
  248. //집계대상 처방일자 및 처방집계내역 조회
  249. misfMsterDetailRetrieve();
  250. ]]>
  251. </script>
  252. </select1>
  253. <caption id="caption9" class="search_name" style="left:666px; top:10px; width:86px; height:17px; ">집계일자</caption>
  254. <caption id="caption3" class="search_name" style="left:865px; top:10px; width:86px; height:17px; ">처방일자</caption>
  255. <input id="ipt_fromdd" ref="/root/main/workdate/fromdd" navindex="5" inputtype="date" style="left:945px; top:10px; width:89px; height:19px; "/>
  256. <input id="ipt_todd" ref="/root/main/workdate/todd" navindex="5" inputtype="date" style="left:1050px; top:10px; width:89px; height:19px; "/>
  257. <caption id="caption4" style="left:1035px; top:10px; width:15px; height:20px; font-weight:bold; ">~</caption>
  258. <caption id="caption7" class="search_name" style="left:461px; top:10px; width:86px; height:17px; ">집계부서</caption>
  259. <select1 id="cmb_sumdeptcd" ref="/root/send/search/sumdeptcd" class="combo_default" disabled="true" navindex="4" appearance="minimal" style="left:541px; top:10px; width:94px; height:19px; ">
  260. <choices>
  261. <item>
  262. <label>내시경실</label>
  263. <value>2010302030</value>
  264. </item>
  265. <item>
  266. <label>수술실</label>
  267. <value>3070000000</value>
  268. </item>
  269. <item>
  270. <label>중앙공급실</label>
  271. <value>3080000000</value>
  272. </item>
  273. </choices>
  274. </select1>
  275. </group>
  276. <line id="line1" class="line_1" style="x1:0px; y1:78px; x2:1195px; y2:78px; "/>
  277. <caption id="caption1" class="tit_2" style="left:0px; top:63px; width:180px; height:14px; ">집계 작업 이력</caption>
  278. <datagrid id="grd_work" nodeset="/root/main/worklist" caption="집계일자^처방일자 (From)^처방일자(To)^작업 실행자^작업 실행 일시^기관코드^창고구분" colsep="^" colwidth="132, 132, 132, 100, 180, 61, 57" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:83px; width:1195px; height:622px; ">
  279. <col ref="sumdd" format="yyyy-mm-dd" style="text-align:center; "/>
  280. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  281. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  282. <col ref="lastupdtrid" style="text-align:center; "/>
  283. <col ref="lastupdtdt" style="text-align:center; "/>
  284. <col ref="instcd" visibility="hidden" style="left:1160px; top:23px; width:61px; height:23px; "/>
  285. <col ref="wareflag" visibility="hidden"/>
  286. </datagrid>
  287. <caption id="caption5" visibility="hidden" style="left:0px; top:705px; width:640px; height:20px; ">※ 창고 선택시, 집계일자 기준 최근 1개월 자료만 조회합니다. 이전 자료를 확인하시려면 정보통신실로 연락바랍니다.</caption>
  288. </group>
  289. </xhtml:body>
  290. </xhtml:html>