SMPMC05300_입원약정서조회.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <send>
  10. <data0>
  11. <ioflag/>
  12. </data0>
  13. <data1>
  14. <refcond>0</refcond>
  15. <cond1/>
  16. <cond2/>
  17. </data1>
  18. <iemr>
  19. <pid/>
  20. <treatno/>
  21. <orddeptcd/>
  22. <indd/>
  23. <docucd/>
  24. <ioflag/>
  25. // <cmc_cretno/>
  26. <cmc_spcid/>
  27. <cmc_orddate/>
  28. <cmc_orderseqno/>
  29. </iemr>
  30. </send>
  31. <main>
  32. <inpatientlist/>
  33. </main>
  34. <init>
  35. <P0149list>
  36. <P0149>
  37. <cdid/>
  38. <cdnm/>
  39. </P0149>
  40. </P0149list>
  41. <P0016list>
  42. <P0016>
  43. <cdid/>
  44. <cdnm/>
  45. </P0016>
  46. </P0016list>
  47. </init>
  48. <hidden>
  49. <init/>
  50. </hidden>
  51. </root>
  52. </instance>
  53. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  54. <submission id="TRPMI00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data0" resultref="/root/hidden/init"/>
  55. <submission id="TRPMC05301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/inpatientlist"/>
  56. <script type="javascript" ev:event="xforms-ready">
  57. <![CDATA[
  58. zbcfGetCodeList(new Array("P0149","P0016"), new Array("/root/init/P0149list", "/root/init/P0016list"));
  59. model.setValue("/root/send/data0/ioflag", "I"); // 입원진료과명을 가져오기 위함
  60. submit("TRPMI00106", false);
  61. makeReportPreview(0, 0, 10, 10, "grp_report");
  62. fInitialize();
  63. model.refresh();
  64. ]]>
  65. </script>
  66. </model>
  67. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  68. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  69. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  70. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  72. <script type="javascript">
  73. <![CDATA[
  74. function fInitialize() {
  75. model.resetInstanceNode("/root/main/inpatientlist");
  76. model.resetInstanceNode("/root/send");
  77. model.setValue("/root/send/data1/refcond","0");
  78. //fSelectRefItem();
  79. model.refresh();
  80. }
  81. function fSelectRefItem()
  82. {
  83. // 0. 전체 1.환자번호 2.환자성명 3.주민번호 4.입원일자 5.퇴원일자 6.진료과 7.보험유형
  84. var sRefCond = model.getValue("/root/send/data1/refcond");
  85. model.setValue("/root/send/data1/cond1", "");
  86. model.setValue("/root/send/data1/cond2", "");
  87. switch(sRefCond) {
  88. case '0' :
  89. ipt_cond1.visible = false;
  90. ipt_cond2.visible = false;
  91. ipt_date.visible = false;
  92. cmb_cond.visible = false;
  93. btn_ref.dispatch("DOMActivate");
  94. break;
  95. case '1' :
  96. ipt_cond1.attribute("maxlength") = 10;
  97. ipt_cond1.visible = true;
  98. ipt_cond2.visible = false;
  99. ipt_date.visible = false;
  100. cmb_cond.visible = false;
  101. model.setFocus("ipt_cond1");
  102. break;
  103. case '2' :
  104. ipt_cond1.attribute("maxlength") = 50;
  105. ipt_cond1.visible = true;
  106. ipt_cond2.visible = false;
  107. ipt_date.visible = false;
  108. cmb_cond.visible = false;
  109. model.setFocus("ipt_cond1");
  110. break;
  111. case '3' :
  112. ipt_cond1.attribute("maxlength") = 6;
  113. ipt_cond1.visible = true;
  114. ipt_cond2.visible = true;
  115. ipt_date.visible = false;
  116. cmb_cond.visible = false;
  117. model.setFocus("ipt_cond1");
  118. break;
  119. case '4' :
  120. model.setValue("/root/send/data1/cond1", getCurrentDate());
  121. ipt_cond1.visible = false;
  122. ipt_cond2.visible = false;
  123. ipt_date.visible = true;
  124. cmb_cond.visible = false;
  125. model.setFocus("ipt_date");
  126. break;
  127. case '5' :
  128. model.setValue("/root/send/data1/cond1", getCurrentDate());
  129. ipt_cond1.visible = false;
  130. ipt_cond2.visible = false;
  131. ipt_date.visible = true;
  132. cmb_cond.visible = false;
  133. model.setFocus("ipt_date");
  134. break;
  135. case '6' :
  136. cmb_cond.choices.itemset.attribute("nodeset") = "/root/hidden/init/orddeptcd";
  137. ipt_cond1.visible = false;
  138. ipt_cond2.visible = false;
  139. ipt_date.visible = false;
  140. cmb_cond.visible = true;
  141. model.setFocus("cmb_cond");
  142. break;
  143. case '7' :
  144. cmb_cond.choices.itemset.attribute("nodeset") = "/root/hidden/init/insukind";
  145. ipt_cond1.visible = false;
  146. ipt_cond2.visible = false;
  147. ipt_date.visible = false;
  148. cmb_cond.visible = true;
  149. model.setFocus("cmb_cond");
  150. break;
  151. default :
  152. ipt_cond1.visible = false;
  153. ipt_cond2.visible = false;
  154. ipt_date.visible = false;
  155. cmb_cond.visible = false;
  156. }
  157. model.refresh();
  158. }
  159. // 조회조건에 따른 값 체크
  160. function fCheckRefCondition() {
  161. // 1. 전체 2.환자번호 4.진료과 5.병동
  162. var sRefCond = model.getValue("/root/send/data1/refcond");
  163. var sCond1 = model.getValue("/root/send/data1/cond1");
  164. var sCond2 = model.getValue("/root/send/data1/cond2");
  165. var bResult = false;
  166. switch(sRefCond) {
  167. case '0' :
  168. bResult = true;
  169. break;
  170. case '1' :
  171. if (isNull(sCond1)) {
  172. messageBox("환자번호를 입력 후 조회하십시오!!", "I");
  173. bResult = false;
  174. } else {
  175. bResult = true;
  176. }
  177. break;
  178. case '2' :
  179. if (isNull(sCond1)) {
  180. messageBox("환자번호를 입력 후 조회하십시오!!", "I");
  181. bResult = false;
  182. } else if (!isNull(sCond1) && sCond1.length < 2) {
  183. messageBox("성명은 2자 이상 입력하십시오!!", "I");
  184. bResult = false;
  185. } else {
  186. bResult = true;
  187. }
  188. break;
  189. case '3' :
  190. if (isNull(sCond1)) {
  191. messageBox("주민번호 앞자리를 입력하십시오!!", "I");
  192. bResult = false;
  193. } else if (!isNull(sCond1) && sCond1.length != 6) {
  194. messageBox("주민번호 앞자리는 6자리를 입력하십시오!!", "I");
  195. bResult = false;
  196. } else {
  197. bResult = true;
  198. }
  199. break;
  200. case '4' :
  201. if (isNull(sCond1)) {
  202. messageBox("입원일자를 입력하십시오!!", "I");
  203. bResult = false;
  204. } else {
  205. bResult = true;
  206. }
  207. break;
  208. case '5' :
  209. if (isNull(sCond1)) {
  210. messageBox("퇴원일자를 입력하십시오!!", "I");
  211. bResult = false;
  212. } else {
  213. bResult = true;
  214. }
  215. break;
  216. case '6' :
  217. if (isNull(sCond1)) {
  218. messageBox("진료과를 선택하십시오!!", "I");
  219. bResult = false;
  220. } else {
  221. bResult = true;
  222. }
  223. break;
  224. case '7' :
  225. if (isNull(sCond1)) {
  226. messageBox("보험유형을 선택하십시오!!", "I");
  227. bResult = false;
  228. } else {
  229. bResult = true;
  230. }
  231. break;
  232. default :
  233. }
  234. return bResult;
  235. }
  236. function fPrint(pCond) {
  237. var sPrintYN = "false";
  238. var sAutoCloseYN = "false";
  239. var sViewYN = "";
  240. if (pCond == "PREVIEW") {
  241. sPrintYN = "false";
  242. sAutoCloseYN = "false";
  243. sViewYN = "";
  244. }
  245. if (pCond == "PRINT") {
  246. sPrintYN = "true";
  247. sAutoCloseYN = "false";
  248. sViewYN = "grp_report";
  249. }
  250. var iCount = getNodesetCount("/root/main/vipinpatlist/vipinpatspec");
  251. if (iCount > 0) {
  252. var sPrintFromdd = model.getValue("/root/send/fromdd");
  253. var sPrinttodd = model.getValue("/root/send/todd");
  254. sPrintFromdd = sPrintFromdd.substr(0, 4) + "-" + sPrintFromdd.substr(4, 2) + "-" + sPrintFromdd.substr(6, 4);
  255. model.makeValue("/root/hidden/printtype/printkind", "VIP재원");
  256. model.makeValue("/root/hidden/printtype/printfromdd", sPrintFromdd);
  257. model.makeValue("/root/hidden/printtype/printtodd", sPrinttodd);
  258. exeReportPreview("RPPMI03601", "XMLSTR" , "" , "" , sPrintYN , "", "", "", "", sAutoCloseYN, "", sViewYN);
  259. } else {
  260. messageBox("출력할 내용이 없습니다!!", "I");
  261. }
  262. }
  263. ]]>
  264. </script>
  265. </xhtml:head>
  266. <xhtml:body guideline="1,1193;1,1195;2,52;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  267. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  268. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:200px; height:14px; ">입원약정서조회</caption>
  269. </group>
  270. <group id="group3" style="left:0px; top:13px; width:1195px; height:744px; ">
  271. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; ">
  272. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  273. <line id="line2" class="line_4" style="x1:1108px; y1:7px; x2:1108px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  274. <caption id="caption17" class="search_name" style="left:5px; top:8px; width:86px; height:17px; ">조회조건 :</caption>
  275. <button id="btn_ref" class="btn1_letter2" style="left:1123px; top:7px; width:56px; height:22px; ">
  276. <caption>조회</caption>
  277. <script type="javascript" ev:event="DOMActivate">
  278. <![CDATA[
  279. // 조회 구분별로 체크 로직 추가....
  280. var bOK = fCheckRefCondition();
  281. if (bOK == true) {
  282. submit("TRPMC05301");
  283. var iCount = getNodesetCount("/root/main/inpatientlist");
  284. if (iCount == 0) {
  285. messageBox("조회 결과가 없습니다.", "I");
  286. }
  287. }
  288. ]]>
  289. </script>
  290. </button>
  291. <select1 id="cmb_condition" ref="/root/send/data1/refcond" appearance="minimal" style="left:95px; top:7px; width:100px; height:19px; ">
  292. <choices>
  293. <item>
  294. <label>전체(재원)</label>
  295. <value>0</value>
  296. </item>
  297. <item>
  298. <label>환자번호</label>
  299. <value>1</value>
  300. </item>
  301. <item>
  302. <label>환자성명</label>
  303. <value>2</value>
  304. </item>
  305. <item>
  306. <label>입원일자</label>
  307. <value>4</value>
  308. </item>
  309. <item>
  310. <label>퇴원일자</label>
  311. <value>5</value>
  312. </item>
  313. <item>
  314. <label>주민번호</label>
  315. <value>3</value>
  316. </item>
  317. <item>
  318. <label>진료과</label>
  319. <value>6</value>
  320. </item>
  321. <item>
  322. <label>보험유형</label>
  323. <value>7</value>
  324. </item>
  325. </choices>
  326. <script type="javascript" ev:event="xforms-select">
  327. <![CDATA[
  328. fSelectRefItem();
  329. ]]>
  330. </script>
  331. </select1>
  332. <input id="ipt_cond1" ref="/root/send/data1/cond1" visibility="hidden" imemode="hangul" style="left:204px; top:7px; width:100px; height:19px; ">
  333. <script type="javascript" ev:event="onkeypress">
  334. <![CDATA[
  335. // enter key
  336. inputEnterKey("btn_ref", "DOMActivate");
  337. ]]>
  338. </script>
  339. </input>
  340. <input id="ipt_cond2" ref="/root/send/data1/cond2" visibility="hidden" maxlength="7" style="left:310px; top:7px; width:100px; height:19px; ">
  341. <script type="javascript" ev:event="onkeypress">
  342. <![CDATA[
  343. // enter key
  344. inputEnterKey("btn_ref", "DOMActivate");
  345. ]]>
  346. </script>
  347. </input>
  348. <input id="ipt_date" ref="/root/send/data1/cond1" visibility="hidden" inputtype="date" style="left:204px; top:7px; width:100px; height:19px; "/>
  349. <select1 id="cmb_cond" ref="/root/send/data1/cond1" visibility="hidden" appearance="minimal" style="left:204px; top:7px; width:100px; height:19px; ">
  350. <choices>
  351. <itemset>
  352. <label ref="nm"/>
  353. <value ref="cd"/>
  354. </itemset>
  355. </choices>
  356. <script type="javascript" ev:event="xforms-select">
  357. <![CDATA[
  358. // 콤보 선택 시 자동 조회
  359. btn_ref.dispatch("DOMActivate");
  360. ]]>
  361. </script>
  362. </select1>
  363. </group>
  364. <caption id="caption2" class="tit_2" style="left:5px; top:55px; width:300px; height:14px; font-family:돋움; vertical-align:middle; ">환자목록</caption>
  365. <line id="line1" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  366. <group id="grp_report" visibility="hidden" style="left:865px; top:50px; width:65px; height:15px; "/>
  367. <button id="btn_print" class="btn2_letter2" visibility="hidden" style="left:1007px; top:50px; width:42px; height:19px; ">
  368. <caption>출력</caption>
  369. <script type="javascript" ev:event="DOMActivate">
  370. <![CDATA[
  371. fPrint("PRINT");
  372. ]]>
  373. </script>
  374. </button>
  375. <button id="btn_excel" class="btn2_letter4" style="left:1130px; top:50px; width:64px; height:19px; ">
  376. <caption>엑셀저장</caption>
  377. <script type="javascript" ev:event="DOMActivate">
  378. <![CDATA[
  379. var fileName = window.fileDialog("save", ",", false, getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  380. if (fileName != "")
  381. {
  382. grd_inpatientlist.saveExcel(fileName, "SheetName", true, true, "", "", false);
  383. }
  384. ]]>
  385. </script>
  386. </button>
  387. <datagrid id="grd_inpatientlist" nodeset="/root/main/inpatientlist" class="datagrid2" caption="스캔&#xA;여부^환자번호^환자성명^주민번호^성별^나이^보험유형^입원일자^퇴원일자^진료과^전문의^병동^병실^스캔여부^h_treatno^h_indd^h_cretno" colsep="^" colwidth="38, 100, 100, 110, 35, 35, 80, 100, 100, 120, 80, 120, 90, 60, 54, 51, 65" dataheight="23" explorerbar="sort" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" style="left:0px; top:70px; width:1194px; height:669px; ">
  388. <col ref="scanyn" style="text-align:center; "/>
  389. <col ref="pid" type="input" style="text-align:left; "/>
  390. <col ref="hngnm" style="text-align:left; "/>
  391. <col ref="rrgstno" format="999999-9999999" style="text-align:center; "/>
  392. <col disabled="true" ref="sex" style="text-align:center; "/>
  393. <col disabled="true" ref="age" style="text-align:center; "/>
  394. <col disabled="true" ref="insukind" type="combo">
  395. <choices>
  396. <itemset nodeset="/root/hidden/init/insukind">
  397. <label ref="nm"/>
  398. <value ref="cd"/>
  399. </itemset>
  400. </choices>
  401. </col>
  402. <col ref="pamindd" format="yyyy-mm-dd"/>
  403. <col ref="dschdd" format="yyyy-mm-dd"/>
  404. <col disabled="true" ref="orddeptnm" style="text-align:left; "/>
  405. <col disabled="true" ref="medispclnm" style="text-align:left; "/>
  406. <col disabled="true" ref="wardcd" type="combo">
  407. <choices>
  408. <itemset nodeset="/root/hidden/init/wardcd">
  409. <label ref="nm"/>
  410. <value ref="cd"/>
  411. </itemset>
  412. </choices>
  413. </col>
  414. <col disabled="true" ref="roomcd" style="text-align:left; "/>
  415. <col ref="scanyn" visibility="hidden"/>
  416. <col ref="treatno" visibility="hidden"/>
  417. <col ref="indd" visibility="hidden"/>
  418. <col ref="cretno" visibility="hidden"/>
  419. <script type="javascript" ev:event="onaftersort">
  420. <![CDATA[
  421. //sorting 시 인스턴스 구조를 재구성
  422. grd_inpatientlist.gridToInstance();
  423. ]]>
  424. </script>
  425. <script type="javascript" ev:event="ondblclick">
  426. <![CDATA[
  427. if(isDataCell() && grd_inpatientlist.col != 2) {
  428. btn_view.dispatch("DOMActivate");
  429. }
  430. ]]>
  431. </script>
  432. </datagrid>
  433. <button id="btn_view" class="btn2_letter5" style="left:1052px; top:50px; width:75px; height:19px; ">
  434. <caption>약정서보기</caption>
  435. <script type="javascript" ev:event="DOMActivate">
  436. <![CDATA[
  437. //================================================================================================
  438. //pid : 환자번호
  439. //orddeptcd : 진료과 코드
  440. //indd : 입(내)원일
  441. //docucd : 서식코드
  442. //ioflag : 입원/외래
  443. //================================================================================================
  444. var iIndex = grd_inpatientlist.row;
  445. var sPid = model.getValue("/root/main/inpatientlist[" + iIndex + "]/pid");
  446. var sTreatNo = model.getValue("/root/main/inpatientlist[" + iIndex + "]/treatno");
  447. //var sTreatNo = model.getValue("/root/main/inpatientlist/treatno");
  448. if (isNull(sPid)) {
  449. messageBox("환자를 선택하십시오!!", "I");
  450. return;
  451. }
  452. if (isNull(sTreatNo)) {
  453. messageBox("스캔된 약정서가 없습니다!!", "I");
  454. return;
  455. }
  456. model.resetInstanceNode("/root/send/iemr");
  457. model.setValue("/root/send/iemr/pid", sPid);
  458. model.setValue("/root/send/iemr/treatno", sTreatNo);
  459. // model.setValue("/root/send/iemr/pid", "3844");
  460. // model.setValue("/root/send/iemr/orddeptcd", "2230000000");
  461. // model.setValue("/root/send/iemr/indd", "20071004");
  462. // model.setValue("/root/send/iemr/docucd", "0000002015");
  463. // model.setValue("/root/send/iemr/ioflag", "O");
  464. // model.setValue("/root/send/iemr/cmc_cretno", "1");
  465. // model.setValue("/root/send/iemr/prcpdd", "");
  466. // model.setValue("/root/send/iemr/execprcpuniqno", "");
  467. // model.setValue("/root/send/iemr/instcd", "");searchChart("/root/hidden/temp");
  468. if(window.children.item("imgemrviewer") == null)
  469. {
  470. window.load("SSMRC03130.xrw", "modeless", "imgemrviewer", "", "/root/send/iemr", "/root/hidden/temp");
  471. //중요!!!!!!!!!!!!!!! 3차 리허설 이후 주석
  472. // window.children.item("imgemrviewer").document.title = "Image EMR Viewer";
  473. // window.children.item("imgemrviewer").javaScript.searchChart("/root/hidden/temp");
  474. // window.children.item("imgemrviewer").javaScript.downloadChart();
  475. // window.children.item("imgemrviewer").javaScript.setupChart("ChartView");
  476. }
  477. else
  478. {
  479. // 팝업 EMR Viewer 사용중인 상태에서 리로드 기능 추가 - 20080416
  480. var iemrNode = instance1.selectSingleNode("/root/send/iemr");
  481. window.children.item("imgemrviewer").javascript.reloadChart(iemrNode);
  482. // 팝업 EMR Viewer 화면 맨 앞으로 가져오기
  483. window.children.item("imgemrviewer").modelesstopmost = true;
  484. window.children.item("imgemrviewer").modelesstopmost = false;
  485. }
  486. ]]>
  487. </script>
  488. </button>
  489. </group>
  490. <group id="group5" style="left:0px; top:757px; width:1195px; height:27px; ">
  491. <button id="button2" class="btn4_letter3" style="left:1126px; top:5px; width:68px; height:22px; ">
  492. <caption>초기화</caption>
  493. <script type="javascript" ev:event="DOMActivate">
  494. <![CDATA[
  495. fInitialize();
  496. ]]>
  497. </script>
  498. </button>
  499. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  500. </group>
  501. </xhtml:body>
  502. </xhtml:html>