SMPID22400_명세서복사.xrw 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * @(#)SMPID22400_명세서복사.xrw
  4. * 수정이력
  5. * - 2008.08.29 / 최초작성 / 김상진
  6. -->
  7. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  8. <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">
  9. <xhtml:head>
  10. <xhtml:title>명세서복사</xhtml:title>
  11. <model id="model1">
  12. <instance id="instance1">
  13. <root xmlns="">
  14. <main>
  15. <list1>
  16. <clbs/>
  17. </list1>
  18. </main>
  19. <send>
  20. <item1>
  21. <ioflag>O</ioflag>
  22. <clamym/>
  23. <clamdg/>
  24. <ordfildcd/>
  25. <clamflagcd/>
  26. <judgendyn/>
  27. <insukind/>
  28. <suppkind/>
  29. <clamdeptcd/>
  30. <acptno/>
  31. <docuseqno1/>
  32. <docuseqno2/>
  33. <pid/>
  34. <pidsn/>
  35. <makeflag>2</makeflag>
  36. <orddrid/>
  37. <orddeptcd/>
  38. <copyflag/>
  39. <t_clamym/>
  40. <t_clamdg/>
  41. <t_clamflagcd/>
  42. <judgrid/>
  43. <gubun>0</gubun>
  44. </item1>
  45. <list1>
  46. <clbs>
  47. </clbs>
  48. </list1>
  49. </send>
  50. <init>
  51. <item1>
  52. <makeflag/>
  53. <copyflag/>
  54. <ioflag/>
  55. <clamym/>
  56. <clamdg/>
  57. <pid/>
  58. <pidsn/>
  59. <t_clamym/>
  60. <t_clamdg/>
  61. <t_clamflagcd/>
  62. </item1>
  63. <!-- 보험유형 -->
  64. <P0008list>
  65. <P0008>
  66. <cdnm/>
  67. <cdid/>
  68. </P0008>
  69. </P0008list>
  70. <!-- 보조유형 -->
  71. <P0010list>
  72. <P0010>
  73. <cdnm/>
  74. <cdid/>
  75. </P0010>
  76. </P0010list>
  77. <!-- 심사상태 / 심사완료여부 -->
  78. <P0151list>
  79. <P0151>
  80. <cdnm/>
  81. <cdid/>
  82. </P0151>
  83. </P0151list>
  84. <!-- 청구분야(진료분야) -->
  85. <P0291list>
  86. <P0291>
  87. <cdnm/>
  88. <cdid/>
  89. </P0291>
  90. </P0291list>
  91. <!-- 청구구분 -->
  92. <P0155list>
  93. <P0155>
  94. <cdnm/>
  95. <cdid/>
  96. </P0155>
  97. </P0155list>
  98. </init>
  99. <hidden>
  100. <sppmc02500>
  101. <cond>
  102. <!-- SPPMC02500_환자조회 화면으로 검색조건을 보내는 경로임 -->
  103. <srchcond/>
  104. <pid/>
  105. <hngnm/>
  106. <rrgstno1/>
  107. <rrgstno2/>
  108. </cond>
  109. </sppmc02500>
  110. <item1>
  111. <maxclamdg/>
  112. </item1>
  113. </hidden>
  114. </root>
  115. </instance>
  116. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  117. <submission id="TRPID20309" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1/ioflag" resultref="root/hidden/tmp"/>
  118. <submission id="TRPID20201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/init/tmp"/>
  119. <submission id="TRPID20601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/main"/>
  120. <submission id="TRPID20407" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/init/clamdg"/>
  121. <submission id="TXPID20601" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/list1/clbs" resultref="/root/hidden/rslt"/>
  122. <submission id="TRPID20602" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/item1" resultref="/root/hidden"/>
  123. <script type="javascript" ev:event="xforms-ready">
  124. <![CDATA[
  125. // 팝업으로 호출되었으면... 타이틀 변경해준다.
  126. if (model.getValue("/root/init/item1/makeflag") != "") {
  127. model.setValue("/root/send/item1/makeflag", model.getValue("/root/init/item1/makeflag"));
  128. model.setValue("/root/send/item1/copyflag", model.getValue("/root/init/item1/copyflag"));
  129. model.setValue("/root/send/item1/ioflag", model.getValue("/root/init/item1/ioflag"));
  130. model.setValue("/root/send/item1/clamym", model.getValue("/root/init/item1/clamym"));
  131. model.setValue("/root/send/item1/clamdg", model.getValue("/root/init/item1/clamdg"));
  132. model.setValue("/root/send/item1/pid", model.getValue("/root/init/item1/pid"));
  133. model.setValue("/root/send/item1/pidsn", model.getValue("/root/init/item1/pidsn"));
  134. model.setValue("/root/send/item1/t_clamym", model.getValue("/root/init/item1/t_clamym"));
  135. model.setValue("/root/send/item1/t_clamdg", model.getValue("/root/init/item1/t_clamdg"));
  136. model.setValue("/root/send/item1/t_clamflagcd", model.getValue("/root/init/item1/t_clamflagcd"));
  137. }
  138. // 화면을 초기화한다.
  139. fInitialize();
  140. // 파업으로 호출되었으면... 등록번호가 있는경우 조회를 바로한다.
  141. if (model.getValue("/root/init/item1/pid") != "") {
  142. addComboItem("cmb_clamdg", model.getValue("/root/init/item1/clamdg"), model.getValue("/root/init/item1/clamdg"), "init");
  143. fGetDocuList();
  144. }
  145. ]]>
  146. </script>
  147. </model>
  148. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  149. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  150. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  151. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  152. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  153. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  154. <script type="javascript" src="../../../pam/aftjudgweb/js/SMPID20000.js"/>
  155. <script type="javascript">
  156. <![CDATA[
  157. var g_from_cnt = 0;
  158. var g_to_cnt = 0;
  159. var gToday = new Date();
  160. var gBaseyear = gToday.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  161. var gBasemonth = gToday.getDateFormat("MM");
  162. var gBaseday = gToday.getDateFormat("DD");
  163. var gCurrentdd = gBaseyear + gBasemonth + gBaseday;
  164. var gCurrentym = gBaseyear + gBasemonth;
  165. // -----------------------
  166. // ▶ 화면초기화
  167. // -----------------------
  168. function fInitialize() {
  169. // ---------------------------------------------------------------
  170. // 공통코드를 조회한다.
  171. // (ZBC001.js) com.ZBCMCODE 에서 기초코드 값 Get
  172. // ---------------------------------------------------------------
  173. zbcfGetCodeList(
  174. new Array("P0008" // 보험유형
  175. ,"P0010" // 보조유형
  176. ,"P0291" // 진료분야
  177. ,"P0155" // 청구구분
  178. ),
  179. new Array("/root/init/P0008list"
  180. ,"/root/init/P0010list"
  181. ,"/root/init/P0291list"
  182. ,"/root/init/P0155list"
  183. ) );
  184. // ---------------------------------------------------------------
  185. // 진료과 주치의 초기화
  186. // ---------------------------------------------------------------
  187. submit("TRPID20309", false);
  188. model.makeNode("root/hidden/tmp/orddeptcd");
  189. model.makeNode("root/hidden/tmp/orddeptcd2");
  190. model.makeNode("root/hidden/tmp/orddrid");
  191. model.makeNode("root/hidden/tmp/orddrid2");
  192. model.removeNodeset("root/init/orddeptcd");
  193. model.removeNodeset("root/init/orddeptcd2");
  194. model.removeNodeset("root/init/orddrid");
  195. model.removeNodeset("root/init/orddrid2");
  196. model.makeNode("root/init/orddeptcd");
  197. model.makeNode("root/init/orddeptcd2");
  198. model.makeNode("root/init/orddrid");
  199. model.makeNode("root/init/orddrid2");
  200. model.copyNode("root/init/orddeptcd", "root/hidden/tmp/orddeptcd");
  201. model.copyNode("root/init/orddeptcd2", "root/hidden/tmp/orddeptcd2");
  202. model.copyNode("root/init/orddrid", "root/hidden/tmp/orddrid");
  203. model.copyNode("root/init/orddrid2", "root/hidden/tmp/orddrid2");
  204. model.removeNodeset("root/hidden/tmp/orddeptcd");
  205. model.removeNodeset("root/hidden/tmp/orddeptcd2");
  206. model.removeNodeset("root/hidden/tmp/orddrid");
  207. model.removeNodeset("root/hidden/tmp/orddrid2");
  208. model.refreshpart("/root/send/item1/orddeptcd");
  209. model.refreshpart("/root/send/item1/orddeptcd2");
  210. model.refreshpart("/root/send/item1/orddrid");
  211. model.refreshpart("/root/send/item1/orddrid2");
  212. // 청구월 셋팅
  213. if (model.getValue("/root/send/item1/clamym") == "") {
  214. var lv_date = gCurrentym.toDate("YYYYMM" + "01");
  215. lv_date = lv_date.getAddDate(-1, "M")
  216. gCurrentym = lv_date.getDateFormat("YYYYMM")
  217. model.setValue("/root/send/item1/clamym", gCurrentym);
  218. }
  219. model.refresh();
  220. }
  221. // ----------------------------------------------------------------------
  222. // ▶ 명세서관리 대상조회
  223. // ----------------------------------------------------------------------
  224. function fGetDocuList() {
  225. if (model.getValue("/root/send/item1/pid") == "") {
  226. messageBox("등록번호는", "I003"); ///I003=등록번호는 필수입력입니다.
  227. model.dispatch("ipt_patunitsrch");
  228. return;
  229. }
  230. //대상자 조회
  231. if (submit("TRPID20601")) {
  232. var nodeList = instance1.selectNodes("/root/main/list1/clbs");
  233. if (nodeList.length == 1) {
  234. model.setValue("/root/main/list1/clbs[1]/fromchk", "Y");
  235. grd_clbsmast.refresh();
  236. grd_clbsmast.row = 1;
  237. g_from_cnt = 1;
  238. }
  239. }
  240. }
  241. // ----------------------------------------------------------------------
  242. // ▶ 명세서관리 자료생성
  243. // ----------------------------------------------------------------------
  244. function fSetDocuMake() {
  245. // 자료생성전 체크
  246. var rslt = fValidcheck();
  247. if (rslt != false) {
  248. model.resetInstanceNode("root/send/list1/clbs");
  249. var makeflag = model.getValue("root/send/item1/makeflag");
  250. var fromchk="";
  251. var iCnt=0;
  252. for (var i = 1; i < grd_clbsmast.rows; i++) {
  253. fromchk = model.getValue("/root/main/list1/clbs[" + i + "]/fromchk");
  254. if (fromchk == "Y") {
  255. iCnt++;
  256. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/makeflag", model.getValue("/root/send/item1/makeflag"));
  257. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/copyflag", model.getValue("/root/send/item1/copyflag"));
  258. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamym", model.getValue("/root/main/list1/clbs[" + i + "]/clamym"));
  259. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamdg", model.getValue("/root/main/list1/clbs[" + i + "]/clamdg"));
  260. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pid", model.getValue("/root/main/list1/clbs[" + i + "]/pid"));
  261. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pidsn", model.getValue("/root/main/list1/clbs[" + i + "]/pidsn"));
  262. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/workflag", model.getValue("/root/main/list1/clbs[" + i + "]/workflag"));
  263. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamkey", model.getValue("/root/main/list1/clbs[" + i + "]/clamkey"));
  264. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/acptno", model.getValue("/root/main/list1/clbs[" + i + "]/acptno"));
  265. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/acptdd", model.getValue("/root/main/list1/clbs[" + i + "]/acptdd"));
  266. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/docuseqno", model.getValue("/root/main/list1/clbs[" + i + "]/docuseqno"));
  267. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/adjtresncd", model.getValue("/root/main/list1/clbs[" + i + "]/adjtresncd"));
  268. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamym", model.getValue("/root/send/item1/t_clamym"));
  269. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamdg", model.getValue("/root/send/item1/t_clamdg"));
  270. if (model.getValue("/root/send/item1/t_clamflagcd") == "0") {
  271. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamflagcd", model.getValue("/root/main/list1/clbs[" + i + "]/clamflagcd"));
  272. } else {
  273. model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamflagcd", model.getValue("/root/send/item1/t_clamflagcd"));
  274. }
  275. }
  276. }
  277. // 자료생성...
  278. if (submit("TXPID20601")) {
  279. // 변경된 명세서를 조회한다.
  280. model.setValue("/root/send/item1/clamym", model.getValue("/root/send/item1/t_clamym"));
  281. model.setValue("/root/send/item1/clamdg", model.getValue("/root/send/item1/t_clamdg"));
  282. // model.setValue("/root/send/item1/clamflagcd", model.getValue("/root/send/item1/t_clamflagcd"));
  283. var clamym = model.getValue("/root/send/item1/clamym");
  284. var t_clamym = model.getValue("/root/send/item1/t_clamym");
  285. model.setValue("/root/send/item1/clamdg", model.getValue("/root/send/item1/t_clamdg"));
  286. var clamdg = model.getValue("/root/send/item1/t_clamdg");
  287. if (clamym == t_clamym) {
  288. addComboItem("cmb_clamdg", clamdg, clamdg, "above");
  289. } else {
  290. addComboItem("cmb_clamdg", clamdg, clamdg, "init");
  291. }
  292. model.refreshpart("/root/send/item1/clamym");
  293. model.refreshpart("/root/send/item1/clamdg");
  294. // model.refreshpart("/root/send/item1/clamflagcd");
  295. btn_select.dispatch("DOMActivate"); // 자료생성 후 바로 조회...
  296. }
  297. }
  298. }
  299. // ----------------------------------------------------------------------
  300. // ▶ 자료생성전 체크
  301. // ----------------------------------------------------------------------
  302. function fValidcheck() {
  303. // // 생성할 명세서 선택되었는지 체크
  304. var nodeList = instance1.selectNodes("/root/main/list1/clbs");
  305. var chkcnt =0;
  306. var i = 1;
  307. var copyflag = model.getValue("/root/send/item1/copyflag");
  308. var gubun = model.getValue("/root/send/item1/gubun");
  309. var lockyn = "";
  310. for ( i = 1; i <= nodeList.length; i++) {
  311. fromchkyn = model.getValue("/root/main/list1/clbs[ " + i + "]/fromchk");
  312. if (fromchkyn == "Y") {
  313. chkcnt++;
  314. lockyn = model.getValue("/root/main/list1/clbs[" + i + "]/lockyn");
  315. clamendyn = model.getValue("/root/main/list1/clbs[" + i + "]/clamendyn");
  316. // 2.상병처방 전체생성이면서 0.원청구, 4.누락청구 인경우
  317. // 2011-07-21 심사팀 요청으로 명세서 복사의 제어조건 해제
  318. /* if (copyflag == "2" && (gubun == "0" || gubun == "4")) {
  319. if ( lockyn == "N" && (clamendyn == "A" || clamendyn == "M" )) {
  320. messageBox("송신완료된 명세서만 명세서복사할 수", "I010"); //I010: 있습니다.
  321. return false;
  322. }
  323. }
  324. */
  325. }
  326. }
  327. if (chkcnt == 0) {
  328. messageBox("자료생성할 명세서가", "I004"); //I004: 없습니다.
  329. return false;
  330. }
  331. else if (chkcnt > 1) {
  332. messageBox("명세서를 하나만", "C002"); ///C002=선택하십시오 !
  333. return false;
  334. }
  335. var clamym = model.getValue("/root/send/item1/clamym");
  336. var clamdg = model.getValue("/root/send/item1/clamdg");
  337. var clamflagcd = model.getValue("/root/send/item1/clamflagcd");
  338. var t_clamym = model.getValue("/root/send/item1/t_clamym");
  339. var t_clamdg = model.getValue("/root/send/item1/t_clamdg");
  340. var t_clamflagcd = model.getValue("/root/send/item1/t_clamflagcd");
  341. if (t_clamym == "") {
  342. messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
  343. return false;
  344. }
  345. else if (t_clamdg == "") {
  346. messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
  347. return false;
  348. }
  349. else if (t_clamflagcd == "") {
  350. messageBox("생성 청구구분이", "I004"); //I004: 없습니다.
  351. return false;
  352. }
  353. else if (model.getValue("/root/send/item1/copyflag") == "") {
  354. messageBox("생성조건이", "I004"); //I004: 없습니다.
  355. return false;
  356. }
  357. else {
  358. if (copyflag != "1") {
  359. if ( clamym + clamdg + clamflagcd == t_clamym + t_clamdg + t_clamflagcd ) {
  360. messageBox(" 생성 청구년월, 청구차수, 청구구분중 하나도 변경되지", "E007"); //E007=않았습니다.
  361. model.setFocus("ipt_toclamym");
  362. return false;
  363. }
  364. }
  365. }
  366. // 보완청구 생성일 경우 접수번호, 접수일자, 명일련번호사유코드 존재여부 체크
  367. if (gubun == "1") {
  368. for ( i = 1; i <= nodeList.length; i++) {
  369. fromchkyn = model.getValue("/root/main/list1/clbs[ " + i + "]/fromchk");
  370. if (fromchkyn == "Y") {
  371. if (model.getValue("/root/main/list1/clbs[" + i + "]/acptno") == "-" || model.getValue("/root/main/list1/clbs[" + i + "]/acptno") == "") {
  372. messageBox("보완청구생성을 위한 접수번호를", "C001"); //C001 입력하십시오
  373. return false;
  374. }
  375. else if (model.getValue("/root/main/list1/clbs[" + i + "]/acptdd") == "-" || model.getValue("/root/main/list1/clbs[" + i + "]/acptdd") == "") {
  376. messageBox("보완청구생성을 위한 접수일자를", "C001"); //C001 입력하십시오
  377. return false;
  378. }
  379. else if (model.getValue("/root/main/list1/clbs[" + i + "]/docuseqno") == "-" || model.getValue("/root/main/list1/clbs[" + i + "]/docuseqno") == "") {
  380. messageBox("보완청구생성을 위한 명일련번호를", "C001"); //C001 입력하십시오
  381. return false;
  382. }
  383. //else if (model.getValue("/root/main/list1/clbs[" + i + "]/adjtresncd") == "-" || model.getValue("/root/main/list1/clbs[" + i + "]/adjtresncd") == "") {
  384. //사유: 미수금관리가 안됨
  385. else if (model.getValue("/root/main/list1/clbs[" + i + "]/adjtresncd") != "35") {
  386. messageBox("반송사유코드가 35가 아니면 보완청구생성을 ", "E001"); //C001 입력하십시오
  387. return false;
  388. }
  389. }
  390. }
  391. //보완청구 생성일 경우 2:상병,처방 전체생성으로 바꿔준다.
  392. model.setValue("root/send/item1/copyflag", "2");
  393. cmb_copyflag.refresh();
  394. }
  395. }
  396. // ----------------------------------------------------------------------
  397. // ▶ 환자조회
  398. // ----------------------------------------------------------------------
  399. function fGetSrchPid() {
  400. var ipt_pid = model.getValue("/root/send/item1/pid");
  401. if (ipt_pid.charCodeAt(0) > 255) {
  402. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "2"); // 검색조건 : 환자명으로 설정
  403. model.setValue("/root/hidden/sppmc02500/cond/hngnm", ipt_pid);
  404. } else {
  405. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  406. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid);
  407. }
  408. // pam/commonweb/xrw/SPPMC02500_환자조회.xrw
  409. modal("SPPMC02500", "1", "150", "150", "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", ""); // SPPMC02500_환자조회.xrw
  410. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  411. if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
  412. model.removeNodeset("/root/main/patinfo/patinfolist"); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
  413. model.makeNode("/root/main/patinfo/patinfolist"); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
  414. model.setValue("/root/send/item1/pid", srch_pid);
  415. }
  416. model.refresh();
  417. }
  418. // ----------------------------------
  419. // ▶최종청구차수 조회
  420. // ----------------------------------
  421. function fGetMaxClamdg() {
  422. var row = grd_clbsmast.row;
  423. model.makeValue("/root/send/item1/clamflag", model.getValue("/root/send/item1/t_clamflagcd"));
  424. model.setValue("/root/send/item1/ordfildcd", model.getValue("/root/main/list1/clbs[" + row + "]/ordfildcd"));
  425. model.makeValue("/root/send/item1/clamtypecd", model.getValue("/root/main/list1/clbs[" + row + "]/clamtypecd"));
  426. model.makeValue("/root/send/item1/sumtypecd", model.getValue("/root/main/list1/clbs[" + row + "]/sumtypecd"));
  427. if (submit("TRPID20602")) {
  428. model.setValue("/root/send/item1/t_clamdg", model.getValue("/root/hidden/item1/maxclamdg"));
  429. model.refreshpart("/root/send/item1/t_clamdg");
  430. }
  431. }
  432. ]]>
  433. </script>
  434. </xhtml:head>
  435. <xhtml:body pagewidth="1162" pageheight="670" guideline="1,1146;2,727;2,739;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  436. <group id="grp_tle" style="left:0px; top:0px; width:1146px; height:13px; ">
  437. <caption id="cap_title" class="tit_1" style="left:0px; top:0px; width:163px; height:14px; ">명세서복사</caption>
  438. </group>
  439. <group id="grp_biz" scroll="auto" style="left:0px; top:13px; width:1146px; height:648px; ">
  440. <datagrid id="grd_clbsmast" nodeset="/root/main/list1/clbs" class="datagrid2" caption="C^TO^청구년월^차수^청구구분^등록번호^등록번호^환자명^보험&#xA;유형^보조&#xA;유형^진료개시일^진료분야^진료과^진료의^청구번호^접수번호^접수일자^명일련^사유&#xA;코드^잠금&#xA;설정^clamkey^workflag^clbtworkflag^추가청구여부" colsep="^" colwidth="35, 35, 61, 41, 56, 67, 22, 65, 30, 30, 71, 60, 85, 70, 85, 75, 76, 72, 38, 45, 37, 28, 30, 58" dataheight="23" ellipsis="true" extendlastcol="scroll" frozencols="8" mergecellsfixedcols="bycol" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="32" rowsep="|" tooltip="true" style="left:0px; top:93px; width:1145px; height:539px; ">
  441. <col checkvalue="Y,N" ref="fromchk" type="checkbox"/>
  442. <col checkvalue="Y,N" ref="tochk" type="checkbox" visibility="hidden"/>
  443. <col disabled="true" ref="clamym" format="yyyy-mm" style="text-align:center; "/>
  444. <col disabled="true" ref="clamdg" style="text-align:center; "/>
  445. <col disabled="true" ref="clamflagcd" type="combo" style="text-align:left; ">
  446. <choices>
  447. <itemset nodeset="/root/init/P0155list/P0155">
  448. <label ref="cdnm"/>
  449. <value ref="cdid"/>
  450. </itemset>
  451. </choices>
  452. </col>
  453. <col ref="pid" style="text-align:center; "/>
  454. <col ref="pidsn" style="text-align:center; "/>
  455. <col ref="patnm" style="left:332px; top:32px; width:53px; height:23px; text-align:center; "/>
  456. <col ref="insukind" type="output" style="text-align:center; "/>
  457. <col ref="suppkind" type="output" style="text-align:center; "/>
  458. <col ref="ordfromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  459. <col disabled="true" ref="ordfildcd" type="combo" style="text-align:center; ">
  460. <choices>
  461. <itemset nodeset="/root/init/P0291list/P0291">
  462. <label ref="cdnm"/>
  463. <value ref="cdid"/>
  464. </itemset>
  465. </choices>
  466. </col>
  467. <col disabled="true" ref="orddeptcd" type="combo" style="text-align:left; ">
  468. <choices>
  469. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  470. <label ref="nm"/>
  471. <value ref="cd"/>
  472. </itemset>
  473. </choices>
  474. </col>
  475. <col disabled="true" ref="orddrid" type="combo" style="text-align:center; ">
  476. <choices>
  477. <itemset nodeset="/root/init/orddrid/orddridlist">
  478. <label ref="nm"/>
  479. <value ref="cd"/>
  480. </itemset>
  481. </choices>
  482. </col>
  483. <col ref="clamno" style="text-align:center; "/>
  484. <col ref="acptno" type="input" maxlength="8" style="text-align:center; "/>
  485. <col ref="acptdd" type="input" format="yyyy-mm-dd" style="text-align:center; "/>
  486. <col ref="docuseqno" type="input" format="99999" maxlength="5" style="text-align:center; "/>
  487. <col imemode="disabled" ref="adjtresncd" type="input" maxlength="2" _chartype="upper" style="text-align:center; "/>
  488. <col ref="lockyn" style="text-align:center; "/>
  489. <col ref="clamkey" visibility="hidden"/>
  490. <col ref="workflag" visibility="hidden"/>
  491. <col ref="clbtworkflag" visibility="hidden"/>
  492. <col ref="rclamyn" visibility="hidden"/>
  493. <script type="javascript" ev:event="xforms-value-changed">
  494. <![CDATA[
  495. var icol = grd_clbsmast.col;
  496. var irow = grd_clbsmast.row;
  497. var ifromcnt=0;
  498. var itocnt=0;
  499. var fromchkyn;
  500. var tochkyn;
  501. var nodeList = instance1.selectNodes("/root/main/list1/clbs");
  502. g_from_cnt =0;
  503. if (icol == grd_clbsmast.colRef("fromchk")) {
  504. for ( i = 1; i <= nodeList.length; i++) {
  505. fromchkyn = model.getValue("/root/main/list1/clbs[ " + i + "]/fromchk");
  506. if (fromchkyn == "Y") {
  507. g_from_cnt++;
  508. if (g_from_cnt > 1) {
  509. messageBox("명세서를 하나만", "C002"); ///C002=선택하십시오 !
  510. model.setValue("/root/main/list1/clbs[ " + irow + "]/fromchk", "N");
  511. g_from_cnt--;
  512. } else {
  513. model.setValue("/root/send/item1/t_clamflagcd", model.getValue("/root/main/list1/clbs[ " + irow + "]/clamflagcd"));
  514. model.refreshpart("/root/send/item1/t_clamflagcd");
  515. }
  516. }
  517. }
  518. }
  519. else if (icol == grd_clbsmast.colRef("docuseqno")) {
  520. var docuseqno = model.getValue("/root/main/list1/clbs[ " + irow + "]/docuseqno");
  521. if (docuseqno) {
  522. docuseqno = docuseqno.getLeftPad(5, "0")
  523. model.setValue("/root/main/list1/clbs[ " + irow + "]/docuseqno", docuseqno);
  524. }
  525. grd_clbsmast.refresh();
  526. }
  527. ]]>
  528. </script>
  529. </datagrid>
  530. <caption id="cap_judgtrgtman" class="tit_2" style="left:5px; top:74px; width:126px; height:13px; ">대상자조회</caption>
  531. <line id="line1" class="line_1" style="x1:0px; y1:89px; x2:1145px; y2:89px; "/>
  532. <group id="group1" style="left:0px; top:4px; width:810px; height:58px; vertical-align:top; ">
  533. <shape id="roundrect3" appearance="roundrect" style="left:0px; top:0px; width:810px; height:58px; "/>
  534. <caption id="caption30" class="search_name" style="left:10px; top:7px; width:85px; height:17px; ">청구년월</caption>
  535. <input id="ipt_clamym" ref="/root/send/item1/clamym" class="input_search" navindex="1" inputtype="date" format="yyyy-mm" style="left:91px; top:6px; width:69px; height:19px; text-align:center; ">
  536. <script type="javascript" ev:event="xforms-value-changed">
  537. <![CDATA[
  538. pidfGetClamdg();
  539. ]]>
  540. </script>
  541. </input>
  542. <!-- 기존 ID : 1214 => P0235 => P0291 -->
  543. <caption id="caption32" class="search_name" style="left:10px; top:33px; width:86px; height:17px; ">청구구분</caption>
  544. <select1 id="cmb_docuflagcd" ref="/root/send/item1/clamflagcd" class="combo_search" navindex="9" appearance="minimal" showvalue="true" style="left:90px; top:32px; width:123px; height:19px; ">
  545. <choices>
  546. <itemset nodeset="/root/init/P0155list/P0155">
  547. <label ref="cdnm"/>
  548. <value ref="cdid"/>
  549. </itemset>
  550. </choices>
  551. </select1>
  552. <!-- 기존 : /root/InitData2/comccodem => P0287 확인해볼 것 -->
  553. <caption id="caption36" class="search_name" style="left:426px; top:32px; width:82px; height:17px; ">접수번호</caption>
  554. <input id="ipt_acptno" ref="/root/send/item1/acptno" class="input_search" navindex="18" maxlength="8" style="left:506px; top:31px; width:97px; height:19px; "/>
  555. <caption id="caption37" class="search_name" style="left:620px; top:10px; width:73px; height:17px; ">명번호</caption>
  556. <input id="ipt_docuseqno1" ref="/root/send/item1/docuseqno1" class="input_search" navindex="19" maxlength="5" style="left:688px; top:9px; width:39px; height:19px; ">
  557. <hint>
  558. <![CDATA[시작번호]]>
  559. </hint>
  560. <script type="javascript" ev:event="xforms-value-changed">
  561. <![CDATA[
  562. var docuseqno1 = model.getValue("/root/send/item1/docuseqno1");
  563. docuseqno1 = fPaddingData(docuseqno1,"L","0", 5 );
  564. model.setValue("/root/send/item1/docuseqno1", docuseqno1);
  565. model.setValue("/root/send/item1/docuseqno2", docuseqno1);
  566. model.refreshpart("/root/send/item1/docuseqno1");
  567. model.refreshpart("/root/send/item1/docuseqno2");
  568. ]]>
  569. </script>
  570. </input>
  571. <input id="ipt_docuseqno2" ref="/root/send/item1/docuseqno2" class="input_search" navindex="20" maxlength="5" style="left:746px; top:9px; width:39px; height:19px; ">
  572. <hint>
  573. <![CDATA[끝번호]]>
  574. </hint>
  575. <script type="javascript" ev:event="xforms-value-changed">
  576. <![CDATA[
  577. var docuseqno2 = model.getValue("/root/send/item1/docuseqno2");
  578. docuseqno2 = fPaddingData(docuseqno2,"L","0", 5 );
  579. model.setValue("/root/send/item1/docuseqno2", docuseqno2 );
  580. model.refreshpart("/root/send/item1/docuseqno2");
  581. ]]>
  582. </script>
  583. </input>
  584. <caption id="caption38" class="search_name" style="left:232px; top:31px; width:84px; height:17px; ">등록번호</caption>
  585. <input id="ipt_patunitsrch" ref="/root/send/item1/pid" class="input_search" navindex="2" inputtype="button" maxlength="10" style="left:312px; top:31px; width:97px; height:19px; ">
  586. <hint>
  587. <![CDATA[환자성명으로 검색시 2자 이상 입력하세요.]]>
  588. </hint>
  589. <script type="javascript" ev:event="onkeypress">
  590. <![CDATA[
  591. if (event.keyCode == "13") { // Enter 입력 시에
  592. if (ipt_patunitsrch.currentText.length > 1) { // 2글자 이상이면
  593. setInputNodeCurText(); // (tfHelper.js) 현재 인풋값 노드 반영
  594. var srchtext = model.getValue("/root/send/item1/pid");
  595. if (srchtext.charCodeAt(0) > 255) {
  596. fGetSrchPid();
  597. } else {
  598. fGetDocuList();
  599. }
  600. }
  601. }
  602. ]]>
  603. </script>
  604. <script type="javascript" ev:event="onbuttonclick">
  605. <![CDATA[
  606. fGetSrchPid();
  607. ]]>
  608. </script>
  609. <script type="javascript" ev:event="xforms-value-changed">
  610. <![CDATA[
  611. ]]>
  612. </script>
  613. </input>
  614. <button id="btn_select" class="btn1_letter2" navindex="32" style="left:730px; top:32px; width:56px; height:22px; ">
  615. <caption>조회</caption>
  616. <script type="javascript" ev:event="DOMActivate">
  617. <![CDATA[
  618. fGetDocuList();
  619. ]]>
  620. </script>
  621. </button>
  622. <caption id="caption45" style="left:731px; top:9px; width:11px; height:16px; ">~</caption>
  623. <select1 id="cmb_clamdg" ref="/root/send/item1/clamdg" appearance="minimal" style="left:163px; top:6px; width:51px; height:19px; ">
  624. <choices>
  625. <itemset nodeset="/root/init/clamdg/clamdglist">
  626. <label ref="clamdgnm"/>
  627. <value ref="clamdgcd"/>
  628. </itemset>
  629. </choices>
  630. </select1>
  631. <caption id="caption1" class="search_name" style="left:232px; top:7px; width:80px; height:17px; ">내원형태</caption>
  632. <select1 id="cmb_ioflag" ref="/root/send/item1/ioflag" class="combo_search" navindex="3" appearance="minimal" style="left:312px; top:7px; width:97px; height:19px; ">
  633. <choices>
  634. <item>
  635. <label>입원</label>
  636. <value>I</value>
  637. </item>
  638. <item>
  639. <label>외래</label>
  640. <value>O</value>
  641. </item>
  642. </choices>
  643. <script type="javascript" ev:event="xforms-value-changed">
  644. <![CDATA[
  645. // 청구년월에 대한 청구차수 조회
  646. pidfGetClamdg();
  647. ]]>
  648. </script>
  649. </select1>
  650. <caption id="caption2" class="search_name" style="left:426px; top:7px; width:82px; height:17px; ">청구번호</caption>
  651. <input id="input1" ref="/root/send/item1/acptno" class="input_search" navindex="18" maxlength="8" style="left:507px; top:7px; width:97px; height:19px; "/>
  652. <line id="line3" class="line_4" style="x1:701px; y1:32px; x2:701px; y2:56px; "/>
  653. </group>
  654. <select1 id="cmb_copyflag" ref="/root/send/item1/copyflag" class="combo_essential" navindex="8" visibility="visible" appearance="minimal" style="left:897px; top:11px; width:246px; height:19px; ">
  655. <choices>
  656. <item>
  657. <label>1. 자격만 생성</label>
  658. <value>1</value>
  659. </item>
  660. <item>
  661. <label>2. 상병,처방 전체생성</label>
  662. <value>2</value>
  663. </item>
  664. </choices>
  665. </select1>
  666. <input id="ipt_toclamdg" ref="/root/send/item1/t_clamdg" class="input_essential" navindex="20" visibility="visible" maxlength="4" format="####" style="left:976px; top:39px; width:49px; height:19px; "/>
  667. <input id="ipt_toclamym" ref="/root/send/item1/t_clamym" class="combo_essential" navindex="1" visibility="visible" inputtype="date" format="yyyy-mm" style="left:897px; top:39px; width:76px; height:19px; text-align:center; "/>
  668. <caption id="caption9" class="cell_1" style="left:815px; top:11px; width:80px; height:23px; text-align:center; vertical-align:middle; ">생성조건</caption>
  669. <line id="line2" class="line_1" style="x1:815px; y1:7px; x2:1143px; y2:7px; "/>
  670. <line id="line6" class="line_3" style="x1:815px; y1:58px; x2:1143px; y2:58px; "/>
  671. <caption id="caption4" class="cell_1" style="left:815px; top:35px; width:80px; height:23px; text-align:center; vertical-align:middle; ">생성차수</caption>
  672. <button id="btn_cancel" class="btn4_letter2" style="left:1089px; top:67px; width:56px; height:22px; ">
  673. <caption>종료</caption>
  674. <close ev:event="DOMActivate"/>
  675. </button>
  676. <button id="btn_init" class="btn4_letter3" visibility="hidden" style="left:880px; top:65px; width:68px; height:22px; ">
  677. <caption>초기화</caption>
  678. <script type="javascript" ev:event="DOMActivate">
  679. <![CDATA[
  680. model.resetInstanceNode("/root/send/item1");
  681. model.resetInstanceNode("/root/main/list1/clbs");
  682. fInitialize();
  683. ]]>
  684. </script>
  685. </button>
  686. <button id="btn_save" class="btn4_letter2" style="left:1028px; top:67px; width:56px; height:22px; ">
  687. <caption>복사</caption>
  688. <script type="javascript" ev:event="DOMActivate">
  689. <![CDATA[
  690. fSetDocuMake();
  691. ]]>
  692. </script>
  693. </button>
  694. <select1 id="cmb_toclamflagcd" ref="/root/send/item1/gubun" class="combo_search" navindex="9" appearance="minimal" showvalue="true" style="left:1030px; top:39px; width:113px; height:19px; ">
  695. <choices>
  696. <item>
  697. <label>원청구</label>
  698. <value>0</value>
  699. </item>
  700. <item>
  701. <label>보완청구</label>
  702. <value>1</value>
  703. </item>
  704. <item>
  705. <label>추가청구</label>
  706. <value>2</value>
  707. </item>
  708. <item>
  709. <label>누락청구</label>
  710. <value>4</value>
  711. </item>
  712. </choices>
  713. <script type="javascript" ev:event="xforms-value-changed">
  714. <![CDATA[
  715. var copyflag = model.getValue("/root/send/item1/copyflag");
  716. var gubun = model.getValue("/root/send/item1/gubun");
  717. var irow = grd_clbsmast.row;
  718. model.setValue("/root/send/item1/t_clamflagcd", model.getValue("/root/send/item1/gubun"));
  719. // 최종청구차수를 조회한다.
  720. fGetMaxClamdg();
  721. if (gubun == "1") {
  722. // 보완청구 생성조건을 2.상병,처방 모두생성으로 변경한다.
  723. model.setValue("/root/send/item1/copyflag", "2");
  724. cmb_copyflag.refresh();
  725. }
  726. ]]>
  727. </script>
  728. </select1>
  729. </group>
  730. </xhtml:body>
  731. </xhtml:html>