SMPID20700_환자청구명세서출력.xrw 84 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>환자청구명세서출력</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list1>
  11. <clbs/>
  12. </list1>
  13. <item1>
  14. <clbs/>
  15. </item1>
  16. </main>
  17. <main2>
  18. <list1>
  19. <clbs/>
  20. </list1>
  21. </main2>
  22. <send>
  23. <clamym/>
  24. <clamdg/>
  25. <ioflag/>
  26. <clamflagcd/>
  27. <sumtypecd/>
  28. <insukind/>
  29. <suppkind/>
  30. <srcflag/>
  31. <docuseqno1/>
  32. <docuseqno2/>
  33. <prntlist/>
  34. <report1>
  35. <list1/>
  36. <list2/>
  37. <list3/>
  38. <list4/>
  39. <list6/>
  40. </report1>
  41. <report2>
  42. <list1/>
  43. <list5/>
  44. </report2>
  45. <reqdata/>
  46. <item1>
  47. <clamym/>
  48. <clamdg/>
  49. <pid/>
  50. <pidsn/>
  51. <pagenum/>
  52. <chkflag/>
  53. <insukind/>
  54. </item1>
  55. <minrnum/>
  56. <maxrnum/>
  57. <judgendyn/>
  58. <insucd/>
  59. <imgdata>
  60. <photimg/>
  61. <imgprtyn/>
  62. </imgdata>
  63. <pid/>
  64. <pidsn/>
  65. </send>
  66. <init>
  67. <!-- 보험유형 -->
  68. <P0008list>
  69. <P0008>
  70. <cdnm/>
  71. <cdid/>
  72. </P0008>
  73. </P0008list>
  74. <!-- 보조유형 -->
  75. <P0010list>
  76. <P0010>
  77. <cdnm/>
  78. <cdid/>
  79. </P0010>
  80. </P0010list>
  81. <!-- 보조유형 data값!!을 넣기 위한 instance-->
  82. <suppkindlist>
  83. <insukind/>
  84. <suppkind/>
  85. <suppkindnm/>
  86. <ownbrate/>
  87. </suppkindlist>
  88. <!-- 청구구분코드 -->
  89. <P0155list>
  90. <P0155>
  91. <cdnm/>
  92. <cdid/>
  93. </P0155>
  94. </P0155list>
  95. <!-- 진료분야 공통코드 -->
  96. <P0458list>
  97. <P0458>
  98. <cdnm/>
  99. <cdid/>
  100. </P0458>
  101. </P0458list>
  102. <insucdlist>
  103. <list>
  104. <insucd/>
  105. <insucdnm/>
  106. </list>
  107. </insucdlist>
  108. </init>
  109. <hidden>
  110. <clbs>
  111. <totcnt/>
  112. </clbs>
  113. <list1>
  114. </list1>
  115. <list2>
  116. </list2>
  117. <list3>
  118. </list3>
  119. <list4>
  120. </list4>
  121. </hidden>
  122. <previewyn/>
  123. <etc>
  124. <diagcd/>
  125. <diagnm/>
  126. </etc>
  127. </root>
  128. </instance>
  129. <script type="javascript" ev:event="xforms-ready">
  130. <![CDATA[
  131. fInitialize(); // 화면을 초기화한다.
  132. fCheckAuth(); // 화면 권한을 설정한다.
  133. makeReportPreview(0,50,1194,600, "grp_rpt_hidden1"); // 바로 출력 할 경우 껌뻑껌뻑 거리는 걸 없에버리자.
  134. makeReportPreview(0,50,1194,600, "grp_rpt_hidden2"); // 바로 출력 할 경우 껌뻑껌뻑 거리는 걸 없에버리자.
  135. ]]>
  136. </script>
  137. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  138. <submission id="TRPID20701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  139. <submission id="TRPIJ00601" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/hidden/tmp"/>
  140. <submission id="TRPID20301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  141. <submission id="TRPID20702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/hidden"/>
  142. <submission id="TRPID20703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/hidden"/>
  143. <submission id="TRPID20704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/hidden"/>
  144. <submission id="TRPID20705" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/hidden"/>
  145. <submission id="TRPID20407" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/clamdg"/>
  146. <submission id="TRPID20706" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/hidden"/>
  147. <submission id="TRPID20707" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main2"/>
  148. <submission id="TRPID20708" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/insucdlist"/>
  149. <submission id="TRPID20709" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/init/instimg"/>
  150. </model>
  151. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  152. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  153. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  154. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  155. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  156. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  157. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  158. <script type="javascript" src="../../../pam/aftjudgweb/js/SMPID20000.js"/>
  159. <script type="javascript">
  160. <![CDATA[
  161. // 지연 출력을 위한 글로벌 변수
  162. var timerID; // 타이머 전역 변수
  163. var glb_i = 0; // 체크된 행 번호
  164. var chkcnt = 0; // 체크된 행 갯수
  165. var chkArr = new Array(); // 체크된 행 담을 배열
  166. // 화면 open시(와 초기화 버튼 클릭시) 화면 초기화 기능을 수행한다.
  167. function fInitialize() {
  168. // 노드 초기화
  169. fInitSrchData();
  170. // (ZBC001.js) com.ZBCMCODE에서 기초코드 값을 가져와서 Combo 컨트롤 item으로 설정하기 위해 사용한다.
  171. zbcfGetCodeList(
  172. new Array("P0008","P0010","P0155","P0458"),
  173. new Array("/root/init/P0008list","/root/init/P0010list","/root/init/P0155list","/root/init/P0458list") );
  174. // 보험유형, 보조유형 코드 불러오기
  175. submit("TRPIJ00601");
  176. model.removeNodeset("root/init/insukind");
  177. model.removeNodeset("root/init/suppkind");
  178. model.makeNode("root/init/insukind");
  179. model.makeNode("root/init/suppkind");
  180. model.copyNode("root/init/insukind", "root/hidden/tmp/insukind");
  181. model.copyNode("root/init/suppkind", "root/hidden/tmp/suppkind");
  182. model.removeNodeset("root/hidden/tmp/insukind");
  183. model.removeNodeset("root/hidden/tmp/suppkind");
  184. model.removeNodeset("root/hidden/tmp/orddeptcd");
  185. model.removeNodeset("root/hidden/tmp/orddrid");
  186. model.removeNodeset("root/hidden/tmp/judgrid");
  187. // 20100108 보조유형 전체 추가
  188. /*
  189. for( i = 1; i <= model.getXPathValue( "count(/root/init/P0008list/P0008)" ) ; i++ ) {
  190. if ( model.getValue("/root/init/P0008list/P0008[" + i + "]/cdid") != "" ) {
  191. model.removeNodeset("/root/init/suppkindall/suppkindlist");
  192. model.makeValue("/root/init/suppkindall/suppkindlist/cdid","");
  193. model.makeValue("/root/init/suppkindall/suppkindlist/cdnm","전체");
  194. model.makeValue("/root/init/suppkindall/suppkindlist/up",model.getValue("/root/init/P0008list/P0008[" + i + "]/cdid"));
  195. copyNodeType("/root/init/suppkind","/root/init/suppkindall","before");
  196. }
  197. }
  198. */
  199. // 무식한 방법 같아서 다시 수정, 하나만 추가후 조회시 조정
  200. model.removeNodeset("/root/init/suppkindall/suppkindlist");
  201. model.makeValue("/root/init/suppkindall/suppkindlist/cdid","");
  202. model.makeValue("/root/init/suppkindall/suppkindlist/cdnm","전체");
  203. model.makeValue("/root/init/suppkindall/suppkindlist/up","-");
  204. copyNodeType("/root/init/suppkind","/root/init/suppkindall","before");
  205. // 손보사 콤보 리스트
  206. submit("TRPID20708");
  207. // 직인 이미지
  208. submit("TRPID20709");
  209. var imgdata = model.getValue("/root/init/instimg/list/photimg"); // base64 encoding 문자열을 가져온다.
  210. model.setValue("/root/send/imgdata/photimg", imgdata,true);
  211. setImageRefInstance("/root/send/imgdata/photimg"); //base64 encoding 문자열을 이미지로 변환하여 보여준다,
  212. // 직인 이미지 있으면 체크표시함
  213. if ( model.getValue("/root/send/imgdata/photimg") != "" ) {
  214. model.setValue("/root/send/imgdata/imgprtyn","Y");
  215. }
  216. // 삭제포함 자리 이동
  217. cp_delyn.attribute("left") = "880px";
  218. bool_delyn.attribute("left") = "960px";
  219. model.refresh();
  220. }
  221. // 노드 초기화
  222. function fInitSrchData() {
  223. // grid를 인스턴스에 mapping후 인스턴스에 해당하는 빈줄 1줄이 생기므로 grid 초기화
  224. model.removeNodeset("/root/main/list1/clbs");
  225. model.resetInstanceNode("/root/send");
  226. model.resetInstanceNode("/root/hidden/clbs/totcnt");
  227. // 청구년월, 차수 초기화
  228. var today = new Date();
  229. var baseyear = today.getDateFormat("YYYY");
  230. var basemonth = today.getDateFormat("MM");
  231. var baseday = today.getDateFormat("DD");
  232. var currentym = baseyear + basemonth;
  233. var currentdd = baseyear + basemonth + baseday;
  234. model.setValue("/root/send/clamym", currentym);
  235. model.setValue("/root/send/clamdg", "");
  236. model.setValue("/root/send/ioflag", "-");
  237. model.removeNodeset("/root/init/clamdg");
  238. model.makeNode("/root/init/clamdg");
  239. submit("TRPID20407");
  240. addComboItem("cmb_clamdg" , "전체","0","above");
  241. // model.makeValue("/root/init/clamdg/clamdglist["+ cmb_clamdg.length+1 +"]/clamdgnm", "전체");
  242. // model.makeValue("/root/init/clamdg/clamdglist["+ cmb_clamdg.length+1 +"]/clamdgcd", 0);
  243. // cmb_clamdg.refresh();
  244. cmb_clamdg.select(0);
  245. model.refreshpart("/root/init/clamdg");
  246. //컨트롤 초기화
  247. ipt_docuseqno1.value = "";
  248. ipt_docuseqno2.value = "";
  249. ipt_docuseqno1.disabled = true;
  250. ipt_docuseqno2.disabled = true;
  251. cmb_suppkind.disabled = true;
  252. cmb_ioflag.refresh();
  253. }
  254. // 화면 권한을 설정한다.
  255. function fCheckAuth() {
  256. if (!isPopup()) { // (common.js) 자신이 팝업인지 아닌지를 리턴한다.
  257. // model.setValue("/root/hidden/properties/auth", "10100000"); // (RXP)팝업이 아닌 경우 처리권한을 부여하지 않는다.
  258. model.setValue("properties/auth", "10100000"); // (RXP)팝업이 아닌 경우 처리권한을 부여하지 않는다.
  259. }
  260. var pAuth = !checkAuth("P"); // 출력권한(보고서 출력, 엑셀 내려받기 등)
  261. // btn_excelsave.disabled = pAuth;
  262. btn_print.disabled = pAuth;
  263. var xAuth = !checkAuth("X"); // 처리권한(입력, 수정, 삭제 등)
  264. // btn_confirm.disabled = xAuth;
  265. // btn_cancel.disabled = xAuth;
  266. }
  267. function fChangeImage(imgsrc) {
  268. img_hidden.src = imgsrc; // 파일에서 읽은 이미지의 base64 encoding 값을 가져오기 위한 이미지 컨트롤
  269. var data = img_hidden.getbase64data(); // base64 encoding 문자열을 가져온다.
  270. model.setValue("/root/send/imgdata/photimg",data,true); // 이미지를 보여주기 위하여 view용 이미지컨트롤의 ref instance에 값을 저장
  271. setImageRefInstance("/root/main/imgdata/photimg"); //base64 encoding 문자열을 이미지로 변환하여 보여준다,
  272. model.refreshpart("/root/send/imgdata/photimg");
  273. }
  274. // 조회
  275. function fGetPatClamDocuPrntList() {
  276. // 청구년월 입력값 체크
  277. var clamym = model.getValue("/root/send/clamym");
  278. if (clamym == "" || clamym.length != 6) {
  279. messageBox("청구년월은 필수", "E008"); /// 청구년월은 필수입니다.
  280. return;
  281. }
  282. // 청구차수 입력값 체크
  283. var clamdg = model.getValue("/root/send/clamdg");
  284. if (clamdg == "") {
  285. messageBox("청구차수는 필수", "E008"); /// 청구차수는 필수입니다.
  286. return;
  287. }
  288. var insukind = model.getValue("/root/send/insukind");
  289. var docuseqno1 = model.getValue("/root/send/docuseqno1");
  290. if (insukind != "31") {
  291. if (docuseqno1 == "") {
  292. messageBox("자보 이외에 등록번호는 필수", "E008"); /// 자보 이외에는 등록번호는 필수입니다.
  293. return;
  294. }
  295. }
  296. // 명세서 시작 종료 일련번호 값 체크
  297. var srcflag = model.getValue("/root/send/srcflag");
  298. var docuseqno1 = model.getValue("/root/send/docuseqno1");
  299. var docuseqno2 = model.getValue("/root/send/docuseqno2");
  300. if (srcflag == "1") { // 명번호
  301. var tmp_len1 = ipt_docuseqno1.value;
  302. var tmp_len2 = ipt_docuseqno2.value;
  303. // 입력시 앞대가리에 0을 안 붙여도 조회시 5자리로 맞춰서 조회하게 해줘요. 2009.04.17
  304. if ( tmp_len1.length > 0 && tmp_len1.length < 5 ) { // 명일련은 5자리를 맞춰줘야 해요
  305. while ( tmp_len1.length != 5 ) {
  306. tmp_len1 = "0" + tmp_len1;
  307. }
  308. ipt_docuseqno1.value = tmp_len1;
  309. }
  310. if ( tmp_len2.length > 0 && tmp_len2.length < 5 ) {
  311. while ( tmp_len2.length != 5 ) {
  312. tmp_len2 = "0" + tmp_len2;
  313. }
  314. ipt_docuseqno2.value = tmp_len2;
  315. }
  316. // 2009.04.17 완전 막음
  317. // var length1 = docuseqno1.length;
  318. // // 임시로 막음. 현재 DB에 명세서 일련번호는 5자리가 아니므로
  319. // if (length1 > 0 && length1 < 5) {
  320. // messageBox("명세서 [시작]일련번호는 5자리", "E008"); /// 명세서 일련번호는 5자리입니다.
  321. // return;
  322. // }
  323. // var length2 = docuseqno2.length;
  324. // if (length2 > 0 && length2 < 5) {
  325. // messageBox("명세서 [종료]일련번호는 5자리", "E008"); /// 명세서 일련번호는 5자리입니다.
  326. // return;
  327. // }
  328. }
  329. // 500건씩 잘라서 조회하기 위한 값
  330. var minrnum = 1;
  331. var maxrnum = 500;
  332. model.setValue("/root/send/minrnum",minrnum);
  333. model.setValue("/root/send/maxrnum",maxrnum);
  334. submit("TRPID20701");
  335. var clbsList = instance1.selectSingleNode("/root/main/list1/clbs");
  336. if (clbsList == null) {
  337. model.makeValue("/root/hidden/clbs/totcnt", 0); // 총건수
  338. } else {
  339. model.makeValue("/root/hidden/clbs/totcnt", clbsList.length); // 총건수
  340. }
  341. model.refresh();
  342. }
  343. // 자보 리스트 엑셀 출력
  344. function fGetPatClamAutoXlsList() {
  345. // 청구년월 입력값 체크
  346. var clamym = model.getValue("/root/send/clamym");
  347. if (clamym == "" || clamym.length != 6) {
  348. messageBox("청구년월은 필수", "E008"); /// 청구년월은 필수입니다.
  349. return;
  350. }
  351. // 청구차수 입력값 체크
  352. var clamdg = model.getValue("/root/send/clamdg");
  353. if (clamdg == "") {
  354. messageBox("청구차수는 필수", "E008"); /// 청구차수는 필수입니다.
  355. return;
  356. }
  357. var insukind = model.getValue("/root/send/insukind");
  358. // 자보일 경우에만 실행 가능하게
  359. if ( insukind == "31" ) {
  360. submit("TRPID20707");
  361. } else {
  362. messageBox("자보가 선택되지 ", "E007"); /// 자보가 선택되지 않았습니다.
  363. return;
  364. }
  365. // 조회된 건수가 있으면 엑셀 저장 다얄로그 소환
  366. if (grd_autoxls.rows > 1) {
  367. var fileName = window.fileDialog("save", "", false, "자보리스트", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  368. if (fileName != "") {
  369. //datagrid.saveExcel의 7번째 인자 값(boolean) : 그리드의 col type=combo일 경우 엑셀저장내용이 lable 또는 value로 설정 함
  370. grd_autoxls.saveExcel(fileName, "SheetName", true, true, "", "", true);
  371. }
  372. }
  373. }
  374. // 대량 출력시 버퍼 오류때문에 딜레이를 준다
  375. // 최초 sleep 함수를 만들어서 이용하려 했으나 출력하는 동안 과부하가 걸리고 익스플로어 제어가 불가능해서 제외
  376. // function sleep(time) {
  377. // if (time < 1) return;
  378. // var now = new Date();
  379. // var stop = now.getTime() + time;
  380. // while(true) {
  381. // now = new Date();
  382. // if (now.getTime() > stop) return;
  383. // }
  384. // }
  385. // 지연출력 함수 2009.02.13 By Kei
  386. // 한꺼번에 출력을 하면 프린터버퍼 문제로 일부 문서가 중복되거나 빠지는 경우가 발생한다.
  387. // 그래서 setInterval() 을 이용하여 출력물 간에 지연시간을 준다.
  388. // for() 문을 이용하면 setInterval() 과 관계없이 연속으로 호출이 된다. 시간지연이 안 됨.
  389. // 해서 for() 문으로 체크하는 것이 아니라 체크된 행을 배열에 저장해 두고
  390. // 글로벌 변수 glb_i를 이용해서 함수가 호출 될 때마다 1씩 증가하게 만들었다.
  391. function delayPrint() {
  392. var i = chkArr[glb_i]; // 배열에 들어 있는 체크된 행번호를 끄집어 낸다.
  393. chksel = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chksel")); // 급여출력여부
  394. chkpay = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkpay")); // 비급여출력여부
  395. chkall = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkall")); // 급여+비급여출력여부
  396. var ioflag = model.getValue("/root/main/list1/clbs["+i+"]/ioflag"); // 내원형태
  397. var sumtypecd = model.getValue("/root/main/list1/clbs["+i+"]/sumtypecd"); // 진료분야
  398. var insukind = model.getValue("/root/main/list1/clbs["+i+"]/insukindcd"); // 보험유형
  399. // 급여명세서 조회를 위한 사후심사 key 값을 데이터로 만든다.
  400. model.setValue("/root/send/item1/clamym", model.getValue("/root/main/list1/clbs["+i+"]/clamym"));
  401. model.setValue("/root/send/item1/clamdg", model.getValue("/root/main/list1/clbs["+i+"]/clamdg"));
  402. model.setValue("/root/send/item1/pid", model.getValue("/root/main/list1/clbs["+i+"]/pid"));
  403. model.setValue("/root/send/item1/pidsn", model.getValue("/root/main/list1/clbs["+i+"]/pidsn"));
  404. model.setValue("/root/send/item1/insukind", model.getValue("/root/main/list1/clbs["+i+"]/insukindcd"));
  405. model.setValue("/root/send/item1/chkflag", "pay");
  406. // 2-1. 급여 출력
  407. if (chksel == "true") {
  408. // 내원형태, 보험유형에 맞는 명세서를 출력한다.
  409. switch (ioflag) {
  410. case "-" :
  411. break;
  412. case "I" :
  413. if (insukind == "31") {
  414. model.setValue("/root/send/item1/pagenum", "33");
  415. fPrintView3(); // 자보 (의과입원)
  416. } else {
  417. model.setValue("/root/send/item1/pagenum", "32");
  418. fPrintView1(); // 일반 (의과입원)
  419. }
  420. break;
  421. case "O" :
  422. if (insukind == "31") {
  423. model.setValue("/root/send/item1/pagenum", "33");
  424. fPrintView4(); // 자보 (의과외래)
  425. } else {
  426. model.setValue("/root/send/item1/pagenum", "32");
  427. fPrintView2(); // 일반 (의과외래)
  428. }
  429. break;
  430. default :
  431. }
  432. }
  433. // 2-2. 비급여 출력
  434. model.setValue("/root/send/item1/chkflag", "nopay");
  435. if (chkpay == "true") {
  436. model.setValue("/root/send/item1/pagenum", "37");
  437. fPrintView5(); // 비급여
  438. }
  439. // 2-3. 급여+비급여 출력
  440. model.setValue("/root/send/item1/chkflag", "all");
  441. if (chkall == "true") {
  442. // 내원형태, 보험유형에 맞는 명세서를 출력한다.
  443. switch (ioflag) {
  444. case "-" :
  445. break;
  446. case "I" :
  447. if (insukind == "31") {
  448. model.setValue("/root/send/item1/pagenum", "33");
  449. fPrintView3(); // 자보 (의과입원)
  450. } else {
  451. model.setValue("/root/send/item1/pagenum", "32");
  452. fPrintView1(); // 일반 (의과입원)
  453. }
  454. break;
  455. case "O" :
  456. if (insukind == "31") {
  457. model.setValue("/root/send/item1/pagenum", "33");
  458. fPrintView4(); // 자보 (의과외래)
  459. } else {
  460. model.setValue("/root/send/item1/pagenum", "32");
  461. fPrintView2(); // 일반 (의과외래)
  462. }
  463. break;
  464. default :
  465. }
  466. }
  467. // 그리드 마지막행까지 체크가 끝나면 초기화
  468. if ( glb_i == chkcnt - 1) {
  469. if(model.getValue("/root/previewyn") == "true") {
  470. window.clearInterval(timerID); // 타이머 초기화
  471. }
  472. messageBox("명세서 출력(" + chkcnt + "건)이 ","I002");
  473. glb_i = 0;
  474. chkcnt = 0;
  475. chkArr = new Array(); // 배열초기화
  476. return; // 반드시 여기서 종료를 해야 한다.
  477. }
  478. // 호출될 때마다 i 값을 1씩 증가시켜서 다음 행을 선택하게 한다
  479. glb_i++;
  480. }
  481. // 출력
  482. function fPrintView() {
  483. // 1. 출력여부 판단 (선택된 row 가 있어야 출력 가능)
  484. var rows = grd_clbsmast.rows;
  485. var chksel = "";
  486. var chkpay = "";
  487. var chkall = "";
  488. var isprnt = "";
  489. glb_i = 0; // 20100218 초기화추가
  490. chkcnt = 0; // 20100218 초기화추가
  491. chkArr = new Array(); // 20100218 배열초기화
  492. // 출력체크 여부와 체크된 행을 저장해 둔다
  493. for (i=1; i<rows; i++) {
  494. chksel = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chksel")); // 급여출력여부
  495. chkpay = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkpay")); // 비급여출력여부
  496. chkall = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkall")); // 급여+비급여출력여부
  497. if (chksel == "true" || chkpay == "true" || chkall == "true") {
  498. isprnt = "true";
  499. chkArr[chkcnt] = i;
  500. chkcnt++;
  501. // i = rows; 이건 뭐냐. 이해 안되서 주석처리
  502. }
  503. }
  504. // 2. 출력
  505. if (isprnt == "true") {
  506. chksel = "";
  507. chkpay = "";
  508. chkall = ""; // 20100228 추가
  509. // 지연출력을 위해 setInterval() 이용, 2초 간격으로 출력함수(delayPrint()) 호출함
  510. if(model.getValue("/root/previewyn") == "true") {
  511. timerID = window.setInterval("delayPrint()",2000);
  512. } else {
  513. // 기존 스크립트 2009.02.13 변경
  514. for (var i=1; i<rows; i++) {
  515. chksel = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chksel")); // 급여출력여부
  516. chkpay = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkpay")); // 비급여출력여부
  517. chkall = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkall")); // 급여+비급여출력여부
  518. var ioflag = model.getValue("/root/main/list1/clbs["+i+"]/ioflag"); // 내원형태
  519. var sumtypecd = model.getValue("/root/main/list1/clbs["+i+"]/sumtypecd"); // 진료분야
  520. var insukind = model.getValue("/root/main/list1/clbs["+i+"]/insukindcd"); // 보험유형
  521. // 급여명세서 조회를 위한 사후심사 key 값을 데이터로 만든다.
  522. model.setValue("/root/send/item1/clamym", model.getValue("/root/main/list1/clbs["+i+"]/clamym"));
  523. model.setValue("/root/send/item1/clamdg", model.getValue("/root/main/list1/clbs["+i+"]/clamdg"));
  524. model.setValue("/root/send/item1/pid", model.getValue("/root/main/list1/clbs["+i+"]/pid"));
  525. model.setValue("/root/send/item1/pidsn", model.getValue("/root/main/list1/clbs["+i+"]/pidsn"));
  526. model.setValue("/root/send/item1/insukind", model.getValue("/root/main/list1/clbs["+i+"]/insukindcd"));
  527. model.setValue("/root/send/item1/chkflag", "pay");
  528. // 2-1. 급여 출력
  529. if (chksel == "true") {
  530. // 내원형태, 보험유형에 맞는 명세서를 출력한다.
  531. switch (ioflag) {
  532. case "-" :
  533. break;
  534. case "I" :
  535. if (insukind == "31") {
  536. model.setValue("/root/send/item1/pagenum", "33");
  537. fPrintView3(); // 자보 (의과입원)
  538. } else {
  539. model.setValue("/root/send/item1/pagenum", "32");
  540. fPrintView1(); // 일반 (의과입원)
  541. }
  542. break;
  543. case "O" :
  544. if (insukind == "31") {
  545. model.setValue("/root/send/item1/pagenum", "33");
  546. fPrintView4(); // 자보 (의과외래)
  547. } else {
  548. model.setValue("/root/send/item1/pagenum", "32");
  549. fPrintView2(); // 일반 (의과외래)
  550. }
  551. break;
  552. default :
  553. }
  554. }
  555. // 2-2. 비급여 출력
  556. model.setValue("/root/send/item1/chkflag", "nopay");
  557. if (chkpay == "true") {
  558. model.setValue("/root/send/item1/pagenum", "37");
  559. fPrintView5(); // 비급여
  560. }
  561. // 2-3. 급여+비급여 출력
  562. model.setValue("/root/send/item1/chkflag", "all");
  563. if (chkall == "true") {
  564. // 내원형태, 보험유형에 맞는 명세서를 출력한다.
  565. switch (ioflag) {
  566. case "-" :
  567. break;
  568. case "I" :
  569. if (insukind == "31") {
  570. model.setValue("/root/send/item1/pagenum", "33");
  571. fPrintView3(); // 자보 (의과입원)
  572. } else {
  573. model.setValue("/root/send/item1/pagenum", "32");
  574. fPrintView1(); // 일반 (의과입원)
  575. }
  576. break;
  577. case "O" :
  578. if (insukind == "31") {
  579. model.setValue("/root/send/item1/pagenum", "33");
  580. fPrintView4(); // 자보 (의과외래)
  581. } else {
  582. model.setValue("/root/send/item1/pagenum", "32");
  583. fPrintView2(); // 일반 (의과외래)
  584. }
  585. break;
  586. default :
  587. }
  588. }
  589. }
  590. }
  591. } else {
  592. messageBox("출력할 환자 청구명세서가 선택되지", "E007");
  593. }
  594. }
  595. // 의과(치과)입원 환자청구명세서 출력
  596. function fPrintView1() {
  597. // 노드 초기화
  598. model.resetInstanceNode("/root/send/report1");
  599. model.resetInstanceNode("/root/send/report2");
  600. model.removenode("/root/hidden/list1");
  601. model.removenode("/root/hidden/list2");
  602. model.removenode("/root/hidden/list3");
  603. model.removenode("/root/hidden/list4");
  604. model.removenode("/root/hidden/list5");
  605. model.removenode("/root/hidden/list6");
  606. model.makeNode("/root/hidden/list1");
  607. model.makeNode("/root/hidden/list2");
  608. model.makeNode("/root/hidden/list3");
  609. model.makeNode("/root/hidden/list4");
  610. model.makeNode("/root/hidden/list5");
  611. model.makeNode("/root/hidden/list6");
  612. // 1. 의과(치과)입원_메인 데이터 조회
  613. // 2. 의과(치과)입원_상병 목록 조회
  614. // 3. 의과(치과)입원_금액 조회
  615. // 4. 의과(치과)입원_처방 조회
  616. submit("TRPID20702");
  617. // 5. 보고서(첫장)로 데이터 보내기
  618. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  619. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  620. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  621. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  622. model.copyNode("/root/send/report1/list6", "/root/hidden/list6");
  623. // option - flase : 미리보기 , ture : 미리보기 없이 출력
  624. //exeReportPreview("RPPID20701", "XMLSTR", "","", "false","","","","","false"); // 미리보기
  625. //exeReportPreview("RPPID20701", "XMLSTR", "","", "true","","","","","true"); // 미리보기없이 출력
  626. exeReportPreview("RPPID20701", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  627. // 6. 보고서(나머지)로 데이터 보내기(뒷장의 존재유무를 sorting1 값으로 판단한다. 이전에는 edicd로 했는데 소계에서는 빈값이어서 변경함)
  628. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  629. if (sorting1 != "") {
  630. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  631. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  632. exeReportPreview("RPPID20706", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  633. }
  634. }
  635. // 의과(치과)외래 환자청구명세서 출력
  636. function fPrintView2() {
  637. // 노드 초기화
  638. model.resetInstanceNode("/root/send/report1");
  639. model.resetInstanceNode("/root/send/report2");
  640. model.removenode("/root/hidden/list1");
  641. model.removenode("/root/hidden/list2");
  642. model.removenode("/root/hidden/list3");
  643. model.removenode("/root/hidden/list4");
  644. model.removenode("/root/hidden/list5");
  645. model.removenode("/root/hidden/list6");
  646. model.makeNode("/root/hidden/list1");
  647. model.makeNode("/root/hidden/list2");
  648. model.makeNode("/root/hidden/list3");
  649. model.makeNode("/root/hidden/list4");
  650. model.makeNode("/root/hidden/list5");
  651. model.makeNode("/root/hidden/list6");
  652. // 1. 의과(치과)외래_메인 데이터 조회
  653. // 2. 의과(치과)외래_상병 목록 조회
  654. // 3. 의과(치과)외래원_금액 조회
  655. // 4. 의과(치과)외래_처방 조회
  656. submit("TRPID20703");
  657. // 5. 보고서(첫장)로 데이터 보내기
  658. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  659. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  660. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  661. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  662. exeReportPreview("RPPID20700", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  663. // 6. 보고서(나머지)로 데이터 보내기
  664. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  665. if (sorting1 != "") {
  666. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  667. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  668. exeReportPreview("RPPID20707", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  669. }
  670. }
  671. // 자보입원 환자청구명세서 출력
  672. function fPrintView3() {
  673. // 노드 초기화
  674. model.resetInstanceNode("/root/send/report1");
  675. model.resetInstanceNode("/root/send/report2");
  676. model.removenode("/root/hidden/list1");
  677. model.removenode("/root/hidden/list2");
  678. model.removenode("/root/hidden/list3");
  679. model.removenode("/root/hidden/list4");
  680. model.removenode("/root/hidden/list5");
  681. model.makeNode("/root/hidden/list1");
  682. model.makeNode("/root/hidden/list2");
  683. model.makeNode("/root/hidden/list3");
  684. model.makeNode("/root/hidden/list4");
  685. model.makeNode("/root/hidden/list5");
  686. // 1. 자보입원_메인 데이터 조회
  687. // 2. 자보입원_상병 목록 조회
  688. // 3. 자보입원_금액 조회
  689. // 4. 자보입원_처방 조회
  690. submit("TRPID20704");
  691. // 5. 보고서(첫장)로 데이터 보내기
  692. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  693. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  694. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  695. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  696. // 20100228 자보 직인출력 추가
  697. if ( model.getValue("/root/send/imgdata/imgprtyn") == "Y" ) {
  698. model.makeValue("/root/send/report1/list1/main/main_photimg",model.getValue("/root/send/imgdata/photimg"),true);
  699. }
  700. // option - flase : 미리보기 , ture : 미리보기 없이 출력
  701. //exeReportPreview("RPPID20705", "XMLSTR", "","", "false","","","","","false"); // 미리보기
  702. //exeReportPreview("RPPID20705", "XMLSTR", "","", "true","","","","","true"); // 미리보기없이 출력
  703. // exeReportPreview("RPPID20705", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  704. // 바로출력할때 미리보기 창이 껌뻑껌뻑거리는 걸 없앤다.
  705. // Step1. xforms-ready에서 미리 멕꾸레폿뷰를 한다.
  706. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden1");
  707. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden2");
  708. // Step2. 숨겨진 그룹을 생성한다. 구석에 숨겨놓고 요따가 미리보기 뷰를 얹는거다.
  709. // grp_rpt_hidden1, grp_rpt_hidden2
  710. // Step3. 출력호출 할때 grp_rpt_hidden1,2 를 지정해서 부른다.
  711. // 그룹을 두개로 나눈 이유는 한번에 호출을 두번하니까 첫번째 장이 날아가 버린다.
  712. // 그래서 첫번째 애랑 두번째 애를 다른 그룹에다가 줘 버렸다.
  713. if (model.getValue("/root/previewyn") == "false") {
  714. // 미리보기
  715. exeReportPreview("RPPID20705", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  716. } else {
  717. // 바로출력
  718. exeReportPreview("RPPID20705", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","","","","grp_rpt_hidden1");
  719. }
  720. // 6. 보고서(나머지)로 데이터 보내기
  721. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  722. if (sorting1 != "") {
  723. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  724. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  725. // exeReportPreview("RPPID20708", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  726. if (model.getValue("/root/previewyn") == "false") {
  727. // 미리보기
  728. exeReportPreview("RPPID20708", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  729. } else {
  730. // 바로출력
  731. exeReportPreview("RPPID20708", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","","","","grp_rpt_hidden2");
  732. }
  733. }
  734. }
  735. function fPayment1() {
  736. // 노드 초기화
  737. model.resetInstanceNode("/root/send/report1");
  738. model.resetInstanceNode("/root/send/report2");
  739. model.removenode("/root/hidden/list1");
  740. model.removenode("/root/hidden/list2");
  741. model.removenode("/root/hidden/list3");
  742. model.removenode("/root/hidden/list4");
  743. model.removenode("/root/hidden/list5");
  744. model.makeNode("/root/hidden/list1");
  745. model.makeNode("/root/hidden/list2");
  746. model.makeNode("/root/hidden/list3");
  747. model.makeNode("/root/hidden/list4");
  748. model.makeNode("/root/hidden/list5");
  749. // 1. 자보입원_메인 데이터 조회
  750. // 2. 자보입원_상병 목록 조회
  751. // 3. 자보입원_금액 조회
  752. // 4. 자보입원_처방 조회
  753. if(submit("TRPID20704")) {
  754. var diagcd = "";
  755. var diagnm = "";
  756. for(i = 0; i <= getNodesetCount("/root/hidden/list2/diag"); i++){
  757. diagcd += model.getValue("/root/hidden/list2/diag["+i+"]/diag_diagcd") +"\n";
  758. diagnm += model.getValue("/root/hidden/list2/diag["+i+"]/diag_diagnm") + "\n";
  759. }
  760. model.setValue("/root/etc/diagcd" , diagcd);
  761. model.setValue("/root/etc/diagnm" , diagnm);
  762. }
  763. // 5. 보고서(첫장)로 데이터 보내기
  764. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  765. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  766. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  767. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  768. // 20100228 자보 직인출력 추가
  769. if ( model.getValue("/root/send/imgdata/imgprtyn") == "Y" ) {
  770. model.makeValue("/root/send/report1/list1/main/main_photimg",model.getValue("/root/send/imgdata/photimg"),true);
  771. }
  772. // option - flase : 미리보기 , ture : 미리보기 없이 출력
  773. //exeReportPreview("RPPID20705", "XMLSTR", "","", "false","","","","","false"); // 미리보기
  774. //exeReportPreview("RPPID20705", "XMLSTR", "","", "true","","","","","true"); // 미리보기없이 출력
  775. // exeReportPreview("RPPID20705", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  776. // 바로출력할때 미리보기 창이 껌뻑껌뻑거리는 걸 없앤다.
  777. // Step1. xforms-ready에서 미리 멕꾸레폿뷰를 한다.
  778. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden1");
  779. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden2");
  780. // Step2. 숨겨진 그룹을 생성한다. 구석에 숨겨놓고 요따가 미리보기 뷰를 얹는거다.
  781. // grp_rpt_hidden1, grp_rpt_hidden2
  782. // Step3. 출력호출 할때 grp_rpt_hidden1,2 를 지정해서 부른다.
  783. // 그룹을 두개로 나눈 이유는 한번에 호출을 두번하니까 첫번째 장이 날아가 버린다.
  784. // 그래서 첫번째 애랑 두번째 애를 다른 그룹에다가 줘 버렸다.
  785. if (model.getValue("/root/previewyn") == "false") {
  786. // 미리보기
  787. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  788. } else {
  789. // 바로출력
  790. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  791. }
  792. // 6. 보고서(나머지)로 데이터 보내기
  793. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  794. if (sorting1 != "") {
  795. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  796. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  797. // exeReportPreview("RPPID20708", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  798. if (model.getValue("/root/previewyn") == "false") {
  799. // 미리보기
  800. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  801. } else {
  802. // 바로출력
  803. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  804. }
  805. }
  806. }
  807. function fPayment2() {
  808. // 노드 초기화
  809. model.resetInstanceNode("/root/send/report1");
  810. model.resetInstanceNode("/root/send/report2");
  811. model.removenode("/root/hidden/list1");
  812. model.removenode("/root/hidden/list2");
  813. model.removenode("/root/hidden/list3");
  814. model.removenode("/root/hidden/list4");
  815. model.removenode("/root/hidden/list5");
  816. model.makeNode("/root/hidden/list1");
  817. model.makeNode("/root/hidden/list2");
  818. model.makeNode("/root/hidden/list3");
  819. model.makeNode("/root/hidden/list4");
  820. model.makeNode("/root/hidden/list5");
  821. // 1. 자보입원_메인 데이터 조회
  822. // 2. 자보입원_상병 목록 조회
  823. // 3. 자보입원_금액 조회
  824. // 4. 자보입원_처방 조회
  825. submit("TRPID20705");
  826. // 5. 보고서(첫장)로 데이터 보내기
  827. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  828. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  829. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  830. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  831. // 20100228 자보 직인출력 추가
  832. if ( model.getValue("/root/send/imgdata/imgprtyn") == "Y" ) {
  833. model.makeValue("/root/send/report1/list1/main/main_photimg",model.getValue("/root/send/imgdata/photimg"),true);
  834. }
  835. // option - flase : 미리보기 , ture : 미리보기 없이 출력
  836. //exeReportPreview("RPPID20705", "XMLSTR", "","", "false","","","","","false"); // 미리보기
  837. //exeReportPreview("RPPID20705", "XMLSTR", "","", "true","","","","","true"); // 미리보기없이 출력
  838. // exeReportPreview("RPPID20705", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  839. // 바로출력할때 미리보기 창이 껌뻑껌뻑거리는 걸 없앤다.
  840. // Step1. xforms-ready에서 미리 멕꾸레폿뷰를 한다.
  841. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden1");
  842. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden2");
  843. // Step2. 숨겨진 그룹을 생성한다. 구석에 숨겨놓고 요따가 미리보기 뷰를 얹는거다.
  844. // grp_rpt_hidden1, grp_rpt_hidden2
  845. // Step3. 출력호출 할때 grp_rpt_hidden1,2 를 지정해서 부른다.
  846. // 그룹을 두개로 나눈 이유는 한번에 호출을 두번하니까 첫번째 장이 날아가 버린다.
  847. // 그래서 첫번째 애랑 두번째 애를 다른 그룹에다가 줘 버렸다.
  848. if (model.getValue("/root/previewyn") == "false") {
  849. // 미리보기
  850. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  851. } else {
  852. // 바로출력
  853. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  854. }
  855. // 6. 보고서(나머지)로 데이터 보내기
  856. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  857. if (sorting1 != "") {
  858. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  859. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  860. // exeReportPreview("RPPID20708", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  861. if (model.getValue("/root/previewyn") == "false") {
  862. // 미리보기
  863. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  864. } else {
  865. // 바로출력
  866. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  867. }
  868. }
  869. }
  870. function fPayment3() {
  871. // 노드 초기화
  872. model.resetInstanceNode("/root/send/report1");
  873. model.resetInstanceNode("/root/send/report2");
  874. model.removenode("/root/hidden/list1");
  875. model.removenode("/root/hidden/list2");
  876. model.removenode("/root/hidden/list3");
  877. model.removenode("/root/hidden/list4");
  878. model.removenode("/root/hidden/list5");
  879. model.makeNode("/root/hidden/list1");
  880. model.makeNode("/root/hidden/list2");
  881. model.makeNode("/root/hidden/list3");
  882. model.makeNode("/root/hidden/list4");
  883. model.makeNode("/root/hidden/list5");
  884. // 1. 비급여_메인 데이터 조회
  885. // 2. 비급여_상병 목록 조회
  886. // 3. 비급여_금액 조회
  887. // 4. 비급여_처방 조회
  888. submit("TRPID20706");
  889. // 5. 보고서(첫장)로 데이터 보내기
  890. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  891. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  892. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  893. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  894. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  895. // 6. 보고서(나머지)로 데이터 보내기
  896. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  897. if (sorting1 != "") {
  898. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  899. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  900. exeReportPreview("RFPID20800", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  901. }
  902. }
  903. function fAccidPayment1() {
  904. // 노드 초기화
  905. model.resetInstanceNode("/root/send/report1");
  906. model.resetInstanceNode("/root/send/report2");
  907. model.removenode("/root/hidden/list1");
  908. model.removenode("/root/hidden/list2");
  909. model.removenode("/root/hidden/list3");
  910. model.removenode("/root/hidden/list4");
  911. model.removenode("/root/hidden/list5");
  912. model.makeNode("/root/hidden/list1");
  913. model.makeNode("/root/hidden/list2");
  914. model.makeNode("/root/hidden/list3");
  915. model.makeNode("/root/hidden/list4");
  916. model.makeNode("/root/hidden/list5");
  917. // 1. 자보입원_메인 데이터 조회
  918. // 2. 자보입원_상병 목록 조회
  919. // 3. 자보입원_금액 조회
  920. // 4. 자보입원_처방 조회
  921. if(submit("TRPID20704")) {
  922. var diagcd = "";
  923. var diagnm = "";
  924. for(i = 0; i <= getNodesetCount("/root/hidden/list2/diag"); i++){
  925. diagcd += model.getValue("/root/hidden/list2/diag["+i+"]/diag_diagcd") +"\n";
  926. diagnm += model.getValue("/root/hidden/list2/diag["+i+"]/diag_diagnm") + "\n";
  927. }
  928. model.setValue("/root/etc/diagcd" , diagcd);
  929. model.setValue("/root/etc/diagnm" , diagnm);
  930. }
  931. // 5. 보고서(첫장)로 데이터 보내기
  932. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  933. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  934. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  935. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  936. // 20100228 자보 직인출력 추가
  937. if ( model.getValue("/root/send/imgdata/imgprtyn") == "Y" ) {
  938. model.makeValue("/root/send/report1/list1/main/main_photimg",model.getValue("/root/send/imgdata/photimg"),true);
  939. }
  940. // option - flase : 미리보기 , ture : 미리보기 없이 출력
  941. //exeReportPreview("RPPID20705", "XMLSTR", "","", "false","","","","","false"); // 미리보기
  942. //exeReportPreview("RPPID20705", "XMLSTR", "","", "true","","","","","true"); // 미리보기없이 출력
  943. // exeReportPreview("RPPID20705", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  944. // 바로출력할때 미리보기 창이 껌뻑껌뻑거리는 걸 없앤다.
  945. // Step1. xforms-ready에서 미리 멕꾸레폿뷰를 한다.
  946. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden1");
  947. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden2");
  948. // Step2. 숨겨진 그룹을 생성한다. 구석에 숨겨놓고 요따가 미리보기 뷰를 얹는거다.
  949. // grp_rpt_hidden1, grp_rpt_hidden2
  950. // Step3. 출력호출 할때 grp_rpt_hidden1,2 를 지정해서 부른다.
  951. // 그룹을 두개로 나눈 이유는 한번에 호출을 두번하니까 첫번째 장이 날아가 버린다.
  952. // 그래서 첫번째 애랑 두번째 애를 다른 그룹에다가 줘 버렸다.
  953. if (model.getValue("/root/previewyn") == "false") {
  954. // 미리보기
  955. exeReportPreview("RFPID20900", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  956. } else {
  957. // 바로출력
  958. //exeReportPreview("RFPID20900", "XMLSTR", "","", "true","","","","","true");
  959. }
  960. // 6. 보고서(나머지)로 데이터 보내기
  961. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  962. if (sorting1 != "") {
  963. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  964. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  965. // exeReportPreview("RPPID20708", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  966. if (model.getValue("/root/previewyn") == "false") {
  967. // 미리보기
  968. exeReportPreview("RFPID20900", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  969. } else {
  970. // 바로출력
  971. exeReportPreview("RFPID20900", "XMLSTR", "","", "true","","","","","true");
  972. }
  973. }
  974. }
  975. function fAccidPayment2() {
  976. // 노드 초기화
  977. model.resetInstanceNode("/root/send/report1");
  978. model.resetInstanceNode("/root/send/report2");
  979. model.removenode("/root/hidden/list1");
  980. model.removenode("/root/hidden/list2");
  981. model.removenode("/root/hidden/list3");
  982. model.removenode("/root/hidden/list4");
  983. model.removenode("/root/hidden/list5");
  984. model.makeNode("/root/hidden/list1");
  985. model.makeNode("/root/hidden/list2");
  986. model.makeNode("/root/hidden/list3");
  987. model.makeNode("/root/hidden/list4");
  988. model.makeNode("/root/hidden/list5");
  989. // 1. 자보입원_메인 데이터 조회
  990. // 2. 자보입원_상병 목록 조회
  991. // 3. 자보입원_금액 조회
  992. // 4. 자보입원_처방 조회
  993. submit("TRPID20705");
  994. // 5. 보고서(첫장)로 데이터 보내기
  995. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  996. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  997. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  998. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  999. // 20100228 자보 직인출력 추가
  1000. if ( model.getValue("/root/send/imgdata/imgprtyn") == "Y" ) {
  1001. model.makeValue("/root/send/report1/list1/main/main_photimg",model.getValue("/root/send/imgdata/photimg"),true);
  1002. }
  1003. // option - flase : 미리보기 , ture : 미리보기 없이 출력
  1004. //exeReportPreview("RPPID20705", "XMLSTR", "","", "false","","","","","false"); // 미리보기
  1005. //exeReportPreview("RPPID20705", "XMLSTR", "","", "true","","","","","true"); // 미리보기없이 출력
  1006. // exeReportPreview("RPPID20705", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  1007. // 바로출력할때 미리보기 창이 껌뻑껌뻑거리는 걸 없앤다.
  1008. // Step1. xforms-ready에서 미리 멕꾸레폿뷰를 한다.
  1009. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden1");
  1010. // makeReportPreview(0,50,1194,600, "grp_rpt_hidden2");
  1011. // Step2. 숨겨진 그룹을 생성한다. 구석에 숨겨놓고 요따가 미리보기 뷰를 얹는거다.
  1012. // grp_rpt_hidden1, grp_rpt_hidden2
  1013. // Step3. 출력호출 할때 grp_rpt_hidden1,2 를 지정해서 부른다.
  1014. // 그룹을 두개로 나눈 이유는 한번에 호출을 두번하니까 첫번째 장이 날아가 버린다.
  1015. // 그래서 첫번째 애랑 두번째 애를 다른 그룹에다가 줘 버렸다.
  1016. if (model.getValue("/root/previewyn") == "false") {
  1017. // 미리보기
  1018. exeReportPreview("RFPID20900", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  1019. } else {
  1020. // 바로출력
  1021. exeReportPreview("RFPID20900", "XMLSTR", "","", "true","","","","","true");
  1022. }
  1023. // 6. 보고서(나머지)로 데이터 보내기
  1024. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  1025. if (sorting1 != "") {
  1026. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  1027. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  1028. // exeReportPreview("RPPID20708", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  1029. if (model.getValue("/root/previewyn") == "false") {
  1030. // 미리보기
  1031. exeReportPreview("RFPID20900", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  1032. } else {
  1033. // 바로출력
  1034. exeReportPreview("RFPID20900", "XMLSTR", "","", "true","","","","","true");
  1035. }
  1036. }
  1037. }
  1038. function fAccidPayment3() {
  1039. // 노드 초기화
  1040. model.resetInstanceNode("/root/send/report1");
  1041. model.resetInstanceNode("/root/send/report2");
  1042. model.removenode("/root/hidden/list1");
  1043. model.removenode("/root/hidden/list2");
  1044. model.removenode("/root/hidden/list3");
  1045. model.removenode("/root/hidden/list4");
  1046. model.removenode("/root/hidden/list5");
  1047. model.makeNode("/root/hidden/list1");
  1048. model.makeNode("/root/hidden/list2");
  1049. model.makeNode("/root/hidden/list3");
  1050. model.makeNode("/root/hidden/list4");
  1051. model.makeNode("/root/hidden/list5");
  1052. // 1. 비급여_메인 데이터 조회
  1053. // 2. 비급여_상병 목록 조회
  1054. // 3. 비급여_금액 조회
  1055. // 4. 비급여_처방 조회
  1056. submit("TRPID20706");
  1057. // 5. 보고서(첫장)로 데이터 보내기
  1058. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  1059. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  1060. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  1061. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  1062. exeReportPreview("RFPID20900", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  1063. // 6. 보고서(나머지)로 데이터 보내기
  1064. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  1065. if (sorting1 != "") {
  1066. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  1067. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  1068. exeReportPreview("RFPID20900", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  1069. }
  1070. }
  1071. // 자보외래 환자청구명세서 출력
  1072. function fPrintView4() {
  1073. // 노드 초기화
  1074. model.resetInstanceNode("/root/send/report1");
  1075. model.resetInstanceNode("/root/send/report2");
  1076. model.removenode("/root/hidden/list1");
  1077. model.removenode("/root/hidden/list2");
  1078. model.removenode("/root/hidden/list3");
  1079. model.removenode("/root/hidden/list4");
  1080. model.removenode("/root/hidden/list5");
  1081. model.makeNode("/root/hidden/list1");
  1082. model.makeNode("/root/hidden/list2");
  1083. model.makeNode("/root/hidden/list3");
  1084. model.makeNode("/root/hidden/list4");
  1085. model.makeNode("/root/hidden/list5");
  1086. // 1. 자보외래_메인 데이터 조회
  1087. // 2. 자보외래_상병 목록 조회
  1088. // 3. 자보외래_금액 조회
  1089. // 4. 자보외래_처방 조회
  1090. submit("TRPID20705");
  1091. // 5. 보고서(첫장)로 데이터 보내기
  1092. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  1093. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  1094. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  1095. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  1096. // exeReportPreview("RPPID20704", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  1097. // 20100228 자보 직인출력 추가
  1098. if ( model.getValue("/root/send/imgdata/imgprtyn") == "Y" ) {
  1099. model.makeValue("/root/send/report1/list1/main/main_photimg",model.getValue("/root/send/imgdata/photimg"),true);
  1100. }
  1101. if (model.getValue("/root/previewyn") == "false") {
  1102. // 미리보기
  1103. exeReportPreview("RPPID20704", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  1104. } else {
  1105. // 바로출력
  1106. exeReportPreview("RPPID20704", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","","","","grp_rpt_hidden1");
  1107. }
  1108. // 6. 보고서(나머지)로 데이터 보내기
  1109. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  1110. if (sorting1 != "") {
  1111. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  1112. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  1113. // exeReportPreview("RPPID20709", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  1114. if (model.getValue("/root/previewyn") == "false") {
  1115. // 미리보기
  1116. exeReportPreview("RPPID20709", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","",model.getValue("/root/previewyn"));
  1117. } else {
  1118. // 바로출력
  1119. exeReportPreview("RPPID20709", "XMLSTR", "","", model.getValue("/root/previewyn") ,"","","","","","","grp_rpt_hidden2");
  1120. }
  1121. }
  1122. }
  1123. // 비급여 환자청구명세서 출력
  1124. function fPrintView5() {
  1125. // 노드 초기화
  1126. model.resetInstanceNode("/root/send/report1");
  1127. model.resetInstanceNode("/root/send/report2");
  1128. model.removenode("/root/hidden/list1");
  1129. model.removenode("/root/hidden/list2");
  1130. model.removenode("/root/hidden/list3");
  1131. model.removenode("/root/hidden/list4");
  1132. model.removenode("/root/hidden/list5");
  1133. model.makeNode("/root/hidden/list1");
  1134. model.makeNode("/root/hidden/list2");
  1135. model.makeNode("/root/hidden/list3");
  1136. model.makeNode("/root/hidden/list4");
  1137. model.makeNode("/root/hidden/list5");
  1138. // 1. 비급여_메인 데이터 조회
  1139. // 2. 비급여_상병 목록 조회
  1140. // 3. 비급여_금액 조회
  1141. // 4. 비급여_처방 조회
  1142. submit("TRPID20706");
  1143. // 5. 보고서(첫장)로 데이터 보내기
  1144. model.copyNode("/root/send/report1/list1", "/root/hidden/list1");
  1145. model.copyNode("/root/send/report1/list2", "/root/hidden/list2");
  1146. model.copyNode("/root/send/report1/list3", "/root/hidden/list3");
  1147. model.copyNode("/root/send/report1/list4", "/root/hidden/list4");
  1148. exeReportPreview("RPPID20710", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  1149. // 6. 보고서(나머지)로 데이터 보내기
  1150. var sorting1 = model.getValue("/root/hidden/list5/prcp_sub/prcp_sub_sorting1");
  1151. if (sorting1 != "") {
  1152. model.copyNode("/root/send/report2/list1", "/root/hidden/list1");
  1153. model.copyNode("/root/send/report2/list5", "/root/hidden/list5");
  1154. exeReportPreview("RPPID20711", "XMLSTR", "","", model.getValue("/root/previewyn"),"","","","",model.getValue("/root/previewyn"));
  1155. }
  1156. }
  1157. // 다음페이지 조회
  1158. function fNextpage()
  1159. {
  1160. if (model.getValue("/root/main/list1/clbs[1]/pid") != "")
  1161. {
  1162. model.removeNodeset("/root/main/list1/clbs");
  1163. var minrnum = model.getValue("/root/send/minrnum");
  1164. var maxrnum = model.getValue("/root/send/maxrnum");
  1165. minrnum = parseInt(minrnum) + 500;
  1166. maxrnum = parseInt(maxrnum) + 500;
  1167. model.setValue("/root/send/minrnum",minrnum);
  1168. model.setValue("/root/send/maxrnum",maxrnum);
  1169. submit("TRPID20701");
  1170. }
  1171. }
  1172. ]]>
  1173. </script>
  1174. </xhtml:head>
  1175. <xhtml:body pagewidth="1170" pageheight="760" guideline="1,1145;2,727;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  1176. <group id="grp_rpt_hidden1" visibility="hidden" style="left:155px; top:85px; width:30px; height:15px; "/>
  1177. <group id="grp_rpt_hidden2" visibility="hidden" style="left:155px; top:85px; width:30px; height:15px; "/>
  1178. <group id="group1" style="left:0px; top:0px; width:1145px; height:13px; ">
  1179. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:142px; height:13px; ">환자 청구명세서 출력</caption>
  1180. </group>
  1181. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1145px; height:714px; ">
  1182. <datagrid id="grd_autoxls" nodeset="/root/main2/list1/clbs" visibility="hidden" caption="명세서일련번호^조합^조합명^환자명^등록번호^주민등록번호^사고접수번호^청구시작일자^청구종료일자^청구과코드^청구과명^청구액(선택진료비)^선택진료비" colsep="^" colwidth="100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:225px; top:60px; width:705px; height:80px; ">
  1183. <col ref="docuseqno"/>
  1184. <col ref="insuno"/>
  1185. <col ref="insucdnm"/>
  1186. <col ref="patnm"/>
  1187. <col ref="pid"/>
  1188. <col ref="patrrgstno"/>
  1189. <col ref="acdacptno"/>
  1190. <col ref="ordfromdd" format="yyyy-mm-dd"/>
  1191. <col ref="ordtodd" format="yyyy-mm-dd"/>
  1192. <col ref="clamdeptcd"/>
  1193. <col ref="clamdeptnm"/>
  1194. <col ref="edimedcaretotamt" format="#,###"/>
  1195. <col ref="specamt" format="#,###"/>
  1196. </datagrid>
  1197. <group id="group2" style="left:0px; top:10px; width:1145px; height:59px; vertical-align:top; ">
  1198. <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:1145px; height:59px; "/>
  1199. <caption id="caption3" class="search_name" style="left:275px; top:9px; width:86px; height:17px; ">내원형태 :</caption>
  1200. <line id="line13" style="x1:1108px; y1:31px; x2:1108px; y2:53px; border-color:#ffe4bb; border-left-style:solid; "/>
  1201. <button id="btn_search" class="btn1_letter2" navindex="11" style="left:1083px; top:19px; width:56px; height:22px; ">
  1202. <caption>조회</caption>
  1203. <script type="javascript" ev:event="DOMActivate">
  1204. <![CDATA[
  1205. // 조회 클릭
  1206. fGetPatClamDocuPrntList();
  1207. ]]>
  1208. </script>
  1209. </button>
  1210. <caption id="caption1" class="search_name" style="left:10px; top:33px; width:86px; height:17px; ">청구구분 :</caption>
  1211. <caption id="caption7" class="search_name" style="left:275px; top:33px; width:86px; height:17px; ">조회조건 :</caption>
  1212. <select1 id="cmb_ioflag" ref="/root/send/ioflag" class="combo_search" navindex="3" appearance="minimal" style="left:364px; top:8px; width:76px; height:19px; ">
  1213. <choices>
  1214. <item>
  1215. <label>전체</label>
  1216. <value>-</value>
  1217. </item>
  1218. <item>
  1219. <label>입원</label>
  1220. <value>I</value>
  1221. </item>
  1222. <item>
  1223. <label>외래</label>
  1224. <value>O</value>
  1225. </item>
  1226. </choices>
  1227. </select1>
  1228. <select1 id="cmb_clamflagcd" ref="/root/send/clamflagcd" class="combo_search" navindex="7" appearance="minimal" style="left:99px; top:32px; width:90px; height:19px; ">
  1229. <choices>
  1230. <itemset nodeset="/root/init/P0155list/P0155">
  1231. <label ref="cdnm"/>
  1232. <value ref="cdid"/>
  1233. </itemset>
  1234. </choices>
  1235. </select1>
  1236. <caption id="caption9" class="search_name" style="left:675px; top:9px; width:86px; height:17px; ">보험유형 :</caption>
  1237. <select1 id="cmb_sumtypecd" ref="/root/send/sumtypecd" class="combo_search" navindex="4" appearance="minimal" style="left:553px; top:8px; width:90px; height:19px; ">
  1238. <choices>
  1239. <itemset nodeset="/root/init/P0458list/P0458">
  1240. <label ref="cdnm"/>
  1241. <value ref="cdid"/>
  1242. </itemset>
  1243. </choices>
  1244. </select1>
  1245. <select1 id="cmb_insukind" ref="/root/send/insukind" class="combo_search" navindex="5" appearance="minimal" style="left:764px; top:8px; width:90px; height:19px; ">
  1246. <choices>
  1247. <itemset nodeset="/root/init/P0008list/P0008">
  1248. <label ref="cdnm"/>
  1249. <value ref="cdid"/>
  1250. </itemset>
  1251. </choices>
  1252. <script type="javascript" ev:event="xforms-value-changed">
  1253. <![CDATA[
  1254. var insukind = model.getValue("/root/send/insukind");
  1255. if (insukind) {
  1256. cmb_suppkind.disabled = false;
  1257. cmb_suppkind.choices.itemset.attribute("nodeset") = "root/init/suppkind/suppkindlist[up='" + insukind + "' or up='-' ]";
  1258. } else {
  1259. cmb_suppkind.disabled = true;
  1260. model.resetInstanceNode("/root/send/suppkind");
  1261. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/init/P0010list/P0010";
  1262. }
  1263. if (insukind == "31") {
  1264. cmb_insunm.attribute("visibility") = "visible";
  1265. cp_insucd.attribute("visibility") = "visible";
  1266. cp_delyn.attribute("left") = "760px";
  1267. bool_delyn.attribute("left") = "840px";
  1268. cmb_insunm.select(0);
  1269. } else {
  1270. cmb_insunm.attribute("visibility") = "hidden";
  1271. cp_insucd.attribute("visibility") = "hidden";
  1272. cp_delyn.attribute("left") = "880px";
  1273. bool_delyn.attribute("left") = "960px";
  1274. model.setValue("/root/send/insucd","");
  1275. }
  1276. model.refresh();
  1277. ]]>
  1278. </script>
  1279. </select1>
  1280. <caption id="caption11" class="search_name" style="left:464px; top:9px; width:86px; height:17px; ">진료분야 :</caption>
  1281. <select1 id="cmb_srcflag" ref="/root/send/srcflag" class="combo_search" navindex="8" appearance="minimal" style="left:364px; top:32px; width:76px; height:19px; ">
  1282. <choices>
  1283. <item>
  1284. <label/>
  1285. <value>0</value>
  1286. </item>
  1287. <item>
  1288. <label>명번호</label>
  1289. <value>1</value>
  1290. </item>
  1291. <item>
  1292. <label>환자번호</label>
  1293. <value>2</value>
  1294. </item>
  1295. </choices>
  1296. <script type="javascript" ev:event="xforms-value-changed">
  1297. <![CDATA[
  1298. var srcflag = model.getValue("/root/send/srcflag");
  1299. if (srcflag == "0") {
  1300. ipt_docuseqno1.value = "";
  1301. ipt_docuseqno2.value = "";
  1302. ipt_docuseqno1.disabled = true;
  1303. ipt_docuseqno2.disabled = true;
  1304. } else if (srcflag == "1") {
  1305. ipt_docuseqno1.disabled = false;
  1306. ipt_docuseqno2.disabled = false;
  1307. } else if (srcflag == "2") {
  1308. ipt_docuseqno1.disabled = false;
  1309. ipt_docuseqno2.disabled = true;
  1310. }
  1311. model.refresh();
  1312. ]]>
  1313. </script>
  1314. </select1>
  1315. <caption id="caption13" class="search_name" style="left:464px; top:33px; width:86px; height:17px; ">시작번호 :</caption>
  1316. <input id="ipt_docuseqno1" ref="/root/send/docuseqno1" class="input_search" disabled="true" navindex="9" format="9999999999" style="left:553px; top:32px; width:90px; height:19px; ">
  1317. <script type="javascript" ev:event="onkeyup">
  1318. <![CDATA[
  1319. setInputNodeCurText();
  1320. if (event.keyCode == '13') {
  1321. if (cmb_srcflag.value == "2") {
  1322. btn_search.dispatch("DOMActivate");
  1323. } else if (cmb_srcflag.value == "1") {
  1324. model.setFocus("ipt_docuseqno2");
  1325. }
  1326. }
  1327. ]]>
  1328. </script>
  1329. </input>
  1330. <input id="ipt_docuseqno2" ref="/root/send/docuseqno2" class="input_search" disabled="true" navindex="10" format="9999999999" style="left:659px; top:32px; width:90px; height:19px; ">
  1331. <script type="javascript" ev:event="onkeyup">
  1332. <![CDATA[
  1333. setInputNodeCurText();
  1334. if (event.keyCode == '13') {
  1335. btn_search.dispatch("DOMActivate");
  1336. }
  1337. ]]>
  1338. </script>
  1339. </input>
  1340. <select1 id="cmb_suppkind" ref="/root/send/suppkind" class="combo_search" navindex="6" appearance="minimal" style="left:969px; top:8px; width:90px; height:19px; ">
  1341. <choices>
  1342. <itemset nodeset="/root/init/P0010list/P0010">
  1343. <label ref="cdnm"/>
  1344. <value ref="cdid"/>
  1345. </itemset>
  1346. </choices>
  1347. </select1>
  1348. <caption id="caption5" class="search_name" style="left:880px; top:9px; width:86px; height:17px; ">보조유형 :</caption>
  1349. <caption id="cp_delyn" class="search_name" style="left:760px; top:33px; width:86px; height:17px; ">삭제포함</caption>
  1350. <bool id="bool_delyn" ref="/root/send/judgendyn" style="left:840px; top:31px; width:30px; height:20px; "/>
  1351. <select1 id="cmb_insunm" ref="/root/send/insucd" class="combo_search" navindex="6" visibility="hidden" appearance="minimal" style="left:969px; top:32px; width:90px; height:19px; ">
  1352. <choices>
  1353. <itemset nodeset="/root/init/insucdlist/list">
  1354. <label ref="insucdnm"/>
  1355. <value ref="insucd"/>
  1356. </itemset>
  1357. </choices>
  1358. </select1>
  1359. <caption id="caption12" style="left:646px; top:35px; width:15px; height:20px; ">~</caption>
  1360. <caption id="cp_insucd" class="search_name" visibility="hidden" style="left:880px; top:33px; width:88px; height:17px; ">손보사 :</caption>
  1361. </group>
  1362. <group id="group4" style="left:0px; top:100px; width:1145px; height:555px; ">
  1363. <datagrid id="grd_clbsmast" nodeset="/root/main/list1/clbs" class="datagrid2" caption="급^비^All^명세서&#xA;일련번호^청구년월^청구&#xA;차수^내원&#xA;형태^청구구분^진료과^진료분야^등록번호^pidsn^환자명^성&#xA;별^나&#xA;이^보험&#xA;유형^보조&#xA;유형^진료의^장&#xA;애^조합기호^조합기호명칭^총진료비^주민번호^청구번호^접수번호^심사차수^사&#xA;망^분할&#xA;청구^judgendyn^심사완료여부" colsep="^" colwidth="25, 25, 25, 56, 55, 31, 41, 60, 70, 89, 55, 40, 45, 25, 25, 35, 35, 45, 25, 80, 100, 74, 90, 70, 55, 55, 25, 35, 100, 100" dataheight="23" ellipsis="true" explorerbar="sortshowmove" extendlastcol="scroll" frozencols="5" mergecellsfixedcols="bycol" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:0px; top:0px; width:1145px; height:549px; ">
  1364. <col ref="chksel" type="checkbox"/>
  1365. <col ref="chkpay" type="checkbox"/>
  1366. <col ref="chkall" type="checkbox"/>
  1367. <col ref="docuseqno" style="text-align:center; "/>
  1368. <col ref="clamym" format="yyyy/mm"/>
  1369. <col ref="clamdg" style="text-align:center; "/>
  1370. <col disabled="true" ref="ioflag" type="combo" style="text-align:center; ">
  1371. <choices>
  1372. <item>
  1373. <label>-</label>
  1374. <value>-</value>
  1375. </item>
  1376. <item>
  1377. <label>입원</label>
  1378. <value>I</value>
  1379. </item>
  1380. <item>
  1381. <label>외래</label>
  1382. <value>O</value>
  1383. </item>
  1384. </choices>
  1385. </col>
  1386. <col disabled="true" ref="clamflagcd" type="combo" style="text-align:left; ">
  1387. <choices>
  1388. <itemset nodeset="/root/init/P0155list/P0155">
  1389. <label ref="cdnm"/>
  1390. <value ref="cdid"/>
  1391. </itemset>
  1392. </choices>
  1393. </col>
  1394. <col ref="orddeptcd"/>
  1395. <col disabled="true" ref="sumtypecd" type="combo">
  1396. <choices>
  1397. <itemset nodeset="/root/init/P0458list/P0458">
  1398. <label ref="cdnm"/>
  1399. <value ref="cdid"/>
  1400. </itemset>
  1401. </choices>
  1402. </col>
  1403. <col ref="pid"/>
  1404. <col ref="pidsn" visibility="hidden"/>
  1405. <col ref="patnm"/>
  1406. <col ref="gender" style="text-align:center; "/>
  1407. <col ref="patage" style="text-align:center; "/>
  1408. <col ref="insukindcd" style="text-align:center; "/>
  1409. <col ref="suppkindcd" style="text-align:center; "/>
  1410. <col ref="orddrnm"/>
  1411. <col ref="prockindflag"/>
  1412. <col ref="insuno"/>
  1413. <col ref="insucdnm"/>
  1414. <col ref="ediinsuclamamt" format="#,###" style="text-align:right; "/>
  1415. <col ref="patrrgstno" format="999999-9999999"/>
  1416. <col ref="clamno"/>
  1417. <col ref="acptno"/>
  1418. <col ref="judgdg"/>
  1419. <col ref="dethyn"/>
  1420. <col ref="divclam"/>
  1421. <col ref="judgendyn" visibility="hidden"/>
  1422. <col ref="judgendynnm"/>
  1423. <script type="javascript" ev:event="onaftersort">
  1424. <![CDATA[
  1425. // 정렬 후 요걸 해줘야 현재 보이는 그리드와 인스턴스가 매치가 된다.
  1426. grd_clbsmast.gridToInstance();
  1427. ]]>
  1428. </script>
  1429. <script type="javascript" ev:event="ondblclick">
  1430. <![CDATA[
  1431. if(isDataCell()){
  1432. var row = grd_clbsmast.row;
  1433. model.setValue("/root/send/clamym" , model.getValue("/root/main/list1/clbs["+row+"]/clamym"));
  1434. model.setValue("/root/send/clamdg" , model.getValue("/root/main/list1/clbs["+row+"]/clamdg"));
  1435. model.setValue("/root/send/ioflag" , model.getValue("/root/main/list1/clbs["+row+"]/ioflag"));
  1436. model.setValue("/root/send/pid" , model.getValue("/root/main/list1/clbs["+row+"]/pid"));
  1437. model.setValue("/root/send/pidsn" , model.getValue("/root/main/list1/clbs["+row+"]/pidsn"));
  1438. }
  1439. ]]>
  1440. </script>
  1441. </datagrid>
  1442. <group id="grp_instimg" visibility="hidden" style="left:25px; top:65px; width:170px; height:170px; border-color:#333333; border-style:solid; ">
  1443. <img id="img_hidden" visibility="hidden" style="left:15px; top:3px; width:117px; height:115px; "/>
  1444. <img id="img_view" ref="/root/send/imgdata/photimg" style="left:26px; top:9px; width:117px; height:115px; background-stretch:stretch; border-color:#333333; border-style:solid; "/>
  1445. <button id="btn_fileupload" class="btn2_letter9" style="left:26px; top:134px; width:119px; height:19px; text-align:center; ">
  1446. <caption>직 인 변 경</caption>
  1447. <script type="javascript" ev:event="DOMActivate">
  1448. <![CDATA[
  1449. var file = openImageFileDialog(1048576); // image 파일이 너무 크면 submit 시간이 매우 오래(5분이상) 걸리므로 가급적 사이즈를 작게 제한한다.
  1450. if (file == "") {
  1451. return;
  1452. }
  1453. fChangeImage(file);
  1454. ]]>
  1455. </script>
  1456. </button>
  1457. </group>
  1458. </group>
  1459. <button id="button4" class="btn2_letter4" style="left:130px; top:73px; width:64px; height:19px; ">
  1460. <caption>직인보기</caption>
  1461. <script type="javascript" ev:event="DOMActivate">
  1462. <![CDATA[
  1463. if ( grp_instimg.visible == false ) {
  1464. grp_instimg.visible = true;
  1465. } else {
  1466. grp_instimg.visible = false;
  1467. }
  1468. ]]>
  1469. </script>
  1470. </button>
  1471. </group>
  1472. <group id="grp_btn" style="left:0px; top:700px; width:1145px; height:27px; ">
  1473. <button id="button10" class="btn4_letter3" style="left:1077px; top:5px; width:68px; height:22px; ">
  1474. <caption>초기화</caption>
  1475. <script type="javascript" ev:event="DOMActivate">
  1476. <![CDATA[
  1477. // 초기화
  1478. fInitSrchData();
  1479. model.refresh();
  1480. ]]>
  1481. </script>
  1482. </button>
  1483. <button id="btn_print" class="btn6_letter2" style="left:0px; top:5px; width:56px; height:22px; ">
  1484. <caption>출력</caption>
  1485. <script type="javascript" ev:event="DOMActivate">
  1486. <![CDATA[
  1487. model.setValue("/root/previewyn","true"); // 미리보기 없음
  1488. fPrintView();
  1489. ]]>
  1490. </script>
  1491. </button>
  1492. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:700px; y2:0px; "/>
  1493. <button id="button1" class="btn6_letter4" style="left:65px; top:5px; width:80px; height:22px; ">
  1494. <caption>미리보기</caption>
  1495. <script type="javascript" ev:event="DOMActivate">
  1496. <![CDATA[
  1497. model.setValue("/root/previewyn","false"); // 미리보기 있음
  1498. fPrintView();
  1499. ]]>
  1500. </script>
  1501. </button>
  1502. <button id="button2" class="btn6_letter5" style="left:155px; top:5px; width:80px; height:22px; ">
  1503. <caption>자보리스트</caption>
  1504. <script type="javascript" ev:event="DOMActivate">
  1505. <![CDATA[
  1506. // 데이터를 가꼬와서 감챠논 그리드에 뿌리고 그 데이터를 엑셀로 저장할 수 있게 한다.
  1507. fGetPatClamAutoXlsList();
  1508. ]]>
  1509. </script>
  1510. </button>
  1511. <button id="button3" class="btn4_letter5" style="left:980px; top:5px; width:92px; height:22px; ">
  1512. <caption>다음페이지</caption>
  1513. <script type="javascript" ev:event="DOMActivate">
  1514. <![CDATA[
  1515. // 500건으로 조회 건수 제한
  1516. if ( grd_clbsmast.rows == 501 )
  1517. {
  1518. fNextpage();
  1519. }
  1520. else
  1521. {
  1522. messageBox("마지막 페이지 ","E008");
  1523. }
  1524. ]]>
  1525. </script>
  1526. </button>
  1527. <select id="chk_imgprtyn" ref="/root/send/imgdata/imgprtyn" overflow="visible" appearance="full" style="left:275px; top:7px; width:105px; height:15px; border-style:none; ">
  1528. <choices>
  1529. <item>
  1530. <label>직인출력(자보)</label>
  1531. <value>Y</value>
  1532. </item>
  1533. </choices>
  1534. <script type="javascript" ev:event="xforms-value-changed">
  1535. <![CDATA[
  1536. if ( model.getValue("/root/send/imgdata/imgprtyn") == "Y"
  1537. && model.getValue("/root/send/imgdata/photimg") == ""
  1538. ) {
  1539. model.setValue("/root/send/imgdata/imgprtyn","");
  1540. model.refreshpart("/root/send/imgdata/imgprtyn");
  1541. messageBox("저장된 직인이미지가 없어 선택할수","I004");
  1542. }
  1543. ]]>
  1544. </script>
  1545. </select>
  1546. <button id="button5" class="btn3_letter6" style="left:390px; top:5px; width:104px; height:22px; ">
  1547. <caption>진료비내역서</caption>
  1548. <script type="javascript" ev:event="DOMActivate">
  1549. <![CDATA[
  1550. var rows = grd_clbsmast.rows;
  1551. var chksel = "";
  1552. var chkpay = "";
  1553. var chkall = "";
  1554. var isprnt = "";
  1555. glb_i = 0; // 20100218 초기화추가
  1556. chkcnt = 0; // 20100218 초기화추가
  1557. chkArr = new Array(); // 20100218 배열초기화
  1558. // 출력체크 여부와 체크된 행을 저장해 둔다
  1559. for (i=1; i<rows; i++) {
  1560. chksel = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chksel")); // 급여출력여부
  1561. chkpay = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkpay")); // 비급여출력여부
  1562. chkall = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkall")); // 급여+비급여출력여부
  1563. if (chksel == "true" || chkpay == "true" || chkall == "true") {
  1564. isprnt = "true";
  1565. chkArr[chkcnt] = i;
  1566. chkcnt++;
  1567. // i = rows; 이건 뭐냐. 이해 안되서 주석처리
  1568. }
  1569. }
  1570. // 2. 출력
  1571. if (isprnt == "true") {
  1572. chksel = "";
  1573. chkpay = "";
  1574. chkall = ""; // 20100228 추가
  1575. // 지연출력을 위해 setInterval() 이용, 2초 간격으로 출력함수(delayPrint()) 호출함
  1576. if(model.getValue("/root/previewyn") == "true") {
  1577. timerID = window.setInterval("delayPrint()",2000);
  1578. } else {
  1579. // 기존 스크립트 2009.02.13 변경
  1580. for (var i=1; i<rows; i++) {
  1581. chksel = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chksel")); // 급여출력여부
  1582. chkpay = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkpay")); // 비급여출력여부
  1583. chkall = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkall")); // 급여+비급여출력여부
  1584. var ioflag = model.getValue("/root/main/list1/clbs["+i+"]/ioflag"); // 내원형태
  1585. var sumtypecd = model.getValue("/root/main/list1/clbs["+i+"]/sumtypecd"); // 진료분야
  1586. var insukind = model.getValue("/root/main/list1/clbs["+i+"]/insukindcd"); // 보험유형
  1587. // 급여명세서 조회를 위한 사후심사 key 값을 데이터로 만든다.
  1588. model.setValue("/root/send/item1/clamym", model.getValue("/root/main/list1/clbs["+i+"]/clamym"));
  1589. model.setValue("/root/send/item1/clamdg", model.getValue("/root/main/list1/clbs["+i+"]/clamdg"));
  1590. model.setValue("/root/send/item1/pid", model.getValue("/root/main/list1/clbs["+i+"]/pid"));
  1591. model.setValue("/root/send/item1/pidsn", model.getValue("/root/main/list1/clbs["+i+"]/pidsn"));
  1592. model.setValue("/root/send/item1/insukind", model.getValue("/root/main/list1/clbs["+i+"]/insukindcd"));
  1593. model.setValue("/root/send/item1/chkflag", "pay");
  1594. // 2-1. 급여 출력
  1595. if (chksel == "true") {
  1596. // 내원형태, 보험유형에 맞는 명세서를 출력한다.
  1597. switch (ioflag) {
  1598. case "-" :
  1599. break;
  1600. case "I" :
  1601. if (insukind == "31") {
  1602. model.setValue("/root/send/item1/pagenum", "33");
  1603. fPayment1();
  1604. } else {
  1605. model.setValue("/root/send/item1/pagenum", "37");
  1606. fPayment1(); // 일반 (의과입원)
  1607. }
  1608. break;
  1609. case "O" :
  1610. if (insukind == "31") {
  1611. model.setValue("/root/send/item1/pagenum", "33");
  1612. fPayment2(); // 자보 (의과외래)
  1613. } else {
  1614. model.setValue("/root/send/item1/pagenum", "37");
  1615. fPayment2(); // 일반 (의과외래)
  1616. }
  1617. break;
  1618. default :
  1619. }
  1620. }
  1621. // 2-2. 비급여 출력
  1622. model.setValue("/root/send/item1/chkflag", "nopay");
  1623. if (chkpay == "true") {
  1624. model.setValue("/root/send/item1/pagenum", "37");
  1625. fPayment3(); // 비급여
  1626. }
  1627. // 2-3. 급여+비급여 출력
  1628. model.setValue("/root/send/item1/chkflag", "all");
  1629. if (chkall == "true") {
  1630. // 내원형태, 보험유형에 맞는 명세서를 출력한다.
  1631. switch (ioflag) {
  1632. case "-" :
  1633. break;
  1634. case "I" :
  1635. if (insukind == "31") {
  1636. model.setValue("/root/send/item1/pagenum", "33");
  1637. fPayment1(); // 자보 (의과입원)
  1638. } else {
  1639. model.setValue("/root/send/item1/pagenum", "37");
  1640. fPayment1(); // 일반 (의과입원)
  1641. }
  1642. break;
  1643. case "O" :
  1644. if (insukind == "31") {
  1645. model.setValue("/root/send/item1/pagenum", "33");
  1646. fPayment2(); // 자보 (의과외래)
  1647. } else {
  1648. model.setValue("/root/send/item1/pagenum", "37");
  1649. fPayment2(); // 일반 (의과외래)
  1650. }
  1651. break;
  1652. default :
  1653. }
  1654. }
  1655. }
  1656. }
  1657. } else {
  1658. messageBox("출력할 환자 청구명세서가 선택되지", "E007");
  1659. }
  1660. ]]>
  1661. </script>
  1662. </button>
  1663. <button id="button6" class="btn3_letter8" style="left:500px; top:5px; width:128px; height:22px; ">
  1664. <caption>산보진료비내역서</caption>
  1665. <script type="javascript" ev:event="DOMActivate">
  1666. <![CDATA[
  1667. var rows = grd_clbsmast.rows;
  1668. var chksel = "";
  1669. var chkpay = "";
  1670. var chkall = "";
  1671. var isprnt = "";
  1672. glb_i = 0; // 20100218 초기화추가
  1673. chkcnt = 0; // 20100218 초기화추가
  1674. chkArr = new Array(); // 20100218 배열초기화
  1675. // 출력체크 여부와 체크된 행을 저장해 둔다
  1676. for (i=1; i<rows; i++) {
  1677. chksel = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chksel")); // 급여출력여부
  1678. chkpay = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkpay")); // 비급여출력여부
  1679. chkall = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkall")); // 급여+비급여출력여부
  1680. if (chksel == "true" || chkpay == "true" || chkall == "true") {
  1681. isprnt = "true";
  1682. chkArr[chkcnt] = i;
  1683. chkcnt++;
  1684. // i = rows; 이건 뭐냐. 이해 안되서 주석처리
  1685. }
  1686. }
  1687. // 2. 출력
  1688. if (isprnt == "true") {
  1689. chksel = "";
  1690. chkpay = "";
  1691. chkall = ""; // 20100228 추가
  1692. // 지연출력을 위해 setInterval() 이용, 2초 간격으로 출력함수(delayPrint()) 호출함
  1693. if(model.getValue("/root/previewyn") == "true") {
  1694. timerID = window.setInterval("delayPrint()",2000);
  1695. } else {
  1696. // 기존 스크립트 2009.02.13 변경
  1697. for (var i=1; i<rows; i++) {
  1698. chksel = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chksel")); // 급여출력여부
  1699. chkpay = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkpay")); // 비급여출력여부
  1700. chkall = grd_clbsmast.valueMatrix(i, grd_clbsmast.colRef("chkall")); // 급여+비급여출력여부
  1701. var ioflag = model.getValue("/root/main/list1/clbs["+i+"]/ioflag"); // 내원형태
  1702. var sumtypecd = model.getValue("/root/main/list1/clbs["+i+"]/sumtypecd"); // 진료분야
  1703. var insukind = model.getValue("/root/main/list1/clbs["+i+"]/insukindcd"); // 보험유형
  1704. // 급여명세서 조회를 위한 사후심사 key 값을 데이터로 만든다.
  1705. model.setValue("/root/send/item1/clamym", model.getValue("/root/main/list1/clbs["+i+"]/clamym"));
  1706. model.setValue("/root/send/item1/clamdg", model.getValue("/root/main/list1/clbs["+i+"]/clamdg"));
  1707. model.setValue("/root/send/item1/pid", model.getValue("/root/main/list1/clbs["+i+"]/pid"));
  1708. model.setValue("/root/send/item1/pidsn", model.getValue("/root/main/list1/clbs["+i+"]/pidsn"));
  1709. model.setValue("/root/send/item1/insukind", model.getValue("/root/main/list1/clbs["+i+"]/insukindcd"));
  1710. model.setValue("/root/send/item1/chkflag", "pay");
  1711. // 2-1. 급여 출력
  1712. if (chksel == "true") {
  1713. // 내원형태, 보험유형에 맞는 명세서를 출력한다.
  1714. switch (ioflag) {
  1715. case "-" :
  1716. break;
  1717. case "I" :
  1718. if (insukind == "31") {
  1719. model.setValue("/root/send/item1/pagenum", "33");
  1720. fAccidPayment1();
  1721. } else {
  1722. model.setValue("/root/send/item1/pagenum", "37");
  1723. fAccidPayment1(); // 일반 (의과입원)
  1724. }
  1725. break;
  1726. case "O" :
  1727. if (insukind == "31") {
  1728. model.setValue("/root/send/item1/pagenum", "33");
  1729. fAccidPayment2(); // 자보 (의과외래)
  1730. } else {
  1731. model.setValue("/root/send/item1/pagenum", "37");
  1732. fAccidPayment2(); // 일반 (의과외래)
  1733. }
  1734. break;
  1735. default :
  1736. }
  1737. }
  1738. // 2-2. 비급여 출력
  1739. model.setValue("/root/send/item1/chkflag", "nopay");
  1740. if (chkpay == "true") {
  1741. model.setValue("/root/send/item1/pagenum", "37");
  1742. fAccidPayment3(); // 비급여
  1743. }
  1744. // 2-3. 급여+비급여 출력
  1745. model.setValue("/root/send/item1/chkflag", "all");
  1746. if (chkall == "true") {
  1747. // 내원형태, 보험유형에 맞는 명세서를 출력한다.
  1748. switch (ioflag) {
  1749. case "-" :
  1750. break;
  1751. case "I" :
  1752. if (insukind == "31") {
  1753. model.setValue("/root/send/item1/pagenum", "33");
  1754. fAccidPayment1(); // 자보 (의과입원)
  1755. } else {
  1756. model.setValue("/root/send/item1/pagenum", "37");
  1757. fAccidPayment1(); // 일반 (의과입원)
  1758. }
  1759. break;
  1760. case "O" :
  1761. if (insukind == "31") {
  1762. model.setValue("/root/send/item1/pagenum", "33");
  1763. fAccidPayment2(); // 자보 (의과외래)
  1764. } else {
  1765. model.setValue("/root/send/item1/pagenum", "37");
  1766. fAccidPayment2(); // 일반 (의과외래)
  1767. }
  1768. break;
  1769. default :
  1770. }
  1771. }
  1772. }
  1773. }
  1774. } else {
  1775. messageBox("출력할 환자 청구명세서가 선택되지", "E007");
  1776. }
  1777. ]]>
  1778. </script>
  1779. </button>
  1780. <button id="button7" class="btn3_letter9" style="left:635px; top:5px; width:140px; height:22px; ">
  1781. <caption>의료급여비용명세서</caption>
  1782. <script type="javascript" ev:event="DOMActivate">
  1783. <![CDATA[
  1784. submit("TRPID20301");
  1785. exeReportPreview("RFPID21000", "XMLSTR", "", "", "false", "", "", "", "", "","", "", "", "", "", "1", "");
  1786. ]]>
  1787. </script>
  1788. </button>
  1789. </group>
  1790. <caption id="cap_judgtrgtman" class="tit_2" style="left:5px; top:94px; width:135px; height:13px; ">환자 청구명세서</caption>
  1791. <line id="line1" class="line_1" style="x1:0px; y1:111px; x2:1145px; y2:111px; "/>
  1792. <output id="opt_totcnt" ref="/root/hidden/clbs/totcnt" class="output_fix" style="left:75px; top:678px; width:85px; height:19px; "/>
  1793. <caption id="caption10" class="cell_1" style="left:0px; top:677px; width:72px; height:23px; ">총건수</caption>
  1794. <line id="line2" class="line_3" style="x1:0px; y1:675px; x2:1145px; y2:675px; "/>
  1795. <line id="line3" class="line_3" style="x1:0px; y1:699px; x2:1145px; y2:699px; "/>
  1796. <caption id="caption8" class="cell_1" style="left:162px; top:676px; width:983px; height:23px; "/>
  1797. <button id="btn_cancel" class="btn2_letter4" style="left:1079px; top:90px; width:64px; height:19px; ">
  1798. <caption>선택취소</caption>
  1799. <script type="javascript" ev:event="DOMActivate">
  1800. <![CDATA[
  1801. var rows = grd_clbsmast.rows;
  1802. for (i=1; i<rows; i++) {
  1803. model.setValue("/root/main/list1/clbs[" + i + "]/chksel", "false");
  1804. model.setValue("/root/main/list1/clbs[" + i + "]/chkpay", "false");
  1805. model.setValue("/root/main/list1/clbs[" + i + "]/chkall", "false");
  1806. }
  1807. model.refresh();
  1808. ]]>
  1809. </script>
  1810. </button>
  1811. <button id="btn_all" class="btn2_letter4" style="left:1012px; top:90px; width:64px; height:19px; ">
  1812. <caption>전체선택</caption>
  1813. <script type="javascript" ev:event="DOMActivate">
  1814. <![CDATA[
  1815. var rows = grd_clbsmast.rows;
  1816. for (i=1; i<rows; i++) {
  1817. model.setValue("/root/main/list1/clbs[" + i + "]/chksel", "true");
  1818. }
  1819. model.refresh();
  1820. ]]>
  1821. </script>
  1822. </button>
  1823. <button id="btn_down" class="icon_down" style="left:173px; top:41px; width:10px; height:9px; ">
  1824. <caption/>
  1825. <script type="javascript" ev:event="onclick">
  1826. <![CDATA[
  1827. // 청구년월 이전월
  1828. var nowym = model.getValue("/root/send/clamym");
  1829. var downym;
  1830. downym = pidfCalMonth(-1, nowym);
  1831. model.setValue("/root/send/clamym", downym);
  1832. ipt_clamym.refresh();
  1833. // 청구년월에 대한 청구차수 조회
  1834. pidfGetClamdg();
  1835. addComboItem("cmb_clamdg" , "전체","0","above");
  1836. model.setValue("/root/send/clamdg", 0);
  1837. // model.makeValue("/root/init/clamdg/clamdglist["+ cmb_clamdg.length+1 +"]/clamdgnm", "전체");
  1838. // model.makeValue("/root/init/clamdg/clamdglist["+ cmb_clamdg.length+1 +"]/clamdgcd", 0);
  1839. cmb_clamdg.refresh();
  1840. ]]>
  1841. </script>
  1842. </button>
  1843. <select1 id="cmb_clamdg" ref="/root/send/clamdg" navindex="2" appearance="minimal" style="left:188px; top:31px; width:62px; height:19px; ">
  1844. <choices>
  1845. <itemset nodeset="/root/init/clamdg/clamdglist">
  1846. <label ref="clamdgnm"/>
  1847. <value ref="clamdgcd"/>
  1848. </itemset>
  1849. </choices>
  1850. </select1>
  1851. <caption id="caption2" class="search_name" style="left:10px; top:31px; width:86px; height:17px; ">청구년월 :</caption>
  1852. <button id="btn_up" class="icon_up" style="left:173px; top:31px; width:10px; height:9px; ">
  1853. <caption/>
  1854. <script type="javascript" ev:event="onclick">
  1855. <![CDATA[
  1856. // 청구년월 다음월
  1857. var nowym = model.getValue("/root/send/clamym");
  1858. var upym;
  1859. upym = pidfCalMonth(1, nowym);
  1860. model.setValue("/root/send/clamym", upym);
  1861. ipt_clamym.refresh();
  1862. // 청구년월에 대한 청구차수 조회
  1863. pidfGetClamdg();
  1864. addComboItem("cmb_clamdg" , "전체","0","above");
  1865. model.setValue("/root/send/clamdg", 0);
  1866. // model.makeValue("/root/init/clamdg/clamdglist["+ cmb_clamdg.length+1 +"]/clamdgnm", "전체");
  1867. // model.makeValue("/root/init/clamdg/clamdglist["+ cmb_clamdg.length+1 +"]/clamdgcd", 0);
  1868. cmb_clamdg.refresh();
  1869. ]]>
  1870. </script>
  1871. </button>
  1872. <input id="ipt_clamym" ref="/root/send/clamym" class="input_search" navindex="1" inputtype="date" format="yyyy-mm" showmask="true" style="left:100px; top:31px; width:69px; height:19px; text-align:center; ">
  1873. <script type="javascript" ev:event="xforms-value-changed">
  1874. <![CDATA[
  1875. // 청구년월에 대한 청구차수 조회
  1876. pidfGetClamdg();
  1877. addComboItem("cmb_clamdg" , "전체","0","above");
  1878. model.setValue("/root/send/clamdg", 0);
  1879. // model.makeValue("/root/init/clamdg/clamdglist["+ cmb_clamdg.length+1 +"]/clamdgnm", "전체");
  1880. // model.makeValue("/root/init/clamdg/clamdglist["+ cmb_clamdg.length+1 +"]/clamdgcd", 0);
  1881. cmb_clamdg.refresh();
  1882. ]]>
  1883. </script>
  1884. </input>
  1885. <line id="line4" class="line_4" style="x1:1075px; y1:35px; x2:1075px; y2:70px; "/>
  1886. <button id="button8" class="btn2_letter2" style="left:967px; top:90px; width:42px; height:19px; ">
  1887. <caption>출력</caption>
  1888. <script type="javascript" ev:event="DOMActivate">
  1889. <![CDATA[
  1890. model.setValue("/root/previewyn","true"); // 미리보기 없음
  1891. fPrintView();
  1892. ]]>
  1893. </script>
  1894. </button>
  1895. </xhtml:body>
  1896. </xhtml:html>