SMPIS01700_진료과별처방약제조회.xrw 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SMPID33000_진료과별처방약제조회.xrw
  4. * 수정이력
  5. * - 2013.01.19 / 최초작성 / 이경민
  6. -->
  7. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  8. <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">
  9. <xhtml:head>
  10. <xhtml:title>진료과별처방약제조회</xhtml:title>
  11. <model id="model1">
  12. <instance id="instance1">
  13. <root xmlns="">
  14. <main>
  15. <drgclist>
  16. <drgc/>
  17. </drgclist>
  18. </main>
  19. <init>
  20. <PAM>
  21. <PK024list/>
  22. </PAM>
  23. <tmp/>
  24. <clamdg/>
  25. </init>
  26. <hidden>
  27. </hidden>
  28. <send>
  29. <clamflag/>
  30. <clamym/>
  31. <clamymfrom/>
  32. <clamdgfrom/>
  33. <clamymto/>
  34. <clamdgto/>
  35. <insukind/>
  36. <ioflag>I</ioflag>
  37. <clamdeptid/>
  38. <orddeptcd/>
  39. <orddrid/>
  40. <code/>
  41. <patunitsrch/>
  42. <cutonly/>
  43. <codecond/>
  44. <cancer/>
  45. <large/>
  46. <middle/>
  47. <small/>
  48. <judgrid/>
  49. <edicd/>
  50. <trustinstcd/>
  51. <temp/>
  52. <spclcd>JX999</spclcd>
  53. <mpsflag>A</mpsflag>
  54. <judgrid/>
  55. <send_afjudg>
  56. <workflag/>
  57. <clamym/>
  58. <clamdg/>
  59. <pid/>
  60. <pidsn/>
  61. <ioflag/>
  62. </send_afjudg>
  63. <ordflag>J</ordflag>
  64. <drgclist>
  65. </drgclist>
  66. <cd_name/>
  67. <calccd/>
  68. <instcd>031</instcd>
  69. </send>
  70. </root>
  71. </instance>
  72. <script type="javascript" ev:event="xforms-ready">
  73. <![CDATA[
  74. // 화면을 초기화한다.
  75. fInitialize();
  76. ]]>
  77. </script>
  78. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  79. <submission id="TRPID20309" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/tmp"/>
  80. <submission id="TRPID20407" mediatype="application/x-www-form-urlencoded" method="post" ref="root/send" resultref="/root/init/clamdg"/>
  81. <submission id="TRPID20201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/tmp"/>
  82. <submission id="TRPIS01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/drgclist"/>
  83. </model>
  84. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  86. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  87. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  88. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  89. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  90. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  91. <script type="javascript">
  92. <![CDATA[
  93. var gToday = new Date();
  94. var gBaseyear = gToday.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  95. var gBasemonth = gToday.getDateFormat("MM");
  96. var gBaseday = gToday.getDateFormat("DD");
  97. var gCurrentdd = gBaseyear + gBasemonth + gBaseday;
  98. var gCurrentym = gBaseyear + gBasemonth;
  99. // -----------------------
  100. // ▶ 화면초기화
  101. // -----------------------
  102. function fInitialize() {
  103. var gBaseyear = gToday.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  104. var gBasemonth = gToday.getDateFormat("MM");
  105. var gCurrentym = gBaseyear + gBasemonth;
  106. var lv_date = gCurrentym.toDate("YYYYMM" + "01");
  107. lv_date = lv_date.getAddDate(-1, "M")
  108. gCurrentym = lv_date.getDateFormat("YYYYMM")
  109. model.setValue("/root/send/clamymfrom",gCurrentym);
  110. //btn_select.dispatch("DOMActivate");
  111. ipt_clamymfrom.dispatch("xforms-value-changed");
  112. // IOFLAG를 파라메터로 받아야 하므로 IOFLAG가 정해진 후 호출 한다
  113. fGetOrdDept(); // 진료과,진료의 콤보 리스트
  114. fGetClamDept(); // 청구과 콤보 리스트
  115. }
  116. // ----------------------------------------------------------------------
  117. // ▶ 동일진료일 명세서조회
  118. // ----------------------------------------------------------------------
  119. function fGetDocuList() {
  120. var chk = true;
  121. if (model.getValue("/root/send/clamymfrom") == "") {
  122. chk = false;
  123. messageBox("기준년월은", "I003"); //I003=필수입력입니다.
  124. model.setFocus("ipt_clamymfrom");
  125. }
  126. if (chk == true) {
  127. submit("TRPIS01701");
  128. }
  129. model.refresh();
  130. }
  131. // 진료과 리스트 가져오기
  132. function fGetOrdDept()
  133. {
  134. submit("TRPID20309");
  135. }
  136. // 청구과 함수
  137. function fGetClamDept()
  138. {
  139. submit("TRPID20201");
  140. }
  141. // 청구년월 함수
  142. function pidfGetClamdg() {
  143. if ( model.getValue("/root/send/clamymfrom") > model.getValue("/root/send/clamymto") ) {
  144. messageBox("종료일은 시작일보다 클 수 ", "I004");
  145. model.setValue("/root/send/clamymto","")
  146. } else {
  147. model.removeNodeset("/root/init/clamdg");
  148. model.makeNode("/root/init/clamdg");
  149. model.setValue("/root/send/clamym",model.getValue("/root/send/clamymfrom"));
  150. submit("TRPID20407");
  151. model.copyNode("/root/init/clamdgfrom","/root/init/clamdg");
  152. /*
  153. cmb_clamdgfrom.refresh();
  154. cmb_clamdgfrom.select(0);
  155. */
  156. model.setValue("/root/send/clamym",model.getValue("/root/send/clamymto"));
  157. submit("TRPID20407");
  158. model.copyNode("/root/init/clamdgto","/root/init/clamdg");
  159. addComboItem("cmb_clamdgfrom","전체","","above");
  160. addComboItem("cmb_clamdgto","전체","","above");
  161. cmb_clamdgfrom.refresh();
  162. cmb_clamdgfrom.select(0);
  163. cmb_clamdgto.refresh();
  164. cmb_clamdgto.select(0);
  165. }
  166. }
  167. function fChkClamym()
  168. {
  169. var fromym = model.getValue("/root/send/clamymfrom");
  170. var toym = model.getValue("/root/send/clamymto");
  171. if ( fromym != toym )
  172. {
  173. cmb_clamdgfrom.value = "";
  174. cmb_clamdgto.value = "";
  175. cmb_clamdgfrom.disabled = true;
  176. cmb_clamdgto.disabled = true;
  177. }
  178. else
  179. {
  180. cmb_clamdgfrom.disabled = false;
  181. cmb_clamdgto.disabled = false;
  182. cmb_clamdgfrom.select(0);
  183. cmb_clamdgto.select(0);
  184. }
  185. cmb_clamdgto.refresh();
  186. cmb_clamdgfrom.refresh();
  187. }
  188. ]]>
  189. </script>
  190. </xhtml:head>
  191. <xhtml:body pagewidth="690" pageheight="660" guideline="1,1163;2,727;2,739;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  192. <group id="grp_tle" style="left:0px; top:0px; width:665px; height:13px; ">
  193. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:216px; height:15px; ">진료과별처방약제조회</caption>
  194. </group>
  195. <group id="grp_biz" scroll="auto" style="left:0px; top:28px; width:665px; height:592px; ">
  196. <datagrid id="grd_drgclist" nodeset="/root/main/drgclist/drgc" class="datagrid3" caption="진료과^수가코드^처방명^처방수^원외&#xA;처방&#xA;구분^청구년월" colsep="^" colwidth="111, 100, 264, 47, 40, 55" dataheight="23" ellipsis="true" explorerbar="sortshowmove" extendlastcol="scroll" mergecellsfixedcols="bycol" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" rowsep="|" tooltip="true" style="left:0px; top:77px; width:659px; height:514px; ">
  197. <col disabled="true" ref="orddeptcd" type="combo" visibility="visible" maxlength="5" style="text-align:center; ">
  198. <choices>
  199. <itemset nodeset="/root/init/tmp/orddeptcd/orddeptcdlist">
  200. <label ref="nm"/>
  201. <value ref="cd"/>
  202. </itemset>
  203. </choices>
  204. </col>
  205. <col disabled="true" ref="snglcalcscorcd" type="output" maxlength="15" style="text-align:center; "/>
  206. <col ref="hngnm" type="output" maxlength="12" style="text-align:left; "/>
  207. <col ref="cnt" type="output" maxlength="12"/>
  208. <col disabled="true" ref="inout" type="output" format="yyyy-mm-dd" maxlength="8" style="text-align:center; "/>
  209. <col disabled="true" ref="clamym" type="output" format="yyyy-mm" maxlength="8" style="text-align:center; "/>
  210. <script type="javascript" ev:event="oncopy">
  211. <![CDATA[
  212. // 그리드 내용 복사
  213. if (grd_drgclist.selectedRows == 1) { // 한줄
  214. var row = grd_drgclist.row;
  215. var col = grd_drgclist.col;
  216. if (col == grd_drgclist.colRef("snglcalcscorcd") || col == grd_drgclist.colRef("hngnm")) {
  217. // 상병코드/상병명
  218. var clip = grd_drgclist.labelMatrix(row, col);
  219. window.clipBoardData = clip;
  220. }
  221. }
  222. ]]>
  223. </script>
  224. </datagrid>
  225. <caption id="cap_judgtrgtman" class="tit_2" style="left:4px; top:56px; width:234px; height:15px; ">진료과별처방약제 리스트</caption>
  226. <line id="line1" class="line_1" style="x1:0px; y1:72px; x2:660px; y2:72px; "/>
  227. <group id="group1" style="left:0px; top:5px; width:660px; height:40px; vertical-align:top; ">
  228. <shape id="roundrect3" appearance="roundrect" style="left:0px; top:0px; width:660px; height:40px; "/>
  229. <button id="btn_select" class="btn1_letter2" navindex="32" style="left:590px; top:10px; width:56px; height:22px; ">
  230. <caption>조회</caption>
  231. <script type="javascript" ev:event="DOMActivate">
  232. <![CDATA[
  233. fGetDocuList();
  234. ]]>
  235. </script>
  236. </button>
  237. <line id="line3" class="line_4" style="x1:580px; y1:5px; x2:580px; y2:38px; "/>
  238. <select1 id="combo2" ref="/root/send/orddeptcd" class="combo_search" appearance="minimal" style="left:470px; top:10px; width:85px; height:19px; ">
  239. <choices>
  240. <itemset nodeset="/root/init/tmp/orddeptcd/orddeptcdlist">
  241. <label ref="nm"/>
  242. <value ref="cd"/>
  243. </itemset>
  244. </choices>
  245. <script type="javascript" ev:event="xforms-value-changed">
  246. <![CDATA[
  247. // var orddeptcd = model.getValue("/root/send/orddeptcd");
  248. // if (orddeptcd) {
  249. // cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/tmp/orddrid/orddridlist[dp='" + orddeptcd + "']";
  250. // cmb_orddrid.disabled = false;
  251. // } else {
  252. // cmb_orddrid.disabled = true;
  253. // }
  254. // model.setValue("/root/send/orddrid", ""); // 주치의 선택을 초기화한다.
  255. // model.refresh();
  256. ]]>
  257. </script>
  258. </select1>
  259. <caption id="caption6" class="search_name" style="left:393px; top:10px; width:65px; height:17px; ">진료과</caption>
  260. <select1 id="rdo_ioflag" ref="/root/send/ioflag" class="combo_search" appearance="minimal" style="left:305px; top:10px; width:75px; height:19px; ">
  261. <choices>
  262. <item>
  263. <label>입원</label>
  264. <value>I</value>
  265. </item>
  266. <item>
  267. <label>외래</label>
  268. <value>O</value>
  269. </item>
  270. </choices>
  271. <script type="javascript" ev:event="xforms-value-changed">
  272. <![CDATA[
  273. fGetOrdDept(); // 진료과,진료의 콤보 리스트
  274. // fGetOrdDrid(); // 진료의 콤보 리스트
  275. fGetClamDept(); // 청구과 콤보 리스트
  276. ]]>
  277. </script>
  278. </select1>
  279. <caption id="caption9" class="search_name" style="left:225px; top:10px; width:76px; height:17px; ">내원유형</caption>
  280. <input id="ipt_clamymfrom" ref="/root/send/clamymfrom" class="input_search" navindex="1" inputtype="date" format="yyyy-mm" style="left:88px; top:10px; width:75px; height:19px; ">
  281. <script type="javascript" ev:event="xforms-value-changed">
  282. <![CDATA[
  283. model.setValue("/root/send/clamymto",model.getValue("/root/send/clamymfrom"));
  284. pidfGetClamdg();
  285. fChkClamym();
  286. ]]>
  287. </script>
  288. </input>
  289. <caption id="caption5" class="search_name" style="left:8px; top:10px; width:76px; height:17px; ">청구년월</caption>
  290. <select1 id="cmb_clamdgfrom" ref="/root/send/clamdgfrom" class="combo_search" appearance="minimal" style="left:165px; top:10px; width:50px; height:19px; ">
  291. <choices>
  292. <itemset nodeset="/root/init/clamdgfrom/clamdglist">
  293. <label ref="clamdgnm"/>
  294. <value ref="clamdgcd"/>
  295. </itemset>
  296. </choices>
  297. <script type="javascript" ev:event="xforms-value-changed">
  298. <![CDATA[
  299. model.setValue("/root/send/clamdgto", model.getValue("/root/send/clamdgfrom"));
  300. model.refresh();
  301. ]]>
  302. </script>
  303. </select1>
  304. </group>
  305. <button id="btn_excelsave" class="btn2_letter4" _auth="P" style="left:597px; top:50px; width:64px; height:19px; ">
  306. <caption>엑셀저장</caption>
  307. <script type="javascript" ev:event="DOMActivate">
  308. <![CDATA[
  309. grd_drgclist.gridToInstance();
  310. if (grd_drgclist.rows > 1) {
  311. var fileName = window.fileDialog("save", "", false, cap_title.value, "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  312. if (fileName != "") {
  313. grd_drgclist.saveExcel(fileName, "sheetname:;colhiddenextend:true;rowhiddenextend:false;col_3:label;col_4:label;col_5:label;col_6:label;", true, true, "", "", true);
  314. }
  315. } else {
  316. messageBox("엑셀저장할 내역이", "I004"); ///엑셀저장할 내역이 없습니다.
  317. }
  318. ]]>
  319. </script>
  320. </button>
  321. <caption id="caption2" visibility="hidden" style="left:10px; top:175px; width:15px; height:20px; ">~</caption>
  322. <select1 id="cmb_clamdgto" ref="/root/send/clamdgto" class="combo_search" visibility="hidden" appearance="minimal" style="left:25px; top:195px; width:50px; height:19px; ">
  323. <choices>
  324. <itemset nodeset="/root/init/clamdgto/clamdglist">
  325. <label ref="clamdgnm"/>
  326. <value ref="clamdgcd"/>
  327. </itemset>
  328. </choices>
  329. <script type="javascript" ev:event="xforms-value-changed">
  330. <![CDATA[
  331. model.setValue("/root/send/clamdgfrom", model.getValue("/root/send/clamdgto"));
  332. model.refresh();
  333. ]]>
  334. </script>
  335. </select1>
  336. <input id="ipt_clamymto" ref="/root/send/clamymto" class="input_search" navindex="1" visibility="hidden" inputtype="date" format="yyyy-mm" style="left:25px; top:175px; width:75px; height:19px; ">
  337. <script type="javascript" ev:event="xforms-value-changed">
  338. <![CDATA[
  339. pidfGetClamdg();
  340. fChkClamym();
  341. ]]>
  342. </script>
  343. </input>
  344. </group>
  345. <button id="btn_cancel" class="btn4_letter2" style="left:605px; top:625px; width:56px; height:22px; ">
  346. <caption>종료</caption>
  347. <close ev:event="DOMActivate"/>
  348. </button>
  349. </xhtml:body>
  350. </xhtml:html>