SPPMI02300_신생아선택.xrw 17 KB

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