SMPIJ02500_평생간염약제환자정보조회.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SMPIJ02500_평생제한간염약제환자정보조회.xrw
  4. * 수정이력
  5. * - 2009.02.12 / 최초작성 / 강종태
  6. ************************************************
  7. * [ Maps ]
  8. -->
  9. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  10. <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">
  11. <xhtml:head>
  12. <xhtml:title>평생제한간염약제환자정보조회</xhtml:title>
  13. <model id="model1">
  14. <instance id="instance1">
  15. <root xmlns="">
  16. <main>
  17. <!-- SPPMC02500_환자조회 화면에서 선택된 검색결과를 받는 경로임 -->
  18. <patinfo>
  19. <patinfolist/>
  20. </patinfo>
  21. <popupendflag/>
  22. <grdlist1>
  23. <hepapatlist>
  24. <pid/>
  25. <patnm/>
  26. <limitflag/>
  27. <prcpfromdd/>
  28. <calcscorcd/>
  29. <calcscorcdnm/>
  30. <totpaydays/>
  31. <anohosprgstdays/>
  32. <hepadd/>
  33. <remfact/>
  34. <hepaseqno/>
  35. <instcd/>
  36. </hepapatlist>
  37. </grdlist1>
  38. <grdlist2>
  39. <hepadetlist>
  40. <ordtype/>
  41. <prcpdd/>
  42. <ordqty/>
  43. <ordtims/>
  44. <onetwo/>
  45. <orddays/>
  46. <orddeptcd/>
  47. <orddrid/>
  48. <orddd/>
  49. </hepadetlist>
  50. </grdlist2>
  51. </main>
  52. <init>
  53. <!-- 진료과 -->
  54. <orddeptcdlist>
  55. <cd/>
  56. <nm/>
  57. </orddeptcdlist>
  58. <!-- 진료의 -->
  59. <orddrid>
  60. <cd/>
  61. <nm/>
  62. </orddrid>
  63. <P0001list>
  64. <P0001>
  65. <cdid/>
  66. <cdnm/>
  67. </P0001>
  68. </P0001list>
  69. </init>
  70. <send>
  71. <patunitsrch/>
  72. <code/>
  73. <codecond/>
  74. <send1>
  75. <pid/>
  76. <calcscorcd/>
  77. <dayfrom/>
  78. <dayto/>
  79. </send1>
  80. <send2>
  81. <instcd/>
  82. <pid/>
  83. <hepaseqno/>
  84. </send2>
  85. <updatedata>
  86. <gridpmbmhepa/>
  87. </updatedata>
  88. </send>
  89. <hidden>
  90. <smpic00200>
  91. <judgsrch>
  92. <con1_dd/>
  93. <con2_gsflag/>
  94. <con3_search1/>
  95. <con4_search2/>
  96. <con5_insu/>
  97. </judgsrch>
  98. <rslt>
  99. <mech/>
  100. <picmmech/>
  101. </rslt>
  102. </smpic00200>
  103. <sppmc02500>
  104. <cond>
  105. <srchcond/>
  106. <pid/>
  107. <hngnm/>
  108. </cond>
  109. </sppmc02500>
  110. </hidden>
  111. </root>
  112. </instance>
  113. <script type="javascript" ev:event="xforms-ready">
  114. <![CDATA[
  115. // 화면 초기화
  116. fInitialize();
  117. ]]>
  118. </script>
  119. <!-- submission -->
  120. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  121. <submission id="TRPIJ02500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/send1" resultref="/root/main/grdlist1"/>
  122. <submission id="TRPIJ02501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/send2" resultref="/root/main/grdlist2"/>
  123. <submission id="TXPIJ02500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata"/>
  124. </model>
  125. <!-- js import -->
  126. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  127. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  128. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  129. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  130. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  131. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  132. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  133. <!-- 뽕숑 -->
  134. <script type="javascript">
  135. <![CDATA[
  136. // 화면 초기화
  137. function fInitialize()
  138. {
  139. model.removeNodeset("/root/main/grdlist1/hepapatlist"); // 그리드 초기화
  140. model.removeNodeset("/root/main/grdlist2/hepadetlist"); // 그리드 초기화
  141. // 공통코드 로드
  142. zbcfGetCodeList(
  143. new Array("P0001"), // 입원,외래,응급
  144. new Array("/root/init/P0001list")
  145. );
  146. }
  147. // 환자단위 조회
  148. function fPatSrch()
  149. {
  150. var ipt_pid = model.getValue("/root/send/patunitsrch");
  151. if (ipt_pid) {
  152. if ( !isNaN(ipt_pid) )
  153. {
  154. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  155. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid);
  156. }
  157. else
  158. {
  159. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "2"); // 검색조건 : 환자명으로 설정
  160. model.setValue("/root/hidden/sppmc02500/cond/hngnm", ipt_pid);
  161. }
  162. } else {
  163. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  164. }
  165. // pam/commonweb/xrw/SPPMC02500_환자조회.xrw
  166. modal("SPPMC02500", "1", "150", "150", "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", ""); // SPPMC02500_환자조회.xrw
  167. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  168. if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
  169. model.removeNodeset("/root/main/patinfo/patinfolist"); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
  170. model.makeNode("/root/main/patinfo/patinfolist"); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
  171. model.setValue("/root/send/patunitsrch", srch_pid);
  172. }
  173. model.refresh();
  174. }
  175. function fGetSnglcalcscorcd() {
  176. // 처방시작일을 수가조회 기준일자로 설정
  177. model.setValue("/root/hidden/smpic00200/judgsrch/con1_dd", getCurrentDate());
  178. // 싱글수가코드
  179. model.setValue("/root/hidden/smpic00200/judgsrch/con2_gsflag", "S");
  180. // SMPIC00200_수가조회 화면의 검색조건 combo 조건값 설정
  181. // 수가 > calcscorcd , edi > edicd , 한글 hngnm
  182. // model.setValue("/root/hidden/smpic00200/judgsrch/con3_search1", rdo_code.value);
  183. model.setValue("/root/hidden/smpic00200/judgsrch/con3_search1", "calcscorcd");
  184. // SMPIC00200_수가조회 용
  185. model.setValue("/root/hidden/smpic00200/judgsrch/con4_search2", "");
  186. // 보험으로 박아서 날린다
  187. model.setValue("/root/hidden/smpic00200/judgsrch/con5_insu", "insu");
  188. model.removeNodeset("/root/hidden/smpic00200/rslt/mech"); // SMPIC00200_수가조회 에서 선택된 결과가 copyNode되는 경로임
  189. model.removeNodeset("/root/hidden/smpic00200/rslt/picmmech"); // SMPIC00200_수가조회 에서 선택된 결과가 copyNode되는 경로임
  190. modal("SMPIC00200", "1", "10", "10", "SMPIC00200", "root/hidden/smpic00200", "/root/temp", "", ""); // SMPIC00200_수가조회.xrw
  191. var mechSelect = instance1.selectSingleNode("/root/temp/mech");
  192. if (mechSelect == null) { // 선택한 코드가 없는 경우
  193. messageBox("수가조회 화면에서 선택한 결과가", "I004"); ///수가조회 화면에서 선택한 결과가 없습니다.
  194. return;
  195. }
  196. // SMPIC00200_수가조회 화면에서 보낸 결과 값에 대한 처리
  197. model.makeNode("/root/hidden/smpic00200/rslt/mech");
  198. model.makeNode("/root/hidden/smpic00200/rslt/picmmech");
  199. model.copyNode("/root/hidden/smpic00200/rslt/mech", "/root/temp/mech");
  200. model.copyNode("/root/hidden/smpic00200/rslt/picmmech", "/root/temp/picmmech");
  201. model.removeNodeset("/root/temp"); // SMPIC00200_수가조회 에서 선택된 결과가 직접 전달되는 경로임
  202. if (model.getValue("/root/hidden/smpic00200/rslt/mech/ordinptflag") != "A") { // 처방입력구분(코드군 P0141) A: 가능
  203. messageBox("처방이 불가한 코드", "E008"); ///처방이 불가한 코드입니다.
  204. return;
  205. }
  206. if ( model.getValue("/root/send/codecond") == "calcscorcd" )
  207. {
  208. model.setValue("/root/send/code", model.getValue("/root/hidden/smpic00200/rslt/picmmech/picmmech_calcscorcd"));
  209. }
  210. else
  211. {
  212. model.setValue("/root/send/code", model.getValue("/root/hidden/smpic00200/rslt/mech/insuedicd"));
  213. }
  214. ipt_code.refresh();
  215. }
  216. // 조회
  217. function fSearch()
  218. {
  219. var ipt_patunitsrch = model.getValue("/root/send/patunitsrch");
  220. var ipt_code = model.getValue("/root/send/code");
  221. model.setValue("/root/send/send1/pid",ipt_patunitsrch);
  222. model.setValue("/root/send/send1/calcscorcd",ipt_code);
  223. // if (ipt_patunitsrch == "" && ipt_code == "")
  224. // {
  225. // messageBox("수가코드는 ", "I003");
  226. // model.setFocus("ipt_code");
  227. // }
  228. // else if ( ipt_patunitsrch == "")
  229. // {
  230. // messageBox("환자등록번호는 ", "I003");
  231. // model.setFocus(ipt_patunitsrch);
  232. // }
  233. // else
  234. // {
  235. model.removeNodeset("/root/main/grdlist1/hepapatlist");
  236. model.removeNodeset("/root/main/grdlist2/hepadetlist");
  237. submit("TRPIJ02500");
  238. // }
  239. }
  240. function getDetlist() {
  241. model.setValue("/root/send/send2/instcd",grd_hepapatlist.valueMatrix(grd_hepapatlist.row,grd_hepapatlist.colRef("instcd")));
  242. model.setValue("/root/send/send2/pid",grd_hepapatlist.valueMatrix(grd_hepapatlist.row,grd_hepapatlist.colRef("pid")));
  243. model.setValue("/root/send/send2/hepaseqno",grd_hepapatlist.valueMatrix(grd_hepapatlist.row,grd_hepapatlist.colRef("hepaseqno")));
  244. submit("TRPIJ02501");
  245. }
  246. ]]>
  247. </script>
  248. </xhtml:head>
  249. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1213;2,784;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  250. <!-- TITLE -->
  251. <group id="group1" style="left:0px; top:0px; width:1190px; height:13px; ">
  252. <caption id="caption1" class="tit_1" style="left:0px; top:0px; width:197px; height:14px; ">평생제한간염약제환자정보조회</caption>
  253. </group>
  254. <!-- 전체 그룹 -->
  255. <group id="group2" scroll="no" style="left:0px; top:13px; width:1190px; height:732px; ">
  256. <!-- 조회조건 -->
  257. <group id="group4" style="left:0px; top:10px; width:1190px; height:35px; vertical-align:top; ">
  258. <shape id="roundrect2" appearance="roundrect" style="left:0px; top:0px; width:1190px; height:35px; "/>
  259. <line id="line2" class="line_4" style="x1:1094px; y1:5px; x2:1094px; y2:30px; "/>
  260. <button id="button1" class="btn1_letter2" navindex="2" style="left:1120px; top:8px; width:56px; height:22px; ">
  261. <caption>조회</caption>
  262. <script type="javascript" ev:event="DOMActivate">
  263. <![CDATA[
  264. fSearch();
  265. ]]>
  266. </script>
  267. </button>
  268. <input id="ipt_code" ref="/root/send/code" class="input_search" inputtype="button" maxlength="10" _chartype="upper" style="left:305px; top:10px; width:90px; height:19px; ">
  269. <script type="javascript" ev:event="onbuttonclick">
  270. <![CDATA[
  271. fGetSnglcalcscorcd();
  272. ]]>
  273. </script>
  274. </input>
  275. <input id="ipt_patunitsrch" ref="/root/send/patunitsrch" class="input_search" navindex="3" inputtype="button" maxlength="10" style="left:95px; top:10px; width:95px; height:19px; ">
  276. <hint>
  277. <![CDATA[환자성명으로 검색시 2자 이상 입력하세요.]]>
  278. </hint>
  279. <script type="javascript" ev:event="onkeypress">
  280. <![CDATA[
  281. if (event.keyCode == "13") { // Enter 입력 시에
  282. if (ipt_patunitsrch.currentText.length > 1) { // 2글자 이상이면
  283. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  284. if( isNaN(model.getValue("/root/send/patunitsrch")) ) // PID로 검색시 조회
  285. {
  286. fPatSrch();
  287. }
  288. else
  289. {
  290. fSearch();
  291. }
  292. }
  293. }
  294. ]]>
  295. </script>
  296. <script type="javascript" ev:event="onbuttonclick">
  297. <![CDATA[
  298. fPatSrch();
  299. ]]>
  300. </script>
  301. </input>
  302. <caption id="caption3" class="search_name" style="left:10px; top:10px; width:102px; height:17px; ">환자조회</caption>
  303. <caption id="caption4" class="search_name" style="left:220px; top:10px; width:76px; height:17px; ">처방코드</caption>
  304. <caption id="caption2" class="search_name" style="left:415px; top:10px; width:104px; height:17px; ">급여총일수</caption>
  305. <input id="input1" ref="/root/send/send1/dayfrom" style="left:515px; top:10px; width:50px; height:19px; "/>
  306. <input id="input2" ref="/root/send/send1/dayto" style="left:605px; top:10px; width:50px; height:19px; "/>
  307. <caption id="caption5" style="left:570px; top:11px; width:30px; height:20px; ">이상</caption>
  308. <caption id="caption6" style="left:665px; top:11px; width:30px; height:20px; ">이하</caption>
  309. </group>
  310. <button id="button2" class="btn2_letter4" style="left:1120px; top:54px; width:64px; height:19px; ">
  311. <caption>엑셀저장</caption>
  312. <script type="javascript" ev:event="DOMActivate">
  313. <![CDATA[
  314. if (grd_hepadetlist.rows > 1) {
  315. var fileName = window.fileDialog("save", "", false, "평생제한간염환자상세내역_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  316. if (fileName != "") {
  317. //datagrid.saveExcel의 7번째 인자 값(boolean) : 그리드의 col type=combo일 경우 엑셀저장내용이 lable 또는 value로 설정 함
  318. // grd_clbsmast.saveExcel(fileName, "SheetName", true, true, "", "", true);
  319. grd_hepadetlist.saveExcel(fileName, "sheetname:;colhiddenextend:false;rowhiddenextend:false;col_1:label", true, true, "", "", true);
  320. }
  321. } else {
  322. messageBox("엑셀저장할 대상이 ", "I004"); ///엑셀저장할 대상자가 없습니다.
  323. }
  324. ]]>
  325. </script>
  326. </button>
  327. <!-- datagrid -->
  328. <caption id="caption8" class="tit_2" style="left:0px; top:58px; width:100px; height:13px; ">환자 리스트</caption>
  329. <datagrid id="grd_hepapatlist" nodeset="/root/main/grdlist1/hepapatlist" class="datagrid2" caption="환자번호^환자명^제한&#xA;구분^처방&#xA;시작일^처방코드^처방명^약제별&#xA;급여총일수^타병원&#xA;투약일수^환자당&#xA;급여총일수^비고^hepaseqno^instcd" colsep="^" colwidth="62, 49, 48, 68, 68, 91, 75, 57, 67, 75, 25, 27" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:75px; width:710px; height:655px; ">
  330. <col ref="pid" style="text-align:center; "/>
  331. <col ref="patnm" style="text-align:center; "/>
  332. <col disabled="true" ref="limitflag" type="combo" style="text-align:center; ">
  333. <choices>
  334. <item>
  335. <label>투여량</label>
  336. <value>A</value>
  337. </item>
  338. <item>
  339. <label>일수</label>
  340. <value>B</value>
  341. </item>
  342. <item>
  343. <label>간이식</label>
  344. <value>C</value>
  345. </item>
  346. <item>
  347. <label>간염</label>
  348. <value>D</value>
  349. </item>
  350. </choices>
  351. </col>
  352. <col ref="prcpfromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  353. <col ref="calcscorcd" style="text-align:left; "/>
  354. <col ref="calcscorcdnm" style="text-align:left; "/>
  355. <col ref="totpaydays" style="text-align:right; "/>
  356. <col ref="anohosprgstdays" type="input" style="text-align:right; "/>
  357. <col ref="hepadd" style="text-align:right; "/>
  358. <col ref="remfact" type="input" style="text-align:left; "/>
  359. <col ref="hepaseqno" visibility="hidden" style="background-color:#999999; "/>
  360. <col ref="instcd" visibility="hidden" style="background-color:#999999; "/>
  361. <script type="javascript" ev:event="ondblclick">
  362. <![CDATA[
  363. if(grd_hepapatlist.isCell(event.target) && grd_hepapatlist.row >= grd_hepapatlist.fixedRows) {
  364. getDetlist();
  365. }
  366. ]]>
  367. </script>
  368. <script type="javascript" ev:event="onclick">
  369. <![CDATA[
  370. grd_hepapatlist.editCell();
  371. ]]>
  372. </script>
  373. </datagrid>
  374. <datagrid id="grd_hepadetlist" nodeset="/root/main/grdlist2/hepadetlist" class="datagrid2" caption="내원유형^처방일^1회량^회수^일투^일수^처방과^진료의^시행일" colsep="^" colwidth="36, 75, 44, 39, 34, 36, 53, 47, 58" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:715px; top:75px; width:475px; height:655px; ">
  375. <col disabled="true" ref="ordtype" type="combo" style="text-align:center; ">
  376. <choices>
  377. <itemset nodeset="/root/init/P0001list/P0001">
  378. <label ref="cdnm"/>
  379. <value ref="cdid"/>
  380. </itemset>
  381. </choices>
  382. </col>
  383. <col ref="prcpdd" format="yyyy-mm-dd" style="text-align:center; "/>
  384. <col ref="ordqty" style="text-align:right; "/>
  385. <col ref="ordtims" style="text-align:right; "/>
  386. <col ref="onetwo" style="text-align:right; "/>
  387. <col ref="orddays" style="text-align:right; "/>
  388. <col ref="orddeptcd" style="text-align:center; "/>
  389. <col ref="orddrid" style="text-align:center; "/>
  390. <col ref="orddd" format="yyyy-mm-dd" style="text-align:center; "/>
  391. </datagrid>
  392. <caption id="caption7" class="tit_2" style="left:715px; top:58px; width:100px; height:13px; ">처방상세내역</caption>
  393. <button id="btn_save" class="btn4_letter2" style="left:648px; top:52px; width:56px; height:22px; ">
  394. <caption>저장</caption>
  395. <script type="javascript" ev:event="DOMActivate">
  396. <![CDATA[
  397. var updtdata = getGridUpdateData(grd_hepapatlist);
  398. if (updtdata == "") {
  399. messageBox("변경된 데이터가","I004");
  400. return;
  401. }
  402. if(grd_hepapatlist.rows <= 1)
  403. {
  404. return;
  405. }
  406. model.setValue("/root/send/updatedata/gridpmbmhepa",grd_hepapatlist.getUpdateData());
  407. if(submit("TXPIJ02500")) {
  408. fSearch();
  409. }
  410. ]]>
  411. </script>
  412. </button>
  413. <button id="button3" class="btn2_letter4" style="left:580px; top:54px; width:64px; height:19px; ">
  414. <caption>엑셀저장</caption>
  415. <script type="javascript" ev:event="DOMActivate">
  416. <![CDATA[
  417. if (grd_hepapatlist.rows > 1) {
  418. var fileName = window.fileDialog("save", "", false, "평생제한간염환자리스트_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  419. if (fileName != "") {
  420. //datagrid.saveExcel의 7번째 인자 값(boolean) : 그리드의 col type=combo일 경우 엑셀저장내용이 lable 또는 value로 설정 함
  421. // grd_clbsmast.saveExcel(fileName, "SheetName", true, true, "", "", true);
  422. grd_hepapatlist.saveExcel(fileName, "sheetname:;colhiddenextend:false;rowhiddenextend:false;", true, true, "", "", true);
  423. }
  424. } else {
  425. messageBox("엑셀저장할 대상이 ", "I004"); ///엑셀저장할 대상자가 없습니다.
  426. }
  427. ]]>
  428. </script>
  429. </button>
  430. </group>
  431. </xhtml:body>
  432. </xhtml:html>