SMPIJ02300_중간청구일괄등록관리.xrw 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>중간청구일괄등록관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list1>
  11. <grdmdiclam/>
  12. </list1>
  13. <list2>
  14. <grdmdiclamlist>
  15. <choi/>
  16. <pid/>
  17. <hngnm/>
  18. <mainjudgid/>
  19. <insukind/>
  20. <suppkind/>
  21. <indd/>
  22. <fromdd/>
  23. <todd/>
  24. <orddeptnm/>
  25. <atdoctid/>
  26. <cnfmdt/>
  27. <mskind/>
  28. <cretno/>
  29. <seqno/>
  30. <instcd/>
  31. <fstrgstrid/>
  32. <ownlimmitdd/>
  33. <inptseqno/>
  34. </grdmdiclamlist>
  35. </list2>
  36. <list5>
  37. <payamtperday>
  38. <execdd/>
  39. <payamt/>
  40. </payamtperday>
  41. </list5>
  42. <patinfo>
  43. <patinfolist/>
  44. </patinfo>
  45. <list6>
  46. <grdmdiclam>
  47. <pid/>
  48. <indd/>
  49. <cretno/>
  50. <mskind/>
  51. </grdmdiclam>
  52. </list6>
  53. </main>
  54. <send>
  55. <pid/>
  56. <indaycnt/>
  57. <totordamt/>
  58. <insukind/>
  59. <judgmdlid/>
  60. <orddeptcd/>
  61. <rgstbadd/>
  62. <patnm/>
  63. <fromdd/>
  64. <todd/>
  65. <mdiclamlist/>
  66. <mdiclamrgstlist/>
  67. <cretno/>
  68. <batchdiv/>
  69. <tempdsch/>
  70. <rgststartdd/>
  71. <allcnt/>
  72. <patcnt/>
  73. <dschperson/>
  74. </send>
  75. <hidden>
  76. <rcv/>
  77. <sppmc02500>
  78. <cond>
  79. <!-- SPPMC02500_환자조회 화면으로 검색조건을 보내는 경로임 -->
  80. <srchcond/>
  81. <pid/>
  82. <hngnm/>
  83. <rrgstno1/>
  84. <rrgstno2/>
  85. <autoflag/>
  86. </cond>
  87. </sppmc02500>
  88. <judglist>
  89. <judgnm/>
  90. <judgid/>
  91. </judglist>
  92. <list2>
  93. <dept/>
  94. </list2>
  95. <pid/>
  96. <midclam>
  97. <pid/>
  98. <indd/>
  99. </midclam>
  100. <atdoclist/>
  101. </hidden>
  102. <init>
  103. <P0008list>
  104. <P0008>
  105. <cdid/>
  106. <cdnm/>
  107. </P0008>
  108. </P0008list>
  109. <P0149list>
  110. <P0149>
  111. <cdid/>
  112. <cdnm/>
  113. </P0149>
  114. </P0149list>
  115. </init>
  116. <temp>
  117. <currentdate/>
  118. </temp>
  119. <checkresult>
  120. <result>
  121. <cnt/>
  122. </result>
  123. </checkresult>
  124. </root>
  125. </instance>
  126. <script type="javascript" ev:event="xforms-ready">
  127. <![CDATA[
  128. // 초기화
  129. fInitialize();
  130. // 현재 날짜
  131. // 현재날짜 하루전날짜를 기본적으로 세팅함 - 20090305 박창원
  132. var curdd = getCurrentDate();
  133. curdd = curdd.toDate("YYYYMMDD");
  134. curdd = curdd.getAddDate(-1);
  135. curdd = curdd.getDateFormat();
  136. model.setValue("/root/temp/currentdate", curdd );
  137. model.setValue("/root/send/pid", model.getValue("/root/hidden/midclam/pid"));
  138. model.setValue("/root/send/rgstbadd", model.getValue("/root/temp/currentdate"));
  139. model.setValue("/root/send/fromdd", model.getValue("/root/hidden/midclam/indd"));
  140. model.setValue("/root/send/todd", model.getValue("/root/temp/currentdate"));
  141. // 공통코드를 조회한다.
  142. zbcfGetCodeList(
  143. new Array("P0008","P0149"),
  144. new Array("/root/init/P0008list","/root/init/P0149list") );
  145. submit("TRPIJ00202"); // 심사자 리스트 조회
  146. submit("TRPIJ00305");
  147. // 로그인 사용자 정보 조회
  148. var sUserInfosS = getUserInfos();
  149. sUserInfosS = sUserInfosS + "|";
  150. var UserInfosS_Array = sUserInfosS.split("|");
  151. var userid = UserInfosS_Array[0];
  152. model.makeNode("/root/hidden/session/sess_" + "userid");
  153. model.setValue("/root/hidden/session/sess_userid",userid);
  154. var pid = model.getValue("/root/send/pid");
  155. if (pid) {
  156. fGetMidClamList();
  157. }
  158. model.refresh();
  159. //[개발 중 메모]
  160. // 1) ZBC001.js => com.ZBCCODEM에서 기초코드 값을 가져와서 Combo 컨트롤 item으로 설정하기 위해 사용한다.
  161. ]]>
  162. </script>
  163. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  164. <submission id="TRPIJ00202" mediatype="application/x-www-form-urlencoded" method="post" resultref="/root/hidden"/>
  165. <submission id="TRPIJ02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  166. <submission id="TRPIJ02302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  167. <submission id="TXPIJ02301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  168. <submission id="TXPIJ02302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  169. <submission id="TRPIJ00305" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden"/>
  170. <!--
  171. <submission id="TXPIJ01101" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/temp"/>
  172. <submission id="TRPIJ01102" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/main/item1"/>
  173. <submission id="TRPIJ01103" ref="/root/send" method="post" mediatype="application/x-www-form-urlencoded" resultref="/root/temp"/>
  174. -->
  175. <submission id="TXPIJ02303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  176. <submission id="TXPIJ02304" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  177. <submission id="TRPIJ02305" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/list6/grdmdiclam" resultref="/root/temp"/>
  178. </model>
  179. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  180. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  181. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  182. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  183. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  184. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  185. <script type="javascript">
  186. <![CDATA[
  187. // 화면 open시(와 초기화 버튼 클릭시) 화면 초기화 기능을 수행한다.
  188. function fInitialize() {
  189. model.resetInstanceNode("/root/send");
  190. model.removeNodeset("/root/main/list1");
  191. model.makeNode("/root/main/list1");
  192. model.removeNodeset("/root/main/list2");
  193. model.makeNode("/root/main/list2");
  194. model.setValue("/root/send/allcnt","0");
  195. model.setValue("/root/send/patcnt","0");
  196. model.refresh();
  197. }
  198. //중간청구 리스트 조회, 중간청구등록 현황 리스트 조회
  199. function fGetMidClamList(){
  200. model.removeNodeset("/root/main/list1");
  201. model.makeNode("/root/main/list1");
  202. if (submit("TRPIJ02301")) {
  203. copyNodeType("/root/main/list1","/root/hidden/rcv/list1","replace");
  204. }
  205. model.removeNodeset("/root/main/list2");
  206. model.makeNode("/root/main/list2");
  207. if (submit("TRPIJ02302")) {
  208. copyNodeType("/root/main/list2","/root/hidden/rcv/list2","replace");
  209. }
  210. // 2008. 02. 13 박지욱 추가 (환자번호가 있는 상태로 조회가 되면 선택은 체크된 상태로 한다)
  211. model.refresh();
  212. for (var i = 1; i < grd_mdiclam.rows; i++) {
  213. model.setValue("/root/main/list1/grdmdiclam[" + i + "]/choi", "true");
  214. grd_mdiclam.rowstatus(i) = 2;
  215. }
  216. for (var i = 1; i < grd_mdiclamrgst.rows; i++) {
  217. if (model.getValue("/root/main/list2/grdmdiclamlist[" + i + "]/cnfmdt") == "") {
  218. model.setValue("/root/main/list2/grdmdiclamlist[" + i + "]/choi", "true");
  219. grd_mdiclamrgst.rowstatus(i) = 2;
  220. }
  221. }
  222. model.refresh();
  223. }
  224. ]]>
  225. </script>
  226. </xhtml:head>
  227. <xhtml:body pagewidth="1211" pageheight="690" guideline="1,1194;2,680;">
  228. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  229. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:124px; height:13px; ">중간청구 등록관리</caption>
  230. </group>
  231. <button id="btn_makemiddleclam" class="btn_sw" group="tab" selected="true" style="left:0px; top:15px; width:90px; height:22px; ">
  232. <caption>중간청구등록</caption>
  233. <script type="javascript" ev:event="DOMActivate">
  234. <![CDATA[
  235. model.toggle("case_makemiddleclam");
  236. btn_save.disabled = false;
  237. btn_cancelsave.disabled = true;
  238. ]]>
  239. </script>
  240. </button>
  241. <button id="btn_srchmiddleclam" class="btn_sw" group="tab" style="left:90px; top:15px; width:150px; height:22px; ">
  242. <caption>중간청구등록 현황 조회</caption>
  243. <script type="javascript" ev:event="DOMActivate">
  244. <![CDATA[
  245. model.toggle("case_srchmiddleclam");
  246. btn_save.disabled = true;
  247. btn_cancelsave.disabled = false;
  248. ]]>
  249. </script>
  250. </button>
  251. <switch id="swt_spclmemo" style="left:0px; top:35px; width:1195px; height:595px; border-color:#c7a3cf; border-style:solid; ">
  252. <case id="case_makemiddleclam" selected="true" style="left:0px; top:0px; width:1193px; height:638px; ">
  253. <group id="group3" scroll="auto" style="left:0px; top:0px; width:1194px; height:592px; ">
  254. <group id="group2" style="left:5px; top:5px; width:1185px; height:70px; vertical-align:top; ">
  255. <shape id="roundrect1" style="left:0px; top:0px; width:1185px; height:65px; background-color:#fffbf2; border-color:#ffd799; "/>
  256. <caption id="caption5" class="search_name" style="left:701px; top:11px; width:86px; height:17px; ">보험유형 :</caption>
  257. <caption id="caption2" class="search_name" style="left:15px; top:10px; width:130px; height:17px; ">등록기준일 :</caption>
  258. <input id="ipt_indd" ref="/root/send/rgstbadd" class="input_search" inputtype="date" style="left:120px; top:10px; width:90px; height:19px; ">
  259. <script type="javascript" ev:event="onkeypress">
  260. <![CDATA[
  261. if(event.keyCode == '13'){
  262. if(ipt_indd.currentText.length != ""){
  263. model.setFocus("cbo_mskind");
  264. }
  265. }
  266. ]]>
  267. </script>
  268. <script type="javascript" ev:event="xforms-value-changed">
  269. <![CDATA[
  270. var rgstbad = model.getValue("/root/send/rgstbadd");
  271. var curDate = getCurrentDate();
  272. if(rgstbad > curDate){
  273. messageBox("현재일자 이후는 등록기준일로 등록할수 없습니다.", "E999", "");
  274. model.setValue("/root/send/rgstbadd", curDate);
  275. model.refresh();
  276. return;
  277. }
  278. // 등록기준일 변경시 그리드의 유형변경일을 동일하게 set - 20081028 박창원
  279. var todd = model.getValue("/root/send/rgstbadd");
  280. for(i=1; i < grd_mdiclam.rows; i++) {
  281. model.setValue("/root/main/list1/grdmdiclam[" + i + "]/todd",todd);
  282. }
  283. ]]>
  284. </script>
  285. </input>
  286. <select1 id="cmb_insukind" ref="/root/send/insukind" class="combo_search" appearance="minimal" style="left:790px; top:10px; width:100px; height:19px; ">
  287. <choices>
  288. <itemset nodeset="/root/init/P0008list/P0008">
  289. <label ref="cdnm"/>
  290. <value ref="cdid"/>
  291. </itemset>
  292. </choices>
  293. </select1>
  294. <caption id="caption1" class="search_name" style="left:15px; top:35px; width:86px; height:17px; ">심 사 자 :</caption>
  295. <select1 id="cmb_judgmdlid" ref="/root/send/judgmdlid" class="combo_search" appearance="minimal" style="left:120px; top:35px; width:90px; height:19px; ">
  296. <choices>
  297. <itemset nodeset="/root/list/judglist">
  298. <label ref="judgnm"/>
  299. <value ref="judgid"/>
  300. </itemset>
  301. </choices>
  302. </select1>
  303. <caption id="caption3" class="search_name" style="left:220px; top:35px; width:86px; height:17px; ">진 료 과 :</caption>
  304. <select1 id="combo2" ref="/root/send/orddeptcd" class="combo_search" appearance="minimal" style="left:315px; top:35px; width:105px; height:19px; ">
  305. <choices>
  306. <itemset nodeset="/root/list2/dept">
  307. <label ref="depthngnm"/>
  308. <value ref="deptcd"/>
  309. </itemset>
  310. </choices>
  311. </select1>
  312. <caption id="caption8" class="search_name" style="left:438px; top:35px; width:86px; height:17px; ">환자번호 :</caption>
  313. <input id="ipt_pid" ref="/root/send/pid" class="input_default" inputtype="button" style="left:525px; top:35px; width:75px; height:19px; ">
  314. <script type="javascript" ev:event="onbuttonclick">
  315. <![CDATA[
  316. model.makeNode("/root/hidden/sppmc02500/cond/srchcond");
  317. model.makeNode("/root/hidden/sppmc02500/cond/pid");
  318. model.makeNode("/root/hidden/sppmc02500/cond/autoflag");
  319. if (ipt_pid.value) {
  320. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  321. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid.value);
  322. model.setValue("/root/hidden/sppmc02500/cond/autoflag","N");
  323. } else {
  324. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  325. }
  326. modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  327. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  328. ipt_pid.value = model.getValue("/root/main/patinfo/patinfolist/pid");
  329. opt_patnm.value = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  330. model.refresh();
  331. ]]>
  332. </script>
  333. <script type="javascript" ev:event="onkeypress">
  334. <![CDATA[
  335. if (event.keyCode == '13') { // Enter 입력 시
  336. model.setFocus("opt_patnm");
  337. model.makeNode("/root/hidden/sppmc02500/cond/srchcond");
  338. model.makeNode("/root/hidden/sppmc02500/cond/pid");
  339. model.makeNode("/root/hidden/sppmc02500/cond/autoflag");
  340. if (ipt_pid.value) {
  341. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  342. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid.value);
  343. model.setValue("/root/hidden/sppmc02500/cond/autoflag","Y");
  344. } else {
  345. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  346. }
  347. modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  348. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  349. ipt_pid.value = model.getValue("/root/main/patinfo/patinfolist/pid");
  350. opt_patnm.value = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  351. model.setFocus("ipt_pid");
  352. model.refresh();
  353. }
  354. ]]>
  355. </script>
  356. </input>
  357. <button id="btn_srch" class="btn1_letter2" style="left:1110px; top:35px; width:56px; height:22px; ">
  358. <caption>조회</caption>
  359. <script type="javascript" ev:event="DOMActivate">
  360. <![CDATA[
  361. model.removeNodeset("/root/main/list1");
  362. model.makeNode("/root/main/list1");
  363. model.setValue("/root/send/allcnt","0");
  364. model.setValue("/root/send/patcnt","0");
  365. // 일괄분할청구 입원시작 기준일 세팅 - 20090305 박창원
  366. var prevmonthday = model.getValue("/root/send/rgstbadd");
  367. if (prevmonthday == "31") {
  368. prevmonthday = "02";
  369. } else {
  370. prevmonthday = "01";
  371. }
  372. // 수정추가 : 20090907 : JHP 퇴원자포함 추가 ,,.. 관련하여 환자번호 무조건 넣게끔...
  373. // 또한 퇴원자포함체크하면 가퇴원포함조건 무시..
  374. var dschperson = model.getValue("/root/send/dschperson");
  375. var dschpid = model.getValue("/root/send/pid");
  376. if(dschperson == "Y" && dschpid == ""){
  377. messageBox("퇴원자포함 선택시 환자번호는","I003");
  378. return;
  379. }
  380. // 수정추가 : 20090907 : JHP 끝
  381. var prevmonthdate = getCurrentDate();
  382. prevmonthdate = prevmonthdate.toDate("YYYYMMDD");
  383. prevmonthdate = prevmonthdate.getAddDate(-1,"M");
  384. prevmonthdate = prevmonthdate.getDateFormat();
  385. model.setValue("/root/send/rgststartdd", prevmonthdate.substr(0,6) + prevmonthday );
  386. if (submit("TRPIJ02301")) {
  387. copyNodeType("/root/main/list1","/root/hidden/rcv/list1","replace");
  388. }
  389. var allcnt = grd_mdiclam.rows;
  390. var patcnt = 0;
  391. model.setValue("/root/send/allcnt",allcnt - 1);
  392. var pid = "";
  393. // 2008. 02. 13 박지욱 추가 (환자번호가 있는 상태로 조회가 되면 선택은 체크된 상태로 한다)
  394. model.refresh();
  395. var allcnt = grd_mdiclam.rows;
  396. model.setValue("/root/send/allcnt",allcnt);
  397. for (var i=0; i<grd_mdiclam.rows;i++) {
  398. var chkpid = model.getValue( "/root/main/list1/grdmdiclam[" + i + "]/pid");
  399. if(pid != chkpid){
  400. patcnt = patcnt + 1;
  401. }
  402. pid = chkpid;
  403. }
  404. model.setValue("/root/send/patcnt",patcnt);
  405. pid = model.getValue("/root/send/pid");
  406. if (pid != "") {
  407. for (var i = 1; i < grd_mdiclam.rows; i++) {
  408. model.setValue("/root/main/list1/grdmdiclam[" + i + "]/choi", "true");
  409. grd_mdiclam.rowstatus(i) = 2;
  410. }
  411. }
  412. // 끝
  413. model.refresh();
  414. ]]>
  415. </script>
  416. </button>
  417. <caption id="caption10" class="search_name" style="left:220px; top:10px; width:86px; height:17px; ">기준일수 :</caption>
  418. <caption id="caption11" class="search_name" style="left:438px; top:10px; width:93px; height:17px; ">진 료 비 :</caption>
  419. <input id="opt_insukindcd" ref="/root/send/indaycnt" format="#,###" style="left:315px; top:10px; width:50px; height:19px; text-align:right; "/>
  420. <input id="opt_suppkindcd" ref="/root/send/totordamt" format="#,###" style="left:525px; top:10px; width:110px; height:19px; text-align:right; "/>
  421. <caption id="caption4" style="left:645px; top:10px; width:28px; height:20px; vertical-align:middle; ">이상</caption>
  422. <caption id="caption21" style="left:370px; top:10px; width:28px; height:20px; vertical-align:middle; ">이상</caption>
  423. <output id="opt_patnm" ref="/root/send/patnm" class="output_fix" style="left:605px; top:35px; width:70px; height:19px; "/>
  424. <caption id="caption7" class="tit_2" style="left:703px; top:39px; width:345px; height:13px; ">설정된 등록기준일까지 분리되어 중간청구 등록됩니다.</caption>
  425. <select id="checkbox1" ref="/root/send/batchdiv" class="checkbox_search" overflow="visible" appearance="full" style="left:902px; top:11px; width:95px; height:15px; border-style:none; ">
  426. <choices>
  427. <item>
  428. <label>일괄분할청구</label>
  429. <value>Y</value>
  430. </item>
  431. </choices>
  432. <script type="javascript" ev:event="xforms-select">
  433. <![CDATA[
  434. var prevmonthday = getCurrentDate();
  435. prevmonthday = prevmonthday.toDate("YYYYMMDD");
  436. prevmonthday = prevmonthday.getAddDate(-1,"M");
  437. prevmonthday = prevmonthday.getMonthDay();
  438. var prevmonthdate = getCurrentDate();
  439. prevmonthdate = prevmonthdate.toDate("YYYYMMDD");
  440. prevmonthdate = prevmonthdate.getAddDate(-1,"M");
  441. prevmonthdate = prevmonthdate.getDateFormat();
  442. model.setValue("/root/send/rgstbadd", prevmonthdate.substr(0,6) + prevmonthday );
  443. model.refresh();
  444. ]]>
  445. </script>
  446. </select>
  447. </group>
  448. <caption id="caption9" class="tit_2" style="left:5px; top:92px; width:177px; height:13px; ">중간청구(분리청구) 리스트</caption>
  449. <line id="line1" class="line_1" style="x1:0px; y1:109px; x2:1190px; y2:109px; "/>
  450. <datagrid id="grd_mdiclam" nodeset="/root/main/list1/grdmdiclam" caption="선택^등록번호^이름^심사자^보험유형^보조유형^입원일^유형시작일^유형종료일^진료과^진료의^재원일수^총진료비^주부유형^생성번호^일련번호^기관코드^등록자^ownlimmitdd^limmittodd^maxtodd" colsep="^" colwidth="30, 90, 80, 83, 69, 69, 100, 100, 100, 56, 80, 60, 90, 100, 100, 100, 100, 100, 100, 100, 100" dataheight="23" explorerbar="sortmove" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:115px; width:1190px; height:475px; ">
  451. <col ref="choi" type="checkbox"/>
  452. <col ref="pid" style="text-align:center; "/>
  453. <col ref="hngnm" style="text-align:center; "/>
  454. <col ref="mainjudgid" type="combo" style="text-align:center; ">
  455. <choices>
  456. <itemset nodeset="/root/list/judglist">
  457. <label style="text-align:center;" ref="judgnm"/>
  458. <value style="text-align:center;" ref="judgid"/>
  459. </itemset>
  460. </choices>
  461. </col>
  462. <col ref="insukind" style="text-align:center; "/>
  463. <col ref="suppkind" style="text-align:center; "/>
  464. <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
  465. <col ref="fromdd" type="inputdate" format="yyyy-mm-dd" style="text-align:center; "/>
  466. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  467. <col ref="orddeptnm" style="text-align:center; "/>
  468. <col ref="atdoctid" style="text-align:center; "/>
  469. <col ref="indaycnt" visibility="hidden" format="#,###" style="text-align:right; "/>
  470. <col ref="totordamt" visibility="hidden" format="#,###" style="text-align:right; "/>
  471. <col ref="mskind" visibility="hidden"/>
  472. <col ref="cretno" visibility="hidden"/>
  473. <col ref="seqno" visibility="hidden"/>
  474. <col ref="instcd" visibility="hidden"/>
  475. <col ref="fstrgstrid" visibility="hidden"/>
  476. <col ref="ownlimmitdd" visibility="hidden"/>
  477. <col ref="limmittodd" visibility="hidden"/>
  478. <col ref="maxtodd" visibility="hidden"/>
  479. <script type="javascript" ev:event="onclick">
  480. <![CDATA[
  481. var chk = model.getValue("/root/main/list1/grdmdiclam[" + grd_mdiclam.row + "]/choi");
  482. if (chk == "true") {
  483. grd_mdiclam.rowstatus(grd_mdiclam.row) = 2;
  484. } else if (chk == "false") {
  485. grd_mdiclam.rowstatus(grd_mdiclam.row) = 0;
  486. }
  487. ]]>
  488. </script>
  489. <script type="javascript" ev:event="onaftersort">
  490. <![CDATA[
  491. grd_mdiclam.gridToInstance(); // Sort 된 Grid 상의 Data 순서와 Instance Node 상의 Data 순서를 동일하게 맞춰준다.
  492. grd_mdiclam.row = grd_mdiclam.selectedRow(0);
  493. ]]>
  494. </script>
  495. </datagrid>
  496. <button id="btn_selectall" class="btn2_letter4" style="left:1060px; top:87px; width:64px; height:19px; ">
  497. <caption>전체선택</caption>
  498. <script type="javascript" ev:event="DOMActivate">
  499. <![CDATA[
  500. for(i=1; i < grd_mdiclam.rows; i++) {
  501. model.setValue("/root/main/list1/grdmdiclam[" + i + "]/choi","true");
  502. grd_mdiclam.rowstatus(i) = 2;
  503. }
  504. ]]>
  505. </script>
  506. </button>
  507. <button id="btn_deselectall" class="btn2_letter4" style="left:1126px; top:87px; width:64px; height:19px; ">
  508. <caption>전체해제</caption>
  509. <script type="javascript" ev:event="DOMActivate">
  510. <![CDATA[
  511. for(i=1; i < grd_mdiclam.rows; i++) {
  512. model.setValue("/root/main/list1/grdmdiclam[" + i + "]/choi","false");
  513. grd_mdiclam.rowstatus(i) = 0;
  514. }
  515. ]]>
  516. </script>
  517. </button>
  518. <select id="chk_tempdsch" ref="/root/send/tempdsch" class="checkbox_search" overflow="visible" appearance="full" style="left:1008px; top:16px; width:85px; height:15px; border-style:none; ">
  519. <choices>
  520. <item>
  521. <label>가퇴원포함</label>
  522. <value>Y</value>
  523. </item>
  524. </choices>
  525. <script type="javascript" ev:event="onclick">
  526. <![CDATA[
  527. ]]>
  528. </script>
  529. </select>
  530. <button id="btn_exlsave" class="btn2_letter4" style="left:993px; top:87px; width:64px; height:19px; ">
  531. <caption>엑셀저장</caption>
  532. <script type="javascript" ev:event="DOMActivate">
  533. <![CDATA[
  534. if (grd_mdiclam.rows == 1) {
  535. return;
  536. }
  537. var fileName = window.fileDialog("save", ",", false, "중간청구등록", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  538. if (fileName != "") {
  539. grd_mdiclam.saveExcel(fileName, "SheetName", true, true, "", "", true);
  540. //datagrid.saveExcel의 7번째 인자 값(boolean) : 그리드의 col type=combo일 경우 엑셀저장내용이 lable 또는 value로 설정 함
  541. }
  542. ]]>
  543. </script>
  544. </button>
  545. <select id="chk_dschperson" ref="/root/send/dschperson" class="checkbox_search" overflow="visible" appearance="full" style="left:1098px; top:16px; width:85px; height:15px; border-style:none; ">
  546. <choices>
  547. <item>
  548. <label>퇴원자포함</label>
  549. <value>Y</value>
  550. </item>
  551. </choices>
  552. <script type="javascript" ev:event="xforms-value-changed">
  553. <![CDATA[
  554. if(chk_dschperson.value == 'Y'){
  555. if(ipt_pid.value == ""){
  556. messageBox("퇴원자포함 선택시 환자번호는","I003");
  557. }
  558. }
  559. ]]>
  560. </script>
  561. </select>
  562. </group>
  563. </case>
  564. <case id="case_srchmiddleclam" style="left:0px; top:0px; width:1193px; height:638px; ">
  565. <group id="group4" style="left:0px; top:0px; width:1194px; height:592px; ">
  566. <group id="group5" style="left:5px; top:5px; width:1185px; height:70px; vertical-align:top; ">
  567. <shape id="shape1" style="left:0px; top:0px; width:1185px; height:65px; background-color:#fffbf2; border-color:#ffd799; "/>
  568. <caption id="caption12" class="search_name" style="left:330px; top:10px; width:86px; height:17px; ">보험유형 :</caption>
  569. <caption id="caption13" class="search_name" style="left:15px; top:10px; width:130px; height:17px; ">등록기준일 :</caption>
  570. <input id="input1" ref="/root/send/fromdd" class="input_search" inputtype="date" style="left:120px; top:10px; width:90px; height:19px; ">
  571. <script type="javascript" ev:event="onkeypress">
  572. <![CDATA[
  573. if(event.keyCode == '13'){
  574. if(ipt_indd.currentText.length != ""){
  575. model.setFocus("cbo_mskind");
  576. }
  577. }
  578. ]]>
  579. </script>
  580. </input>
  581. <input id="input2" ref="/root/send/todd" class="input_search" inputtype="date" style="left:230px; top:10px; width:90px; height:19px; ">
  582. <script type="javascript" ev:event="onkeypress">
  583. <![CDATA[
  584. if(event.keyCode == '13'){
  585. if(ipt_indd.currentText.length != ""){
  586. model.setFocus("cbo_mskind");
  587. }
  588. }
  589. ]]>
  590. </script>
  591. </input>
  592. <select1 id="cmb_rgstinsukind" ref="/root/send/insukind" class="combo_search" appearance="minimal" style="left:419px; top:9px; width:100px; height:19px; ">
  593. <choices>
  594. <itemset nodeset="/root/init/P0008list/P0008">
  595. <label ref="cdnm"/>
  596. <value ref="cdid"/>
  597. </itemset>
  598. </choices>
  599. </select1>
  600. <caption id="caption14" class="search_name" style="left:15px; top:35px; width:86px; height:17px; ">심사자 :</caption>
  601. <select1 id="cmb_rgstjudgmdlid" ref="/root/send/judgmdlid" class="combo_search" appearance="minimal" style="left:120px; top:35px; width:90px; height:19px; ">
  602. <choices>
  603. <itemset nodeset="/root/list/judglist">
  604. <label ref="judgnm"/>
  605. <value ref="judgid"/>
  606. </itemset>
  607. </choices>
  608. </select1>
  609. <caption id="caption15" class="search_name" style="left:220px; top:35px; width:86px; height:17px; ">진료과 :</caption>
  610. <select1 id="combo5" ref="/root/send/orddeptcd" class="combo_search" appearance="minimal" style="left:300px; top:35px; width:170px; height:19px; ">
  611. <choices>
  612. <itemset nodeset="/root/list2/dept">
  613. <label ref="depthngnm"/>
  614. <value ref="deptcd"/>
  615. </itemset>
  616. </choices>
  617. </select1>
  618. <caption id="caption16" class="search_name" style="left:490px; top:35px; width:86px; height:17px; ">환자번호 :</caption>
  619. <input id="ipt_rgstpid" ref="/root/send/pid" class="input_default" inputtype="button" style="left:580px; top:35px; width:87px; height:19px; ">
  620. <script type="javascript" ev:event="onbuttonclick">
  621. <![CDATA[
  622. model.makeNode("/root/hidden/sppmc02500/cond/srchcond");
  623. model.makeNode("/root/hidden/sppmc02500/cond/pid");
  624. model.makeNode("/root/hidden/sppmc02500/cond/autoflag");
  625. if (ipt_pid.value) {
  626. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  627. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid.value);
  628. model.setValue("/root/hidden/sppmc02500/cond/autoflag","N");
  629. } else {
  630. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  631. }
  632. modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  633. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  634. ipt_rgstpid.value = model.getValue("/root/main/patinfo/patinfolist/pid");
  635. opt_rgstpatnm.value = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  636. model.refresh();
  637. ]]>
  638. </script>
  639. <script type="javascript" ev:event="onkeypress">
  640. <![CDATA[
  641. if (event.keyCode == '13') { // Enter 입력 시
  642. model.setFocus("opt_patnm");
  643. model.makeNode("/root/hidden/sppmc02500/cond/srchcond");
  644. model.makeNode("/root/hidden/sppmc02500/cond/pid");
  645. model.makeNode("/root/hidden/sppmc02500/cond/autoflag");
  646. if (ipt_pid.value) {
  647. model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
  648. model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid.value);
  649. model.setValue("/root/hidden/sppmc02500/cond/autoflag","Y");
  650. } else {
  651. model.resetInstanceNode("/root/hidden/sppmc02500/cond");
  652. }
  653. modal("SPPMC02500", 1,150, 150, "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", "");
  654. var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  655. ipt_rgstpid.value = model.getValue("/root/main/patinfo/patinfolist/pid");
  656. opt_rgstpatnm.value = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  657. model.setFocus("ipt_pid");
  658. model.refresh();
  659. }
  660. ]]>
  661. </script>
  662. </input>
  663. <button id="btn_rgstsrch" class="btn1_letter2" style="left:1120px; top:5px; width:56px; height:22px; ">
  664. <caption>조회</caption>
  665. <script type="javascript" ev:event="DOMActivate">
  666. <![CDATA[
  667. model.removeNodeset("/root/main/list2");
  668. model.makeNode("/root/main/list2");
  669. model.setValue("/root/send/allcnt","0");
  670. model.setValue("/root/send/patcnt","0");
  671. if (submit("TRPIJ02302")) {
  672. copyNodeType("/root/main/list2","/root/hidden/rcv/list2","replace");
  673. }
  674. // 2008. 02. 13 박지욱 추가 (환자번호가 있는 상태로 조회가 되면 선택은 체크된 상태로 한다)
  675. model.refresh();
  676. var pid = "";
  677. var patcnt = 0;
  678. var allcnt = grd_mdiclamrgst.rows;
  679. model.setValue("/root/send/allcnt",allcnt - 1);
  680. for (var i=0; i<grd_mdiclamrgst.rows;i++) {
  681. var chkpid = model.getValue( "/root/main/list2/grdmdiclamlist[" + i + "]/pid");
  682. if(pid != chkpid){
  683. patcnt = patcnt + 1;
  684. }
  685. pid = chkpid;
  686. }
  687. model.setValue("/root/send/patcnt",patcnt);
  688. pid = model.getValue("/root/send/pid");
  689. if (pid != "") {
  690. for (var i = 1; i < grd_mdiclamrgst.rows; i++) {
  691. if (model.getValue("/root/main/list2[" + i + "]/cnfmdt") == "") {
  692. model.setValue("/root/main/list2/grdmdiclamlist[" + i + "]/choi", "true");
  693. grd_mdiclamrgst.rowstatus(i) = 2;
  694. }
  695. }
  696. }
  697. // 끝
  698. model.refresh();
  699. ]]>
  700. </script>
  701. </button>
  702. <caption id="caption18" style="left:215px; top:10px; width:28px; height:20px; vertical-align:middle; ">~</caption>
  703. <output id="opt_rgstpatnm" ref="/root/send/patnm" class="output_fix" imemode="hangul" style="left:670px; top:35px; width:87px; height:19px; "/>
  704. </group>
  705. <caption id="caption20" class="tit_2" style="left:5px; top:92px; width:177px; height:13px; ">중간청구(분리청구) 리스트</caption>
  706. <line id="line2" class="line_1" style="x1:0px; y1:109px; x2:1190px; y2:109px; "/>
  707. <datagrid id="grd_mdiclamrgst" nodeset="/root/main/list2/grdmdiclamlist" caption="선택^청구생성완료여부^등록번호^이름^심사자^보험유형^보조유형^입원일^유형시작일^유형종료일^진료과^진료의^중간청구등록일^주부유형^생성번호^일련번호^기관코드^등록자^ownlimmitdd^inptseqno" colsep="^" colwidth="30, 105, 100, 100, 100, 75, 75, 100, 100, 100, 61, 100, 96, 100, 100, 100, 100, 100, 100, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:115px; width:1190px; height:475px; ">
  708. <col ref="choi" type="checkbox"/>
  709. <col ref="cretyn" style="text-align:center; "/>
  710. <col ref="pid" style="text-align:center; "/>
  711. <col ref="hngnm" style="text-align:center; "/>
  712. <col ref="mainjudgid" type="combo" style="text-align:center; ">
  713. <choices>
  714. <itemset nodeset="/root/list/judglist">
  715. <label style="text-align:center;" ref="judgnm"/>
  716. <value style="text-align:center;" ref="judgid"/>
  717. </itemset>
  718. </choices>
  719. </col>
  720. <col ref="insukind" style="text-align:center; "/>
  721. <col ref="suppkind" style="text-align:center; "/>
  722. <col ref="indd" format="yyyy-mm-dd" style="text-align:center; "/>
  723. <col ref="fromdd" format="yyyy-mm-dd" style="text-align:center; "/>
  724. <col ref="todd" format="yyyy-mm-dd" style="text-align:center; "/>
  725. <col ref="orddeptnm" style="text-align:center; "/>
  726. <col ref="atdoctid" style="text-align:center; "/>
  727. <col ref="cnfmdt" format="yyyy-mm-dd" style="text-align:center; "/>
  728. <col ref="mskind" visibility="hidden"/>
  729. <col ref="cretno" visibility="hidden"/>
  730. <col ref="seqno" visibility="hidden"/>
  731. <col ref="instcd" visibility="hidden"/>
  732. <col ref="fstrgstrid" visibility="hidden"/>
  733. <col ref="ownlimmitdd" visibility="hidden"/>
  734. <col ref="inptseqno" visibility="hidden"/>
  735. <script type="javascript" ev:event="onclick">
  736. <![CDATA[
  737. var chk = model.getValue("/root/main/list2/grdmdiclamlist[" + grd_mdiclamrgst.row + "]/choi");
  738. if (chk == "true") {
  739. grd_mdiclamrgst.rowstatus(grd_mdiclamrgst.row) = 2;
  740. } else if (chk == "false") {
  741. grd_mdiclamrgst.rowstatus(grd_mdiclamrgst.row) = 0;
  742. }
  743. ]]>
  744. </script>
  745. </datagrid>
  746. <button id="btn_selectall1" class="btn2_letter4" style="left:1060px; top:87px; width:64px; height:19px; ">
  747. <caption>전체선택</caption>
  748. <script type="javascript" ev:event="DOMActivate">
  749. <![CDATA[
  750. for(i=1; i < grd_mdiclamrgst.rows; i++) {
  751. model.setValue("/root/main/list2/grdmdiclamlist[" + i + "]/choi","true");
  752. grd_mdiclamrgst.rowstatus(i) = 2;
  753. }
  754. ]]>
  755. </script>
  756. </button>
  757. <button id="btn_deselectall1" class="btn2_letter4" style="left:1126px; top:87px; width:64px; height:19px; ">
  758. <caption>전체해제</caption>
  759. <script type="javascript" ev:event="DOMActivate">
  760. <![CDATA[
  761. for(i=1; i < grd_mdiclamrgst.rows; i++) {
  762. model.setValue("/root/main/list2/grdmdiclamlist[" + i + "]/choi","false");
  763. grd_mdiclamrgst.rowstatus(i) = 0;
  764. }
  765. ]]>
  766. </script>
  767. </button>
  768. </group>
  769. </case>
  770. </switch>
  771. <group id="grp_btn" scroll="auto" style="left:0px; top:635px; width:1194px; height:35px; ">
  772. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:840px; y2:0px; "/>
  773. <button id="btn_save" class="btn4_letter2" style="left:924px; top:5px; width:56px; height:22px; ">
  774. <caption>등록</caption>
  775. <script type="javascript" ev:event="DOMActivate">
  776. <![CDATA[
  777. // 체크된 데이터 중에서 유형기간을 벗어나거나 종료일이 오늘보다 큰 데이터는 block - 20081029 박창원
  778. var curdd = getCurrentDate();
  779. for (i=1; i<= grd_mdiclam.rows; i++) {
  780. var limmittodd = model.getValue("/root/main/list1/grdmdiclam[" + i + "]/limmittodd");
  781. var todd = model.getValue("/root/main/list1/grdmdiclam[" + i + "]/todd");
  782. var choi = model.getValue("/root/main/list1/grdmdiclam[" + i + "]/choi");
  783. if (todd > limmittodd && choi == "true" && todd != "99991231") {
  784. messageBox("유형기간을 벗어난 데이터가 포함되어 등록할 수 없습니다. 확인 후 ","C003");
  785. for(j=1; j < grd_mdiclam.rows; j++) {
  786. model.setValue("/root/main/list1/grdmdiclam[" + j + "]/choi","false");
  787. grd_mdiclam.rowstatus(j) = 0;
  788. }
  789. return;
  790. } else if (todd > curdd && choi == "true") {
  791. messageBox("유형종료일이 오늘날짜를 초과하는 데이터가 포함되어 등록할 수 없습니다. 확인 후 ","C003");
  792. for(j=1; j < grd_mdiclam.rows; j++) {
  793. model.setValue("/root/main/list1/grdmdiclam[" + j + "]/choi","false");
  794. grd_mdiclam.rowstatus(j) = 0;
  795. }
  796. return;
  797. }
  798. }
  799. var rgstbadd = model.getValue("/root/send/rgstbadd");
  800. if (rgstbadd == "") {
  801. messageBox("등록기준일은","I003");
  802. return;
  803. }
  804. var updtdata = getGridUpdateData(grd_mdiclam);
  805. if (updtdata == "") {
  806. messageBox("변경된 데이터가","I004");
  807. return;
  808. }
  809. if(grd_mdiclam.rows <= 1) {
  810. return;
  811. }
  812. var rows = grd_mdiclam.rows;
  813. var check = "";
  814. var stat = 0;
  815. var fromdd = "";
  816. var lastmdlclamdd = "";
  817. var interval = 0;
  818. var pid = "";
  819. var openerpid = "";
  820. var midcflag = "";
  821. if (checkOpener()) {
  822. openerpid = opener.model.getValue("/root/main/item1/iteminfo/pid");
  823. }
  824. for (i=1; i<rows; i++) {
  825. stat = grd_mdiclam.rowStatus(i);
  826. if (stat == 2) {
  827. check =grd_mdiclam.valueMatrix(i,1);
  828. if (check == "true") {
  829. pid = model.getValue("/root/main/list1/grdmdiclam["+ i +"]/pid");
  830. // opener에 조회 된 환자가 중간 청구 대상으로 처리 되는지 여부 확인
  831. if (checkOpener()) {
  832. if (openerpid == pid) {
  833. midcflag = "Y";
  834. }
  835. }
  836. /* // 2008. 02. 14 박지욱 수정 (최종청구일이 아닌 최종분할일을 가지고 다음 중간청구시작일을 만든다.)
  837. lastmdldivdd = model.getValue("/root/main/list1/grdmdiclam["+ i +"]/lastmdldivdd");
  838. if (lastmdldivdd == "") {
  839. model.setValue("/root/main/list1/grdmdiclam["+ i +"]/fromdd", model.getValue("/root/main/list1/grdmdiclam["+ i +"]/indd"));
  840. } else {
  841. var fromdate = new Date();
  842. fromdate = lastmdldivdd.toDate("YYYYMMDD");
  843. fromdd = fromdate.getAddDate(1,"D").getDateFormat("YYYYMMDD");
  844. model.setValue("/root/main/list1/grdmdiclam["+ i +"]/fromdd", fromdd);
  845. } */
  846. //model.setValue("/root/main/list1/grdmdiclam["+ i +"]/lastmdlclamdd", rgstbadd);
  847. //model.setValue("/root/main/list1/grdmdiclam["+ i +"]/todd", rgstbadd);
  848. model.setValue("/root/main/list1/grdmdiclam["+ i +"]/fstrgstrid", model.getValue("/root/hidden/session/sess_userid"));
  849. interval = getDateInterval(model.getValue("/root/main/list1/grdmdiclam["+ i +"]/fromdd"),model.getValue("/root/main/list1/grdmdiclam["+ i +"]/todd"));
  850. if (interval < 0) {
  851. messageBox("등록기준일이 시작일자 보다 이전일자로 등록","E001");
  852. return;
  853. }
  854. } else {
  855. grd_mdiclam.rowStatus(i) =0;
  856. }
  857. }
  858. }
  859. //중간청구 등록시 이전 입원기간이 중간청구 등록이 안되어 있는 경우 BLOCKING
  860. var clamrows = grd_mdiclam.rows;
  861. for (i=1; i<clamrows; i++) {
  862. //체크적용된 것만 체크
  863. if (model.getValue("/root/main/list1/grdmdiclam["+ i +"]/choi") == "true" ) {
  864. //입원기간이 유형시작일과 다를경우
  865. var fromdd = model.getValue("/root/main/list1/grdmdiclam["+ i +"]/fromdd");
  866. var maxtodd = model.getValue("/root/main/list1/grdmdiclam["+ i +"]/maxtodd");
  867. fromdd = fromdd.toDate("YYYYMMDD");
  868. fromdd = fromdd.getAddDate(-1);
  869. fromdd = fromdd.getDateFormat();
  870. if(fromdd != maxtodd){
  871. var rtn = messageBox(i+"번째 줄의 이전 입원 진료분이 중간청구 등록되지 않은 날짜가 있습니다. 계속 진행 하시겠습니까?. ","Q999");
  872. if( rtn != '6' ){
  873. model.setValue("/root/main/list1/grdmdiclam["+ i +"]/choi", "false");
  874. grd_mdiclam.rowStatus(i) = 0;
  875. }
  876. }
  877. //if(model.getValue("/root/main/list1/grdmdiclam["+ i +"]/fromdd") != model.getValue("/root/main/list1/grdmdiclam["+ i +"]/fromdd")){
  878. /*
  879. model.setValue("/root/main/list6/grdmdiclam/pid", model.getValue("/root/main/list1/grdmdiclam["+ i +"]/pid"));
  880. model.setValue("/root/main/list6/grdmdiclam/indd", model.getValue("/root/main/list1/grdmdiclam["+ i +"]/indd"));
  881. model.setValue("/root/main/list6/grdmdiclam/cretno", model.getValue("/root/main/list1/grdmdiclam["+ i +"]/cretno"));
  882. model.setValue("/root/main/list6/grdmdiclam/fromdd", model.getValue("/root/main/list1/grdmdiclam["+ i +"]/fromdd"));
  883. model.setValue("/root/main/list6/grdmdiclam/mskind", model.getValue("/root/main/list1/grdmdiclam["+ i +"]/mskind"));
  884. model.setValue("/root/main/list6/grdmdiclam/maxtodd", model.getValue("/root/mais kn/list1/grdmdiclam["+ i +"]/maxtodd"));
  885. model.removenode("/root/checkresult");
  886. if(submit("TRPIJ02305")){
  887. if( getNodesetCount("/root/checkresult/result/cnt") < 1 ){
  888. var rtn = messageBox(i+"번째 줄의 이전 입원 진료분이 중간청구 등록되지 않았습니다. 입원일부터 청구 생성하시겠습니까?. ","Q999");
  889. if( rtn == '6' ){
  890. model.setValue("/root/main/list1/grdmdiclam["+ i +"]/fromdd", model.getValue("/root/main/list1/grdmdiclam["+ i +"]/indd"));
  891. }else{
  892. model.setValue("/root/main/list1/grdmdiclam["+ i +"]/choi", "false");
  893. grd_mdiclam.rowStatus(i) = 0;
  894. }
  895. }
  896. }
  897. */
  898. //}
  899. }
  900. }
  901. //선택된 데이터가 없으면 submit제외
  902. var clamcheckrows = grd_mdiclam.rows;
  903. var cnt = 0;
  904. for (i=1; i<clamrows; i++) {
  905. if (model.getValue("/root/main/list1/grdmdiclam["+ i +"]/choi") == "true" ) {
  906. cnt = cnt +1;
  907. }
  908. }
  909. if(cnt > 0){
  910. model.setValue("/root/send/mdiclamlist",grd_mdiclam.getUpdateData());
  911. if ( submit("TXPIJ02301") ) {
  912. submit("TXPIJ02303");
  913. var controlObj = document.controls("btn_srch");
  914. controlObj.dispatch("DOMActivate");
  915. // opener에 조회 된 환자가 중간 청구 대상으로 처리
  916. if (midcflag == "Y") {
  917. opener.javascript.fSetMidregist("Y");
  918. }
  919. messageBox("등록이","I002");
  920. }
  921. }
  922. ]]>
  923. </script>
  924. </button>
  925. <button id="btn_cancelsave" class="btn4_letter4" disabled="true" style="left:983px; top:5px; width:80px; height:22px; ">
  926. <caption>등록취소</caption>
  927. <script type="javascript" ev:event="DOMActivate">
  928. <![CDATA[
  929. // 체크된 데이터 중에서 자료수집이 된 건이 있으면 block - 20081016 박창원
  930. for (i=1; i<= grd_mdiclamrgst.rows; i++) {
  931. var cretyn = model.getValue("/root/main/list2/grdmdiclamlist[" + i + "]/cretyn");
  932. var choi = model.getValue("/root/main/list2/grdmdiclamlist[" + i + "]/choi");
  933. if (cretyn == "Y" && choi == "true") {
  934. messageBox("청구생성된 데이터가 포함되어 취소 할 수 없습니다. 생성삭제 후 ","C003");
  935. for(j=1; j < grd_mdiclamrgst.rows; j++) {
  936. model.setValue("/root/main/list2/grdmdiclamlist[" + j + "]/choi","false");
  937. grd_mdiclamrgst.rowstatus(j) = 0;
  938. }
  939. return;
  940. }
  941. }
  942. var updtdata = getGridUpdateData(grd_mdiclamrgst);
  943. if (updtdata == "") {
  944. messageBox("변경된 데이터가","I004");
  945. return;
  946. }
  947. var rows = grd_mdiclamrgst.rows;
  948. var check = "";
  949. var stat = 0;
  950. var pid = "";
  951. var openerpid = "";
  952. var midcflag = "";
  953. if (checkOpener()) {
  954. openerpid = opener.model.getValue("/root/main/item1/iteminfo/pid");
  955. }
  956. for (i=1; i<rows; i++) {
  957. stat = grd_mdiclamrgst.rowStatus(i);
  958. if (stat == 2) {
  959. check =grd_mdiclamrgst.valueMatrix(i,1);
  960. if (check == "true") {
  961. model.setValue("/root/main/list2/grdmdiclamlist["+ i +"]/lastupdtrid", model.getValue("/root/hidden/session/sess_userid"));
  962. pid = model.getValue("/root/main/list1/grdmdiclam["+ i +"]/pid");
  963. // opener에 조회 된 환자가 중간 청구 대상으로 처리 되는지 여부 확인
  964. if (checkOpener()) {
  965. if (openerpid == pid) {
  966. midcflag = "N";
  967. }
  968. }
  969. } else {
  970. grd_mdiclamrgst.rowStatus(i) =0;
  971. }
  972. }
  973. }
  974. model.setValue("/root/send/mdiclamrgstlist",grd_mdiclamrgst.getUpdateData());
  975. if ( submit("TXPIJ02302") ) {
  976. submit("TXPIJ02304");
  977. var controlObj = document.controls("btn_rgstsrch");
  978. controlObj.dispatch("DOMActivate");
  979. // opener에 조회 된 환자가 중간 청구 대상으로 처리
  980. if (midcflag == "N") {
  981. opener.javascript.fSetMidregist("N");
  982. }
  983. messageBox("등록취소가","I002");
  984. }
  985. ]]>
  986. </script>
  987. </button>
  988. <button id="btn_cancel" class="btn4_letter2" style="left:1066px; top:5px; width:56px; height:22px; ">
  989. <caption>취소</caption>
  990. <script type="javascript" ev:event="DOMActivate">
  991. <![CDATA[
  992. if (checkOpener()) {
  993. window.close(); //F5 실행시 IE를 종료시킨다.
  994. }
  995. ]]>
  996. </script>
  997. </button>
  998. <button id="btn_init" class="btn4_letter3" style="left:1125px; top:5px; width:68px; height:22px; ">
  999. <caption>초기화</caption>
  1000. <script type="javascript" ev:event="DOMActivate">
  1001. <![CDATA[
  1002. fInitialize();
  1003. ]]>
  1004. </script>
  1005. </button>
  1006. <caption id="caption17" class="cell_1" style="left:0px; top:5px; width:50px; height:24px; ">총건수</caption>
  1007. <output id="output1" ref="/root/send/allcnt" class="output_fix" style="left:50px; top:8px; width:85px; height:19px; "/>
  1008. <caption id="caption19" class="cell_1" style="left:134px; top:5px; width:50px; height:24px; ">환자수</caption>
  1009. <output id="output2" ref="/root/send/patcnt" class="output_fix" style="left:184px; top:8px; width:85px; height:19px; "/>
  1010. <line id="line3" class="line_3" style="x1:0px; y1:5px; x2:270px; y2:5px; "/>
  1011. <line id="line4" class="line_3" style="x1:0px; y1:29px; x2:270px; y2:29px; "/>
  1012. </group>
  1013. </xhtml:body>
  1014. </xhtml:html>