SSPMC00601_재원환자별이력조회.xrw 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  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. <patinfo>
  11. <patinfolist/>
  12. </patinfo>
  13. </main>
  14. <send>
  15. <srchcond/>
  16. <pid/>
  17. <hngnm/>
  18. <rrgstno1/>
  19. <rrgstno2/>
  20. <acptdd/>
  21. </send>
  22. <init>
  23. <P0350list>
  24. <P0350>
  25. <cdnm/>
  26. <cdid/>
  27. </P0350>
  28. </P0350list>
  29. </init>
  30. <hidden>
  31. <uid>
  32. <myself/>
  33. <opener/>
  34. </uid>
  35. </hidden>
  36. </root>
  37. </instance>
  38. <script type="javascript" ev:event="xforms-ready">
  39. <![CDATA[
  40. zbcfGetCodeList(new Array("P0350"), new Array("/root/init/P0350list"));
  41. if( getNodesetCount("/root/send/srchcond") > 0 ){
  42. if( model.getValue("/root/send/checkfnexam") != "1" ){
  43. //조회조건에서 '예약일시'를 제거한다.
  44. cmb_cond.choices.itemset.attribute("nodeset") = "/root/init/P0350list/P0350[cdid != '5' ]";
  45. }
  46. fChangeSearchCondition( model.getValue("/root/send/srchcond") );
  47. model.refresh();
  48. //값이 부모창에서 입력되었을 경우 조회한다.
  49. if(fInputValueCheckXformsReady() ){
  50. //if( fInputValueCheckXformsReady() ){
  51. if( submit("TRPMC00607") ){
  52. if( grd_patinfo.rows == 2 ){
  53. if( model.getValue("/root/send/autoflag").toUpperCase() == "Y" ){
  54. model.setFocus("grd_patinfo");
  55. btn_confirm.dispatch("DOMActivate");
  56. window.close();
  57. }
  58. }
  59. if( grd_patinfo.rows > 1 ){
  60. model.setFocus("grd_patinfo");
  61. }else{
  62. fChangeSearchCondition( cmb_cond.value );
  63. }
  64. }
  65. }
  66. }else{
  67. //조회조건에서 '예약일시'를 제거한다.
  68. cmb_cond.choices.itemset.attribute("nodeset") = "/root/init/P0350list/P0350[cdid != '5' ]";
  69. model.makeNode("/root/send/srchcond");
  70. model.makeNode("/root/send/pid");
  71. model.makeNode("/root/send/hngnm");
  72. model.makeNode("/root/send/rrgstno1");
  73. model.makeNode("/root/send/rrgstno2");
  74. model.makeNode("/root/send/acptdd");
  75. model.refresh();
  76. }
  77. ]]>
  78. </script>
  79. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  80. <submission id="TRPMC02500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/patinfo"/>
  81. <submission id="TRPMC00607" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/patinfo"/>
  82. </model>
  83. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  84. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  85. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  86. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  87. <script type="javascript">
  88. <![CDATA[
  89. //창 생성시 부모창으로 부터 받은 입력값의 유효범위 체크
  90. function fInputValueCheckXformsReady(){
  91. var cond = model.getValue("/root/send/srchcond");
  92. switch(cond){
  93. case '1':
  94. //환자등록번호 체크
  95. if(ipt_pid.currentText.length >= 1 ){
  96. model.setValue("/root/send/pid", ipt_pid.currentText);
  97. return (true);
  98. }else{
  99. messageBox("환자등록번호를 정확히", "C001");
  100. return (false);
  101. }
  102. break;
  103. case '2':
  104. //환자이름 체크
  105. //if( ipt_hngnm.currentText.length >= 2 ) return (true);
  106. if(ipt_hngnm.currentText.length >= 2 ){
  107. model.setValue("/root/send/hngnm", ipt_hngnm.currentText);
  108. return (true);
  109. }else{
  110. messageBox("환자이름을 2자리 이상", "C001");
  111. return (false);
  112. }
  113. break;
  114. case '3':
  115. //환자 주민번호 체크
  116. if( ipt_rrgstno1.currentText.length >= 1 || ipt_rrgstno2.currentText.length >= 1){
  117. model.setValue("/root/send/rrgstno1", ipt_rrgstno1.currentText);
  118. model.setValue("/root/send/rrgstno2", ipt_rrgstno2.currentText);
  119. return (true);
  120. }else{
  121. messageBox("환자 주민번호를", "C001");
  122. return (false);
  123. }
  124. break;
  125. case '4':
  126. //환자이름 유효성 체크.
  127. if(ipt_hngnm.currentText.length >= 2 ){
  128. model.setValue("/root/send/hngnm", ipt_hngnm.currentText);
  129. }else{
  130. messageBox("환자이름을 2자리 이상", "C001");
  131. return (false);
  132. }
  133. //환자 주민번호 체크
  134. if( ipt_rrgstno1.currentText.length >= 1 || ipt_rrgstno2.currentText.length >= 1){
  135. model.setValue("/root/send/rrgstno1", ipt_rrgstno1.currentText);
  136. model.setValue("/root/send/rrgstno2", ipt_rrgstno2.currentText);
  137. }else{
  138. messageBox("환자 주민번호를", "C001");
  139. return (false);
  140. }
  141. return( true );
  142. break;
  143. case '5':
  144. //예약일자 유효성 체크 --
  145. if( isValidDateTime( model.getValue("/root/send/acptdd"), "YYYYMMDD") ){
  146. model.setValue("/root/send/acptdd", model.getValue("/root/send/acptdd"));
  147. //model.setValue("/root/send/rrgstno2", ipt_rrgstno2.currentText);
  148. //alert("aaaa");
  149. return (true);
  150. }else{
  151. messageBox("예약일자를 정확히", "C001");
  152. return (false);
  153. }
  154. break;
  155. default :
  156. model.setFocus("cmb_cond");
  157. return( false );
  158. break;
  159. }
  160. }
  161. //입력값의 유효범위 체크
  162. function fInputValueCheck(){
  163. var cond = model.getValue("/root/send/srchcond");
  164. //alert("cond-----> "+ cond);
  165. switch(cond){
  166. case '1':
  167. //환자등록번호 체크
  168. if(ipt_pid.currentText.length >= 1 ){
  169. model.setValue("/root/send/pid", ipt_pid.currentText);
  170. ipt_hngnm.currentText = '';
  171. return (true);
  172. }else{
  173. messageBox("환자등록번호를 정확히", "C001");
  174. return (false);
  175. }
  176. break;
  177. case '2':
  178. //환자이름 체크
  179. //if( ipt_hngnm.currentText.length >= 2 ) return (true);
  180. if(ipt_hngnm.currentText.length >= 2 ){
  181. model.setValue("/root/send/hngnm", ipt_hngnm.currentText);
  182. //alert("ipt_hngnm-----> "+ ipt_hngnm.currentText);
  183. //alert("getValue-----> "+ model.getValue("/root/send/hngnm"));
  184. ipt_pid.currentText = '';
  185. return (true);
  186. }else{
  187. messageBox("환자이름을 2자리 이상", "C001");
  188. return (false);
  189. }
  190. break;
  191. case '3':
  192. //환자 주민번호 체크
  193. if( ipt_rrgstno1.currentText.length >= 1 || ipt_rrgstno2.currentText.length >= 1 ){
  194. model.setValue("/root/send/rrgstno1", ipt_rrgstno1.currentText);
  195. model.setValue("/root/send/rrgstno2", ipt_rrgstno2.currentText);
  196. return (true);
  197. }else{
  198. messageBox("환자 주민번호를", "C001");
  199. return (false);
  200. }
  201. break;
  202. case '4':
  203. //환자이름 유효성 체크.
  204. if(ipt_hngnm.currentText.length>= 2 ){
  205. model.setValue("/root/send/hngnm", ipt_hngnm.currentText);
  206. }else{
  207. messageBox("환자이름을 2자리 이상", "C001");
  208. return (false);
  209. }
  210. //환자 주민번호 체크
  211. if( ipt_rrgstno1.currentText.length >= 1 || ipt_rrgstno2.currentText.length >= 1){
  212. model.setValue("/root/send/rrgstno1", ipt_rrgstno1.currentText);
  213. model.setValue("/root/send/rrgstno2", ipt_rrgstno2.currentText);
  214. }else{
  215. messageBox("환자 주민번호를", "C001");
  216. return (false);
  217. }
  218. return( true );
  219. break;
  220. case '5':
  221. //예약일자 유효성 체크 --
  222. model.refresh();
  223. if( isValidDateTime( model.getValue("/root/send/acptdd"), "YYYYMMDD") ){
  224. //alert(model.getValue("/root/send/acptdd"));
  225. return (true);
  226. }else{
  227. messageBox("예약일자를 정확히", "C001");
  228. return (false);
  229. }
  230. break;
  231. default :
  232. messageBox("검색조건이 정확히 선택되지 않았습니다. 확인 후 다시 시도해 주십시요.", "E999", "");
  233. model.setFocus("cmb_cond");
  234. return( false );
  235. break;
  236. }
  237. }
  238. //조회 조건에 맞는 input 컨트롤을 세팅해 준다.
  239. function fChangeSearchCondition( cond){
  240. switch(cond){
  241. case '1':
  242. model.makeNode("/root/send/pid");
  243. ipt_pid.attribute("visibility") = "visible";
  244. ipt_pid.attribute("left") = "219px";
  245. ipt_pid.attribute("top") = "8px";
  246. ipt_hngnm.attribute("visibility") = "hidden";
  247. ipt_rrgstno1.attribute("visibility") = "hidden";
  248. ipt_rrgstno2.attribute("visibility") = "hidden";
  249. ipt_acptdd.attribute("visibility") = "hidden";
  250. model.setFocus("ipt_pid");
  251. break;
  252. case '2':
  253. model.makeNode("/root/send/hngnm");
  254. ipt_hngnm.attribute("visibility") = "visible";
  255. ipt_hngnm.attribute("left") = "219px";
  256. ipt_hngnm.attribute("top") = "8px";
  257. ipt_pid.attribute("visibility") = "hidden";
  258. ipt_rrgstno1.attribute("visibility") = "hidden";
  259. ipt_rrgstno2.attribute("visibility") = "hidden";
  260. ipt_acptdd.attribute("visibility") = "hidden";
  261. model.setFocus("ipt_hngnm");
  262. break;
  263. case '3':
  264. model.makeNode("/root/send/rrgstno1");
  265. model.makeNode("/root/send/rrgstno2");
  266. ipt_rrgstno1.attribute("visibility") = "visible";
  267. ipt_rrgstno2.attribute("visibility") = "visible";
  268. ipt_rrgstno1.attribute("left") = "219px";
  269. ipt_rrgstno1.attribute("top") = "8px";
  270. ipt_rrgstno2.attribute("left") = "282px";
  271. ipt_rrgstno2.attribute("top") = "8px";
  272. ipt_hngnm.attribute("visibility") = "hidden";
  273. ipt_pid.attribute("visibility") = "hidden";
  274. ipt_acptdd.attribute("visibility") = "hidden";
  275. model.setFocus("ipt_rrgstno1");
  276. break;
  277. case '4':
  278. //model.makeNode("/root/send/pid");
  279. model.makeNode("/root/send/hngnm");
  280. model.makeNode("/root/send/rrgstno1");
  281. model.makeNode("/root/send/rrgstno2");
  282. ipt_hngnm.attribute("visibility") = "visible";
  283. ipt_hngnm.attribute("left") = "219px";
  284. ipt_hngnm.attribute("top") = "8px";
  285. ipt_pid.attribute("visibility") = "hidden";
  286. ipt_rrgstno1.attribute("visibility") = "visible";
  287. ipt_rrgstno1.attribute("left") = "302px";
  288. ipt_rrgstno1.attribute("top") = "8px";
  289. ipt_rrgstno2.attribute("visibility") = "visible";
  290. ipt_rrgstno2.attribute("left") = "365px";
  291. ipt_rrgstno2.attribute("top") = "8px";
  292. ipt_acptdd.attribute("visibility") = "hidden";
  293. model.setFocus("ipt_hngnm");
  294. break;
  295. case '5':
  296. model.makeNode("/root/send/acptdd");
  297. ipt_acptdd.attribute("visibility") = "visible";
  298. ipt_acptdd.attribute("left") = "219px";
  299. ipt_acptdd.attribute("top") = "8px";
  300. ipt_hngnm.attribute("visibility") = "hidden";
  301. ipt_pid.attribute("visibility") = "hidden";
  302. ipt_rrgstno1.attribute("visibility") = "hidden";
  303. ipt_rrgstno2.attribute("visibility") = "hidden";
  304. model.setFocus("ipt_acptdd");
  305. break;
  306. default :
  307. //messageBox("검색조건이 정확히 선택되지 않았습니다. 확인 후 다시 시도해 주십시요.", "E999", "");
  308. break;
  309. }
  310. }
  311. ]]>
  312. </script>
  313. </xhtml:head>
  314. <xhtml:body pagewidth="800" pageheight="350" guideline="2,343;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  315. <group id="group3" scroll="auto" style="left:0px; top:0px; width:780px; height:316px; ">
  316. <group id="group2" visibility="hidden" style="left:0px; top:0px; width:518px; height:35px; ">
  317. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:517px; height:35px; "/>
  318. <caption id="caption2" class="search_name" style="left:15px; top:8px; width:86px; height:17px; ">검색조건 :</caption>
  319. <button id="btn_search" class="btn1_letter2" navindex="6" style="left:445px; top:7px; width:56px; height:22px; ">
  320. <caption>조회</caption>
  321. <script type="javascript" ev:event="DOMActivate">
  322. <![CDATA[
  323. if( fInputValueCheck() ){
  324. if( submit("TRPMC00607") ){
  325. if( grd_patinfo.rows > 1 ){
  326. model.setFocus("grd_patinfo");
  327. //model.resetInstanceNode("/root/send");
  328. }else{
  329. fChangeSearchCondition( cmb_cond.value );
  330. }
  331. }
  332. }
  333. ]]>
  334. </script>
  335. </button>
  336. <line id="line13" class="line_4" style="x1:429px; y1:7px; x2:429px; y2:29px; border-color:#ffe4bb; "/>
  337. <input id="ipt_hngnm" ref="/root/send/hngnm" class="input_search" navindex="1" visibility="hidden" autonext="false" style="left:179px; top:0px; width:80px; height:19px; ">
  338. <script type="javascript" ev:event="onkeypress">
  339. <![CDATA[
  340. inputEnterKey("btn_search", "DOMActivate");
  341. ]]>
  342. </script>
  343. </input>
  344. <input id="ipt_rrgstno1" ref="/root/send/rrgstno1" class="input_search" navindex="2" visibility="hidden" format="999999" style="left:222px; top:8px; width:60px; height:19px; ">
  345. <script type="javascript" ev:event="onkeypress">
  346. <![CDATA[
  347. inputEnterKey("btn_search", "DOMActivate");
  348. ]]>
  349. </script>
  350. </input>
  351. <select1 id="cmb_cond" ref="/root/send/srchcond" class="combo_search" navindex="10" appearance="minimal" style="left:106px; top:8px; width:110px; height:19px; ">
  352. <choices>
  353. <itemset nodeset="/root/init/P0350list/P0350">
  354. <label ref="cdnm"/>
  355. <value ref="cdid"/>
  356. </itemset>
  357. </choices>
  358. <script type="javascript" ev:event="xforms-value-changed">
  359. <![CDATA[
  360. var cond = model.getValue("/root/send/srchcond");
  361. //model.refresh();
  362. fChangeSearchCondition( cond );
  363. ]]>
  364. </script>
  365. </select1>
  366. <input id="ipt_rrgstno2" ref="/root/send/rrgstno2" class="input_search" navindex="3" visibility="hidden" autonext="false" format="9999999" style="left:250px; top:8px; width:60px; height:19px; ">
  367. <script type="javascript" ev:event="onkeypress">
  368. <![CDATA[
  369. inputEnterKey("btn_search", "DOMActivate");
  370. ]]>
  371. </script>
  372. </input>
  373. <input id="ipt_pid" ref="/root/send/pid" class="input_search" navindex="4" visibility="hidden" autonext="false" format="99999999" style="left:275px; top:8px; width:80px; height:19px; ">
  374. <script type="javascript" ev:event="onkeypress">
  375. <![CDATA[
  376. inputEnterKey("btn_search", "DOMActivate");
  377. ]]>
  378. </script>
  379. </input>
  380. <input id="ipt_acptdd" ref="/root/send/acptdd" class="input_search" navindex="5" visibility="hidden" autonext="false" inputtype="date" style="left:290px; top:8px; width:100px; height:19px; ">
  381. <script type="javascript" ev:event="onkeypress">
  382. <![CDATA[
  383. inputEnterKey("btn_search", "DOMActivate");
  384. ]]>
  385. </script>
  386. </input>
  387. </group>
  388. <caption id="caption1" class="tit_2" style="left:5px; top:5px; width:95px; height:13px; ">재원이력사항</caption>
  389. <line id="line1" class="line_1" style="x1:0px; y1:20px; x2:780px; y2:20px; "/>
  390. <datagrid id="grd_patinfo" nodeset="/root/main/patinfo/patinfolist" caption="환자명^입원일자^퇴원일자^진료과^전문의^휴대전화번호^주민등록번호^주민등록번호^환자번호" colsep="^" colwidth="83, 100, 100, 105, 94, 90, 64, 68, 79" dataheight="23" defaultrows="2" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheight="23" rowsep="|" navindex="7" style="left:0px; top:25px; width:780px; height:280px; ">
  391. <col ref="hngnm" style="text-align:center; "/>
  392. <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
  393. <col ref="dschdd" format="yyyy-mm-dd" style="text-align:center; "/>
  394. <col ref="orddeptnm"/>
  395. <col ref="medispclid"/>
  396. <col ref="mpphontel" style="text-align:center; "/>
  397. <col ref="rrgstno1" style="text-align:center; "/>
  398. <col ref="rrgstno2" style="text-align:center; "/>
  399. <col ref="pid" style="text-align:center; "/>
  400. <script type="javascript" ev:event="ondblclick">
  401. <![CDATA[
  402. if ( checkOpener() ) {
  403. row = grd_patinfo.row;
  404. if( row > 0 ){
  405. if( getNodesetCount("/root/main/patinfo/patinfolist") > 0 ){
  406. opener.model.copyNode("/root/main/patinfo/patinfolist", grd_patinfo.getNode( row ));
  407. opener.model.makeNode("/root/main/popupendflag");
  408. opener.model.setValue("/root/main/popupendflag", "ok");
  409. opener.model.refresh();
  410. window.close();
  411. }
  412. }
  413. } else {
  414. messageBox("상위화면이 변경되어 데이터를 가져올 수", "I004");
  415. }
  416. ]]>
  417. </script>
  418. <script type="javascript" ev:event="onclick">
  419. <![CDATA[
  420. /*
  421. if ( checkOpener() ) {
  422. row = grd_patinfo.row;
  423. if( row > 0 ){
  424. if( getNodesetCount("/root/main/patinfo/patinfolist") > 1 ){
  425. opener.model.copyNode("/root/main/patinfo/patinfolist", grd_patinfo.getNode( row ));
  426. opener.model.refresh();
  427. }
  428. }
  429. } else {
  430. messageBox("상위화면이 변경되어 데이터를 가져올 수", "I004");
  431. }
  432. */
  433. ]]>
  434. </script>
  435. <script type="javascript" ev:event="onkeypress">
  436. <![CDATA[
  437. if( event.keyCode == 13 ){
  438. btn_confirm.dispatch("DOMActivate");
  439. }
  440. //alert("aaa");
  441. ]]>
  442. </script>
  443. </datagrid>
  444. </group>
  445. <group id="group1" scroll="auto" style="left:0px; top:316px; width:780px; height:27px; ">
  446. <button id="btn_confirm" class="btn4_letter2" navindex="8" style="left:662px; top:5px; width:56px; height:22px; ">
  447. <caption>확인</caption>
  448. <script type="javascript" ev:event="DOMActivate">
  449. <![CDATA[
  450. if ( checkOpener() ) {
  451. row = grd_patinfo.row;
  452. opener.model.setValue("/root/main/popupendflag", "cancel");
  453. if( row > 0 ){
  454. if( getNodesetCount("/root/main/patinfo/patinfolist") > 0 ){
  455. opener.model.copyNode("/root/main/patinfo/patinfolist", grd_patinfo.getNode( row ));
  456. opener.model.makeNode("/root/main/popupendflag");
  457. opener.model.setValue("/root/main/popupendflag", "ok");
  458. }
  459. //else{
  460. // opener.model.setValue("/root/main/popupendflag", "cancel");
  461. //}
  462. //opener.model.refresh();
  463. //window.close();
  464. }else {
  465. //opener.model.setValue("/root/main/popupendflag", "cancel");
  466. messageBox("행이 정확히 선택되지", "E007");
  467. //opener.model.refresh();
  468. //window.close();
  469. }
  470. } else {
  471. messageBox("상위화면이 변경되어 데이터를 가져올 수", "I004");
  472. //opener.model.setValue("/root/main/popupendflag", "cancel");
  473. //opener.model.refresh();
  474. //window.close();
  475. }
  476. opener.model.refresh();
  477. window.close();
  478. ]]>
  479. </script>
  480. </button>
  481. <button id="btn_cancel" class="btn4_letter2" navindex="9" style="left:721px; top:5px; width:56px; height:22px; ">
  482. <caption>취소</caption>
  483. <script type="javascript" ev:event="DOMActivate">
  484. <![CDATA[
  485. opener.model.makeNode("/root/main/popupendflag");
  486. opener.model.setValue("/root/main/popupendflag", "cancel");
  487. window.close();
  488. ]]>
  489. </script>
  490. </button>
  491. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:780px; y2:0px; "/>
  492. </group>
  493. </xhtml:body>
  494. </xhtml:html>