SPAYA05300_환자찾기.xrw 17 KB

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