SMPIR31000_정산의뢰생성.xrw 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266
  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. <send>
  10. <data0>
  11. <acptno/>
  12. </data0>
  13. <data1>
  14. <srchflag/>
  15. <acptno/>
  16. <judgdg/>
  17. <clamno/>
  18. <docuseqno/>
  19. <obtappflag>1</obtappflag>
  20. </data1>
  21. <data2/>
  22. <data3/>
  23. <data4/>
  24. <send_obtmlist>
  25. <acptno/>
  26. <judgdg/>
  27. <clamno/>
  28. <docuseqno/>
  29. <obtappflag/>
  30. </send_obtmlist>
  31. <send_end>
  32. <judgdg/>
  33. <clamno/>
  34. <acptno/>
  35. <obtappflag/>
  36. <notidd/>
  37. <obtappdd/>
  38. <obtappdocuno/>
  39. <status/>
  40. <endflag/>
  41. <obtappendflag/>
  42. <indendyn/>
  43. </send_end>
  44. </send>
  45. <main>
  46. <item1>
  47. <clbs>
  48. <acptno/>
  49. <judgdg/>
  50. <setno/>
  51. <docuseqno/>
  52. <indd/>
  53. <dschdd/>
  54. <ordfromdd/>
  55. <ordtodd/>
  56. <pid/>
  57. <patnm/>
  58. <fstrgstdt/>
  59. <insukind/>
  60. <suppkind/>
  61. <newinsukind/>
  62. <newsuppkind/>
  63. <payownbrate/>
  64. <edimedcaretotamt/>
  65. <ediinsuclamamt/>
  66. <edihandcaprfund/>
  67. <edisuppamt/>
  68. <ediownbmaxexamt/>
  69. <clamym/>
  70. <clamdg/>
  71. <pidsn/>
  72. <obtappamt/>
  73. <obtsuppamt/>
  74. <obtownbmaxamt/>
  75. <obtappflag/>
  76. <obtapprem/>
  77. <offcharm/>
  78. <rareobstflag/>
  79. <vcode/>
  80. <serdiagno/>
  81. <obtapprem/>
  82. </clbs>
  83. </item1>
  84. <list1>
  85. <clod/>
  86. </list1>
  87. <item2/>
  88. <item3/>
  89. </main>
  90. <init>
  91. <item1>
  92. <acptno/>
  93. <judgdg/>
  94. <docuseqno/>
  95. <clamno/>
  96. <srchflag/>
  97. </item1>
  98. <list1>
  99. <judg/>
  100. </list1>
  101. <!-- 보험유형 -->
  102. <P0008list>
  103. <P0008>
  104. <cdnm/>
  105. <cdid/>
  106. </P0008>
  107. </P0008list>
  108. <!-- 보조유형 -->
  109. <P0010list>
  110. <P0010>
  111. <cdnm/>
  112. <cdid/>
  113. </P0010>
  114. </P0010list>
  115. <P0322list/>
  116. <!-- 공상구분코드 -->
  117. <P0236list/>
  118. </init>
  119. <hidden>
  120. <obtappamt/>
  121. <obtsuppamt/>
  122. <obtownbmaxamt/>
  123. <obtappflag/>
  124. <obtapprem/>
  125. <sppir31110>
  126. <cond>
  127. <clamym/>
  128. <clamdg/>
  129. <pid/>
  130. <pidsn/>
  131. </cond>
  132. <rslt>
  133. <clod/>
  134. </rslt>
  135. </sppir31110>
  136. </hidden>
  137. </root>
  138. </instance>
  139. <script type="javascript" ev:event="xforms-ready">
  140. <![CDATA[
  141. // 0. Opener 에서 넘어왔는지 체크
  142. var acptno = model.getValue("/root/send/data0/acptno");
  143. // 0. Opener 에서 넘어왔는지 체크 (입원사후심사에서 호출)
  144. var acptno2 = model.getValue("/root/init/item1/acptno")
  145. // 1. 화면 초기화
  146. fInitialize();
  147. // 2. 공통코드 초기화
  148. zbcfGetCodeList(
  149. new Array("P0008","P0010"),
  150. new Array("/root/init/P0008list","/root/init/P0010list")
  151. );
  152. if (acptno != "") {
  153. model.setValue("/root/send/data1/acptno", acptno);
  154. ipt_acptno.refresh();
  155. fGetJudgdg();
  156. } else if (acptno2 != "") { // 입원사후심사에서 팝업으로 호출된경우(정산의뢰버튼 클릭시)
  157. model.makeValue("/root/init/list1/judg/judgdg", model.getValue("/root/init/item1/judgdg"));
  158. model.setValue("/root/send/data1/srchflag", model.getValue("/root/init/item1/srchflag"));
  159. model.setValue("/root/send/data1/acptno", model.getValue("/root/init/item1/acptno"));
  160. model.setValue("/root/send/data1/judgdg", model.getValue("/root/init/item1/judgdg"));
  161. model.setValue("/root/send/data1/docuseqno", model.getValue("/root/init/item1/docuseqno"));
  162. model.setValue("/root/send/data1/clamno", model.getValue("/root/init/item1/clamno"));
  163. model.setValue("/root/send/data1/obtappflag", "1");
  164. // 조회
  165. btn_search.dispatch("DOMActivate");
  166. }
  167. ]]>
  168. </script>
  169. <submission id="TRZBC00102" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  170. <submission id="TRPIR31001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/init/list1"/>
  171. <submission id="TRPIR31002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data1" resultref="/root/main/item1"/>
  172. <submission id="TXPIR31001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data2/clbs" resultref="/root/temp"/>
  173. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  174. <submission id="TXPIR31002" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data3" resultref="/root/temp"/>
  175. <submission id="TRPIR31004" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/data4" resultref="/root/main/item2"/>
  176. <submission id="TRPIR31005" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/item1/clbs" resultref="/root/init/tmp"/>
  177. <submission id="TRPIR31006" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/item1/clbs" resultref="/root/hidden/result"/>
  178. <submission id="submission1" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/item1/clbs"/>
  179. </model>
  180. <script type="javascript">
  181. <![CDATA[
  182. // 화면 초기화
  183. function fInitialize() {
  184. // 1. 조회조건 초기화
  185. model.resetInstanceNode("/root/send/data1");
  186. model.setValue("/root/send/data1/srchflag", "1");
  187. model.setValue("/root/send/data1/obtappflag", "1");
  188. ipt_acptno.disabled = false;
  189. cmb_judgdg.disabled = false;
  190. ipt_clamno.disabled = true;
  191. cmb_insukind.disabled = true;
  192. cmb_suppkind.disabled = true;
  193. // 2-1. 접수번호에 따른 심사차수 조회결과 초기화
  194. model.removenode("/root/init/list1");
  195. model.makeNode("/root/init/list1");
  196. // 2-2. 환자 기본정보 초기화
  197. model.resetInstanceNode("/root/main/item1");
  198. // 2-3. 정산의뢰생성사유 초기화
  199. model.setValue("/root/hidden/obtappflag", "1");
  200. model.setValue("/root/hidden/obtapprem", "");
  201. model.setValue("/root/hidden/obtappamt", "");
  202. model.setValue("/root/hidden/obtsuppamt", "");
  203. model.setValue("/root/hidden/obtownbmaxamt", "");
  204. txa_obtapprem.disabled = false;
  205. btn_clod.disabled = true;
  206. btn_delete.disabled = true;
  207. // 2-4. 처방별 환수내역 초기화
  208. model.removenode("/root/main/list1");
  209. model.makeNode("/root/main/list1");
  210. zbcfGetCodeList(
  211. new Array(
  212. "P0236" // 공상구분
  213. ),
  214. new Array(
  215. "/root/init/P0236list"
  216. ),
  217. false );
  218. model.refresh();
  219. }
  220. // 접수번호에 대한 심사차수 조회
  221. function fGetJudgdg() {
  222. var acptno = model.getValue("/root/send/data1/acptno");
  223. if (acptno != "") {
  224. // 1. 심사차수를 초기화한다.
  225. model.removenode("/root/init/list1");
  226. model.makeNode("/root/init/list1");
  227. // 2. 접수번호에 해당되는 심사차수를 조회한다.
  228. submit("TRPIR31001");
  229. model.setValue("/root/send/data1/clamno", model.getValue("/root/init/list1/judg/clamno"));
  230. // 3. 첫번째 심사차수를 선택한다.
  231. var nodelist = instance1.selectNodes("/root/init/list1/judg");
  232. if (nodelist.length > 0) {
  233. cmb_judgdg.select(0);
  234. }
  235. } else {
  236. model.removenode("/root/init/list1");
  237. model.makeNode("/root/init/list1");
  238. model.setValue("/root/send/data1/judgdg", "");
  239. cmb_judgdg.refresh();
  240. }
  241. }
  242. // 정산의뢰 환자정보 조회(접수번호)
  243. function fGetCalcCretPatInfoByAcptno() {
  244. // 1. 접수번호, 심사차수, 명일련 입력값 검사
  245. var acptno = model.getValue("/root/send/data1/acptno");
  246. if (acptno == "") {
  247. messageBox("접수번호가 입력되지", "E007");
  248. return;
  249. }
  250. var judgdg = model.getValue("/root/send/data1/judgdg");
  251. if (judgdg == "") {
  252. messageBox("심사차수가 입력되지", "E007");
  253. return;
  254. }
  255. var docuseqno = model.getValue("/root/send/data1/docuseqno");
  256. if (docuseqno == "") {
  257. messageBox("명세서 일련번호가 입력되지", "E007");
  258. return;
  259. }
  260. var docuseqno = ipt_docuseqno.value;
  261. if (docuseqno.length == 0) {
  262. return false;
  263. }
  264. else if (docuseqno.length == 1) {
  265. docuseqno = "0000"+docuseqno;
  266. }
  267. else if (docuseqno.length == 2) {
  268. docuseqno = "000"+docuseqno;
  269. }
  270. else if (docuseqno.length == 3) {
  271. docuseqno = "00"+docuseqno;
  272. }
  273. else if (docuseqno.length == 4) {
  274. docuseqno = "0"+docuseqno;
  275. }
  276. else if (docuseqno.length == 5) {
  277. docuseqno = docuseqno;
  278. }
  279. else if (docuseqno.length > 5) {
  280. messageBox("명세서일련번호는 최대 5자리","E008");
  281. ipt_docuseqno.value = "";
  282. return false;
  283. }
  284. model.setValue("/root/send/data1/docuseqno", docuseqno);
  285. // 2. 조회
  286. submit("TRPIR31002");
  287. }
  288. // 정산의뢰 환자정보 조회(청구번호)
  289. function fGetCalcCretPatInfoByClamno() {
  290. // 1. 청구번호, 명일련 입력값 검사
  291. var clamno = model.getValue("/root/send/data1/clamno");
  292. if (clamno == "") {
  293. messageBox("청구번호가 입력되지", "E007");
  294. return;
  295. }
  296. var docuseqno = model.getValue("/root/send/data1/docuseqno");
  297. if (docuseqno == "") {
  298. messageBox("명세서 일련번호가 입력되지", "E007");
  299. return;
  300. }
  301. var docuseqno = ipt_docuseqno.value;
  302. if (docuseqno.length == 0) {
  303. return false;
  304. }
  305. else if (docuseqno.length == 1) {
  306. docuseqno = "0000"+docuseqno;
  307. }
  308. else if (docuseqno.length == 2) {
  309. docuseqno = "000"+docuseqno;
  310. }
  311. else if (docuseqno.length == 3) {
  312. docuseqno = "00"+docuseqno;
  313. }
  314. else if (docuseqno.length == 4) {
  315. docuseqno = "0"+docuseqno;
  316. }
  317. else if (docuseqno.length == 5) {
  318. docuseqno = docuseqno;
  319. }
  320. else if (docuseqno.length > 5) {
  321. messageBox("명세서일련번호는 최대 5자리","E008");
  322. ipt_docuseqno.value = "";
  323. return false;
  324. }
  325. model.setValue("/root/send/data1/docuseqno", docuseqno);
  326. // 2. 조회
  327. submit("TRPIR31002");
  328. }
  329. // 처방별 환수내역 조회
  330. function fGetRefundClodList() {
  331. var clamym = model.getValue("/root/main/item1/clbs/clamym");
  332. var clamdg = model.getValue("/root/main/item1/clbs/clamdg");
  333. var pid = model.getValue("/root/main/item1/clbs/pid");
  334. var pidsn = model.getValue("/root/main/item1/clbs/pidsn");
  335. if (clamym != "" && clamdg != "" && pid != "" && pidsn != "") {
  336. // 1. 청구처방조회 화면을 호출한다.
  337. // 1-1. 청구처방 조회조건
  338. model.removenode("/root/hidden/sppir31110");
  339. model.makeNode("/root/hidden/sppir31110");
  340. model.makeValue("/root/hidden/sppir31110/cond/data1/clamym", clamym);
  341. model.makeValue("/root/hidden/sppir31110/cond/data1/clamdg", clamdg);
  342. model.makeValue("/root/hidden/sppir31110/cond/data1/pid", pid);
  343. model.makeValue("/root/hidden/sppir31110/cond/data1/pidsn", pidsn);
  344. // 1-2. 기존에 넣어둔 환수내역
  345. model.makeNode("/root/hidden/sppir31110/cond/data2");
  346. model.copyNode("/root/hidden/sppir31110/cond/data2", "/root/main/list1");
  347. // 1-3. 전달받을 결과경로 초기화
  348. model.makeNode("/root/hidden/sppir31110/rslt");
  349. // 1-4. 청구처방조회 팝업 호출
  350. modal("SPPIR31110", "", "10", "10", "SPPIR31110", "/root/hidden/sppir31110/cond", "/root/send", "", "");
  351. // 2. 청구처방조회에서 체크한 처방을 환수내역에 보여준다.
  352. var nodeList = instance1.selectNodes("/root/hidden/sppir31110/rslt/clod");
  353. var length = nodeList.length;
  354. if (length > 0) {
  355. model.copyNode("/root/main/list1", "/root/hidden/sppir31110/rslt");
  356. grd_clodlist.refresh();
  357. }
  358. }
  359. }
  360. // 정산의뢰삭제를 위한 이의신청명세서 조회 화면을 호출한다.
  361. function fSearchObtmList() {
  362. var judgdg = model.getValue("/root/main/item1/clbs/judgdg");
  363. var clamno = model.getValue("/root/main/item1/clbs/clamno");
  364. var acptno = model.getValue("/root/main/item1/clbs/acptno");
  365. var docuseqno = model.getValue("/root/main/item1/clbs/docuseqno");
  366. //if (judgdg != "" && clamno != "" && acptno != "" && docuseqno != "") {
  367. // 1. 이의신청명세서 조회화면으로 넘어갈 데이터를 담는다.
  368. model.removenode("/root/hidden/sppir31120");
  369. model.makeNode("/root/hidden/sppir31120");
  370. model.makeValue("/root/hidden/sppir31120/cond/data1/judgdg", judgdg);
  371. model.makeValue("/root/hidden/sppir31120/cond/data1/clamno", clamno);
  372. model.makeValue("/root/hidden/sppir31120/cond/data1/acptno", acptno);
  373. model.makeValue("/root/hidden/sppir31120/cond/data1/docuseqno", docuseqno);
  374. // 2. 화면을 호출한다.
  375. modal("SPPIR31130", "", "10", "10", "SPPIR31130", "/root/hidden/sppir31120/cond/data1", "/root/send/data2", "", "");
  376. //}
  377. }
  378. //정산의뢰삭제 화면 띄우는 로직 추가 by 박영우 2011.04.21
  379. function fDeleteObtmList() {
  380. var judgdg = model.getValue("/root/main/item1/clbs/judgdg");
  381. var clamno = model.getValue("/root/main/item1/clbs/clamno");
  382. var acptno = model.getValue("/root/main/item1/clbs/acptno");
  383. var docuseqno = model.getValue("/root/main/item1/clbs/docuseqno");
  384. if (judgdg != "" && clamno != "" && acptno != "" && docuseqno != "") {
  385. // 1. 이의신청명세서 조회화면으로 넘어갈 데이터를 담는다.
  386. model.removenode("/root/hidden/sppir31120");
  387. model.makeNode("/root/hidden/sppir31120");
  388. model.makeValue("/root/hidden/sppir31120/cond/data1/judgdg", judgdg);
  389. model.makeValue("/root/hidden/sppir31120/cond/data1/clamno", clamno);
  390. model.makeValue("/root/hidden/sppir31120/cond/data1/acptno", acptno);
  391. model.makeValue("/root/hidden/sppir31120/cond/data1/docuseqno", docuseqno);
  392. // 2. 화면을 호출한다.
  393. modal("SPPIR31120", "", "10", "10", "SPPIR31120", "/root/hidden/sppir31120/cond/data1", "/root/send/data1", "", "");
  394. }
  395. }
  396. // 요율변경, 자격변경으로 정산의뢰 생성
  397. function fSetCalcCretByRate() {
  398. // 1. 변경요율, 정산의뢰액, 정산의뢰사유 검사
  399. var obtappflag = model.getValue("/root/hidden/obtappflag");
  400. var obtappamt = model.getValue("/root/hidden/obtappamt");
  401. var obtapprem = model.getValue("/root/hidden/obtapprem");
  402. var obtsuppamt = model.getValue("/root/hidden/obtsuppamt");
  403. var obtownbmaxamt = model.getValue("/root/hidden/obtownbmaxamt");
  404. if (obtappamt == "" && obtsuppamt == "") {
  405. messageBox("정산의뢰액이 입력되지", "E007");
  406. return;
  407. }
  408. if (obtapprem == "") {
  409. messageBox("요율/자격정산 사유가 입력되지", "E007");
  410. return;
  411. }
  412. // 2. 저장할 데이터 담는다.
  413. model.removenode("/root/send/data2");
  414. model.makeNode("/root/send/data2");
  415. model.setValue("/root/main/item1/clbs/obtappflag", obtappflag);
  416. model.setValue("/root/main/item1/clbs/obtappamt", obtappamt);
  417. model.setValue("/root/main/item1/clbs/obtsuppamt", obtsuppamt);
  418. model.setValue("/root/main/item1/clbs/obtownbmaxamt", obtownbmaxamt);
  419. model.setValue("/root/main/item1/clbs/obtapprem", obtapprem);
  420. model.setValue("/root/main/item1/clbs/chnginsukind", model.getValue("/root/main/item1/clbs/newinsukind"));
  421. model.setValue("/root/main/item1/clbs/chngsuppkind", model.getValue("/root/main/item1/clbs/newsuppkind"));
  422. copyNodeType("/root/send/data2", "/root/main/item1","after");
  423. // 3. 이미 정산의뢰 생성된 데이터인지 확인한다. (명세서가 있는지 체크한다.)
  424. if (fCheckDuplObtm() == "Y") return;
  425. // 4. 저장하시겠습니까?
  426. if (messageBox("요율/자격 변경에 대한 정산의뢰를 생성", "S001") != 6) return;
  427. // 5. 저장한다.
  428. if (submit("TXPIR31001")) {
  429. messageBox("[요율/자격] 정산의뢰 생성이", "I002");
  430. // 6. 재조회한다.
  431. model.resetInstanceNode("/root/main/item1");
  432. submit("TRPIR31002");
  433. // 7. 정산의뢰생성사유 초기화
  434. model.setValue("/root/hidden/obtapprem", "");
  435. model.setValue("/root/hidden/obtappamt", "");
  436. model.setValue("/root/hidden/obtsuppamt", "");
  437. model.setValue("/root/hidden/obtownbmaxamt", "");
  438. model.removenode("/root/main/list1");
  439. model.makeNode("/root/main/list1");
  440. model.refresh();
  441. btn_search.dispatch("DOMActivate");
  442. }
  443. }
  444. // 환수내역으로 정산의뢰 생성
  445. function fSetCalcCretByRefund() {
  446. // 1. 정산의뢰액 검사
  447. var obtappamt = model.getValue("/root/hidden/obtappamt");
  448. if (obtappamt == "") {
  449. messageBox("정산의뢰액이 입력되지", "E007");
  450. return;
  451. }
  452. if (grd_clodlist.rows == 1) {
  453. messageBox("환수요청할 처방이 입력되지", "E007");
  454. return;
  455. }
  456. // 2. 저장할 데이터 담는다.
  457. model.removenode("/root/send/data3");
  458. model.makeNode("/root/send/data3");
  459. model.setValue("/root/main/item1/clbs/obtappflag", model.getValue("/root/hidden/obtappflag"));
  460. model.setValue("/root/main/item1/clbs/obtappamt", obtappamt);
  461. model.setValue("/root/main/item1/clbs/obtapprem", "-");
  462. copyNodeType("/root/send/data3", "/root/main/item1","after");
  463. // 3. 이미 정산의뢰 생성된 데이터인지 확인한다. (명세서가 있는지 체크한다.)
  464. if (fCheckDuplObtm() == "Y") return;
  465. // 4. 저장하시겠습니까?
  466. if (messageBox("처방별 환수내역에 대한 정산의뢰를 생성", "S001") != 6) return;
  467. for(var i = 1; i < grd_clodlist.rows; i++) {
  468. model.makeValue("/root/send/data3/clod[" + i + "]/clod_chksel", model.getValue("/root/main/list1/clod[" + i + "]/chksel"));
  469. model.makeValue("/root/send/data3/clod[" + i + "]/clod_clamym", model.getValue("/root/main/list1/clod[" + i + "]/clamym"));
  470. model.makeValue("/root/send/data3/clod[" + i + "]/clod_clamdg", model.getValue("/root/main/list1/clod[" + i + "]/clamdg"));
  471. model.makeValue("/root/send/data3/clod[" + i + "]/clod_pid", model.getValue("/root/main/list1/clod[" + i + "]/pid"));
  472. model.makeValue("/root/send/data3/clod[" + i + "]/clod_pidsn", model.getValue("/root/main/list1/clod[" + i + "]/pidsn"));
  473. model.makeValue("/root/send/data3/clod[" + i + "]/clod_seqno", model.getValue("/root/main/list1/clod[" + i + "]/seqno"));
  474. model.makeValue("/root/send/data3/clod[" + i + "]/clod_snglcalcscorcd", model.getValue("/root/main/list1/clod[" + i + "]/snglcalcscorcd"));
  475. model.makeValue("/root/send/data3/clod[" + i + "]/clod_hngnm", model.getValue("/root/main/list1/clod[" + i + "]/hngnm"));
  476. model.makeValue("/root/send/data3/clod[" + i + "]/clod_unitcost", model.getValue("/root/main/list1/clod[" + i + "]/unitcost"));
  477. model.makeValue("/root/send/data3/clod[" + i + "]/clod_edidrugqty", model.getValue("/root/main/list1/clod[" + i + "]/edidrugqty"));
  478. model.makeValue("/root/send/data3/clod[" + i + "]/clod_tims", model.getValue("/root/main/list1/clod[" + i + "]/tims"));
  479. model.makeValue("/root/send/data3/clod[" + i + "]/clod_edidayno", model.getValue("/root/main/list1/clod[" + i + "]/edidayno"));
  480. model.makeValue("/root/send/data3/clod[" + i + "]/clod_ediamt", model.getValue("/root/main/list1/clod[" + i + "]/ediamt"));
  481. model.makeValue("/root/send/data3/clod[" + i + "]/clod_obtapponeqty", model.getValue("/root/main/list1/clod[" + i + "]/obtapponeqty"));
  482. model.makeValue("/root/send/data3/clod[" + i + "]/clod_obtappdayqty", model.getValue("/root/main/list1/clod[" + i + "]/obtappdayqty"));
  483. model.makeValue("/root/send/data3/clod[" + i + "]/clod_obtapptotqty", model.getValue("/root/main/list1/clod[" + i + "]/obtapptotqty"));
  484. model.makeValue("/root/send/data3/clod[" + i + "]/clod_changeediamt", model.getValue("/root/main/list1/clod[" + i + "]/changeediamt"));
  485. model.makeValue("/root/send/data3/clod[" + i + "]/clod_obtappamt", model.getValue("/root/main/list1/clod[" + i + "]/obtappamt"));
  486. model.makeValue("/root/send/data3/clod[" + i + "]/clod_edilnno", model.getValue("/root/main/list1/clod[" + i + "]/edilnno"));
  487. model.makeValue("/root/send/data3/clod[" + i + "]/clod_edicdflag", model.getValue("/root/main/list1/clod[" + i + "]/edicdflag"));
  488. model.makeValue("/root/send/data3/clod[" + i + "]/clod_edicd", model.getValue("/root/main/list1/clod[" + i + "]/edicd"));
  489. }
  490. // 5. 저장한다.
  491. if (submit("TXPIR31002")) {
  492. messageBox("[환수내역] 정산의뢰 생성이", "I002");
  493. // 6. 재조회한다.
  494. model.resetInstanceNode("/root/main/item1");
  495. submit("TRPIR31002");
  496. // 7. 환수내역 목록 초기화
  497. model.setValue("/root/hidden/obtapprem", "");
  498. model.setValue("/root/hidden/obtappamt", "");
  499. model.removenode("/root/main/list1");
  500. model.makeNode("/root/main/list1");
  501. model.refresh();
  502. btn_search.dispatch("DOMActivate");
  503. }
  504. }
  505. // 이미 정산의뢰 생성된 데이터인지 확인한다. (명세서가 있는지 체크한다.)
  506. function fCheckDuplObtm() {
  507. var retVal = "N";
  508. model.removenode("/root/hidden/result");
  509. model.makeNode("/root/hidden/result");
  510. if (submit("TRPIR31006")) {
  511. var obtmcnt = model.getValue("/root/hidden/result/cnt/obtmcnt");
  512. if (parseInt(obtmcnt) > 0) {
  513. messageBox("이미 이의신청 명세서가 존재하므로 정산의뢰 생성", "E001");
  514. retVal = "Y";
  515. }
  516. }
  517. return retVal;
  518. }
  519. // 보험유형 변경시에 보조유형을 선별해준다.
  520. function fChangeInsuKind() {
  521. var insukind = model.getValue("/root/main/item1/clbs/newinsukind");
  522. if (insukind) {
  523. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/init/suppkind/suppkindlist[up='" + insukind + "']";
  524. } else {
  525. cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/init/P0010list/P0010";
  526. model.setValue("/root/main/item1/clbs/newsuppkind", "");
  527. }
  528. cmb_suppkind.refresh();
  529. if (cmb_suppkind.label) {
  530. } else { // 기존 선택된 보조유형을 선택할 수 없는 보험유형이 선택된 경우이므로
  531. model.setValue("/root/main/item1/clbs/newsuppkind", "");
  532. cmb_suppkind.refresh();
  533. }
  534. }
  535. ]]>
  536. </script>
  537. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  538. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  539. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  540. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  541. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  542. </xhtml:head>
  543. <xhtml:body pagewidth="1070" pageheight="670" guideline="1,805;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  544. <group id="grp_tle" style="left:0px; top:0px; width:1050px; height:13px; ">
  545. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:183px; height:14px; ">이의신청 정산의뢰 생성</caption>
  546. </group>
  547. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1050px; height:647px; ">
  548. <button id="btn_clodsave" class="btn2_letter2" visibility="hidden" style="left:950px; top:375px; width:42px; height:19px; ">
  549. <caption>저장</caption>
  550. <script type="javascript" ev:event="DOMActivate">
  551. <![CDATA[
  552. messageBox("구현 예정", "E008");
  553. ]]>
  554. </script>
  555. </button>
  556. <group id="grp_sea" style="left:0px; top:10px; width:1040px; height:55px; vertical-align:top; ">
  557. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1040px; height:55px; background-color:#fffbf2; border-color:#ffd799; "/>
  558. <caption id="caption3" class="search_name" style="left:205px; top:6px; width:86px; height:17px; ">접수번호 :</caption>
  559. <line id="line13" class="line_4" style="x1:960px; y1:5px; x2:960px; y2:27px; "/>
  560. <caption id="caption4" class="search_name" style="left:389px; top:6px; width:86px; height:17px; ">심사차수 :</caption>
  561. <caption id="caption2" class="search_name" style="left:792px; top:6px; width:78px; height:17px; ">명일련 :</caption>
  562. <input id="ipt_acptno" ref="/root/send/data1/acptno" class="input_s_essential" navindex="2" format="9999999999" style="left:292px; top:5px; width:83px; height:19px; ">
  563. <script type="javascript" ev:event="onkeypress">
  564. <![CDATA[
  565. setInputNodeCurText();
  566. // 접수번호 입력 후, Enter
  567. if (event.keyCode == "13") {
  568. fGetJudgdg();
  569. }
  570. ]]>
  571. </script>
  572. <script type="javascript" ev:event="DOMFocusIn">
  573. <![CDATA[
  574. ]]>
  575. </script>
  576. </input>
  577. <select1 id="cmb_judgdg" ref="/root/send/data1/judgdg" class="combo_s_essential" navindex="3" appearance="minimal" style="left:477px; top:5px; width:78px; height:19px; ">
  578. <choices>
  579. <itemset nodeset="/root/init/list1/judg">
  580. <label ref="judgdg"/>
  581. <value ref="judgdg"/>
  582. </itemset>
  583. </choices>
  584. </select1>
  585. <input id="ipt_docuseqno" ref="/root/send/data1/docuseqno" class="input_s_essential" navindex="5" maxlength="5" format="99999" style="left:867px; top:5px; width:63px; height:19px; "/>
  586. <button id="btn_search" class="btn1_letter2" navindex="6" style="left:975px; top:7px; width:56px; height:22px; ">
  587. <caption>조회</caption>
  588. <script type="javascript" ev:event="DOMActivate">
  589. <![CDATA[
  590. var srchflag = model.getValue("/root/send/data1/srchflag");
  591. if (srchflag == "1") {
  592. // 1. 접수번호-심사차수-명일련 조회
  593. fGetCalcCretPatInfoByAcptno();
  594. } else if (srchflag == "2") {
  595. // 1. 청구번호-명일련 조회
  596. fGetCalcCretPatInfoByClamno();
  597. }
  598. if (model.getValue("/root/main/item1/clbs/acptno") != "") {
  599. if (model.getValue("/root/main/item1/clbs/insukind") != "21" && model.getValue("/root/main/item1/clbs/insukind") != "22") {
  600. cmb_insukind.disabled = true;
  601. } else {
  602. cmb_insukind.disabled = false;
  603. }
  604. cmb_suppkind.disabled = false;
  605. // 2. 보조유형을 조회한다.
  606. model.removenode("/root/init/suppkind");
  607. model.makeNode("/root/init/suppkind");
  608. submit("TRPIR31005");
  609. model.copyNode("/root/init/suppkind", "/root/init/tmp/suppkind");
  610. model.removeNodeset("/root/init/tmp/suppkind");
  611. // 3. 보험유형에 따른 보조유형을 선별한다.
  612. fChangeInsuKind();
  613. // 4. 정산의뢰액을 초기화한다.
  614. model.setValue(txa_obtapprem.attribute("ref"), model.getValue("/root/main/item1/clbs/obtapprem"));
  615. model.setValue(ipt_obtappamt.attribute("ref"), model.getValue("/root/main/item1/clbs/obtappamt"));
  616. model.setValue(ipt_suppamt.attribute("ref"), model.getValue("/root/main/item1/clbs/obtsuppamt"));
  617. model.setValue(ipt_maxamt.attribute("ref"), model.getValue("/root/main/item1/clbs/obtownbmaxamt"));
  618. model.refresh();
  619. } else {
  620. cmb_insukind.disabled = true;
  621. cmb_suppkind.disabled = true;
  622. }
  623. ]]>
  624. </script>
  625. </button>
  626. <input id="ipt_clamno" ref="/root/send/data1/clamno" class="input_s_essential" navindex="4" maxlength="12" format="999999999999" style="left:658px; top:5px; width:117px; height:19px; "/>
  627. <caption id="caption25" class="search_name" style="left:570px; top:6px; width:86px; height:17px; ">청구번호 :</caption>
  628. <caption id="caption26" class="search_name" style="left:5px; top:6px; width:86px; height:17px; ">조회구분 :</caption>
  629. </group>
  630. <caption id="caption1" class="tit_2" style="left:5px; top:72px; width:160px; height:13px; ">환자 기본정보</caption>
  631. <line id="line1" class="line_1" style="x1:0px; y1:87px; x2:1038px; y2:87px; "/>
  632. <line id="line9" class="line_3" style="x1:0px; y1:218px; x2:1037px; y2:218px; "/>
  633. <line id="line11" class="line_2" style="x1:0px; y1:115px; x2:925px; y2:115px; "/>
  634. <output id="opt_acptno" ref="/root/main/item1/clbs/acptno" class="output_fix" appearance="output" style="left:93px; top:94px; width:90px; height:19px; text-align:left; "/>
  635. <output id="opt_indd" ref="/root/main/item1/clbs/indd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:279px; top:94px; width:90px; height:19px; text-align:left; "/>
  636. <caption id="caption38" class="cell_1" style="left:0px; top:91px; width:91px; height:23px; text-align:center; vertical-align:middle; ">접수번호</caption>
  637. <caption id="caption39" class="cell_1" style="left:186px; top:91px; width:91px; height:23px; text-align:left; vertical-align:middle; ">입원일자</caption>
  638. <line id="line2" class="line_2" style="x1:0px; y1:141px; x2:925px; y2:141px; "/>
  639. <output id="opt_judgdg" ref="/root/main/item1/clbs/judgdg" class="output_fix" appearance="output" style="left:93px; top:120px; width:90px; height:19px; text-align:left; "/>
  640. <output id="opt_dschdd" ref="/root/main/item1/clbs/dschdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:279px; top:120px; width:90px; height:19px; text-align:left; "/>
  641. <caption id="caption5" class="cell_1" style="left:0px; top:117px; width:91px; height:23px; text-align:center; vertical-align:middle; ">심사차수</caption>
  642. <caption id="caption7" class="cell_1" style="left:186px; top:117px; width:91px; height:23px; text-align:left; vertical-align:middle; ">퇴원일자</caption>
  643. <caption id="caption8" class="cell_1" style="left:0px; top:143px; width:91px; height:23px; text-align:center; vertical-align:middle; ">묶음번호</caption>
  644. <output id="opt_setno" ref="/root/main/item1/clbs/setno" class="output_fix" appearance="output" style="left:93px; top:145px; width:90px; height:19px; text-align:left; "/>
  645. <line id="line3" class="line_2" style="x1:0px; y1:167px; x2:925px; y2:167px; "/>
  646. <caption id="caption9" class="cell_1" style="left:186px; top:143px; width:91px; height:23px; text-align:left; vertical-align:middle; ">개시일자</caption>
  647. <output id="opt_ordfromdd" ref="/root/main/item1/clbs/ordfromdd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:279px; top:145px; width:90px; height:19px; text-align:left; "/>
  648. <caption id="caption10" class="cell_1" style="left:0px; top:169px; width:91px; height:23px; text-align:center; vertical-align:middle; ">명일련</caption>
  649. <caption id="caption11" class="cell_1" style="left:186px; top:169px; width:91px; height:23px; text-align:left; vertical-align:middle; ">종료일자</caption>
  650. <output id="opt_docuseqno" ref="/root/main/item1/clbs/docuseqno" class="output_fix" appearance="output" style="left:93px; top:171px; width:90px; height:19px; text-align:left; "/>
  651. <output id="opt_ordtodd" ref="/root/main/item1/clbs/ordtodd" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:279px; top:171px; width:90px; height:19px; text-align:left; "/>
  652. <caption id="caption12" class="cell_1" style="left:372px; top:169px; width:91px; height:23px; text-align:left; vertical-align:middle; ">청구요율</caption>
  653. <caption id="caption13" class="cell_1" style="left:558px; top:169px; width:93px; height:23px; text-align:left; vertical-align:middle; ">정산의뢰액</caption>
  654. <output id="opt_pid" ref="/root/main/item1/clbs/pid" class="output_fix" appearance="output" style="left:465px; top:94px; width:90px; height:19px; text-align:left; "/>
  655. <select1 id="cmb_insukind" ref="/root/main/item1/clbs/newinsukind" class="combo_fix" disabled="false" appearance="minimal" style="left:651px; top:94px; width:90px; height:19px; text-align:left; ">
  656. <choices>
  657. <itemset nodeset="/root/init/P0008list/P0008">
  658. <label ref="cdnm"/>
  659. <value ref="cdid"/>
  660. </itemset>
  661. </choices>
  662. <script type="javascript" ev:event="xforms-value-changed">
  663. <![CDATA[
  664. // 보험유형 변경은 의료급여1종 <-> 2종으로의 변경만 가능하다.
  665. if (model.getValue("/root/main/item1/clbs/insukind") == "21") {
  666. if (model.getValue("/root/main/item1/clbs/newinsukind") != "22") {
  667. messageBox("의료급여1종은 의료급여2종 외 보험유형으로 변경", "E001");
  668. model.setValue("/root/main/item1/clbs/newinsukind", model.getValue("/root/main/item1/clbs/insukind"));
  669. cmb_insukind.refresh();
  670. return;
  671. }
  672. } else if (model.getValue("/root/main/item1/clbs/insukind") == "22") {
  673. if (model.getValue("/root/main/item1/clbs/newinsukind") != "21") {
  674. messageBox("의료급여2종은 의료급여1종 외 보험유형으로 변경", "E001");
  675. model.setValue("/root/main/item1/clbs/newinsukind", model.getValue("/root/main/item1/clbs/insukind"));
  676. cmb_insukind.refresh();
  677. return;
  678. }
  679. }
  680. fChangeInsuKind();
  681. ]]>
  682. </script>
  683. </select1>
  684. <caption id="caption14" class="cell_1" style="left:372px; top:117px; width:91px; height:23px; text-align:left; vertical-align:middle; ">수진자명</caption>
  685. <output id="opt_patnm" ref="/root/main/item1/clbs/patnm" class="output_fix" appearance="output" style="left:465px; top:120px; width:90px; height:19px; text-align:left; "/>
  686. <caption id="caption15" class="cell_1" style="left:558px; top:117px; width:91px; height:23px; text-align:left; vertical-align:middle; ">보조유형</caption>
  687. <select1 id="cmb_suppkind" ref="/root/main/item1/clbs/newsuppkind" class="combo_fix" disabled="false" appearance="minimal" style="left:651px; top:120px; width:90px; height:19px; text-align:left; ">
  688. <choices>
  689. <itemset nodeset="/root/init/P0010list/P0010">
  690. <label ref="cdnm"/>
  691. <value ref="cdid"/>
  692. </itemset>
  693. </choices>
  694. </select1>
  695. <caption id="caption16" class="cell_1" style="left:372px; top:91px; width:91px; height:23px; text-align:left; vertical-align:middle; ">등록번호</caption>
  696. <caption id="caption17" class="cell_1" style="left:372px; top:143px; width:91px; height:23px; text-align:left; vertical-align:middle; ">생성일자</caption>
  697. <caption id="caption18" class="cell_1" style="left:558px; top:91px; width:91px; height:23px; text-align:left; vertical-align:middle; ">보험유형</caption>
  698. <caption id="caption19" class="cell_1" style="left:558px; top:143px; width:91px; height:23px; text-align:left; vertical-align:middle; ">공상구분</caption>
  699. <output id="opt_fstrgstdt" ref="/root/main/item1/clbs/fstrgstdt" class="output_fix" format="yyyy-mm-dd" appearance="output" style="left:465px; top:145px; width:90px; height:19px; text-align:left; "/>
  700. <output id="opt_payownbrate" ref="/root/main/item1/clbs/payownbrate" class="output_fix" appearance="output" style="left:465px; top:171px; width:90px; height:19px; text-align:right; "/>
  701. <input id="ipt_obtappamt" ref="/root/hidden/obtappamt" class="input_default" inputtype="button" format="(-)#,###" style="left:650px; top:170px; width:90px; height:19px; text-align:right; "/>
  702. <output id="opt_edimedcaretotamt" ref="/root/main/item1/clbs/edimedcaretotamt" class="output_fix" format="#,###" appearance="output" style="left:837px; top:94px; width:90px; height:19px; text-align:right; "/>
  703. <output id="opt_ediinsuclamamt" ref="/root/main/item1/clbs/ediinsuclamamt" class="output_fix" format="#,###" appearance="output" style="left:837px; top:120px; width:90px; height:19px; text-align:right; "/>
  704. <caption id="caption20" class="cell_1" style="left:744px; top:169px; width:91px; height:23px; text-align:left; vertical-align:middle; ">지원금</caption>
  705. <output id="opt_edihandcaprfund" ref="/root/main/item1/clbs/edihandcaprfund" class="output_fix" format="#,###" appearance="output" style="left:837px; top:145px; width:90px; height:19px; text-align:right; "/>
  706. <caption id="caption21" class="cell_1" style="left:744px; top:117px; width:91px; height:23px; text-align:left; vertical-align:middle; ">청구액</caption>
  707. <caption id="caption22" class="cell_1" style="left:744px; top:91px; width:91px; height:23px; text-align:left; vertical-align:middle; ">총진료비</caption>
  708. <caption id="caption23" class="cell_1" style="left:744px; top:143px; width:91px; height:23px; text-align:left; vertical-align:middle; ">장애인기금</caption>
  709. <shape id="roundrect2" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:225px; width:1035px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  710. <caption id="caption24" class="search_name" style="left:15px; top:234px; width:138px; height:17px; ">정산의뢰생성사유 :</caption>
  711. <select1 id="radio1" ref="/root/hidden/obtappflag" appearance="full" cols="3" rows="1" overflow="visible" style="left:160px; top:234px; width:265px; height:20px; border-style:none; ">
  712. <choices>
  713. <item>
  714. <label>요율정산</label>
  715. <value>1</value>
  716. </item>
  717. <item>
  718. <label>자격정산</label>
  719. <value>2</value>
  720. </item>
  721. <item>
  722. <label>처방별환수요청</label>
  723. <value>3</value>
  724. </item>
  725. </choices>
  726. <script type="javascript" ev:event="xforms-value-changed">
  727. <![CDATA[
  728. var obtappflag = model.getValue("/root/hidden/obtappflag");
  729. model.setValue("/root/hidden/obtapprem", "");
  730. model.setValue("/root/hidden/obtappamt", "");
  731. model.setValue("/root/hidden/obtsuppamt", "");
  732. model.setValue("/root/hidden/obtownbmaxamt", "");
  733. txa_obtapprem.refresh();
  734. ipt_obtappamt.refresh();
  735. if (obtappflag == "3") {
  736. txa_obtapprem.disabled = true;
  737. btn_clod.disabled = false;
  738. btn_delete.disabled = false;
  739. } else if (obtappflag == "2") {
  740. txa_obtapprem.disabled = false;
  741. btn_clod.disabled = true;
  742. btn_delete.disabled = true;
  743. model.removenode("/root/main/list1");
  744. model.makeNode("/root/main/list1");
  745. grd_clodlist.refresh();
  746. } else if (obtappflag == "1") {
  747. txa_obtapprem.disabled = false;
  748. btn_clod.disabled = true;
  749. btn_delete.disabled = true;
  750. model.removenode("/root/main/list1");
  751. model.makeNode("/root/main/list1");
  752. grd_clodlist.refresh();
  753. }
  754. ]]>
  755. </script>
  756. </select1>
  757. <button id="btn_clod" class="btn2_letter6" style="left:906px; top:375px; width:86px; height:19px; ">
  758. <caption>청구처방조회</caption>
  759. <script type="javascript" ev:event="DOMActivate">
  760. <![CDATA[
  761. fGetRefundClodList();
  762. ]]>
  763. </script>
  764. </button>
  765. <select1 id="rdo_srchflag" ref="/root/send/data1/srchflag" navindex="1" appearance="full" cols="3" rows="1" overflow="visible" style="left:95px; top:20px; width:95px; height:20px; border-style:none; ">
  766. <choices>
  767. <item>
  768. <label>접수</label>
  769. <value>1</value>
  770. </item>
  771. <item>
  772. <label>청구</label>
  773. <value>2</value>
  774. </item>
  775. </choices>
  776. <script type="javascript" ev:event="xforms-value-changed">
  777. <![CDATA[
  778. var srchflag = model.getValue("/root/send/data1/srchflag");
  779. if (srchflag == "1") {
  780. ipt_acptno.disabled = false;
  781. cmb_judgdg.disabled = false;
  782. model.setValue("/root/send/data1/clamno", "");
  783. ipt_clamno.disabled = true;
  784. ipt_clamno.refresh();
  785. } else {
  786. ipt_clamno.disabled = false;
  787. model.setValue("/root/send/data1/acptno", "");
  788. model.setValue("/root/send/data1/judgdg", "");
  789. ipt_acptno.disabled = true;
  790. cmb_judgdg.disabled = true;
  791. ipt_acptno.refresh();
  792. cmb_judgdg.refresh();
  793. }
  794. ]]>
  795. </script>
  796. </select1>
  797. <caption id="caption27" class="cell_1" style="left:930px; top:91px; width:108px; height:23px; text-align:left; vertical-align:middle; "/>
  798. <caption id="caption28" class="cell_1" style="left:930px; top:117px; width:108px; height:23px; text-align:left; vertical-align:middle; "/>
  799. <caption id="caption29" class="cell_1" style="left:930px; top:143px; width:108px; height:23px; text-align:left; vertical-align:middle; "/>
  800. <caption id="caption30" class="cell_1" style="left:930px; top:169px; width:108px; height:23px; text-align:left; vertical-align:middle; "/>
  801. <textarea id="txa_obtapprem" ref="/root/hidden/obtapprem" style="left:0px; top:285px; width:1038px; height:85px; "/>
  802. <datagrid id="grd_clodlist" nodeset="/root/main/list1/clod" class="datagrid2" caption="clamym^clamdg^pid^pidsn^seqno^처방코드^EDI코드^처방명칭^단가^청구&#xA;일회^청구&#xA;일투^청구&#xA;총투^청구액^정산&#xA;일회^정산&#xA;일투^정산&#xA;총투^정산진료비^정산의뢰액^edilnno^edicdflag" colsep="^" colwidth="50, 50, 50, 50, 50, 83, 83, 230, 76, 42, 45, 45, 70, 46, 45, 45, 70, 70, 100, 100" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:405px; width:1038px; height:215px; ">
  803. <col ref="clamym" visibility="hidden"/>
  804. <col ref="clamdg" visibility="hidden"/>
  805. <col ref="pid" visibility="hidden"/>
  806. <col ref="pidsn" visibility="hidden"/>
  807. <col ref="seqno" visibility="hidden"/>
  808. <col ref="snglcalcscorcd"/>
  809. <col ref="edicd"/>
  810. <col ref="hngnm"/>
  811. <col ref="unitcost" format="#,###" style="text-align:right; "/>
  812. <col ref="edidrugqty" style="text-align:right; "/>
  813. <col ref="tims" style="text-align:right; "/>
  814. <col ref="edidayno" style="text-align:right; "/>
  815. <col ref="ediamt" format="#,###" style="text-align:right; "/>
  816. <col ref="obtapponeqty" type="input" format="###" style="text-align:right; "/>
  817. <col ref="obtappdayqty" type="input" format="###" style="text-align:right; "/>
  818. <col ref="obtapptotqty" type="input" format="###" style="text-align:right; "/>
  819. <col ref="changeediamt" format="#,###" style="text-align:right; "/>
  820. <col ref="obtappamt" format="(-)#,###" style="text-align:right; "/>
  821. <col ref="edilnno" visibility="hidden"/>
  822. <col ref="edicdflag" visibility="hidden"/>
  823. <script type="javascript" ev:event="onendedit">
  824. <![CDATA[
  825. // 정산일회, 일투, 총투 변경 시 정산진료비와 정산의뢰액을 계산한다.
  826. var col = grd_clodlist.col;
  827. if (col == grd_clodlist.colRef("obtapponeqty") || col == grd_clodlist.colRef("obtappdayqty") || col == grd_clodlist.colRef("obtapptotqty")) {
  828. var row = grd_clodlist.row;
  829. var obtapponeqty = model.getValue("/root/main/list1/clod["+ row +"]/obtapponeqty");
  830. var obtappdayqty = model.getValue("/root/main/list1/clod["+ row +"]/obtappdayqty");
  831. var obtapptotqty = model.getValue("/root/main/list1/clod["+ row +"]/obtapptotqty");
  832. var unitcost = model.getValue("/root/main/list1/clod["+ row +"]/unitcost");
  833. var ediamt = model.getValue("/root/main/list1/clod["+ row +"]/ediamt");
  834. // 정산진료비
  835. var changeediamt = parseInt(unitcost) * parseInt(obtapponeqty) * parseInt(obtappdayqty) * parseInt(obtapptotqty);
  836. model.setValue("/root/main/list1/clod["+ row +"]/changeediamt", changeediamt);
  837. // 정산의뢰액 = 정산진료비 - 청구액
  838. var obtappamt = parseInt(changeediamt) - parseInt(ediamt);
  839. model.setValue("/root/main/list1/clod["+ row +"]/obtappamt", obtappamt);
  840. // 환수내역에 쌓인 정산의뢰액을 합하여 환자기본정보 정산의뢰액에 넣어준다.
  841. var obtapptotamt = 0;
  842. for(var i = 1; i < grd_clodlist.rows; i++) {
  843. var obtappamt = parseInt(model.getValue("/root/main/list1/clod["+ i +"]/obtappamt"));
  844. obtapptotamt = obtapptotamt + obtappamt;
  845. }
  846. model.setValue("/root/hidden/obtappamt", obtapptotamt);
  847. ipt_obtappamt.refresh();
  848. }
  849. ]]>
  850. </script>
  851. </datagrid>
  852. <caption id="caption31" class="tit_2" style="left:5px; top:270px; width:160px; height:13px; ">요율/자격정산</caption>
  853. <caption id="caption32" class="tit_2" style="left:5px; top:380px; width:160px; height:13px; ">처방별 환수내역</caption>
  854. <line id="line4" class="line_1" style="x1:0px; y1:401px; x2:1038px; y2:401px; "/>
  855. <button id="btn_ratesave" class="btn2_letter2" visibility="hidden" style="left:994px; top:265px; width:42px; height:19px; ">
  856. <caption>저장</caption>
  857. <script type="javascript" ev:event="DOMActivate">
  858. <![CDATA[
  859. ]]>
  860. </script>
  861. </button>
  862. <button id="btn_delete" class="btn2_letter2" style="left:995px; top:375px; width:42px; height:19px; ">
  863. <caption>삭제</caption>
  864. <script type="javascript" ev:event="DOMActivate">
  865. <![CDATA[
  866. grd_clodlist.deleteRow(grd_clodlist.row, true);
  867. ]]>
  868. </script>
  869. </button>
  870. <select1 id="cmb_offcharm" ref="/root/main/item1/clbs/offcharm" class="combo_fix" disabled="false" navindex="4" scroll="vertical" appearance="minimal" showvalue="true" _auth="R" style="left:650px; top:145px; width:90px; height:19px; ">
  871. <choices>
  872. <itemset nodeset="/root/init/P0236list/P0236">
  873. <label ref="cdnm"/>
  874. <value ref="cdid"/>
  875. </itemset>
  876. </choices>
  877. </select1>
  878. <caption id="caption33" class="cell_1" style="left:930px; top:195px; width:108px; height:23px; text-align:left; vertical-align:middle; "/>
  879. <input id="ipt_suppamt" ref="/root/hidden/obtsuppamt" class="input_default" inputtype="button" format="(-)#,###" style="left:837px; top:170px; width:90px; height:19px; text-align:right; "/>
  880. <caption id="caption34" class="cell_1" style="left:744px; top:195px; width:91px; height:23px; text-align:left; vertical-align:middle; ">상한액</caption>
  881. <caption id="caption35" class="cell_1" style="left:0px; top:195px; width:91px; height:23px; text-align:center; vertical-align:middle; ">특정기호</caption>
  882. <caption id="caption36" class="cell_1" style="left:186px; top:195px; width:91px; height:23px; text-align:left; vertical-align:middle; ">산정특례번호</caption>
  883. <caption id="caption37" class="cell_1" style="left:372px; top:195px; width:91px; height:23px; text-align:left; vertical-align:middle; "/>
  884. <caption id="caption40" class="cell_1" style="left:558px; top:195px; width:91px; height:23px; text-align:left; vertical-align:middle; "/>
  885. <line id="line5" class="line_2" style="x1:5px; y1:193px; x2:930px; y2:193px; "/>
  886. <button id="button1" class="btn5_letter6" style="left:940px; top:197px; width:86px; height:19px; ">
  887. <caption>정산금액계산</caption>
  888. <script type="javascript" ev:event="DOMActivate">
  889. <![CDATA[
  890. if (model.getValue("/root/main/item1/clbs/acptno") != "") {
  891. var insukind = model.getValue("/root/main/item1/clbs/newinsukind");
  892. var suppkind = model.getValue("/root/main/item1/clbs/newsuppkind");
  893. if (insukind == "") {
  894. messageBox("정산의뢰액 계산시, 보험유형은 필수입력사항", "E008");
  895. return;
  896. }
  897. if (suppkind == "") {
  898. messageBox("정산의뢰액 계산시, 보조유형은 필수입력사항", "E008");
  899. return;
  900. }
  901. model.removenode("/root/send/data4");
  902. model.makeNode("/root/send/data4");
  903. model.copyNode("/root/send/data4", "/root/main/item1/clbs");
  904. model.setValue("/root/send/data4/insukind", insukind);
  905. model.setValue("/root/send/data4/suppkind", suppkind);
  906. if (model.getValue("/root/send/data4/indd") == "" || model.getValue("/root/send/data4/indd") == "-")
  907. model.setValue("/root/send/data4/indd", model.getValue("/root/send/data4/ordfromdd"));
  908. if (model.getValue("/root/send/data4/dschdd") == "" || model.getValue("/root/send/data4/dschdd") == "-")
  909. model.setValue("/root/send/data4/dschdd", model.getValue("/root/send/data4/ordfromdd"));
  910. if (model.getValue("/root/send/data4/clamdeptcd") == "" || model.getValue("/root/send/data4/clamdeptcd") == "-")
  911. model.setValue("/root/send/data4/clamdeptcd", "01");
  912. model.resetInstanceNode("/root/main/item2");
  913. var vcode = model.getValue(ipt_vcode.attribute("ref")) + "/";
  914. var serdiagno = model.getValue(ipt_serdiagno.attribute("ref")) + "\n";
  915. model.setValue(txa_obtapprem.attribute("ref"), vcode + serdiagno + model.getValue("/root/main/item1/clbs/obtapprem"));
  916. // 1. 요율, 자격변경으로 인하여 재계산되어 나오는 청구액을 구한다.
  917. if (submit("TRPIR31004")) {
  918. // 2. 신청구액 - 기청구액 = 정산의뢰액
  919. var newclamamt = model.getValue("/root/main/item2/clbs/ediinsuclamamt");
  920. var oldclamamt = model.getValue("/root/main/item1/clbs/ediinsuclamamt");
  921. var obtappamt = parseInt(newclamamt) - parseInt(oldclamamt);
  922. model.setValue("/root/hidden/obtappamt", parseInt(obtappamt));
  923. ipt_obtappamt.refresh();
  924. var newsuppamt = model.getValue("/root/main/item2/clbs/edisuppamt");
  925. var oldsuppamt = model.getValue("/root/main/item1/clbs/edisuppamt");
  926. var obtsuppamt = parseInt(newsuppamt) - parseInt(oldsuppamt);
  927. model.setValue("/root/hidden/obtsuppamt", parseInt(obtsuppamt));
  928. ipt_suppamt.refresh();
  929. var newmaxamt = model.getValue("/root/main/item2/clbs/ediownbmaxexamt");
  930. var oldmaxamt = model.getValue("/root/main/item1/clbs/ediownbmaxexamt");
  931. var obtownbmaxamt = parseInt(newmaxamt) - parseInt(oldmaxamt);
  932. model.setValue("/root/hidden/obtownbmaxamt", parseInt(obtownbmaxamt));
  933. ipt_maxamt.refresh();
  934. }
  935. }
  936. ]]>
  937. </script>
  938. </button>
  939. <input id="ipt_maxamt" ref="/root/hidden/obtownbmaxamt" class="input_default" inputtype="button" format="(-)#,###" style="left:837px; top:195px; width:90px; height:19px; text-align:right; "/>
  940. <caption id="caption41" class="cell_1" style="left:558px; top:194px; width:91px; height:23px; text-align:left; vertical-align:middle; ">결핵구분</caption>
  941. <select1 id="cmb_rareobstflag" ref="/root/main/item1/clbs/rareobstflag" class="combo_fix" appearance="minimal" style="left:650px; top:196px; width:90px; height:19px; ">
  942. <choices>
  943. <item>
  944. <label>결핵</label>
  945. <value>L</value>
  946. </item>
  947. <item>
  948. <label/>
  949. <value>-</value>
  950. </item>
  951. </choices>
  952. </select1>
  953. <select id="chk_attdocu" ref="/root/main/item1/clbs/attdocu" overflow="visible" appearance="full" cellspacing="1" cols="5" sep="," vcellspacing="10" style="left:525px; top:231px; width:370px; height:20px; border-style:none; ">
  954. <choices>
  955. <item>
  956. <label>1심결통보서</label>
  957. <value>1</value>
  958. </item>
  959. <item>
  960. <label>2진료기록부</label>
  961. <value>2</value>
  962. </item>
  963. <item>
  964. <label>3X-ray</label>
  965. <value>3</value>
  966. </item>
  967. <item>
  968. <label>4검사결과지</label>
  969. <value>4</value>
  970. </item>
  971. <item>
  972. <label>5기타</label>
  973. <value>5</value>
  974. </item>
  975. </choices>
  976. <script type="javascript" ev:event="xforms-value-changed">
  977. <![CDATA[
  978. ]]>
  979. </script>
  980. </select>
  981. <caption id="caption42" class="search_name" style="left:435px; top:235px; width:85px; height:17px; ">첨부문서:</caption>
  982. <input id="ipt_vcode" ref="/root/main/item1/clbs/vcode" style="left:93px; top:197px; width:90px; height:19px; "/>
  983. <input id="ipt_serdiagno" ref="/root/main/item1/clbs/serdiagno" style="left:279px; top:197px; width:90px; height:19px; "/>
  984. <caption id="caption43" class="search_name" style="left:5px; top:40px; width:138px; height:17px; ">정산의뢰생성사유 :</caption>
  985. <select1 id="radio2" ref="/root/send/data1/obtappflag" appearance="full" cols="3" rows="1" overflow="visible" style="left:150px; top:40px; width:265px; height:20px; border-style:none; ">
  986. <choices>
  987. <item>
  988. <label>요율정산</label>
  989. <value>1</value>
  990. </item>
  991. <item>
  992. <label>자격정산</label>
  993. <value>2</value>
  994. </item>
  995. <item>
  996. <label>처방별환수요청</label>
  997. <value>3</value>
  998. </item>
  999. </choices>
  1000. <script type="javascript" ev:event="xforms-value-changed">
  1001. <![CDATA[
  1002. var obtappflag = model.getValue("/root/hidden/obtappflag");
  1003. model.setValue("/root/hidden/obtapprem", "");
  1004. model.setValue("/root/hidden/obtappamt", "");
  1005. model.setValue("/root/hidden/obtsuppamt", "");
  1006. model.setValue("/root/hidden/obtownbmaxamt", "");
  1007. txa_obtapprem.refresh();
  1008. ipt_obtappamt.refresh();
  1009. if (obtappflag == "3") {
  1010. txa_obtapprem.disabled = true;
  1011. btn_clod.disabled = false;
  1012. btn_delete.disabled = false;
  1013. } else if (obtappflag == "2") {
  1014. txa_obtapprem.disabled = false;
  1015. btn_clod.disabled = true;
  1016. btn_delete.disabled = true;
  1017. model.removenode("/root/main/list1");
  1018. model.makeNode("/root/main/list1");
  1019. grd_clodlist.refresh();
  1020. } else if (obtappflag == "1") {
  1021. txa_obtapprem.disabled = false;
  1022. btn_clod.disabled = true;
  1023. btn_delete.disabled = true;
  1024. model.removenode("/root/main/list1");
  1025. model.makeNode("/root/main/list1");
  1026. grd_clodlist.refresh();
  1027. }
  1028. ]]>
  1029. </script>
  1030. </select1>
  1031. <button id="button4" class="btn2_letter4" style="left:974px; top:67px; width:64px; height:19px; ">
  1032. <caption>자격조회</caption>
  1033. <script type="javascript" ev:event="DOMActivate">
  1034. <![CDATA[
  1035. var patnm = model.getValue("/root/main/item1/clbs/patnm");
  1036. var patrrgstno = model.getValue("/root/main/item1/clbs/patrrgstno");
  1037. var parm = patrrgstno+ "▦"+patnm+"▦" + getCurrentDate() + "▦"; // 주민번호▦이름▦진료일자
  1038. setParameter("SPPMC03900_PARM", parm);
  1039. setParameter("SPPMC03900_RTN", "");
  1040. modal("SPPMC03900", "1", "10", "10", "SPPMC03900", "", "", "", ""); // SPPMC03900_자격조회.xrw
  1041. ]]>
  1042. </script>
  1043. </button>
  1044. <button id="button3" class="btn3_letter4" style="left:118px; top:622px; width:80px; height:22px; ">
  1045. <caption>문서 마감</caption>
  1046. <script type="javascript" ev:event="DOMActivate">
  1047. <![CDATA[
  1048. // 이의신청등록관리화면의 조회조건과 이의신청과조회화면의 조회조건이 부분적으로 일치하기 때문에 동일한 조회조건에 해당하는 항목만 매핑처리한다.
  1049. var judgdg = model.getValue("/root/send/data1/judgdg");
  1050. var clamno = model.getValue("/root/send/data1/clamno");
  1051. var acptno = model.getValue("/root/send/data1/acptno");
  1052. var obtappflag = model.getValue("/root/send/data1/obtappflag");
  1053. var obtappflagcd = "10";
  1054. var notidd = model.getValue("/root/main/item1/clbs/notidd");
  1055. model.setValue("/root/send/send_end/judgdg",judgdg);
  1056. model.setValue("/root/send/send_end/clamno",clamno);
  1057. model.setValue("/root/send/send_end/acptno",acptno);
  1058. if (obtappflag == "2") {
  1059. obtappflagcd = "11";
  1060. } else {
  1061. obtappflagcd = "10";
  1062. }
  1063. model.setValue("/root/send/send_end/obtappflag", obtappflagcd);
  1064. //model.setValue("/root/send/data1/indendyn", "Y");
  1065. model.setValue( "/root/send/send_end/status", "update" );
  1066. model.setValue( "instance('instance1')/send/send_end/notidd", notidd);
  1067. // model.setValue( "instance('instance1')/send/send_end/obtappdd", t10 );
  1068. // model.setValue( "instance('instance1')/send/send_end/obtappdocuno", t9.replace("가의강", "보험") );
  1069. // model.setValue( "instance('instance1')/send/send_end/endflag", "" );
  1070. // model.setValue( "instance('instance1')/send/send_end/obtappendflag", t8 );
  1071. modal("SPPIR30420", 1, 1, 1, "SPPIR30420", "/root/send/send_end", "/root/main/enddata");
  1072. ]]>
  1073. </script>
  1074. </button>
  1075. <button id="button7" class="btn3_letter7" style="left:1px; top:622px; width:116px; height:22px; ">
  1076. <caption>이의신청서 출력</caption>
  1077. <script type="javascript" ev:event="onclick">
  1078. <![CDATA[
  1079. var judgdg = model.getValue("/root/send/data1/judgdg");
  1080. var clamno = model.getValue("/root/send/data1/clamno");
  1081. var acptno = model.getValue("/root/send/data1/acptno");
  1082. var obtappflag = model.getValue("/root/send/data1/obtappflag");
  1083. var obtappflagcd = "10";
  1084. model.setValue("/root/send/send_obtmlist/judgdg",judgdg);
  1085. model.setValue("/root/send/send_obtmlist/clamno",clamno);
  1086. model.setValue("/root/send/send_obtmlist/acptno",acptno);
  1087. if (obtappflag == "2") {
  1088. obtappflagcd = "11";
  1089. } else {
  1090. obtappflagcd = "10";
  1091. }
  1092. model.setValue("/root/send/send_obtmlist/obtappflag", obtappflagcd);
  1093. modal("SPPIR30500", 1, 1, 1, "SPPIR30500", "/root/send/send_obtmlist", "/root/receiveref");
  1094. ]]>
  1095. </script>
  1096. </button>
  1097. </group>
  1098. <button id="btn_init" class="btn4_letter3" navindex="7" style="left:969px; top:635px; width:68px; height:22px; ">
  1099. <caption>초기화</caption>
  1100. <script type="javascript" ev:event="DOMActivate">
  1101. <![CDATA[
  1102. fInitialize();
  1103. ]]>
  1104. </script>
  1105. </button>
  1106. <button id="btn_regist" class="btn4_letter6" navindex="7" style="left:862px; top:635px; width:104px; height:22px; ">
  1107. <caption>정산의뢰생성</caption>
  1108. <script type="javascript" ev:event="DOMActivate">
  1109. <![CDATA[
  1110. var acptno = model.getValue("/root/main/item1/clbs/acptno");
  1111. if (acptno != "") {
  1112. // 1. 정산의뢰 생성한다.
  1113. var obtappflag = model.getValue("/root/hidden/obtappflag");
  1114. if (obtappflag == "3") {
  1115. // 환수내역으로 정산의뢰 생성
  1116. fSetCalcCretByRefund();
  1117. } else {
  1118. // 요율변경으로 정산의뢰 생성
  1119. fSetCalcCretByRate();
  1120. }
  1121. }
  1122. ]]>
  1123. </script>
  1124. </button>
  1125. <button id="button2" class="btn4_letter6" navindex="7" style="left:755px; top:635px; width:104px; height:22px; ">
  1126. <caption>정산의뢰조회</caption>
  1127. <script type="javascript" ev:event="DOMActivate">
  1128. <![CDATA[
  1129. fSearchObtmList();
  1130. ]]>
  1131. </script>
  1132. </button>
  1133. <button id="btn_cancel" class="btn4_letter6" navindex="7" style="left:645px; top:635px; width:104px; height:22px; ">
  1134. <caption>정산의뢰삭제</caption>
  1135. <script type="javascript" ev:event="DOMActivate">
  1136. <![CDATA[
  1137. fDeleteObtmList();
  1138. ]]>
  1139. </script>
  1140. </button>
  1141. </xhtml:body>
  1142. </xhtml:html>