SMPMC04201_전자카드출력.xrw 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--수정이력 : 2007.10.15 박재형 - 감면정보에 가족주민번호, 가족성명 추가 -->
  3. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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. <isswaitpat>
  12. <isswaitpatlist>
  13. <issyn/>
  14. <pid/>
  15. <hngnm/>
  16. <rrgstno1/>
  17. <rrgstno2/>
  18. <issdd/>
  19. <isstm/>
  20. <issrid/>
  21. </isswaitpatlist>
  22. </isswaitpat>
  23. </main>
  24. <send/>
  25. <hidden>
  26. <patcardissue>
  27. </patcardissue>
  28. <session/>
  29. </hidden>
  30. <temp>
  31. <rsrvlist/>
  32. </temp>
  33. <init>
  34. <PAM>
  35. <P0018list/>
  36. </PAM>
  37. </init>
  38. </root>
  39. </instance>
  40. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  41. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  42. <!-- 수정 추가 : 2007.10.15 박재형 : 감면저장-->
  43. <!-- 수정추가 : 2007.10.15 박재형 : 감면 조회-->
  44. <submission id="TRPMC04203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/patcardissue/send" resultref="/root/main"/>
  45. <submission id="TXPMC04203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/patcardissue/send" resultref="/root/rcv"/>
  46. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  47. </model>
  48. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  49. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  50. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  52. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  53. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  54. <script type="javascript" src="../../../pam/opatmngtweb/js/PMOCOM.js"/>
  55. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  56. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  57. <script type="javascript" src="../../../pam/ipatmngtweb/js/PMI001.js"/>
  58. <!-- 수정추가 : 20071015 박재형 : 할인분류구분 공통코드추가 (P0417)-->
  59. <script type="javascript" ev:event="xforms-ready">
  60. <![CDATA[
  61. // 2009.09.29 - 출력물 자동 출력여부를 위해서 원무공통코드조회
  62. pamfGetCodeList(new Array("P0018"), new Array("/root/init/PAM/P0018list"));
  63. //2007-10-04 이동식 추가 - 환자카드발급 PC정보를 읽어온다.
  64. fGetPCID();
  65. //END..
  66. //세션정보 조회
  67. fGetUserInfosSampling();
  68. button6.disabled = false;
  69. button5.disabled = true;
  70. //2009-10-23 이동식 수정 - 병원별 기종 차이로 인한 인터벌 시간 변경
  71. var sInstcd = model.getValue("/root/hidden/session/sess_dutplceinstcd");
  72. if( sInstcd != '011' && sInstcd != '013' && sInstcd != '014' && sInstcd != '017' ){
  73. sInstcd = '018'; //부천성가 기기 변경으로 인한 test 번호
  74. }
  75. if( sInstcd == '011' && sInstcd == '017' || sInstcd == '018' ){
  76. gIntervalTime = 5000;
  77. }else{
  78. gIntervalTime = 30000;
  79. }
  80. fInit();
  81. ]]>
  82. </script>
  83. <script type="javascript">
  84. <![CDATA[
  85. var IssCard = null;
  86. var gTimerID;
  87. var gIntervalTime;
  88. //초기화
  89. function fInit(){
  90. //다음번 발행 카드 대상 환자 번호 저장
  91. // var pid = '-';
  92. // if( getNodesetCount("/root/main/isswaitpat/isswaitpatlist/pid") > 1 ){
  93. // pid = model.getValue("/root/main/isswaitpat/isswaitpatlist[2]/pid")
  94. // }
  95. var issno = model.getValue("/root/hidden/patcardissue/pcinfo");
  96. if( issno == '' || issno == ' ' || issno == '-' ){
  97. // window.clearInterval(gTimerID);
  98. // gTimerID = window.setInterval("fInit()", gIntervalTime);
  99. messageBox("PC 고유번호 정보를 찾을 수 없습니다.", "E999", "");
  100. button6.disabled = true;
  101. button5.disabled = false;
  102. return false;
  103. }
  104. //데이터 초기화
  105. model.removeNodeset("/root/main/isswaitpat");
  106. model.makeNode("/root/main/isswaitpat");
  107. //카드발급 데이터 조회
  108. // model.makeValue("/root/main/patcardissue/send/pid", pid);
  109. model.makeValue("/root/main/patcardissue/send/issno", issno);
  110. submit("TRPMC04203");
  111. //데이터 없으면 리턴
  112. if( getNodesetCount("/root/main/isswaitpat/isswaitpatlist/pid") < 1 ){
  113. window.clearInterval(gTimerID);
  114. gTimerID = window.setInterval("fInit()", 3000);
  115. return false;
  116. }else{
  117. //데이터 초기화
  118. model.removeNodeset("/root/main/patcardissue");
  119. model.makeNode("/root/main/patcardissue/getinfo");
  120. model.makeNode("/root/main/patcardissue/issinfo");
  121. model.makeNode("/root/main/patcardissue/setinfo");
  122. model.makeNode("/root/main/patcardissue/send/pid");
  123. model.makeNode("/root/main/patcardissue/send/issdd");
  124. model.makeNode("/root/main/patcardissue/send/issno");
  125. model.makeNode("/root/main/patcardissue/send/issyn");
  126. model.makeNode("/root/main/patcardissue/send/remfact");
  127. model.copyNode("/root/main/patcardissue/getinfo", "/root/main/isswaitpat/isswaitpatlist[1]");
  128. model.setValue("/root/main/isswaitpat/isswaitpatlist[1]/issyn", 'I'); //발급중
  129. try{
  130. if( fIssuePatientCard() == true ){
  131. // model.setValue("/root/main/isswaitpat/isswaitpatlist[1]/issyn", 'Y'); //발급완료
  132. model.setValue("/root/main/patcardissue/send/pid", model.getValue("/root/main/isswaitpat/isswaitpatlist[1]/pid"));
  133. model.setValue("/root/main/patcardissue/send/issdd", model.getValue("/root/main/isswaitpat/isswaitpatlist[1]/issdd"));
  134. model.setValue("/root/main/patcardissue/send/issno", issno);
  135. model.setValue("/root/main/patcardissue/send/issyn", 'Y');
  136. }else{
  137. model.setValue("/root/main/isswaitpat/isswaitpatlist[1]/issyn", 'E'); //발급오류
  138. model.setValue("/root/main/patcardissue/send/pid", model.getValue("/root/main/isswaitpat/isswaitpatlist[1]/pid"));
  139. model.setValue("/root/main/patcardissue/send/issdd", model.getValue("/root/main/isswaitpat/isswaitpatlist[1]/issdd"));
  140. model.setValue("/root/main/patcardissue/send/issno", issno);
  141. model.setValue("/root/main/patcardissue/send/issyn", 'E');
  142. //
  143. window.clearInterval(gTimerID);
  144. if( messageBox("환자카드발행 중 오류 발생!! 계속 진행하시겠습니까?", "Q999", "") == '6' ){
  145. gTimerID = window.setInterval("fInit()", 5000);
  146. button6.disabled = false;
  147. button5.disabled = true;
  148. }else{
  149. button6.disabled = true;
  150. button5.disabled = false;
  151. }
  152. }
  153. }catch(e){
  154. model.setValue("/root/main/patcardissue/send/pid", model.getValue("/root/main/isswaitpat/isswaitpatlist[1]/pid"));
  155. model.setValue("/root/main/patcardissue/send/issdd", model.getValue("/root/main/isswaitpat/isswaitpatlist[1]/issdd"));
  156. model.setValue("/root/main/patcardissue/send/issno", issno);
  157. model.setValue("/root/main/patcardissue/send/issyn", 'E');
  158. model.setValue("/root/main/patcardissue/send/remfact", e.description);
  159. messageBox("[" + e.description + "]" + "환자카드 발행중 오류가 발생하여 카드발행을 중단합니다. 다시 시작하시려면 하단의 발급시작버튼을 눌러주세요!", "E999", "");
  160. window.clearInterval(gTimerID);
  161. button6.disabled = true;
  162. button5.disabled = false;
  163. }
  164. submit("TXPMC04203");
  165. }
  166. model.refresh();
  167. }
  168. function fIssOtherCard(){
  169. IssCard.PortOpen = false;
  170. fInit();
  171. }
  172. function fIssOtherCard2(){
  173. //IssCard.PortOpen = false;
  174. fInit();
  175. }
  176. //2007-10-04 이동식 추가 - 환자카드발급신청
  177. function fIssuePatientCard(){
  178. /*
  179. 01. rid : 레포트명
  180. 02. dataType : 연계방법
  181. 03. paramsXPath : 매개변수필드 XPath
  182. 04. submitId : SubmitID
  183. 05. print : 출력여부
  184. 06. printDialog : 인쇄 창 보임 여부
  185. 07. fileType : 저장타입
  186. 08. fileName : 파일명
  187. 09. fileDialog : 파일 저장 창 보임여부
  188. 10. closeYn : 미리보기창닫기여부
  189. 11. monNo : 모니터 번호
  190. 12. parentObjId : 부모객체명
  191. 13. printPaperBin : 트레이번호
  192. 14. userService : 데이터 소스
  193. 15. showButton : 툴바버튼보임여부
  194. 16. printCount : 프린트장수
  195. 17. zoomRate : 미리보기뷰어 비율
  196. 18. printOption : 출력시 선택 옵션
  197. 19. dataXPath : 데이터 XPath
  198. 20. mainDataXPath : 메인리포트 반복XPath
  199. 21. subDataXPath : 서브리포트1 반복Xpath
  200. exeReportPreview(rid, dataType, paramsXPath, submitId, print, printDialog, fileType, fileName, fileDialog, closeYn, monNo, parentObjId, printPaperBin, userService, showButton, printCount, zoomRate, printOption, dataXPath, mainDataXPath, subDataXPath)
  201. c:\windows\device.ini 파일에 1A나 1B등 써놓으면 같은 내용을 가진 PC들은 그룹으로 지정되어 프린터 물려있는 PC자동으로 찾아서 출력함!
  202. */
  203. var sInstcd = model.getValue("/root/hidden/session/sess_dutplceinstcd");
  204. if( sInstcd!= '011' && sInstcd != '013' && sInstcd != '014' && sInstcd != '017' ){
  205. //sInstcd = '018';
  206. }
  207. //발급로직 start!!
  208. var pid = model.getValue("/root/main/patcardissue/getinfo/pid");
  209. var hngnm = model.getValue("/root/main/patcardissue/getinfo/hngnm");
  210. var engnm = model.getValue("/root/main/patcardissue/getinfo/engnm");
  211. var insukind = model.getValue("/root/main/patcardissue/getinfo/insukind");
  212. var rrgstno1 = model.getValue("/root/main/patcardissue/getinfo/rrgstno1");
  213. var rrgstno2 = model.getValue("/root/main/patcardissue/getinfo/rrgstno2");
  214. var rrgstno = model.getValue("/root/main/patcardissue/getinfo/rrgstno1") + model.getValue("/root/main/patcardissue/getinfo/rrgstno2");
  215. var sex = model.getValue("/root/main/patcardissue/getinfo/sex");
  216. //성가 환자카드로직 기존로직 제외
  217. if( sInstcd == '999' ){
  218. var spc = '';
  219. for( var i = 1; i <= 13 - pid.length; i ++ ){
  220. spc = spc + ' ';
  221. }
  222. //엠보싱세팅
  223. var emb = '';
  224. //등록번호 시작이 영문일때
  225. if( pid.substr(0,1) == 'A' || pid.substr(0,1) == 'B' ){
  226. emb = '#DCL#080550 1#FC1#800 2#FC2#500 3#FC1#200 4#FC1#200 #END#@@@@@@'; //환자번호가 알파벳으로 시작
  227. spc = spc + ' '; // 간격 재조정
  228. }else{
  229. emb = '#DCL#080550 1#FC2#800 2#FC2#500 3#FC1#200 4#FC1#200 #END#@@@@@@'; //환자번호가 숫자로만.
  230. }
  231. rrgstno = rrgstno1 + '-' + rrgstno2.substr(0, 1) + '******';
  232. var totalStr = '#DCC##EMB#' + pid + spc + insukind + '"' + engnm + '"' + rrgstno + ' ' + sex + '#GRD#1"' + pid + '"' + '#END#@@@@@@';
  233. try{
  234. body.removeChild("NWSerial_EMB");
  235. if (document.all("NWSerial_EMB") == null) { // 최초 한번만 createChild() 한다.
  236. body.createChild("xforms:object", "id:NWSerial_EMB; clsid:{648A5600-2C6E-101B-82B6-000000000014}; visibility:hidden; left:0px; top:0px; width:0px; height:0px; ");
  237. }
  238. IssCard = NWSerial_EMB;
  239. //Sets and returns the communications port number.
  240. IssCard.CommPort = 2;
  241. //Sets and returns the baud rate, parity, data bit, and stop bit
  242. IssCard.Settings = "9600,E,7,1";
  243. IssCard.InputLen = 0;
  244. IssCard.InBufferCount = 0;
  245. //Sets and returns the state of the communications port
  246. var portOpenYN = IssCard.PortOpen;
  247. if( portOpenYN == false ){
  248. IssCard.PortOpen = true;
  249. }
  250. portOpenYN = IssCard.PortOpen;
  251. if( portOpenYN == false ){
  252. messageBox("포트 연결에 실패하였습니다.", "E999", "");
  253. return false;
  254. }
  255. IssCard.Output = emb ;
  256. //타이머 3000 msecs
  257. var start = new Date().getTime();
  258. var msecs = '3000';
  259. var cur = start;
  260. while(cur - start < msecs){
  261. cur = new Date().getTime();
  262. }
  263. IssCard.Output = totalStr;
  264. var outBufferCount = IssCard.OutBufferCount;
  265. var inBufferCount = IssCard.InBufferCount;
  266. var cntLoof = 0;
  267. while( outBufferCount != 0 || inBufferCount == 0){
  268. cntLoof = parseInt(cntLoof) + 1;
  269. if( cntLoof > 30 ){
  270. throw "시간 초과 오류입니다.";
  271. }
  272. //타이머 3000 msecs
  273. var start = new Date().getTime();
  274. var msecs = '1000';
  275. var cur = start;
  276. while(cur - start < msecs){
  277. cur = new Date().getTime();
  278. }
  279. outBufferCount = IssCard.OutBufferCount;
  280. inBufferCount = IssCard.InBufferCount;
  281. }
  282. window.clearInterval(gTimerID);
  283. gTimerID = window.setInterval("fIssOtherCard()", gIntervalTime);
  284. return true;
  285. }catch(e){
  286. model.setValue("/root/main/patcardissue/send/remfact", e);
  287. IssCard.PortOpen = false;
  288. return false;
  289. }
  290. //의정부 환자카드발급로직
  291. }else if( sInstcd == '013' ){
  292. //엠보싱세팅
  293. var emb = '';
  294. //환자이름 시작이 영문일때
  295. var sKorEngCheck = hngnm.charCodeAt(0);
  296. var sNameString = '';
  297. //영어 이외의 문자일 때 - 한글로 인식
  298. if( !( ( 0x61 <= sKorEngCheck && sKorEngCheck <= 0x7A ) || ( 0x41 <= sKorEngCheck && sKorEngCheck <= 0x5A ) ) ) {
  299. emb = "(((@!#)))@@@@@@ #DCL#080400 1#FC2#0800 2#FC2#0500 3#FC2#0220 #END#@@@@@@";
  300. sNameString = engnm;
  301. //영문일 경우 - 영어로 인식
  302. }else{
  303. emb = "(((@!#)))@@@@@@ #DCL#080400 1#FC2#0800 2#FC1#0500 3#FC2#0220 #END#@@@@@@";
  304. sNameString = hngnm.toLowerCase( );
  305. }
  306. //성별세팅
  307. if( rrgstno2.substr(0, 1) == '1' || rrgstno2.substr(0, 1) == '3' || rrgstno2.substr(0, 1) == '5' || rrgstno2.substr(0, 1) == '7'){ //남자
  308. sex = ".";
  309. }else{
  310. sex = ",";
  311. }
  312. //기타 정보 세팅
  313. var FS = "!";
  314. var pidLength = 10 - parseInt(pid.length);
  315. var BarTmp = pid;
  316. for( var i = 0; i < pidLength; i++ ){
  317. BarTmp = '0' + BarTmp;
  318. }
  319. var Bar = "#GRD#1" + FS + BarTmp + FS + "#END#@@@@@@";
  320. var IDTmp = '';
  321. var sPNRN = rrgstno1 + '-' + rrgstno2.substr(0, 1) + '******';
  322. var totalStr = "(((@!#))) #DCC##EMB#" + pid + " " + insukind + FS + sNameString + FS + sPNRN + " " + sex + Bar;
  323. try{
  324. if (document.all("NWSerial_EMB") == null) { // 최초 한번만 createChild() 한다.
  325. body.createChild("xforms:object", "id:NWSerial_EMB; clsid:{648A5600-2C6E-101B-82B6-000000000014}; visibility:hidden; left:0px; top:0px; width:0px; height:0px; ");
  326. }
  327. IssCard = NWSerial_EMB;
  328. //Sets and returns the communications port number.
  329. IssCard.CommPort = 5;
  330. //Sets and returns the baud rate, parity, data bit, and stop bit
  331. IssCard.Settings = "1200,N,8,1";
  332. IssCard.InputLen = 0;
  333. IssCard.InBufferCount = 0;
  334. //Sets and returns the state of the communications port
  335. var portOpenYN = IssCard.PortOpen;
  336. if( portOpenYN == false ){
  337. IssCard.PortOpen = true;
  338. }
  339. portOpenYN = IssCard.PortOpen;
  340. if( portOpenYN == false ){
  341. messageBox("포트 연결에 실패하였습니다.", "E999", "");
  342. return false;
  343. }
  344. IssCard.Output = emb ;
  345. //타이머 3000 msecs
  346. var start = new Date().getTime();
  347. var msecs = '3000';
  348. var cur = start;
  349. while(cur - start < msecs){
  350. cur = new Date().getTime();
  351. }
  352. IssCard.Output = totalStr;
  353. var outBufferCount = IssCard.OutBufferCount;
  354. var inBufferCount = IssCard.InBufferCount;
  355. var cntLoof = 0;
  356. while( outBufferCount != 0 || inBufferCount == 0){
  357. cntLoof = parseInt(cntLoof) + 1;
  358. if( cntLoof > 30 ){
  359. throw "시간 초과 오류입니다.";
  360. }
  361. //타이머 3000 msecs
  362. var start = new Date().getTime();
  363. var msecs = '1000';
  364. var cur = start;
  365. while(cur - start < msecs){
  366. cur = new Date().getTime();
  367. }
  368. outBufferCount = IssCard.OutBufferCount;
  369. inBufferCount = IssCard.InBufferCount;
  370. }
  371. window.clearInterval(gTimerID);
  372. gTimerID = window.setInterval("fIssOtherCard()", gIntervalTime);
  373. return true;
  374. }catch(e){
  375. model.setValue("/root/main/patcardissue/send/remfact", e);
  376. IssCard.PortOpen = false;
  377. return false;
  378. }
  379. //수원
  380. }else if(sInstcd == '017'){
  381. try{
  382. model.removeNodeset("/root/temp/rsrvlist");
  383. model.makeNode("/root/temp/rsrvlist/issyn"); // 발급상태
  384. model.makeNode("/root/temp/rsrvlist/pid"); // 등록번호
  385. model.makeNode("/root/temp/rsrvlist/hngnm"); // 환자이름
  386. model.makeNode("/root/temp/rsrvlist/rrgstno1");
  387. model.makeNode("/root/temp/rsrvlist/rrgstno2");
  388. model.makeNode("/root/temp/rsrvlist/issdd");
  389. model.makeNode("/root/temp/rsrvlist/isstm");
  390. model.makeNode("/root/temp/rsrvlist/issrid");
  391. model.setValue("/root/temp/rsrvlist/pid", pid); // 등록번호
  392. model.setValue("/root/temp/rsrvlist/hngnm", hngnm); // 환자이름
  393. /*
  394. var sPrinter;
  395. var trayno;
  396. var sDirectionOption;
  397. // 2009.06.19 - local에 설정된 파일을 우선시 한다.
  398. // print1:입원약정서, print2:입원환자카드, print3:선택신청, print4:성빈센트 카드프린터
  399. var printInfo = pmifGetPrintSetting("print4");
  400. if (printInfo.length == 2) {
  401. sPrinter = printInfo[0];
  402. trayno = printInfo[1];
  403. sDirectionOption = "printdirection=1";
  404. } else {
  405. sPrinter = model.getValue("/root/init/PAM/P0018list/P0018[cdid = '4']/cdnm");
  406. if (isNull(sPrinter)) {
  407. sPrinter = "true";
  408. } else {
  409. sDirectionOption = "printdirection=1";
  410. }
  411. }
  412. */
  413. //공통코드 P0045에서 프린터 명칭과 트레이 호출 - 환자카드발행
  414. fGetPrintName();
  415. var print_name = getGlobalVariable("SPPAO00100_P0045_5_nm","p");
  416. var print_tray = getGlobalVariable("SPPAO00100_P0045_5_tray","p");
  417. var sDirectionOption = "printdirection=1";
  418. //호출끝
  419. //환자카드발행
  420. exeReportPreview("RPPMC04201", "XMLSTR" , "" , "" , print_name, "", "", "", "", "true", "", "",print_tray, "", "", "", "", sDirectionOption);
  421. window.clearInterval(gTimerID);
  422. gTimerID = window.setInterval("fIssOtherCard2()", gIntervalTime);
  423. return true;
  424. }catch(e){
  425. return false;
  426. }
  427. //여의도, 부천은 같은 동일기종사용
  428. }else if(sInstcd == '011' || sInstcd == '014'){
  429. try{
  430. model.removeNodeset("/root/temp/rsrvlist");
  431. model.makeNode("/root/temp/rsrvlist/issyn"); // 발급상태
  432. model.makeNode("/root/temp/rsrvlist/pid"); // 등록번호
  433. model.makeNode("/root/temp/rsrvlist/hngnm"); // 환자이름
  434. model.makeNode("/root/temp/rsrvlist/rrgstno1");
  435. model.makeNode("/root/temp/rsrvlist/rrgstno2");
  436. model.makeNode("/root/temp/rsrvlist/issdd");
  437. model.makeNode("/root/temp/rsrvlist/isstm");
  438. model.makeNode("/root/temp/rsrvlist/issrid");
  439. model.setValue("/root/temp/rsrvlist/pid", pid); // 등록번호
  440. var rrgstno = rrgstno1 + "-" + rrgstno2.substr(0,1);
  441. model.setValue("/root/temp/rsrvlist/rrgstno1", rrgstno); // 주민번호
  442. //환자이름 시작이 영문일때
  443. var sKorEngCheck = hngnm.charCodeAt(0);
  444. var sNameString = '';
  445. var sLastName ='';
  446. //영어 이외의 문자일 때 - 한글로 인식
  447. if(!((0x61 <= sKorEngCheck && sKorEngCheck <= 0x7A) || (0x41 <= sKorEngCheck && sKorEngCheck <= 0x5A))) {
  448. var a = parseInt(hngnm.length) - 1;
  449. if ( a < 3) {
  450. for( var i = 0; i <= a; i++ ){
  451. if (i == a) {
  452. sNameString = hngnm.substr(i, 1);
  453. } else {
  454. sNameString = hngnm.substr(i, 1) + " ";
  455. }
  456. sLastName = sLastName + sNameString;
  457. }
  458. } else {
  459. sLastName = hngnm;
  460. }
  461. // 영어로 인식
  462. }else{
  463. sLastName = hngnm;
  464. }
  465. model.setValue("/root/temp/rsrvlist/hngnm", sLastName); // 환자이름
  466. /*
  467. var sPrinter;
  468. var trayno;
  469. var sDirectionOption;
  470. // 2009.06.19 - local에 설정된 파일을 우선시 한다.
  471. // print1:입원약정서, print2:입원환자카드, print3:선택신청, print4:성빈센트 카드프린터
  472. var printInfo = pmifGetPrintSetting("print4");
  473. if (printInfo.length == 2) {
  474. sPrinter = printInfo[0];
  475. trayno = printInfo[1];
  476. sDirectionOption = "printdirection=1";
  477. } else {
  478. sPrinter = model.getValue("/root/init/PAM/P0018list/P0018[cdid = '4']/cdnm");
  479. if (isNull(sPrinter)) {
  480. sPrinter = "true";
  481. } else {
  482. sDirectionOption = "printdirection=1";
  483. }
  484. }
  485. */
  486. //공통코드 P0045에서 프린터 명칭과 트레이 호출 - 환자카드발행
  487. fGetPrintName();
  488. var print_name = getGlobalVariable("SPPAO00100_P0045_5_nm","p");
  489. var print_tray = getGlobalVariable("SPPAO00100_P0045_5_tray","p");
  490. var sDirectionOption = "printdirection=1";
  491. //호출끝
  492. //환자카드발행
  493. if(sInstcd == '011') exeReportPreview("RPPMC04203", "XMLSTR" , "" , "" , print_name, "", "", "", "", "true", "", "",print_tray, "", "", "", "", sDirectionOption); //여의도
  494. if(sInstcd == '014') exeReportPreview("RPPMC04202", "XMLSTR" , "" , "" , print_name, "", "", "", "", "true", "", "",print_tray, "", "", "", "", sDirectionOption); //성가
  495. window.clearInterval(gTimerID);
  496. gTimerID = window.setInterval("fIssOtherCard2()", gIntervalTime);
  497. return true;
  498. }catch(e){
  499. return false;
  500. }
  501. }
  502. }
  503. //END..
  504. ]]>
  505. </script>
  506. </xhtml:head>
  507. <xhtml:body style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  508. <group id="group1" scroll="auto" style="left:0px; top:475px; width:725px; height:27px; ">
  509. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:725px; y2:0px; "/>
  510. <button id="button5" class="btn4_letter4" disable.background-image="../../../com/commonweb/images/dis_btn4_letter4.gif" style="left:563px; top:5px; width:80px; height:22px; background-image:../../../com/commonweb/images/btn4_letter4.gif; ">
  511. <caption>발급시작</caption>
  512. <script type="javascript" ev:event="DOMActivate">
  513. <![CDATA[
  514. button6.disabled = false;
  515. button5.disabled = true;
  516. fInit();
  517. ]]>
  518. </script>
  519. </button>
  520. <button id="button6" class="btn4_letter4" disable.background-image="../../../com/commonweb/images/dis_btn4_letter4.gif" style="left:645px; top:5px; width:80px; height:22px; background-image:../../../com/commonweb/images/btn4_letter4.gif; ">
  521. <caption>발급중지</caption>
  522. <script type="javascript" ev:event="DOMActivate">
  523. <![CDATA[
  524. window.clearInterval(gTimerID);
  525. button6.disabled = true;
  526. button5.disabled = false;
  527. ]]>
  528. </script>
  529. </button>
  530. </group>
  531. <group id="group3" style="left:0px; top:0px; width:725px; height:13px; ">
  532. <caption id="caption22" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">전자카드출력</caption>
  533. </group>
  534. <group id="group2" style="left:0px; top:13px; width:725px; height:466px; ">
  535. <group id="group5" style="left:0px; top:0px; width:725px; height:465px; ">
  536. <datagrid id="datagrid1" nodeset="/root/main/isswaitpat/isswaitpatlist" caption="발급상태^등록번호^환자명^주민등록번호^주민등록번호^발급일자^발급시간^발급자" colsep="^" colwidth="64, 100, 100, 65, 70, 100, 100, 80" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:27px; width:725px; height:438px; ">
  537. <col ref="issyn" type="combo">
  538. <choices>
  539. <item>
  540. <label>대기</label>
  541. <value>N</value>
  542. </item>
  543. <item>
  544. <label>발급중</label>
  545. <value>I</value>
  546. </item>
  547. <item>
  548. <label>발급오류</label>
  549. <value>E</value>
  550. </item>
  551. <item>
  552. <label>발급완료</label>
  553. <value>Y</value>
  554. </item>
  555. </choices>
  556. </col>
  557. <col ref="pid"/>
  558. <col ref="hngnm"/>
  559. <col ref="rrgstno1"/>
  560. <col ref="rrgstno2"/>
  561. <col ref="issdd" format="yyyy-mm-dd"/>
  562. <col ref="isstm" format="hh:nn:ss"/>
  563. <col ref="issrid"/>
  564. </datagrid>
  565. <line id="line2" class="line_1" style="x1:0px; y1:22px; x2:725px; y2:22px; "/>
  566. <caption id="caption14" class="tit_2" style="left:5px; top:7px; width:144px; height:14px; ">발급대기내역</caption>
  567. </group>
  568. </group>
  569. <object id="NWSerial_EMB" clsid="{648a5600-2c6e-101b-82b6-000000000014}" visibility="hidden" style="left:515px; top:480px; width:40px; height:35px; "/>
  570. </xhtml:body>
  571. </xhtml:html>