SMPMC04200_전자카드발급.xrw 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--수정이력 : 2007.10.15 박재형 - 감면정보에 가족주민번호, 가족성명 추가 -->
  3. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  4. <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">
  5. <xhtml:head>
  6. <xhtml:title>전자카드발급</xhtml:title>
  7. <model id="model1">
  8. <instance id="instance1">
  9. <root xmlns="">
  10. <main>
  11. <newpatinfo>
  12. <pid/>
  13. <hngnm/>
  14. <rrgstno/>
  15. <rrgstno1/>
  16. <rrgstno2/>
  17. <remfact/>
  18. </newpatinfo>
  19. <rsrvpatinfo>
  20. <orddd/>
  21. <orddeptcd/>
  22. <orddeptabbr/>
  23. <orddrid/>
  24. <orddeptdrabbr/>
  25. <issno/>
  26. </rsrvpatinfo>
  27. <rsrvpat>
  28. <rsrvpatlist>
  29. <pid/>
  30. <hngnm/>
  31. <rrgstno1/>
  32. <rrgstno2/>
  33. <orddeptcd/>
  34. <orddrid/>
  35. </rsrvpatlist>
  36. </rsrvpat>
  37. <checknewrsrvpat/>
  38. </main>
  39. <send/>
  40. <init>
  41. <orddeptcd>
  42. <orddeptcdlist>
  43. <cd/>
  44. <nm/>
  45. <deptengabbr/>
  46. </orddeptcdlist>
  47. </orddeptcd>
  48. <orddrid>
  49. <orddridlist>
  50. <cd/>
  51. <nm/>
  52. <abbr/>
  53. </orddridlist>
  54. </orddrid>
  55. </init>
  56. <hidden>
  57. <patcardissue>
  58. </patcardissue>
  59. </hidden>
  60. </root>
  61. </instance>
  62. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  63. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  64. <submission id="TXPAM00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/patcardissue" resultref="/root/hidden/patcardissue/result"/>
  65. <!-- 수정 추가 : 2007.10.15 박재형 : 감면저장-->
  66. <!-- 수정추가 : 2007.10.15 박재형 : 감면 조회-->
  67. <submission id="TRPMC04201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/rsrvpatinfo" resultref="/root/main/rsrvpat"/>
  68. <submission id="TRPMC04202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp/newpatinfo"/>
  69. </model>
  70. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  71. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  72. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  74. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  75. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  76. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  77. <!-- 수정추가 : 20071015 박재형 : 할인분류구분 공통코드추가 (P0417)-->
  78. <script type="javascript" ev:event="xforms-ready">
  79. <![CDATA[
  80. //2007-10-04 이동식 추가 - 환자카드발급 PC정보를 읽어온다.
  81. fGetPCID();
  82. //alert(app.macAddress);
  83. //END..
  84. //초기화
  85. fInit();
  86. //진료과코드 진료의사ID 조회
  87. pamGetDeptCDDrIDList();
  88. model.makeNode("/root/init/temp/orddeptcd/orddeptcdlist/cd");
  89. model.makeNode("/root/init/temp/orddeptcd/orddeptcdlist/nm");
  90. copyNodesetType("/root/init/orddeptcd/orddeptcdlist", "/root/init/temp/orddeptcd/orddeptcdlist", "before");
  91. model.removeNodeset("/root/init/temp");
  92. model.refresh();
  93. ]]>
  94. </script>
  95. <script type="javascript">
  96. <![CDATA[
  97. var IssCard = null;
  98. //초기화
  99. function fInit(){
  100. //데이터 초기화
  101. model.resetInstanceNode("/root/main/newpatinfo");
  102. model.resetInstanceNode("/root/main/rsrvpatinfo");
  103. model.removeNodeset("/root/main/rsrvpat/rsrvpatlist");
  104. //오늘 날자 세팅
  105. model.setValue("/root/main/rsrvpatinfo/orddd", getCurrentDate());
  106. //예약환자화면 디폴트처리
  107. model.setValue("/root/main/checknewrsrvpat", 'R');
  108. group4.visible = false;
  109. group5.visible = true;
  110. model.refresh();
  111. }
  112. //2007-10-04 이동식 추가 - 환자카드발급신청
  113. function fIssuePatientCard(){
  114. //노드생성
  115. model.makeNode("/root/hidden/patcardissue/flag");
  116. model.makeNode("/root/hidden/patcardissue/pid");
  117. model.makeNode("/root/hidden/patcardissue/rrgstno1");
  118. model.makeNode("/root/hidden/patcardissue/rrgstno2");
  119. model.makeNode("/root/hidden/patcardissue/issflag");
  120. model.makeNode("/root/hidden/patcardissue/issno");
  121. model.makeNode("/root/hidden/patcardissue/hngnm");
  122. model.makeNode("/root/hidden/patcardissue/remfact");
  123. model.makeNode("/root/hidden/patcardissue/result");
  124. //데이터 체크
  125. var pid = model.getValue("/root/main/newpatinfo/pid");
  126. if( pid == '' || pid == ' ' || pid == '-' ){
  127. messageBox("등록번호를 찾을 수 없습니다.", "E999", "");
  128. return false;
  129. }
  130. var rrgstno1 = model.getValue("/root/main/newpatinfo/rrgstno1");
  131. if( rrgstno1 == '' || rrgstno1 == ' ' || rrgstno1 == '-' ){
  132. messageBox("주민등록번호 앞 6자리를 찾을 수 없습니다.", "E999", "");
  133. return false;
  134. }else{
  135. if( ! fRrgstNo1Veri() ){
  136. return false;
  137. }
  138. }
  139. var rrgstno2 = model.getValue("/root/main/newpatinfo/rrgstno2");
  140. if( rrgstno2 == '' || rrgstno2 == ' ' || rrgstno2 == '-' ){
  141. messageBox("주민등록번호 뒤 7자리를 찾을 수 없습니다.", "E999", "");
  142. return false;
  143. }else{
  144. if( ! fRrgstNo2Veri() ){
  145. return false;
  146. }
  147. }
  148. var hngnm = model.getValue("/root/main/newpatinfo/hngnm");
  149. if( hngnm == '' || hngnm == ' ' || hngnm == '-' ){
  150. messageBox("환자이름을 찾을 수 없습니다.", "E999", "");
  151. return false;
  152. }
  153. var issno = model.getValue("/root/hidden/patcardissue/pcinfo");
  154. if( issno == '' || issno == ' ' || issno == '-' ){
  155. messageBox("PC 고유번호 정보를 찾을 수 없습니다.", "E999", "");
  156. return false;
  157. }
  158. //노드값 세팅
  159. model.setValue("/root/hidden/patcardissue/flag", "R"); //재발행 cf)최초발행은 'F'
  160. model.setValue("/root/hidden/patcardissue/pid", pid);
  161. model.setValue("/root/hidden/patcardissue/rrgstno1", rrgstno1);
  162. model.setValue("/root/hidden/patcardissue/rrgstno2", rrgstno2);
  163. model.setValue("/root/hidden/patcardissue/issflag", "7"); //환자 cf)직원은 '4"
  164. model.setValue("/root/hidden/patcardissue/issno", issno);
  165. model.setValue("/root/hidden/patcardissue/hngnm", hngnm);
  166. model.setValue("/root/hidden/patcardissue/remfact", model.getValue("/root/main/newpatinfo/remfact"));
  167. setForceOn();
  168. if(submit("TXPAM00201")){
  169. messageBox("환자카드 발급신청을 정상적으로 완료했습니다. 카드발급 프린터에서 발급상황을 확인하세요.", "I999", "");
  170. model.removenode("/root/hidden/patcardissue/flag");
  171. model.removenode("/root/hidden/patcardissue/pid");
  172. model.removenode("/root/hidden/patcardissue/rrgstno1");
  173. model.removenode("/root/hidden/patcardissue/rrgstno2");
  174. model.removenode("/root/hidden/patcardissue/issflag");
  175. model.removenode("/root/hidden/patcardissue/issno");
  176. model.removenode("/root/hidden/patcardissue/hngnm");
  177. model.removenode("/root/hidden/patcardissue/remfact");
  178. model.removenode("/root/hidden/patcardissue/result");
  179. model.resetInstanceNode("/root/main/newpatinfo");
  180. model.refresh();
  181. model.setFocus("ipt_pid");
  182. }
  183. }
  184. //END..
  185. // 수정추가 : 2007.10.17 : 박재형 - 감면정보 조회시 주민번호 앞자리 조건 확인
  186. function fRrgstNo1Veri()
  187. {
  188. var rrgstno1 = model.getValue("/root/main/newpatinfo/rrgstno1");
  189. if (rrgstno1 != null && rrgstno1 != "" && rrgstno1 != " " && rrgstno1 != "-")
  190. {
  191. if (rrgstno1.length != 6)
  192. {
  193. messageBox("주민번호1은 6자리여야 합니다!","E999","");
  194. model.setFocus("rrgstno1");
  195. model.refresh();
  196. return false;
  197. }
  198. if (rrgstno1.isNumber() != true)
  199. {
  200. messageBox("주민번호1은 숫자형태로 입력되어야 합니다!","E999","");
  201. model.setFocus("rrgstno1");
  202. model.refresh();
  203. return false;
  204. }
  205. }
  206. else
  207. {
  208. messageBox("주민번호1은 6자리여야 합니다!","E999","");
  209. model.setFocus("rrgstno1");
  210. model.refresh();
  211. return false;
  212. }
  213. return true;
  214. }
  215. // 수정추가 : 2007.10.17 : 박재형 - 감면정보 조회시 주민번호 뒷자리 조건 확인 및 앞자리 날짜입력양식 확인
  216. function fRrgstNo2Veri()
  217. {
  218. var brthdd;
  219. var rrgstno1 = model.getValue("/root/main/newpatinfo/rrgstno1");
  220. var rrgstno2 = model.getValue("/root/main/newpatinfo/rrgstno2");
  221. if (rrgstno1.length != 6)
  222. {
  223. messageBox("환자주민번호1은 6자리입니다!","E999","");
  224. model.setFocus("rrgstno1");
  225. return false;
  226. }
  227. if (rrgstno2.length != 7)
  228. {
  229. messageBox("환자주민번호2은 7자리입니다!","E999","");
  230. model.setFocus("ipt_rrgstno2");
  231. return false;
  232. }
  233. var gubn = rrgstno2.substr(0,1);
  234. switch(gubn){
  235. case '1' :
  236. case '2' :
  237. case '5' :
  238. case '6' :
  239. brthdd = '19'.concat(rrgstno1);
  240. break;
  241. case '3' :
  242. case '4' :
  243. case '7' :
  244. case '8' :
  245. brthdd = '20'.concat(rrgstno1);
  246. break;
  247. case '9' :
  248. case '0' :
  249. brthdd = '18'.concat(rrgstno1);
  250. break;
  251. default :
  252. brthdd = '19'.concat(rrgstno1);
  253. break;
  254. }
  255. //model.setValue("/root/main/ptbspatinfo/brthdd",brthdd);
  256. if (isValidDateTime(brthdd, "YYYYMMDD") == false)
  257. {
  258. if( messageBox("주민번호 앞6자리 형식오류입니다. 계속 진행하시겠습니까?","Q999","") != 6 ){
  259. model.setValue("/root/main/newpatinfo/rrgstno1","");
  260. model.setValue("/root/main/newpatinfo/rrgstno2","");
  261. //model.setValue("/root/main/ptbspatinfo/brthdd","");
  262. model.refresh();
  263. return false;
  264. }
  265. }
  266. var rrgstno = rrgstno1.concat(rrgstno2);
  267. //var age = rrgstno1;
  268. //model.setValue("/root/main/patinfo/patinfolist/age",getFullAge(model.getValue("/root/main/patinfo/patinfolist/brthdd")));
  269. //model.refresh();
  270. if (isResidentNo(rrgstno) == false)
  271. {
  272. if( messageBox("유효하지 않은 주민번호입니다!, 계속 진행하시겠습니까?","Q999","") != 6 ){
  273. model.setValue("/root/main/newpatinfo/rrgstno1","");
  274. model.setValue("/root/main/newpatinfo/rrgstno2","");
  275. model.refresh();
  276. return false;
  277. }else{
  278. return true;
  279. }
  280. }
  281. return true;
  282. }
  283. ]]>
  284. </script>
  285. </xhtml:head>
  286. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  287. <group id="group1" scroll="auto" style="left:0px; top:475px; width:840px; height:27px; ">
  288. <button id="btn_initialize" class="btn4_letter3" style="left:772px; top:5px; width:68px; height:22px; ">
  289. <caption>초기화</caption>
  290. <script type="javascript" ev:event="DOMActivate">
  291. <![CDATA[
  292. //데이터 초기화
  293. model.resetInstanceNode("/root/main/newpatinfo");
  294. model.resetInstanceNode("/root/main/rsrvpatinfo");
  295. model.removeNodeset("/root/main/rsrvpat/rsrvpatlist");
  296. //오늘 날자 세팅
  297. model.setValue("/root/main/rsrvpatinfo/orddd", getCurrentDate());
  298. model.refresh();
  299. ]]>
  300. </script>
  301. </button>
  302. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:840px; y2:0px; "/>
  303. </group>
  304. <group id="group3" style="left:0px; top:0px; width:845px; height:13px; ">
  305. <caption id="caption22" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">전자카드발급</caption>
  306. </group>
  307. <group id="group2" style="left:0px; top:13px; width:845px; height:466px; ">
  308. <group id="group4" style="left:0px; top:25px; width:840px; height:435px; ">
  309. <input id="ipt_rrgstno2" ref="/root/main/newpatinfo/rrgstno2" class="font_pid" visibility="hidden" maxlength="7" format="9999999" style="left:528px; top:167px; width:307px; height:65px; color:#000000; text-align:left; ">
  310. <script type="javascript" ev:event="onkeypress">
  311. <![CDATA[
  312. if (event.keyCode == "13")
  313. {
  314. model.setFocus("textarea1");
  315. }
  316. ]]>
  317. </script>
  318. <script type="javascript" ev:event="DOMFocusOut">
  319. <![CDATA[
  320. if( isNaN(ipt_rrgstno2.currentText) ){
  321. messageBox("주민번호2이 숫자형 데이터가 아닙니다!", "E999", "");
  322. model.setValue("/root/main/newpatinfo/rrgstno2", "");
  323. ipt_rrgstno2.refresh();
  324. model.setFocus("ipt_rrgstno2");
  325. return false;
  326. }
  327. ]]>
  328. </script>
  329. </input>
  330. <input id="ipt_rrgstno1" ref="/root/main/newpatinfo/rrgstno1" class="font_pid" visibility="hidden" maxlength="6" format="999999" style="left:225px; top:167px; width:299px; height:65px; color:#000000; text-align:left; ">
  331. <script type="javascript" ev:event="onkeypress">
  332. <![CDATA[
  333. if (event.keyCode == "13")
  334. {
  335. model.setFocus("ipt_rrgstno2");
  336. }
  337. ]]>
  338. </script>
  339. <script type="javascript" ev:event="DOMFocusOut">
  340. <![CDATA[
  341. if( isNaN(ipt_rrgstno1.currentText) ){
  342. messageBox("주민번호1이 숫자형 데이터가 아닙니다!", "E999", "");
  343. model.setValue("/root/main/newpatinfo/rrgstno1", "");
  344. ipt_rrgstno1.refresh();
  345. model.setFocus("ipt_rrgstno1");
  346. return false;
  347. }
  348. ]]>
  349. </script>
  350. </input>
  351. <input id="ipt_rrgstno" ref="/root/main/newpatinfo/rrgstno" class="font_pid" navindex="3" format="999999-9999999" style="left:225px; top:167px; width:610px; height:65px; color:#000000; text-align:left; ">
  352. <script type="javascript" ev:event="onkeypress">
  353. <![CDATA[
  354. if (event.keyCode == "13")
  355. {
  356. var rrgstno = ipt_rrgstno.currentText;
  357. if( rrgstno.length != 14 ){
  358. messageBox("주민번호를 정확히 입력하지 않았습니다.", "E999", "");
  359. //model.setValue("/root/main/newpatinfo/rrgstno", "");
  360. model.setValue("/root/main/newpatinfo/rrgstno1", "");
  361. model.setValue("/root/main/newpatinfo/rrgstno2", "");
  362. model.refresh();
  363. return false;
  364. }
  365. rrgstno = rrgstno.replace("-", "");
  366. if( isNaN(rrgstno) ){
  367. messageBox("주민번호가 숫자형 데이터가 아닙니다!", "E999", "");
  368. model.setValue("/root/main/newpatinfo/rrgstno", "");
  369. model.setValue("/root/main/newpatinfo/rrgstno1", "");
  370. model.setValue("/root/main/newpatinfo/rrgstno2", "");
  371. model.refresh();
  372. return false;
  373. //model.setFocus("ipt_rrgstno2");
  374. }
  375. model.setFocus("textarea1");
  376. }
  377. ]]>
  378. </script>
  379. <script type="javascript" ev:event="DOMFocusOut">
  380. <![CDATA[
  381. var rrgstno = ipt_rrgstno.currentText;
  382. if( rrgstno.length != 14 ){
  383. messageBox("주민번호를 정확히 입력하지 않았습니다.", "E999", "");
  384. //model.setValue("/root/main/newpatinfo/rrgstno", "");
  385. model.setValue("/root/main/newpatinfo/rrgstno1", "");
  386. model.setValue("/root/main/newpatinfo/rrgstno2", "");
  387. model.refresh();
  388. return false;
  389. }
  390. rrgstno = rrgstno.replace("-", "");
  391. if( isNaN(rrgstno) ){
  392. messageBox("주민번호가 숫자형 데이터가 아닙니다!", "E999", "");
  393. model.setValue("/root/main/newpatinfo/rrgstno", "");
  394. model.setValue("/root/main/newpatinfo/rrgstno1", "");
  395. model.setValue("/root/main/newpatinfo/rrgstno2", "");
  396. model.refresh();
  397. return false;
  398. //model.setFocus("ipt_rrgstno2");
  399. }
  400. model.setValue("/root/main/newpatinfo/rrgstno1", rrgstno.substr(0,6));
  401. model.setValue("/root/main/newpatinfo/rrgstno2", rrgstno.substr(6,7));
  402. model.refresh();
  403. model.setFocus("textarea1");
  404. ]]>
  405. </script>
  406. </input>
  407. <input id="ipt_hngnm" ref="/root/main/newpatinfo/hngnm" class="font_pid" navindex="2" imemode="hangul" style="left:225px; top:99px; width:610px; height:65px; color:#000000; text-align:left; ">
  408. <script type="javascript" ev:event="onkeypress">
  409. <![CDATA[
  410. if (event.keyCode == "13")
  411. {
  412. model.setValue("/root/main/newpatinfo/hngnm", ipt_hngnm.currentText);
  413. ipt_hngnm.refresh();
  414. model.setFocus("ipt_rrgstno");
  415. }
  416. ]]>
  417. </script>
  418. </input>
  419. <textarea id="textarea1" ref="/root/main/newpatinfo/remfact" navindex="4" imemode="hangul" style="left:225px; top:235px; width:610px; height:163px; font-size:26pt; color:#000000; "/>
  420. <caption id="caption1" class="cell_1" style="left:0px; top:234px; width:223px; height:166px; font-size:26pt; vertical-align:middle; ">참고사항</caption>
  421. <caption id="caption2" class="tit_2" style="left:5px; top:10px; width:126px; height:14px; ">신환환자</caption>
  422. <line id="line7" class="line_1" style="x1:0px; y1:25px; x2:836px; y2:25px; "/>
  423. <line id="line8" class="line_2" style="x1:0px; y1:164px; x2:836px; y2:164px; "/>
  424. <caption id="caption81" class="cell_1" style="left:0px; top:166px; width:223px; height:67px; font-size:26pt; vertical-align:middle; ">주민등록번호</caption>
  425. <caption id="caption82" class="cell_1" style="left:0px; top:30px; width:223px; height:67px; font-size:26pt; vertical-align:middle; ">등록번호</caption>
  426. <caption id="caption79" class="cell_1" style="left:0px; top:98px; width:223px; height:67px; font-size:26pt; vertical-align:middle; ">환자이름</caption>
  427. <line id="line1" class="line_2" style="x1:0px; y1:96px; x2:836px; y2:96px; "/>
  428. <button id="button2" class="btn4_letter2" navindex="5" style="left:710px; top:403px; width:56px; height:22px; ">
  429. <caption>발급</caption>
  430. <script type="javascript" ev:event="DOMActivate">
  431. <![CDATA[
  432. fIssuePatientCard();
  433. ]]>
  434. </script>
  435. </button>
  436. <line id="line9" class="line_3" style="x1:0px; y1:400px; x2:836px; y2:400px; "/>
  437. <button id="button4" class="btn4_letter3" style="left:768px; top:403px; width:68px; height:22px; ">
  438. <caption>초기화</caption>
  439. <script type="javascript" ev:event="DOMActivate">
  440. <![CDATA[
  441. //데이터 초기화
  442. model.resetInstanceNode("/root/main/newpatinfo");
  443. model.resetInstanceNode("/root/main/rsrvpatinfo");
  444. model.removeNodeset("/root/main/rsrvpat/rsrvpatlist");
  445. //오늘 날자 세팅
  446. model.setValue("/root/main/rsrvpatinfo/orddd", getCurrentDate());
  447. model.refresh();
  448. model.setFocus("ipt_pid");
  449. ]]>
  450. </script>
  451. </button>
  452. <line id="line4" class="line_2" style="x1:0px; y1:232px; x2:836px; y2:232px; "/>
  453. <input id="ipt_pid" ref="/root/main/newpatinfo/pid" class="font_pid" navindex="1" autonext="false" maxlength="10" style="left:226px; top:31px; width:610px; height:65px; color:#000000; text-align:left; ">
  454. <script type="javascript" ev:event="onkeypress">
  455. <![CDATA[
  456. if (event.keyCode == "13")
  457. {
  458. if( isNaN(ipt_pid.currentText) ){
  459. messageBox("등록번호가 숫자형 데이터가 아닙니다!", "E999", "");
  460. model.setValue("/root/main/newpatinfo/pid", "");
  461. ipt_pid.refresh();
  462. model.setFocus("ipt_pid");
  463. return false;
  464. }
  465. model.makeNode("/root/send/pid");
  466. model.makeNode("/root/temp/newpatinfo");
  467. model.setValue("/root/send/pid", ipt_pid.currentText);
  468. model.setValue("/root/main/newpatinfo/pid", ipt_pid.currentText);
  469. model.refresh();
  470. setForceOn();
  471. if( submit("TRPMC04202") ){
  472. if( getNodesetCount("/root/temp/newpatinfo/newpatinfolist") > 0 ){
  473. var issdd = model.getValue("/root/temp/newpatinfo/newpatinfolist/issdd");
  474. var msgdd = issdd.substr(0, 4) + "년 " + issdd.substr(4,2) + "월 " + issdd.substr(6,2) + "일에 ";
  475. var msg = messageBox( msgdd + "전자카드가 발급되었습니다. 재발급 하시겠습니까?", "Q999", "");
  476. if( msg == 6 ){
  477. model.setValue("/root/main/newpatinfo/pid", model.getValue("/root/temp/newpatinfo/newpatinfolist/pid"));
  478. model.setValue("/root/main/newpatinfo/hngnm", model.getValue("/root/temp/newpatinfo/newpatinfolist/hngnm"));
  479. model.setValue("/root/main/newpatinfo/rrgstno1", model.getValue("/root/temp/newpatinfo/newpatinfolist/rrgstno1"));
  480. model.setValue("/root/main/newpatinfo/rrgstno2", model.getValue("/root/temp/newpatinfo/newpatinfolist/rrgstno2"));
  481. model.setValue("/root/main/newpatinfo/rrgstno", model.getValue("/root/temp/newpatinfo/newpatinfolist/rrgstno1") + model.getValue("/root/temp/newpatinfo/newpatinfolist/rrgstno2") );
  482. model.setValue("/root/main/newpatinfo/remfact", '재발급');
  483. model.refresh();
  484. button2.dispatch("DOMActivate"); //발급버튼 실행
  485. }else{
  486. button4.dispatch("DOMActivate"); //초기화버튼 실행
  487. return false;
  488. }
  489. }else{
  490. model.setValue("/root/main/newpatinfo/pid", ipt_pid.currentText);
  491. model.refresh();
  492. model.setFocus("ipt_hngnm");
  493. }
  494. }
  495. }
  496. ]]>
  497. </script>
  498. <script type="javascript" ev:event="DOMFocusOut">
  499. <![CDATA[
  500. if( isNaN(ipt_pid.currentText) ){
  501. messageBox("등록번호가 숫자형 데이터가 아닙니다!", "E999", "");
  502. model.setValue("/root/main/newpatinfo/pid", "");
  503. ipt_pid.refresh();
  504. model.setFocus("ipt_pid");
  505. return false;
  506. }
  507. ]]>
  508. </script>
  509. </input>
  510. </group>
  511. <group id="group5" style="left:0px; top:25px; width:843px; height:440px; ">
  512. <datagrid id="datagrid1" nodeset="/root/main/rsrvpat/rsrvpatlist" caption="등록번호^환자명^주민등록번호^주민등록번호^진료과명^전문의명^진료예약일^생성일자^발급일자^발급시간" colsep="^" colwidth="80, 70, 50, 55, 140, 70, 85, 85, 85, 70" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:67px; width:840px; height:368px; ">
  513. <col ref="pid"/>
  514. <col ref="hngnm"/>
  515. <col ref="rrgstno1"/>
  516. <col ref="rrgstno2"/>
  517. <col disabled="true" ref="orddeptcd" type="combo">
  518. <choices>
  519. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  520. <label ref="nm"/>
  521. <value ref="cd"/>
  522. </itemset>
  523. </choices>
  524. </col>
  525. <col disabled="true" ref="orddrid" type="combo">
  526. <choices>
  527. <itemset nodeset="/root/init/orddrid/orddridlist">
  528. <label ref="nm"/>
  529. <value ref="cd"/>
  530. </itemset>
  531. </choices>
  532. </col>
  533. <col ref="orddd" format="yyyy-mm-dd"/>
  534. <col ref="isscretdd" format="yyyy-mm-dd"/>
  535. <col ref="issdd" format="yyyy-mm-dd"/>
  536. <col ref="isstm" format="hh:nn:ss"/>
  537. </datagrid>
  538. <line id="line2" class="line_1" style="x1:0px; y1:62px; x2:840px; y2:62px; "/>
  539. <caption id="caption14" class="tit_2" style="left:5px; top:47px; width:144px; height:13px; ">예약환자리스트</caption>
  540. <group id="group6" style="left:0px; top:0px; width:840px; height:35px; vertical-align:top; ">
  541. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:840px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  542. <button id="btn_search" class="btn1_letter2" navindex="11" style="left:685px; top:7px; width:56px; height:22px; ">
  543. <caption>조회</caption>
  544. <script type="javascript" ev:event="DOMActivate">
  545. <![CDATA[
  546. var orddd = model.getValue("/root/main/rsrvpatinfo/orddd");
  547. var orddeptcd = model.getValue("/root/main/rsrvpatinfo/orddeptcd");
  548. if( orddd == '' || orddd == ' ' || orddd == null || orddd == '-' ){
  549. messageBox("진료일자를 넣고, 조회해주세요.", "E999", "");
  550. return false;
  551. }else if( orddeptcd == '' || orddeptcd == ' ' || orddeptcd == null || orddeptcd == '-' ){
  552. var msg = messageBox("해당 진료일에 예약환자가 있는 의사정보를 조회합니다. 조회하시겠습니까?", "Q999", "");
  553. if( msg != 6 ){
  554. return false;
  555. }
  556. }
  557. var issno = model.getValue("/root/hidden/patcardissue/pcinfo");
  558. if( issno == '' || issno == ' ' || issno == '-' ){
  559. messageBox("발급PC정보를 읽을 수 없습니다. \n전자카드발급을 위한 PC정보 파일이 있는지 확인하세요.(C:\WINDOWS\Device.ini)", "E999", "");
  560. return false;
  561. }else{
  562. model.setValue("/root/main/rsrvpatinfo/issno", issno);
  563. }
  564. setForceOn();
  565. if( ! submit("TRPMC04201") ){
  566. }
  567. ]]>
  568. </script>
  569. </button>
  570. <line id="line13" class="line_4" style="x1:670px; y1:7px; x2:670px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  571. <select1 id="cmb_orddrid" ref="/root/main/rsrvpatinfo/orddrid" class="combo_s_essential" navindex="10" appearance="minimal" style="left:580px; top:8px; width:80px; height:19px; ">
  572. <choices>
  573. <itemset nodeset="/root/init/orddrid/orddridlist">
  574. <label ref="nm"/>
  575. <value ref="cd"/>
  576. </itemset>
  577. </choices>
  578. <script type="javascript" ev:event="xforms-value-changed">
  579. <![CDATA[
  580. var orddrid = cmb_orddrid.value;
  581. var drengabbr = model.getValue("/root/init/orddrid/orddridlist[ cd = '" + cmb_orddrid.value + "']/drengabbr");
  582. var orddeptcd = model.getValue("/root/init/orddrid/orddridlist[ cd = '" + cmb_orddrid.value + "']/dp");
  583. //진료과 세팅
  584. model.setValue("/root/main/rsrvpatinfo/orddeptcd", orddeptcd );
  585. cmb_orddeptcd.refresh();
  586. cmb_orddeptcd.dispatch("xforms-value-changed");
  587. //END..
  588. //2007-08-17 이동식 추가 - 진료의 선택시 영문약어표시
  589. model.setValue("/root/main/rsrvpatinfo/orddrid", orddrid);
  590. model.setValue("/root/main/rsrvpatinfo/orddeptdrabbr", drengabbr);
  591. model.refresh();
  592. ]]>
  593. </script>
  594. </select1>
  595. <input id="ipt_orddeptdrabbr" ref="/root/main/rsrvpatinfo/orddeptdrabbr" class="input_s_essential" navindex="9" maxlength="4" _chartype="upper" style="left:530px; top:8px; width:47px; height:19px; ">
  596. <script type="javascript" ev:event="DOMFocusOut">
  597. <![CDATA[
  598. //2007-12-14 최종수정 - 진료의약어 입력시 진료과 진료의 동시세팅!
  599. var orddrabbr = ipt_orddeptdrabbr.value;
  600. if( orddrabbr == '' || orddrabbr.length < 2 || orddrabbr == ' '){
  601. return false;
  602. }
  603. var orddrid = model.getValue("/root/init/orddrid/orddridlist[ drengabbr = '" + orddrabbr.toUpperCase() + "']/cd");
  604. var orddeptcd = model.getValue("/root/init/orddrid/orddridlist[ drengabbr = '" + orddrabbr.toUpperCase() + "']/dp");
  605. //진료과 세팅
  606. model.setValue("/root/main/rsrvpatinfo/orddeptcd", orddeptcd );
  607. cmb_orddeptcd.refresh();
  608. cmb_orddeptcd.dispatch("xforms-value-changed");
  609. //진료의 세팅
  610. model.setValue("/root/main/rsrvpatinfo/orddrid", orddrid );
  611. cmb_orddrid.refresh();
  612. cmb_orddrid.dispatch("xforms-value-changed");
  613. model.setFocus("btn_search");
  614. ]]>
  615. </script>
  616. <script type="javascript" ev:event="onkeypress">
  617. <![CDATA[
  618. if (event.keyCode == "13"){
  619. if( ipt_orddeptdrabbr.value.length == 4 ){
  620. model.setFocus("btn_search");
  621. }else{
  622. model.setFocus("cmb_orddrid");
  623. }
  624. }
  625. ]]>
  626. </script>
  627. </input>
  628. <caption id="caption3" class="search_name" style="left:198px; top:8px; width:81px; height:17px; vertical-align:middle; ">진료과 :</caption>
  629. <caption id="caption4" class="search_name" style="left:7px; top:8px; width:73px; height:17px; vertical-align:middle; ">진료일 :</caption>
  630. <caption id="caption5" class="search_name" style="left:453px; top:8px; width:78px; height:17px; vertical-align:middle; ">전문의 :</caption>
  631. <input id="ipt_orddeptabbr" ref="/root/main/rsrvpatinfo/orddeptabbr" class="input_s_essential" navindex="7" maxlength="4" _chartype="upper" style="left:273px; top:8px; width:47px; height:19px; ">
  632. <script type="javascript" ev:event="DOMFocusOut">
  633. <![CDATA[
  634. //var abbr = ipt_orddeptabbr.value;
  635. var orddeptabbr = ipt_orddeptabbr.value;
  636. //진료과 세팅
  637. var orddeptcd = model.getValue("/root/init/orddeptcd/orddeptcdlist[ deptengabbr = '" + orddeptabbr.toUpperCase() + "']/cd");
  638. model.setValue("/root/main/rsrvpatinfo/orddeptcd", orddeptcd );
  639. cmb_orddeptcd.refresh();
  640. cmb_orddeptcd.dispatch("xforms-value-changed");
  641. model.setFocus("ipt_orddeptdrabbr")
  642. ]]>
  643. </script>
  644. <script type="javascript" ev:event="onkeypress">
  645. <![CDATA[
  646. if (event.keyCode == "13"){
  647. if( ipt_orddeptabbr.value.length >= 2 ){
  648. model.setFocus("ipt_orddeptdrabbr");
  649. }else{
  650. model.setFocus("cmb_orddeptcd");
  651. }
  652. }
  653. ]]>
  654. </script>
  655. </input>
  656. <select1 id="cmb_orddeptcd" ref="/root/main/rsrvpatinfo/orddeptcd" class="combo_s_essential" navindex="8" appearance="minimal" style="left:323px; top:8px; width:120px; height:19px; ">
  657. <choices>
  658. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  659. <label ref="nm"/>
  660. <value ref="cd"/>
  661. </itemset>
  662. </choices>
  663. <script type="javascript" ev:event="xforms-value-changed">
  664. <![CDATA[
  665. var otpt_orddeptcd = model.getValue("/root/main/rsrvpatinfo/orddeptcd");
  666. //2007-08-17 이동식 추가 - 진료과 선택시 영문약어표시
  667. var deptengabbr = model.getValue("/root/init/orddeptcd/orddeptcdlist[ cd = '" + cmb_orddeptcd.value + "']/deptengabbr");
  668. //model.makeNode("");
  669. model.setValue("/root/main/rsrvpatinfo/orddeptabbr", deptengabbr);
  670. //END..
  671. //진료의 세팅
  672. cmb_orddrid.choices.itemset.attribute("nodeset") = "/root/init/orddrid/orddridlist[dp = '" + cmb_orddeptcd.value + "']";
  673. model.setValue("/root/main/rsrvpatinfo/orddrid", "");
  674. //model.makeNode("/root/main/otpt/otpt_orddeptdrabbr");
  675. model.setValue("/root/main/rsrvpatinfo/orddeptdrabbr","");
  676. model.refresh();
  677. model.setFocus("cmb_orddrid");
  678. ]]>
  679. </script>
  680. </select1>
  681. <input id="input3" ref="/root/main/rsrvpatinfo/orddd" class="input_s_essential" navindex="6" inputtype="date" appearance="input" style="left:82px; top:8px; width:100px; height:19px; "/>
  682. <line id="line3" class="line_4" style="top:7; x1:755px; y1:7px; x2:755px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
  683. <button id="button1" class="btn4_letter2" navindex="12" style="left:770px; top:7px; width:56px; height:22px; ">
  684. <caption>발급</caption>
  685. <script type="javascript" ev:event="DOMActivate">
  686. <![CDATA[
  687. if( getNodesetCount("/root/main/rsrvpat/rsrvpatlist") < 1 ){
  688. messageBox("전자카드 발급 할 예약환자 리스트가 없습니다!", "E999", "");
  689. return false;
  690. }
  691. model.makeNode("/root/hidden/patcardissue/send");
  692. model.copyNode("/root/hidden/patcardissue/send", "/root/main/rsrvpat");
  693. model.makeNode("/root/hidden/patcardissue/result");
  694. setForceOn();
  695. if(submit("TXPAM00201")){
  696. messageBox("환자카드 발급신청을 정상적으로 완료했습니다. 카드발급 프린터에서 발급상황을 확인하세요.", "I999", "");
  697. model.removenode("/root/hidden/patcardissue/send");
  698. model.removenode("/root/hidden/patcardissue/result");
  699. }
  700. ]]>
  701. </script>
  702. </button>
  703. </group>
  704. <button id="button3" class="btn2_letter4" style="left:776px; top:41px; width:64px; height:19px; ">
  705. <caption>엑셀저장</caption>
  706. <script type="javascript" ev:event="DOMActivate">
  707. <![CDATA[
  708. var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  709. if (fileName != "")
  710. {
  711. datagrid1.saveExcel(fileName, "SheetName", true, true, "", "", false);
  712. }
  713. ]]>
  714. </script>
  715. </button>
  716. </group>
  717. <select1 id="radio1" ref="/root/main/checknewrsrvpat" class="radio_default" overflow="visible" appearance="full" style="left:5px; top:5px; width:75px; height:20px; border-style:none; ">
  718. <choices>
  719. <item>
  720. <label>신환환자</label>
  721. <value>N</value>
  722. </item>
  723. </choices>
  724. <script type="javascript" ev:event="xforms-value-changed">
  725. <![CDATA[
  726. var check = model.getValue("/root/main/checknewrsrvpat");
  727. if( check == 'N' ){
  728. group4.visible = true; //신환환자 전자카드 발급 화면
  729. group5.visible = false; //예약환자 전자카드 발급 화면
  730. group1.visible = false; //하단 초기화 버튼
  731. model.setFocus("ipt_pid");
  732. }else{
  733. group4.visible = false; //신환환자 전자카드 발급 화면
  734. group5.visible = true;; //예약환자 전자카드 발급 화면
  735. group1.visible = true; //하단 초기화 버튼
  736. model.setFocus("input3");
  737. }
  738. ]]>
  739. </script>
  740. </select1>
  741. <select1 id="radio2" ref="/root/main/checknewrsrvpat" class="radio_default" overflow="visible" appearance="full" style="left:78px; top:5px; width:75px; height:20px; border-style:none; ">
  742. <choices>
  743. <item>
  744. <label>예약환자</label>
  745. <value>R</value>
  746. </item>
  747. </choices>
  748. <script type="javascript" ev:event="xforms-value-changed">
  749. <![CDATA[
  750. var check = model.getValue("/root/main/checknewrsrvpat");
  751. if( check == 'N' ){
  752. group4.visible = true; //신환환자 전자카드 발급 화면
  753. group5.visible = false; //예약환자 전자카드 발급 화면
  754. group1.visible = false; //하단 초기화 버튼
  755. model.setFocus("ipt_pid");
  756. }else{
  757. group4.visible = false; //신환환자 전자카드 발급 화면
  758. group5.visible = true;; //예약환자 전자카드 발급 화면
  759. group1.visible = true; //하단 초기화 버튼
  760. model.setFocus("input3");
  761. }
  762. ]]>
  763. </script>
  764. </select1>
  765. </group>
  766. </xhtml:body>
  767. </xhtml:html>