SPPIJ01900_중증수술기간산정관리.xfdl 117 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755
  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml" />
  4. <Form id="SPPIJ01900" position="absolute 0 0 820 750" titletext="중증수술기간산정관리" onload="SPPIJ01900_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div id="group3" scrollbars="autoboth" position="absolute 0 0 800 705" style="">
  8. <Layouts>
  9. <Layout>
  10. <Static id="caption1" class="tit_2" position="absolute 559 10 814 23" style="" text="수술일자별 기간/ 급여총액" />
  11. <Shape id="line1" class="line_1" linetype="horizontal" position="absolute 553 27 791 30" style="" anchor="default" />
  12. <Grid id="grd_esscterm" binddataset="ds_main_list1_ownbamtlist" position="absolute 553 31 793 340" style="" oncellclick="group3_grd_esscterm_oncellclick">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="70" />
  17. <Column size="70" />
  18. <Column size="75" />
  19. </Columns>
  20. <Rows>
  21. <Row size="25" band="head" />
  22. <Row size="25" />
  23. </Rows>
  24. <Band id="head">
  25. <Cell text="시작일" />
  26. <Cell col="1" text="종료일" />
  27. <Cell col="2" text="급여총액" />
  28. </Band>
  29. <Band id="body">
  30. <Cell text="bind:fromdd" />
  31. <Cell col="1" text="bind:todd" />
  32. <Cell col="2" text="bind:ownbamt" />
  33. </Band>
  34. </Format>
  35. </Formats>
  36. </Grid>
  37. <Shape id="line2" class="line_1" linetype="horizontal" position="absolute 0 26 548 29" style="" anchor="default" />
  38. <Grid id="grd_operlist" binddataset="ds_main_list2_opcdlist" position="absolute 0 31 550 340" style="" ontextchanged="group3_grd_operlist_ontextchanged">
  39. <Formats>
  40. <Format id="default">
  41. <Columns>
  42. <Column size="60" />
  43. <Column size="148" />
  44. <Column size="71" />
  45. <Column size="86" />
  46. <Column size="78" />
  47. <Column size="80" />
  48. <Column size="60" />
  49. </Columns>
  50. <Rows>
  51. <Row size="25" band="head" />
  52. <Row size="25" />
  53. </Rows>
  54. <Band id="head">
  55. <Cell text="수술코드" />
  56. <Cell col="1" text="코드명칭" />
  57. <Cell col="2" text="수술일자" />
  58. <Cell col="3" text="적용시작일자" />
  59. <Cell col="4" text="적용종료일자" />
  60. <Cell col="5" text="급여총액" />
  61. <Cell col="6" text="적용여부" />
  62. <Cell col="7" text="" />
  63. </Band>
  64. <Band id="body">
  65. <Cell text="bind:snglcalcscorcd" />
  66. <Cell col="1" text="bind:hngnm" />
  67. <Cell col="2" text="bind:execdd" />
  68. <Cell col="3" text="bind:fromdd" />
  69. <Cell col="4" text="bind:todd" />
  70. <Cell col="5" text="bind:payamt" />
  71. <Cell col="6" text="bind:flag" />
  72. <Cell col="7" text="bind:applyop" />
  73. </Band>
  74. </Format>
  75. </Formats>
  76. </Grid>
  77. <Static id="caption2" class="tit_2" position="absolute 2 10 152 23" style="" text="수술코드 및 수술일자" />
  78. <Static id="caption3" class="tit_2" position="absolute 5 471 215 484" style="" text="기간별 본인부담율 적용 내역" />
  79. <Shape id="line3" class="line_1" linetype="horizontal" position="absolute 0 486 792 489" style="" anchor="default" />
  80. <Grid id="grd_appterm" binddataset="ds_hidden_list1_insulist" position="absolute 0 493 792 675" style="" ontextchanged="group3_grd_appterm_ontextchanged">
  81. <Formats>
  82. <Format id="default">
  83. <Columns>
  84. <Column size="70" />
  85. <Column size="60" />
  86. <Column size="70" />
  87. <Column size="70" />
  88. <Column size="60" />
  89. <Column size="87" />
  90. <Column size="85" />
  91. <Column size="85" />
  92. <Column size="83" />
  93. <Column size="60" />
  94. <Column size="95" />
  95. <Column size="100" />
  96. </Columns>
  97. <Rows>
  98. <Row size="25" band="head" />
  99. <Row size="25" />
  100. </Rows>
  101. <Band id="head">
  102. <Cell text="환자번호" />
  103. <Cell col="1" text="환자이름" />
  104. <Cell col="2" text="입원일자" />
  105. <Cell col="3" text="적용일자" />
  106. <Cell col="4" text="보험유형" />
  107. <Cell col="5" text="유형보조" />
  108. <Cell col="6" text="시작일자" />
  109. <Cell col="7" text="종료일자" />
  110. <Cell col="8" text="본인부담율" />
  111. <Cell col="9" text="instcd" />
  112. <Cell col="10" text="유형종료예정일" />
  113. <Cell col="11" text="caption1" />
  114. </Band>
  115. <Band id="body">
  116. <Cell text="bind:pid" />
  117. <Cell col="1" text="bind:hngnm" />
  118. <Cell col="2" text="bind:indd" />
  119. <Cell col="3" text="bind:appdd" />
  120. <Cell col="4" text="bind:insukind" />
  121. <Cell col="5" text="bind:col01" />
  122. <Cell col="6" text="bind:fromdd" />
  123. <Cell col="7" text="bind:todd" />
  124. <Cell col="8" text="bind:ownbrate" />
  125. <Cell col="9" text="bind:instcd" />
  126. <Cell col="10" text="bind:opertodd" />
  127. <Cell col="11" text="bind:cretno" />
  128. </Band>
  129. </Format>
  130. </Formats>
  131. </Grid>
  132. <Grid id="grd_insulist" binddataset="ds_main_list3_insulist" position="absolute 0 381 792 465" style="">
  133. <Formats>
  134. <Format id="default">
  135. <Columns>
  136. <Column size="70" />
  137. <Column size="60" />
  138. <Column size="70" />
  139. <Column size="70" />
  140. <Column size="60" />
  141. <Column size="60" />
  142. <Column size="85" />
  143. <Column size="85" />
  144. <Column size="83" />
  145. <Column size="60" />
  146. <Column size="95" />
  147. <Column size="100" />
  148. <Column size="100" />
  149. <Column size="100" />
  150. <Column size="100" />
  151. </Columns>
  152. <Rows>
  153. <Row size="25" band="head" />
  154. <Row size="25" />
  155. </Rows>
  156. <Band id="head">
  157. <Cell text="환자번호" />
  158. <Cell col="1" text="환자이름" />
  159. <Cell col="2" text="입원일자" />
  160. <Cell col="3" text="적용일자" />
  161. <Cell col="4" text="보험유형" />
  162. <Cell col="5" text="유형보조" />
  163. <Cell col="6" text="시작일자" />
  164. <Cell col="7" text="종료일자" />
  165. <Cell col="8" text="본인부담율" />
  166. <Cell col="9" text="instcd" />
  167. <Cell col="10" text="유형종료예정일" />
  168. <Cell col="11" text="청구여부" />
  169. <Cell col="12" text="seqno" />
  170. <Cell col="13" text="mskind" />
  171. <Cell col="14" text="cretno" />
  172. </Band>
  173. <Band id="body">
  174. <Cell text="bind:pid" />
  175. <Cell col="1" text="bind:hngnm" />
  176. <Cell col="2" text="bind:indd" />
  177. <Cell col="3" text="bind:appdd" />
  178. <Cell col="4" text="bind:insukind" />
  179. <Cell col="5" text="bind:suppkind" />
  180. <Cell col="6" text="bind:fromdd" />
  181. <Cell col="7" text="bind:todd" />
  182. <Cell col="8" text="bind:ownbrate" />
  183. <Cell col="9" text="bind:instcd" />
  184. <Cell col="10" text="bind:opertodd" />
  185. <Cell col="11" text="bind:clamflag" />
  186. <Cell col="12" text="bind:seqno" />
  187. <Cell col="13" text="bind:mskind" />
  188. <Cell col="14" text="bind:cretno" />
  189. </Band>
  190. </Format>
  191. </Formats>
  192. </Grid>
  193. <Static id="caption4" class="tit_2" position="absolute 5 361 170 374" style="" text="현재보험정보" />
  194. <Shape id="line4" class="line_1" linetype="horizontal" position="absolute 0 376 792 379" style="" anchor="default" />
  195. <Shape id="roundrect1" anchor="default" class="roundrect_example" type="roundrectangle" position="absolute 554 351 792 374" style="" />
  196. <Calendar id="ipt_pid" class="input_default" position="absolute 648 353 739 372" style="" anchor="default" />
  197. <Static id="caption5" position="absolute 557 356 646 371" style="font:,8,8pt;" text="유형종료예정일 :" />
  198. </Layout>
  199. </Layouts>
  200. </Div>
  201. <Div id="group1" position="absolute 0 709 800 736" style="">
  202. <Layouts>
  203. <Layout>
  204. <Button id="btn_apply" class="btn4_letter2" position="absolute 676 5 732 27" style="" text="확정" onclick="group1_btn_apply_onclick" />
  205. <Button id="button2" class="btn4_letter2" position="absolute 736 5 792 27" style="" text="닫기" onclick="group1_button2_onclick" />
  206. <Shape id="line32" class="line_6" linetype="horizontal" position="absolute 0 0 799 3" style="" anchor="default" />
  207. <Button id="btn_opapply" class="btn4_letter4" position="absolute 593 5 673 27" style="" text="기간적용" onclick="group1_btn_opapply_onclick" />
  208. <Button id="btn_iphsrebuild" class="btn4_letter4" position="absolute 510 5 590 27" style="" text="유형복원" onclick="group1_btn_iphsrebuild_onclick" />
  209. </Layout>
  210. </Layouts>
  211. </Div>
  212. <Button id="btn_save" class="btn5_letter2" position="absolute 747 353 789 372" style="" text="저장" onclick="btn_save_onclick" />
  213. </Layout>
  214. </Layouts>
  215. <Objects>
  216. <Dataset id="ds_main_list3" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  217. <ColumnInfo />
  218. </Dataset>
  219. <Dataset id="ds_main_list2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  220. <ColumnInfo />
  221. </Dataset>
  222. <Dataset id="ds_main_list5" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  223. <ColumnInfo />
  224. </Dataset>
  225. <Dataset id="ds_main_list4" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  226. <ColumnInfo>
  227. <Column id="pmbminsu" type="STRING" size="256" />
  228. </ColumnInfo>
  229. <Rows>
  230. <Row>
  231. <Col id="pmbminsu"></Col>
  232. </Row>
  233. </Rows>
  234. </Dataset>
  235. <Dataset id="ds_hidden_list5" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  236. <ColumnInfo />
  237. </Dataset>
  238. <Dataset id="ds_hidden_list4" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  239. <ColumnInfo>
  240. <Column id="pid" type="STRING" size="256" />
  241. <Column id="mskind" type="STRING" size="256" />
  242. <Column id="calcbasedd" type="STRING" size="256" />
  243. <Column id="instcd" type="STRING" size="256" />
  244. <Column id="cretno" type="STRING" size="256" />
  245. <Column id="indd" type="STRING" size="256" />
  246. </ColumnInfo>
  247. <Rows>
  248. <Row>
  249. <Col id="pid"></Col>
  250. <Col id="mskind"></Col>
  251. <Col id="calcbasedd"></Col>
  252. <Col id="instcd"></Col>
  253. <Col id="cretno"></Col>
  254. <Col id="indd"></Col>
  255. </Row>
  256. </Rows>
  257. </Dataset>
  258. <Dataset id="ds_hidden_list1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  259. <ColumnInfo />
  260. </Dataset>
  261. <Dataset id="ds_hidden_list3" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  262. <ColumnInfo>
  263. <Column id="opcdlist" type="STRING" size="256" />
  264. </ColumnInfo>
  265. <Rows>
  266. <Row>
  267. <Col id="opcdlist"></Col>
  268. </Row>
  269. </Rows>
  270. </Dataset>
  271. <Dataset id="ds_hidden_list2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  272. <ColumnInfo>
  273. <Column id="rslt" type="STRING" size="256" />
  274. </ColumnInfo>
  275. </Dataset>
  276. <Dataset id="ds_hidden_list1_insulist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  277. <ColumnInfo>
  278. <Column id="pid" type="STRING" size="256" />
  279. <Column id="hngnm" type="STRING" size="256" />
  280. <Column id="indd" type="STRING" size="256" />
  281. <Column id="appdd" type="STRING" size="256" />
  282. <Column id="insukind" type="STRING" size="256" />
  283. <Column id="col01" type="STRING" size="256" />
  284. <Column id="fromdd" type="STRING" size="256" />
  285. <Column id="todd" type="STRING" size="256" />
  286. <Column id="ownbrate" type="STRING" size="256" />
  287. <Column id="instcd" type="STRING" size="256" />
  288. <Column id="opertodd" type="STRING" size="256" />
  289. <Column id="mskind" type="STRING" size="256" />
  290. <Column id="cretno" type="STRING" size="256" />
  291. </ColumnInfo>
  292. <Rows>
  293. <Row>
  294. <Col id="pid"></Col>
  295. <Col id="hngnm"></Col>
  296. <Col id="indd"></Col>
  297. <Col id="appdd"></Col>
  298. <Col id="insukind"></Col>
  299. <Col id="col01"></Col>
  300. <Col id="fromdd"></Col>
  301. <Col id="todd"></Col>
  302. <Col id="ownbrate"></Col>
  303. <Col id="instcd"></Col>
  304. <Col id="opertodd"></Col>
  305. <Col id="mskind"></Col>
  306. <Col id="cretno"></Col>
  307. </Row>
  308. </Rows>
  309. </Dataset>
  310. <Dataset id="ds_hidden_newoperddsend" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  311. <ColumnInfo>
  312. <Column id="newoperdd" type="STRING" size="256" />
  313. </ColumnInfo>
  314. <Rows>
  315. <Row>
  316. <Col id="newoperdd"></Col>
  317. </Row>
  318. </Rows>
  319. </Dataset>
  320. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  321. <ColumnInfo />
  322. </Dataset>
  323. <Dataset id="ds_main" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  324. <ColumnInfo />
  325. </Dataset>
  326. <Dataset id="ds_hidden_list5_kindlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  327. <ColumnInfo>
  328. <Column id="fromdd" type="STRING" size="256" />
  329. <Column id="todd" type="STRING" size="256" />
  330. <Column id="suppkind" type="STRING" size="256" />
  331. </ColumnInfo>
  332. <Rows>
  333. <Row>
  334. <Col id="fromdd"></Col>
  335. <Col id="todd"></Col>
  336. <Col id="suppkind"></Col>
  337. </Row>
  338. </Rows>
  339. </Dataset>
  340. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  341. <ColumnInfo>
  342. <Column id="temp" type="STRING" size="256" />
  343. </ColumnInfo>
  344. </Dataset>
  345. <Dataset id="ds_send_uptoperdd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  346. <ColumnInfo>
  347. <Column id="pid" type="STRING" size="256" />
  348. <Column id="indd" type="STRING" size="256" />
  349. <Column id="cretno" type="STRING" size="256" />
  350. <Column id="instcd" type="STRING" size="256" />
  351. <Column id="insukind" type="STRING" size="256" />
  352. <Column id="suppkind" type="STRING" size="256" />
  353. <Column id="fromdd" type="STRING" size="256" />
  354. <Column id="todd" type="STRING" size="256" />
  355. <Column id="mskind" type="STRING" size="256" />
  356. <Column id="newoperdd" type="STRING" size="256" />
  357. </ColumnInfo>
  358. <Rows>
  359. <Row>
  360. <Col id="pid"></Col>
  361. <Col id="indd"></Col>
  362. <Col id="cretno"></Col>
  363. <Col id="instcd"></Col>
  364. <Col id="insukind"></Col>
  365. <Col id="suppkind"></Col>
  366. <Col id="fromdd"></Col>
  367. <Col id="todd"></Col>
  368. <Col id="mskind"></Col>
  369. <Col id="newoperdd"></Col>
  370. </Row>
  371. </Rows>
  372. </Dataset>
  373. <Dataset id="ds_main_list5_payamtperday" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  374. <ColumnInfo>
  375. <Column id="execdd" type="STRING" size="256" />
  376. <Column id="payamt" type="STRING" size="256" />
  377. </ColumnInfo>
  378. <Rows>
  379. <Row>
  380. <Col id="execdd"></Col>
  381. <Col id="payamt"></Col>
  382. </Row>
  383. </Rows>
  384. </Dataset>
  385. <Dataset id="ds_hidden_list2_insulist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  386. <ColumnInfo>
  387. <Column id="iphs_status" type="STRING" size="256" />
  388. <Column id="iphs_pid" type="STRING" size="256" />
  389. <Column id="iphs_indd" type="STRING" size="256" />
  390. <Column id="iphs_cretno" type="STRING" size="256" />
  391. <Column id="iphs_mskind" type="STRING" size="256" />
  392. <Column id="iphs_fromdd" type="STRING" size="256" />
  393. <Column id="iphs_seqno" type="STRING" size="256" />
  394. <Column id="iphs_todd" type="STRING" size="256" />
  395. <Column id="iphs_instcd" type="STRING" size="256" />
  396. <Column id="iphs_insukind" type="STRING" size="256" />
  397. <Column id="iphs_suppkind" type="STRING" size="256" />
  398. <Column id="iphs_opertodd" type="STRING" size="256" />
  399. </ColumnInfo>
  400. <Rows>
  401. <Row>
  402. <Col id="iphs_status"></Col>
  403. <Col id="iphs_pid"></Col>
  404. <Col id="iphs_indd"></Col>
  405. <Col id="iphs_cretno"></Col>
  406. <Col id="iphs_mskind"></Col>
  407. <Col id="iphs_fromdd"></Col>
  408. <Col id="iphs_seqno"></Col>
  409. <Col id="iphs_todd"></Col>
  410. <Col id="iphs_instcd"></Col>
  411. <Col id="iphs_insukind"></Col>
  412. <Col id="iphs_suppkind"></Col>
  413. <Col id="iphs_opertodd"></Col>
  414. </Row>
  415. </Rows>
  416. </Dataset>
  417. <Dataset id="ds_main_list3_insulist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  418. <ColumnInfo>
  419. <Column id="pid" type="STRING" size="256" />
  420. <Column id="hngnm" type="STRING" size="256" />
  421. <Column id="indd" type="STRING" size="256" />
  422. <Column id="appdd" type="STRING" size="256" />
  423. <Column id="insukind" type="STRING" size="256" />
  424. <Column id="suppkind" type="STRING" size="256" />
  425. <Column id="fromdd" type="STRING" size="256" />
  426. <Column id="todd" type="STRING" size="256" />
  427. <Column id="ownbrate" type="STRING" size="256" />
  428. <Column id="instcd" type="STRING" size="256" />
  429. <Column id="opertodd" type="STRING" size="256" />
  430. <Column id="clamflag" type="STRING" size="256" />
  431. <Column id="seqno" type="STRING" size="256" />
  432. <Column id="mskind" type="STRING" size="256" />
  433. <Column id="cretno" type="STRING" size="256" />
  434. </ColumnInfo>
  435. <Rows>
  436. <Row>
  437. <Col id="pid"></Col>
  438. <Col id="hngnm"></Col>
  439. <Col id="indd"></Col>
  440. <Col id="appdd"></Col>
  441. <Col id="insukind"></Col>
  442. <Col id="suppkind"></Col>
  443. <Col id="fromdd"></Col>
  444. <Col id="todd"></Col>
  445. <Col id="ownbrate"></Col>
  446. <Col id="instcd"></Col>
  447. <Col id="opertodd"></Col>
  448. <Col id="clamflag"></Col>
  449. <Col id="seqno"></Col>
  450. <Col id="mskind"></Col>
  451. <Col id="cretno"></Col>
  452. </Row>
  453. </Rows>
  454. </Dataset>
  455. <Dataset id="ds_send_cond" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  456. <ColumnInfo>
  457. <Column id="pid" type="STRING" size="256" />
  458. <Column id="indd" type="STRING" size="256" />
  459. <Column id="cretno" type="STRING" size="256" />
  460. <Column id="mskind" type="STRING" size="256" />
  461. <Column id="instcd" type="STRING" size="256" />
  462. <Column id="vcode" type="STRING" size="256" />
  463. <Column id="brateflag" type="STRING" size="256" />
  464. <Column id="brthdd" type="STRING" size="256" />
  465. <Column id="saveyn" type="STRING" size="256" />
  466. <Column id="ownbrate" type="STRING" size="256" />
  467. <Column id="cfe" type="STRING" size="256" />
  468. </ColumnInfo>
  469. <Rows>
  470. <Row>
  471. <Col id="pid"></Col>
  472. <Col id="indd"></Col>
  473. <Col id="cretno"></Col>
  474. <Col id="mskind"></Col>
  475. <Col id="instcd"></Col>
  476. <Col id="vcode"></Col>
  477. <Col id="brateflag"></Col>
  478. <Col id="brthdd"></Col>
  479. <Col id="saveyn"></Col>
  480. <Col id="ownbrate"></Col>
  481. <Col id="cfe"></Col>
  482. </Row>
  483. </Rows>
  484. </Dataset>
  485. <Dataset id="ds_main_list2_opcdlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  486. <ColumnInfo>
  487. <Column id="snglcalcscorcd" type="STRING" size="256" />
  488. <Column id="hngnm" type="STRING" size="256" />
  489. <Column id="execdd" type="STRING" size="256" />
  490. <Column id="fromdd" type="STRING" size="256" />
  491. <Column id="todd" type="STRING" size="256" />
  492. <Column id="payamt" type="STRING" size="256" />
  493. <Column id="flag" type="STRING" size="256" />
  494. <Column id="applyop" type="STRING" size="256" />
  495. </ColumnInfo>
  496. <Rows>
  497. <Row>
  498. <Col id="snglcalcscorcd"></Col>
  499. <Col id="hngnm"></Col>
  500. <Col id="execdd"></Col>
  501. <Col id="fromdd"></Col>
  502. <Col id="todd"></Col>
  503. <Col id="payamt"></Col>
  504. <Col id="flag"></Col>
  505. <Col id="applyop"></Col>
  506. </Row>
  507. </Rows>
  508. </Dataset>
  509. <Dataset id="ds_hidden_source" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  510. <ColumnInfo>
  511. <Column id="pid" type="STRING" size="256" />
  512. <Column id="indd" type="STRING" size="256" />
  513. <Column id="cretno" type="STRING" size="256" />
  514. <Column id="mskind" type="STRING" size="256" />
  515. <Column id="brateflag" type="STRING" size="256" />
  516. <Column id="brthdd" type="STRING" size="256" />
  517. </ColumnInfo>
  518. <Rows>
  519. <Row>
  520. <Col id="pid"></Col>
  521. <Col id="indd"></Col>
  522. <Col id="cretno"></Col>
  523. <Col id="mskind"></Col>
  524. <Col id="brateflag"></Col>
  525. <Col id="brthdd"></Col>
  526. </Row>
  527. </Rows>
  528. </Dataset>
  529. <Dataset id="ds_hidden_newoperddresult" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  530. <ColumnInfo />
  531. </Dataset>
  532. <Dataset id="ds_main_list1_ownbamtlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  533. <ColumnInfo>
  534. <Column id="fromdd" type="STRING" size="256" />
  535. <Column id="todd" type="STRING" size="256" />
  536. <Column id="ownbamt" type="STRING" size="256" />
  537. </ColumnInfo>
  538. <Rows>
  539. <Row>
  540. <Col id="fromdd"></Col>
  541. <Col id="todd"></Col>
  542. <Col id="ownbamt"></Col>
  543. </Row>
  544. </Rows>
  545. </Dataset>
  546. <Dataset id="ds_hidden_newoperddresult_result" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  547. <ColumnInfo>
  548. <Column id="inpt_count" type="STRING" size="256" />
  549. </ColumnInfo>
  550. </Dataset>
  551. <Dataset id="ds_main_list1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="keep">
  552. <ColumnInfo />
  553. </Dataset>
  554. </Objects>
  555. <Bind>
  556. <BindItem id="item0" compid="group3.ipt_pid" propid="value" datasetid="ds_hidden_newoperddsend" columnid="newoperdd" />
  557. </Bind>
  558. <Script type="xscript4.0"><![CDATA[function SPPIJ01900_onload(obj:Form, e:LoadEventInfo) {
  559. // [자연분만, 중증질환 기간산정 유형변경 처리유형]
  560. //
  561. // 1. 한개의 유형 30일 안넘은 경우
  562. // (AS-IS의경우 처음부터 기간을 미리 적용해놓음)
  563. // => (넘겨줄파라미터)
  564. // iphs key , insukind, suppkind, fromdd, todd
  565. // 예) 입원일 : 20070101, 현재일자 :20070115
  566. // =>파라미터 :Fromdd : 20070101, Todd : 20070130
  567. // insukind : 11, suppkind : 05
  568. // => 결과 : 20070101-20070130 (11:05)
  569. // 20070131-99991231 (11:00)
  570. // 2개 발생되어야함.
  571. //
  572. // 2. 한개의 유형 30일 초과의 경우 중간에 끊는경우
  573. // => (넘겨줄파라미터)
  574. // iphs key , insukind, suppkind, fromdd, todd
  575. // 예) 입월일 :20070101, 현재일자 20070331
  576. // =>파라미터 :Fromdd : 20070131, Todd : 20070228
  577. // insukind : 11, suppkind : 05
  578. // => 결과 : 20070101-20070130 (11:00)
  579. // 20070131-20070228 (11:05)
  580. // 20070301-99991231 (11:00)
  581. // 3개 발생되어야함.
  582. //
  583. // 3. 유형이 두개(11, 22) 존재하고 기간을 걸쳐서 중증일자를 적용하는경우
  584. // => (넘겨줄파라미터) : 유형별로 각각 호출한다.
  585. // iphs key , insukind, suppkind, fromdd, todd
  586. // 예)입원일자 :20070101, 현재일자 20070501
  587. // 유형별 기간 11:00 => 20070101- 20070331
  588. // 22:00 => 20070401 - 99991231
  589. // 이상태에서 중증기간을 20070315 - 20070413 으로 적용할경우
  590. // 첫번째 호출 :
  591. // =>파라미터 :Fromdd : 20070315, Todd : 20070331
  592. // insukind : 11, suppkind : 05
  593. // => 결과 : 20070101-20070315 (11:00)
  594. // 20070316-20070331 (11:05)
  595. // 2개 발생되어야함.
  596. // 두번째 호출 :
  597. // =>파라미터 :Fromdd : 20070315, Todd : 20070331
  598. // insukind : 22, suppkind : 05
  599. // => 결과 : 20070401-20070413 (22:05)
  600. // 20070414-99991231 (22:00)
  601. // 2개 발생되어야함.
  602. // fInitialize();
  603. }
  604. function SPPIJ01900_onload(obj:Form, e:LoadEventInfo) {
  605. frmf_initForm(obj);
  606. //grdf_initGrid(grd_XXX);
  607. //grdf_setGridSort(grd_XXX);
  608. //grdf_setRowTypeIcon(grd_XXX, 0_컬럼위치값);
  609. fInitialize();
  610. }
  611. include '../../.._com_commonweb_js_common.js'
  612. include '../../.._com_commonweb_js_numericHelper.js'
  613. include '../../.._com_commonweb_js_dateHelper.js'
  614. include '../../.._com_commonweb_js_stringHelper.js'
  615. include '../../.._com_commonweb_js_tfHelper.js'
  616. include '../../.._com_basiccodeweb_js_ZBC001.js'
  617. include '../../.._pam_pamcomnweb_js_PAM.js'
  618. // 화면 open시(와 초기화 버튼 클릭시) 화면 초기화 기능을 수행한다.
  619. function fInitialize() {
  620. ds_main.clearData();
  621. //ds_hidden.clearData();
  622. // 심사마감이나 퇴원이 되었을때는 조작을 할 수 없게 한다. - 20080924 박창원
  623. var saveyn = ds_send_cond.getColumn(0, "saveyn");
  624. if (saveyn == "Y") {
  625. sysf_messageBox("마감이나 퇴원, 중간청구,부적절한 유형적용,읽기전용 모드 상태입니다. 조작은 할 수","E001");
  626. group1.btn_iphsrebuild.enable = false;
  627. group1.btn_opapply.enable = false;
  628. group1.btn_apply.enable = false;
  629. }
  630. // if (submit("TRPIJ01901")) {
  631. var oParam = {};
  632. oParam.id = "TRPIJ01901";
  633. oParam.service = "bfjudgapp.SerDiagOpTermEstm";
  634. oParam.method = "reqGetEssc";
  635. oParam.inds = "req=ds_";
  636. oParam.outds = "ds_=opcdlist ds_=insulist ds_=pmbminsu ds_=payamtperday";
  637. oParam.async = false;
  638. oParam.callback = "cf_TRPIJ01901";
  639. tranf_submit(oParam);
  640. /*
  641. function cf_TRPIJ01901(sSvcId, nErrorCode, sErrorMsg) {
  642. if(nErrorCode < 0) return;
  643. }
  644. function cf_TRPIJ01901(sSvcId, nErrorCode, sErrorMsg) {
  645. arErrorCode.push(sSvcId, nErrorCode);
  646. }
  647. arErrorCode.pop("TRPIJ01901") > -1
  648. arErrorCode.pop("TRPIJ01901") < 0
  649. */
  650. //var opcdcnt = ds_main_list2_opcdlist.rowcount;
  651. var opcdcnt = ds_main_list2_opcdlist.rowcount;
  652. var todd = "";
  653. opcdcnt = parseInt(opcdcnt);
  654. // 수술기간을 판단하여 금액을 산정한다.
  655. fOpPeriodAmt();
  656. // 첫번째 수술의 가장 많은 금액의 기간을 첫번째 수술의 기본적인 적용 시작일, 종료일로 해준다.
  657. group3.grd_esscterm.colSort(group3.grd_esscterm.colRef("ownbamt"))="desc";
  658. group3.grd_esscterm.sort(1, 1, group3.grd_esscterm.rows, 3)="usersort";
  659. group3.grd_esscterm.gridToInstance();
  660. //model.refresh();
  661. ds_main_list2.setColumn( 0, "opcdlist[1]_fromdd", ds_main_list1_ownbamtlist.getColumn(1, "fromdd"));
  662. ds_main_list2.setColumn( 0, "opcdlist[1]_todd", ds_main_list1_ownbamtlist.getColumn(1, "todd"));
  663. // 첫번째 수술에 급여총액 산출
  664. ds_main_list2.setColumn( 0, "opcdlist[1]_payamt", ds_main_list1_ownbamtlist.getColumn(1, "ownbamt"));
  665. group3.grd_esscterm.colsort(1)="asc";
  666. group3.grd_esscterm.sort(1, 1, group3.grd_esscterm.rows, 3)="usersort";
  667. group3.grd_esscterm.gridToInstance();
  668. //model.refresh();
  669. if (opcdcnt > 1) {
  670. // 두번째 수술부터는 수술일로 부터 일괄적으로 30일을 적용한다.
  671. for (i=2;i<=opcdcnt;i++) {
  672. var execdd = ds_main_list2_opcdlist.getColumn(i, "execdd");
  673. // 첫번째 수술과 수술일이 같은 경우는 날짜를 동일하게 맞춰준다. - 20090326 박창원
  674. var fstexecdd = ds_main_list2_opcdlist.getColumn(1, "execdd");
  675. if (execdd == fstexecdd) {
  676. ds_main_list2.setColumn( i , "fromdd", ds_main_list2_opcdlist.getColumn(1, "fromdd"));
  677. ds_main_list2.setColumn( i , "todd", ds_main_list2_opcdlist.getColumn(1, "todd"));
  678. }else {
  679. ds_main_list2.setColumn( i , "fromdd", execdd);
  680. thisYear = execdd.substring(0,4); // 현재 입력된 연
  681. thisMonth = execdd.substring(4,6); // 현재 입력된 월
  682. thisDay = execdd.substring(6,8); // 현재 입력된 일
  683. nextDate = new Date(thisYear, (thisMonth - 1), thisDay );
  684. nextDate.setDate(nextDate.getDate() + 29); // 30일 뒤인 다음날 날짜를 구한다.
  685. todd = "";
  686. todd += nextDate.getYear();
  687. if ((nextDate.getMonth() + 1) < 10) {
  688. todd += "0" + (nextDate.getMonth() + 1);
  689. }
  690. else {
  691. todd += (nextDate.getMonth() + 1);
  692. }
  693. if (nextDate.getDate() < 10) {
  694. todd += "0" + nextDate.getDate();
  695. } else {
  696. todd += nextDate.getDate();
  697. }
  698. ds_main_list2.setColumn( i , "todd", todd);
  699. }
  700. ds_main_list2.setColumn( i , "flag", "Y");
  701. // model.makeNode("ds_main_list2_opcdlist[" + i + "]_hfromdd");
  702. // ds_main_list2.setColumn( i , "hfromdd", execdd);
  703. // 급여금액 계산
  704. // fCalcPayment(i,execdd,todd);
  705. //
  706. //model.refresh();
  707. }
  708. for (j=2;j<=opcdcnt;j++) {
  709. var row = j;
  710. var payexecdd = ds_main_list2_opcdlist.getColumn(j, "fromdd");
  711. var paytodd = ds_main_list2_opcdlist.getColumn(j, "todd");
  712. fCalcPayment(row,payexecdd,paytodd);
  713. }
  714. //model.refresh();
  715. }
  716. //submit("TRPIJ01903"); // 입원일부터 일자별로 급여 총액을 가져온다. 20080728 박창원
  717. //model.refresh();
  718. }
  719. }
  720. // 수술기간을 판단하여 첫번째 수술의 금액을 산정하여 디스플레이한다. - 20080729 박창원
  721. function fOpPeriodAmt() {
  722. var sum_fromdd = new Array();
  723. var sum_todd = new Array();
  724. var sum_payamt = new Array();
  725. var opdd = new Array();
  726. var lowstartdd;
  727. var maxstartdd;
  728. var fromdd;
  729. var todd;
  730. var payamtsum = 0;
  731. var payamt = 0;
  732. var cnt = 0;
  733. var opcnt = 0;
  734. var indd = ds_send_cond.getColumn(0, "indd");
  735. // 수술일자를 setting
  736. for(i=1; i<=group3.grd_operlist.rows; i++) {
  737. opdd[i] = ds_main_list2_opcdlist.getColumn(i, "execdd");
  738. }
  739. // 무조건 오른쪽 리스트는 제1수술만 보여준다.
  740. // maxstartdd는 무조건 수술일
  741. maxstartdd = opdd[1];
  742. // 수술일과 입원일의 차이를 계산해서 29일 이내 이면 입원일이 lowstartdd이다.
  743. var interval = utlf_getDateInterval(indd,opdd[1]);
  744. if (interval < "29") {
  745. lowstartdd = indd;
  746. }
  747. else { // 29일 이내가 아니면 수술일로 부터 29일전이 lowstartdd이다.
  748. var tempdd;
  749. tempdd = opdd[1].toDate("YYYYMMDD");
  750. tempdd = tempdd.getAddDate(-29);
  751. lowstartdd = tempdd.getDateFormat();
  752. }
  753. //
  754. // 나눠진 lowstartdd, MaxStart기준으로 금액을 산정하여 합한다.
  755. for(i=1; i < 31;i++) {
  756. fromdd = lowstartdd;
  757. basedd = fromdd;
  758. // todd는 시작일로부터 29일을 더한다.
  759. todd = fromdd.toDate("YYYYMMDD");
  760. todd = todd.getAddDate(29);
  761. todd = todd.getDateFormat();
  762. // 금액을 합한다.
  763. for(j=1; j<31; j++) {
  764. payamt = model.getValue("ds_main_list5_payamtperday[execdd = " + basedd + "]_payamt");
  765. if (payamt == "") {
  766. payamt = 0;
  767. }
  768. if (isNaN(payamt) != true) {
  769. payamt = parseInt(payamt);
  770. payamtsum = payamtsum + payamt;
  771. }
  772. // basedd를 증가시킨다(하루씩)
  773. basedd = basedd.toDate("YYYYMMDD");
  774. basedd = basedd.getAddDate(1);
  775. basedd = basedd.getDateFormat();
  776. // basedd가 todd보다 클경우 빠져나간다.
  777. if (basedd > todd) {
  778. continue;
  779. }
  780. }
  781. // lowstartdd가 opdd보다 클경우 빠져나간다.
  782. if (fromdd > opdd[1]) {
  783. continue;
  784. }
  785. // 한 사이클의 시작종료에 대한 금액의 sum을 저장
  786. sum_fromdd[i] = fromdd;
  787. sum_todd[i] = todd;
  788. sum_payamt[i] = payamtsum;
  789. payamtsum = 0;
  790. cnt = cnt + 1;
  791. // lowstartdd를 증가시킨다(하루씩)
  792. lowstartdd = lowstartdd.toDate("YYYYMMDD");
  793. lowstartdd = lowstartdd.getAddDate(1);
  794. lowstartdd = lowstartdd.getDateFormat();
  795. }
  796. ds_main_list1_ownbmtlist.clearData();
  797. for (i=1;i<cnt + 1;i++) {
  798. ds_main_list1_ownbamtlist.setColumn( i, "fromdd", sum_fromdd[i]);
  799. ds_main_list1_ownbamtlist.setColumn( i, "todd", sum_todd[i]);
  800. ds_main_list1_ownbamtlist.setColumn( i, "ownbamt", sum_payamt[i]);
  801. }
  802. /* // 수술이 두개일경우
  803. else if (group3.grd_operlist.rows == 3) {
  804. // 두수술의 날짜가 30일 이상나는지 판단함
  805. // 첫번째 수술일과 두번째 수술일의 차이를 계산
  806. var interval = utlf_getDateInterval(opdd[2],opdd[1]);
  807. // 첫번째 수술일과 입원일의 차이를 계산
  808. var interval1 = utlf_getDateInterval(opdd[1],indd);
  809. // 두번째 수술일과 입원일의 차이를 계산
  810. var interval2 = utlf_getDateInterval(opdd[2],indd);
  811. // 명백하게 기간이 겹치기 때문에 합쳐야 되는 경우
  812. if (interval < "29" && interval1 < "29" && interval2 < "30") {
  813. fromdd = indd; // 시작일은 입원일이 된다.
  814. basedd = fromdd;
  815. // todd는 마지막수술일 + 29
  816. var lastopdd = opdd[2].toDate("YYYYMMDD");
  817. todd = lastopdd.getAddDate(29);
  818. todd = todd.getDateFormat();
  819. var period = utlf_getDateInterval(todd,fromdd);
  820. // 시작일 부터 종료일 까지 금액 함산
  821. for (i = 1; i<period; i++) {
  822. basedd = fromdd;
  823. payamt = model.getValue("ds_main_list5_payamtperday[execdd = " + basedd + "]_payamt");
  824. if (payamt == "") {
  825. payamt = 0;
  826. }
  827. if (isNaN(payamt) != true) {
  828. payamt = parseInt(payamt);
  829. payamtsum = payamtsum + payamt;
  830. }
  831. // basedd를 증가시킨다(하루씩)
  832. basedd = basedd.toDate("YYYYMMDD");
  833. basedd = basedd.getAddDate(1);
  834. basedd = basedd.getDateFormat();
  835. // 한 사이클의 시작종료에 대한 금액의 sum을 저장
  836. sum_fromdd[i] = fromdd;
  837. sum_todd[i] = todd;
  838. sum_payamt[i] = payamtsum;
  839. payamtsum = 0;
  840. cnt = cnt + 1;
  841. } // for i
  842. ds_main_list1_ownbmtlist.clearData();
  843. for (i=1;i<cnt + 1;i++) {
  844. ds_main_list1_ownbamtlist.setColumn( i, "fromdd", sum_fromdd[i]);
  845. ds_main_list1_ownbamtlist.setColumn( i, "todd", sum_todd[i]);
  846. ds_main_list1_ownbamtlist.setColumn( i, "ownbamt", sum_payamt[i]);
  847. }
  848. } // if (interval < "29" && interval1 < "29" && interval2 < "30")
  849. } // else if (group3.grd_operlist.rows == 2) */
  850. //model.refresh();
  851. }
  852. // fromdd와 todd에 다른 급여 총액을 계산해서 수술코드 및 일자에 디스플레이
  853. function fCalcPayment(inptrow,fromdd,todd) {
  854. var row = inptrow;
  855. // 날짜에 따른 금액을 산정한다
  856. var payment = 0;
  857. var payfromdd = fromdd;
  858. var paytodd = todd;
  859. // 시작일과 종료일간의 차를 구함
  860. var period = utlf_getDateInterval(payfromdd, paytodd);
  861. // 시작일부터 종료일까지 금액산정
  862. for (i=1; i <= period + 1; i++) {
  863. var payexecdd = model.getValue("ds_main_list5_payamtperday[execdd =" + payfromdd + "]_payamt");
  864. if (payexecdd == "") {
  865. payexecdd = 0;
  866. }
  867. if (isNaN(payexecdd) != true) {
  868. payexecdd = parseInt(payexecdd);
  869. payment = payment + payexecdd;
  870. }
  871. // payfromdd 를 증가시킨다(하루씩)
  872. payfromdd = payfromdd.toDate("YYYYMMDD");
  873. payfromdd = payfromdd.getAddDate(1);
  874. payfromdd = payfromdd.getDateFormat();
  875. // payfromdd가 todd보다 클경우 빠져나간다.
  876. if (payfromdd > paytodd) {
  877. continue;
  878. }
  879. } //for i
  880. ds_main_list2.setColumn( row , "payamt", payment);
  881. }
  882. //유형적용 완료후 소급처리 한다.
  883. function fReCalc() {
  884. // 입원일 부터 현재까지 계산한다(일일단위로 loop)
  885. var fromdd = ds_send_cond.getColumn(0, "indd");
  886. var curdd = utlf_getCurrentDate();
  887. var period = utlf_getDateInterval(fromdd, curdd);
  888. // fromdd부터 currentdate까지 loop
  889. for (i=1; i<= period + 1; i++) {
  890. dsf_makeValue( ds_hidden_list4_insulist, "pid", "string", "" );
  891. dsf_makeValue( ds_hidden_list4_insulist, "indd", "string", "" );
  892. dsf_makeValue( ds_hidden_list4_insulist, "mskind", "string", "" );
  893. dsf_makeValue( ds_hidden_list4_insulist, "calcbasedd", "string", "" );
  894. dsf_makeValue( ds_hidden_list4_insulist, "cretno", "string", "" );
  895. ds_hidden_list4_insulist.setColumn( 0, "pid", ds_send_cond.getColumn(0, "pid"));
  896. ds_hidden_list4_insulist.setColumn( 0, "indd", ds_send_cond.getColumn(0, "indd"));
  897. ds_hidden_list4_insulist.setColumn( 0, "mskind", ds_send_cond.getColumn(0, "mskind"));
  898. ds_hidden_list4_insulist.setColumn( 0, "cretno", ds_send_cond.getColumn(0, "cretno"));
  899. ds_hidden_list4_insulist.setColumn( 0, "calcbasedd", fromdd);
  900. // submit("TXPIJ00205");
  901. var oParam = {};
  902. oParam.id = "TXPIJ00205";
  903. oParam.service = "bfjudgapp.InHospJudgTrgtMan";
  904. oParam.method = "reqInCalculation";
  905. oParam.inds = "req=ds_";
  906. oParam.outds = "";
  907. oParam.async = false;
  908. oParam.callback = "cf_TXPIJ00205";
  909. tranf_submit(oParam);
  910. /*
  911. function cf_TXPIJ00205(sSvcId, nErrorCode, sErrorMsg) {
  912. if(nErrorCode < 0) return;
  913. }
  914. function cf_TXPIJ00205(sSvcId, nErrorCode, sErrorMsg) {
  915. arErrorCode.push(sSvcId, nErrorCode);
  916. }
  917. arErrorCode.pop("TXPIJ00205") > -1
  918. arErrorCode.pop("TXPIJ00205") < 0
  919. */
  920. // fromdd를 증가시킨다(하루씩)
  921. fromdd = fromdd.toDate("YYYYMMDD");
  922. fromdd = fromdd.getAddDate(1);
  923. fromdd = fromdd.getDateFormat();
  924. }
  925. }
  926. function group3_grd_esscterm_oncellclick(obj:Grid, e:GridClickEventInfo) {
  927. var torow = group3.grd_operlist.row;
  928. var fromrow = group3.grd_esscterm.row;
  929. if (group3.grd_esscterm.isCell(event.target) && group3.grd_esscterm.row >= group3.grd_esscterm.fixedRows) {
  930. if ( group3.grd_operlist.row >= group3.grd_operlist.fixedRows) {
  931. var execdd = ds_main_list2_opcdlist.getColumn(torow, "execdd"));
  932. var fromdd = ds_main_list1_ownbamtlist.getColumn(fromrow, "fromdd"));
  933. var todd = ds_main_list1_ownbamtlist.getColumn(fromrow, "todd"));
  934. ds_main_list2.setColumn( torow , "fromdd",ds_main_list1_ownbamtlist.getColumn(fromrow, "fromdd")));
  935. ds_main_list2.setColumn( torow , "todd",ds_main_list1_ownbamtlist.getColumn(fromrow, "todd")));
  936. ds_main_list2.setColumn( torow , "flag","Y");
  937. }
  938. }
  939. //model.refresh();
  940. }
  941. function group3_grd_operlist_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo) {
  942. var row = group3.grd_operlist.row;
  943. var col = group3.grd_operlist.col;
  944. var indd = ds_send_cond.getColumn(0, "indd");
  945. var fromdd = ds_main_list2_opcdlist.getColumn(row, "fromdd"));
  946. var todd = ds_main_list2_opcdlist.getColumn(row, "todd"));
  947. var chkopdd = ds_main_list2_opcdlist.getColumn(row, "execdd"));
  948. var chktodd = ds_main_list2_opcdlist.getColumn(row, "fromdd"));
  949. var applyop = ds_main_list2_opcdlist.getColumn(row, "applyop"));
  950. // 이미 적용된 날짜와 기간이 겹치지 않게 하기 위해 20080915 박창원
  951. var maxv191192todd = "";
  952. var maxclamtodd = "";
  953. var oprows = group3.grd_operlist.rows;
  954. for(i=1; i < oprows; i++) {
  955. if(ds_main_list2_opcdlist.getColumn(i, "applyop") == "Y") {
  956. maxv191192todd = ds_main_list2_opcdlist.getColumn(i, "todd");
  957. }
  958. }
  959. chktodd = chktodd.toDate("YYYYMMDD");
  960. chktodd = chktodd.getAddDate(29);
  961. chktodd = chktodd.getDateFormat();
  962. // 이미 적용되어잇는 보조유형의 날자를 지정하면 알럿 20080915 박창원
  963. if(applyop == "Y") {
  964. sysf_messageBox("이미 유형적용이 된 수술입니다. 유형복원 후 처리","I006");
  965. todd = todd.toDate("YYYYMMDD");
  966. todd = todd.getAddDate(-29);
  967. fromdd = todd.getDateFormat();
  968. ds_main_list2.setColumn( row , "fromdd", fromdd);
  969. return;
  970. }
  971. // 이미적용되어있는 보조유형의 날짜를 침범하면 error 20080915 박창원
  972. if (fromdd < maxv191192todd) {
  973. sysf_messageBox("이미 적용되어있는 수술기간과 겹치게 선택","E001");
  974. todd = todd.toDate("YYYYMMDD");
  975. todd = todd.getAddDate(-29);
  976. fromdd = todd.getDateFormat();
  977. ds_main_list2.setColumn( row , "fromdd", fromdd);
  978. return;
  979. }
  980. // 적용시작일자가 입원일보다 작으면 ERROR
  981. if (fromdd < indd) {
  982. sysf_messageBox("적용시작일을 입원일 이전으로 선택","E001");
  983. todd = todd.toDate("YYYYMMDD");
  984. todd = todd.getAddDate(-29);
  985. fromdd = todd.getDateFormat();
  986. ds_main_list2.setColumn( row , "fromdd", fromdd);
  987. return;
  988. } else if((fromdd > chkopdd) || (chktodd < chkopdd)) { // 수술일자는 적용기간내에 있어야 한다.
  989. sysf_messageBox("적용기간은 수술일을 제외하여 선택","E001");
  990. todd = todd.toDate("YYYYMMDD");
  991. todd = todd.getAddDate(-29);
  992. fromdd = todd.getDateFormat();
  993. ds_main_list2.setColumn( row , "fromdd", fromdd);
  994. return;
  995. }
  996. var beforefromdd = "";
  997. var todd = "";
  998. if (row > 1) {
  999. var beforerow = eval(row) - 1;
  1000. var beforefromdd = ds_main_list2_opcdlist.getColumn(beforerow, "fromdd"));
  1001. if (beforefromdd > fromdd) {
  1002. sysf_messageBox("이전 수술에 대한 적용시작일자 보다 이전일 적용시작일자로 선택","E001");
  1003. ds_main_list2.setColumn( row , "fromdd", ds_main_list2_opcdlist.getColumn(row, "hfromdd")));
  1004. return;
  1005. }
  1006. }
  1007. if (row >= 1) {
  1008. thisYear = fromdd.substring(0,4); // 현재 입력된 연
  1009. thisMonth = fromdd.substring(4,6); // 현재 입력된 월
  1010. thisDay = fromdd.substring(6,8); // 현재 입력된 일
  1011. nextDate = new Date(thisYear, (thisMonth - 1), thisDay );
  1012. nextDate.setDate(nextDate.getDate() + 29); // 30일 뒤인 다음날 날짜를 구한다.
  1013. todd = "";
  1014. todd += nextDate.getYear();
  1015. if ((nextDate.getMonth() + 1) < 10) {
  1016. todd += "0" + (nextDate.getMonth() + 1);
  1017. }
  1018. else {
  1019. todd += (nextDate.getMonth() + 1);
  1020. }
  1021. if (nextDate.getDate() < 10) {
  1022. todd += "0" + nextDate.getDate();
  1023. } else {
  1024. todd += nextDate.getDate();
  1025. }
  1026. ds_main_list2.setColumn( row , "fromdd", fromdd);
  1027. ds_main_list2.setColumn( row , "todd", todd);
  1028. ds_main_list2.setColumn( row , "flag", "Y");
  1029. }
  1030. // 날짜에 따른 금액을 산정한다
  1031. if (col == group3.grd_operlist.colRef("fromdd")) {
  1032. fCalcPayment(row,fromdd,todd);
  1033. } // if (col == group3.grd_operlist.colRef("fromdd"))
  1034. //model.refresh();
  1035. }
  1036. function group3_grd_appterm_ontextchanged(obj:Grid, e:GridEditTextChangedEventInfo) {
  1037. var row = group3.grd_appterm.row;
  1038. var insukind = ds_hidden_list1_insulist.getColumn(row, "insukind"));
  1039. for (var i=1; i<group3.grd_appterm.rows; i++) {
  1040. group3.grd_appterm.cellComboNodeset(i,6) = "ds_main_list4_pmbminsu[insukind = '"+insukind+"']";
  1041. }
  1042. }
  1043. function group1_btn_apply_onclick(obj:Button, e:ClickEventInfo) {
  1044. // for(i = 0; i < group3.grd_insulist.rows; i++){
  1045. // var chk = ds_main_list3_insulist.getColumn(i, "suppkind");
  1046. // if(chk == "05"){
  1047. // sysf_messageBox("이미 적용된 중증기간이 있습니다. 원무팀에 연락하여 변경처리 전에는 작업 ","E001");
  1048. // return;
  1049. // }
  1050. // }
  1051. // 자료수집이 되었거나 이미 적용이된 수술유형의 경우를 판별해서 해당 유형의 종료일 + 1을 소급계산의 시작일로 하여야 하고
  1052. // 유형변경시에도 제외되어야 한다(자료수집이나 중증 수술 유형적용이 된 환자는 입원일로 부터 소급계산) 20080915 박창원
  1053. var chkv191192 = "N";
  1054. var chkclam = "N";
  1055. var maxv191192todd = "19000101";
  1056. var maxclamtodd = "19000101";
  1057. var maxdate;
  1058. var insurows = group3.grd_insulist.rows;
  1059. for(i=1; i < insurows; i++) {
  1060. if(ds_main_list3_insulist.getColumn(i, "clamflag") == "Y") {
  1061. maxclamtodd = ds_main_list3_insulist.getColumn(i, "todd");
  1062. }
  1063. // 20090325 차상위 2종 적용 - 박창원
  1064. if((ds_main_list3_insulist.getColumn(i, "suppkind") == "05") || (ds_main_list3_insulist.getColumn(i, "suppkind") == "39")){
  1065. maxv191192todd = ds_main_list3_insulist.getColumn(i, "todd");
  1066. }
  1067. if(maxclamtodd >= maxv191192todd) {
  1068. maxdate = maxclamtodd;
  1069. }else{
  1070. maxdate = maxv191192todd;
  1071. }
  1072. }
  1073. var tmp = sysf_messageBox("기간별 본인부담율 적용내역으로 유형번경 처리를", "Q004");
  1074. if(tmp != 6){
  1075. return;
  1076. }
  1077. var pre_fromdd = "";
  1078. var pre_todd = "";
  1079. //필수값들을 체크한다.
  1080. for (var i = 1; i < group3.grd_appterm.rows; i++) {
  1081. var fromdd = ds_hidden_list1_insulist.getColumn(i, "fromdd");
  1082. var todd = ds_hidden_list1_insulist.getColumn(i, "todd");
  1083. var opertodd = ds_hidden_list1_insulist.getColumn(i, "opertodd");
  1084. if(i == 1){
  1085. if(fromdd > todd){
  1086. sysf_messageBox("유형시작일자가 종료일자보다 클 수 없습니다. 변경처리를","E001");
  1087. return;
  1088. }
  1089. }else{
  1090. if(fromdd > todd){
  1091. sysf_messageBox("유형시작일자가 종료일자보다 클 수 없습니다. 변경처리를","E001");
  1092. return;
  1093. }
  1094. /* if(pre_todd >= fromdd){
  1095. sysf_messageBox("적용시작일자가 이전유형 종료일자 보다 작거나 같을수 없습니다. 변경처리를","E001");
  1096. return;
  1097. } */
  1098. //유형종료 예정일이 없는경우는 체크 하지 않기 위해서 todd로 셋팅해준다.
  1099. if(opertodd == ""){
  1100. opertodd = todd;
  1101. }
  1102. if(opertodd > todd ){
  1103. sysf_messageBox("유형종료예정일이 종료일자보다 클수 없습니다. 변경처리를","E001");
  1104. return;
  1105. }
  1106. }
  1107. pre_fromdd = fromdd;
  1108. pre_todd = todd;
  1109. }
  1110. //기간별 본인부담 적용율 내역갯수만큼 돌면서 10%구간을 체크하여 유형번경 로직을 호출한다.
  1111. for (var i = 1; i < group3.grd_appterm.rows; i++) {
  1112. var fromdate = ds_hidden_list1_insulist.getColumn(i, "fromdd");
  1113. var ownbrate = ds_hidden_list1_insulist.getColumn(i, "ownbrate");
  1114. if(ownbrate == "10" && (fromdate > maxv191192todd) ){ // 조건추가 이미 수술로 인해 적용된 유형이 있으면 제외하고 함. 20080915 박창원
  1115. var pid = ds_hidden_list1_insulist.getColumn(i, "pid");
  1116. var indd = ds_hidden_list1_insulist.getColumn(i, "indd");
  1117. var cretno = ds_main_list3_insulist.getColumn(1, "cretno");
  1118. var fromdd = ds_hidden_list1_insulist.getColumn(i, "fromdd");
  1119. var seqno = model.getValue("ds_main_list3_insulist[" + (group3.grd_insulist.rows - 1) + "]_seqno");
  1120. var mskind = ds_main_list3_insulist.getColumn(1, "mskind");
  1121. var todd = ds_hidden_list1_insulist.getColumn(i, "todd");
  1122. var insukind = ds_hidden_list1_insulist.getColumn(i, "insukind");
  1123. var suppkind = ds_hidden_list1_insulist.getColumn(i, "col01");
  1124. var instcd = ds_hidden_list1_insulist.getColumn(i, "instcd");
  1125. var opertodd = ds_hidden_list1_insulist.getColumn(i, "todd");
  1126. ds_hidden_list2_insulist.clearData(); ds_hidden_list2_insulist.addRow();
  1127. var cNode = instance1.selectSingleNode("ds_hidden_list2_insulist");
  1128. if(cNode == null){
  1129. if(pid){
  1130. dsf_makeValue( ds_hidden_list2_insulist, "iphs_status", "string", "" );
  1131. dsf_makeValue( ds_hidden_list2_insulist, "iphs_pid", "string", "" );
  1132. dsf_makeValue( ds_hidden_list2_insulist, "iphs_indd", "string", "" );
  1133. dsf_makeValue( ds_hidden_list2_insulist, "iphs_cretno", "string", "" );
  1134. dsf_makeValue( ds_hidden_list2_insulist, "iphs_fromdd", "string", "" );
  1135. dsf_makeValue( ds_hidden_list2_insulist, "iphs_seqno", "string", "" );
  1136. dsf_makeValue( ds_hidden_list2_insulist, "iphs_mskind", "string", "" );
  1137. dsf_makeValue( ds_hidden_list2_insulist, "iphs_todd", "string", "" );
  1138. dsf_makeValue( ds_hidden_list2_insulist, "iphs_insukind", "string", "" );
  1139. dsf_makeValue( ds_hidden_list2_insulist, "iphs_suppkind", "string", "" );
  1140. dsf_makeValue( ds_hidden_list2_insulist, "iphs_instcd", "string", "" );
  1141. dsf_makeValue( ds_hidden_list2_insulist, "iphs_opertodd", "string", "" );
  1142. ds_hidden_list2_insulist.setColumn( 0, "iphs_status","B");
  1143. ds_hidden_list2_insulist.setColumn( 0, "iphs_pid",pid);
  1144. ds_hidden_list2_insulist.setColumn( 0, "iphs_indd",indd);
  1145. ds_hidden_list2_insulist.setColumn( 0, "iphs_cretno",cretno);
  1146. ds_hidden_list2_insulist.setColumn( 0, "iphs_fromdd",fromdd);
  1147. ds_hidden_list2_insulist.setColumn( 0, "iphs_seqno",seqno);
  1148. ds_hidden_list2_insulist.setColumn( 0, "iphs_mskind",mskind);
  1149. // 20100423 JHP 개심개두 종료일자를 무조건 99991231에서 변경함. 현재일자 기준 종료일이 이전이면 todd, 같거나 크면 99991231로 변경 시작
  1150. // ds_hidden_list2_insulist.setColumn( 0, "iphs_todd", "99991231"); // 이전
  1151. var getcurdd = utlf_getCurrentDate();
  1152. if(getcurdd > todd){
  1153. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd", todd);
  1154. }else{
  1155. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd", "99991231");
  1156. }
  1157. // 20100423 JHP 개심개두 종료일자를 무조건 99991231에서 변경함. 현재일자 기준 종료일이 이전이면 todd, 같거나 크면 99991231로 변경 끝
  1158. ds_hidden_list2_insulist.setColumn( 0, "iphs_insukind",insukind);
  1159. ds_hidden_list2_insulist.setColumn( 0, "iphs_suppkind",suppkind);
  1160. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd);
  1161. ds_hidden_list2_insulist.setColumn( 0, "iphs_opertodd",opertodd);
  1162. }
  1163. }else{
  1164. if(pid){
  1165. ds_hidden_list2_insulist.setColumn( 0, "iphs_status","B");
  1166. ds_hidden_list2_insulist.setColumn( 0, "iphs_pid",pid);
  1167. ds_hidden_list2_insulist.setColumn( 0, "iphs_indd",indd);
  1168. ds_hidden_list2_insulist.setColumn( 0, "iphs_cretno",cretno);
  1169. ds_hidden_list2_insulist.setColumn( 0, "iphs_fromdd",fromdd);
  1170. ds_hidden_list2_insulist.setColumn( 0, "iphs_seqno",seqno);
  1171. ds_hidden_list2_insulist.setColumn( 0, "iphs_mskind",mskind);
  1172. // 20100423 JHP 개심개두 종료일자를 무조건 99991231에서 변경함. 현재일자 기준 종료일이 이전이면 todd, 같거나 크면 99991231로 변경 시작
  1173. // ds_hidden_list2_insulist.setColumn( 0, "iphs_todd", "99991231"); // 이전
  1174. var getcurdd = utlf_getCurrentDate();
  1175. if(getcurdd > todd){
  1176. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd", todd);
  1177. }else{
  1178. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd", "99991231");
  1179. }
  1180. // 20100423 JHP 개심개두 종료일자를 무조건 99991231에서 변경함. 현재일자 기준 종료일이 이전이면 todd, 같거나 크면 99991231로 변경 끝
  1181. ds_hidden_list2_insulist.setColumn( 0, "iphs_insukind",insukind);
  1182. ds_hidden_list2_insulist.setColumn( 0, "iphs_suppkind",suppkind);
  1183. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd);
  1184. ds_hidden_list2_insulist.setColumn( 0, "iphs_opertodd",opertodd);
  1185. }
  1186. }
  1187. ds_hidden_list2_rslt.clearData();
  1188. // submit("TXPIJ01902");
  1189. var oParam = {};
  1190. oParam.id = "TXPIJ01902";
  1191. oParam.service = "ipatmngtapp.InhospUpdt";
  1192. oParam.method = "reqSetInhospUpdt4";
  1193. oParam.inds = "s_iphs=ds_";
  1194. oParam.outds = "ds_=result";
  1195. oParam.async = false;
  1196. oParam.callback = "cf_TXPIJ01902";
  1197. tranf_submit(oParam);
  1198. /*
  1199. function cf_TXPIJ01902(sSvcId, nErrorCode, sErrorMsg) {
  1200. if(nErrorCode < 0) return;
  1201. }
  1202. function cf_TXPIJ01902(sSvcId, nErrorCode, sErrorMsg) {
  1203. arErrorCode.push(sSvcId, nErrorCode);
  1204. }
  1205. arErrorCode.pop("TXPIJ01902") > -1
  1206. arErrorCode.pop("TXPIJ01902") < 0
  1207. */
  1208. //model.refresh();
  1209. }
  1210. }
  1211. if(sysf_messageBox("유형변경이 완료 되었습니다. 변경된 내역의 소급처리를", "Q004") == 6){
  1212. var sWindowMsg = "수가계산중입니다...";
  1213. callLoadingWindow(sWindowMsg);
  1214. fReCalc() ;
  1215. removeLoadingWindow();
  1216. }
  1217. sysf_messageBox("소급계산이", "I002");
  1218. //opener.model.refresh();
  1219. opener.javascript.fGetItemInfo();
  1220. activateOpener(); // (common.js)에서 제공하는 함수로 opener를 activate한다.
  1221. window.close(); // F5 실행시 IE를 종료시킨다.
  1222. // ds_main.clearData();
  1223. // submit("TRPIJ01901");
  1224. //
  1225. //model.refresh();
  1226. }
  1227. function group1_button2_onclick(obj:Button, e:ClickEventInfo) {
  1228. window.close(); // F5 실행시 IE를 종료시킨다.
  1229. }
  1230. function group1_btn_opapply_onclick(obj:Button, e:ClickEventInfo) {
  1231. // 모든수술이 기간적용이 되어 있을 경우 기간적용 버튼을 조작 하면 알럿
  1232. // 모든수술이 전부 적용되었는지 확인 - 20080926 박창원
  1233. var rows = group3.grd_operlist.rows;
  1234. var apply = "Y"
  1235. for (i=1; i< rows; i++) {
  1236. var applyop = ds_main_list2_opcdlist.getColumn(i, "applyop");
  1237. if (applyop == "N") {
  1238. apply = "N";
  1239. }
  1240. }
  1241. if (applyop == "Y") {
  1242. sysf_messageBox("모든 수술이 유형적용 되어있습니다. 복원후에","C003");
  1243. return;
  1244. }
  1245. // loop : 입원일로 부터 현재일까지 날짜와 보조유형(수술일 지정체크) 해서 보조유형을 담아 놓는다.
  1246. var days = new Array();
  1247. var daysuppkind = new Array();
  1248. var indd = ds_send_cond.getColumn(0, "indd");
  1249. var curdd = utlf_getCurrentDate();
  1250. var pid = ds_send_cond.getColumn(0, "pid");
  1251. var hngnm = ds_main_list3_insulist.getColumn(1, "hngnm");
  1252. var insukind = ds_main_list3_insulist.getColumn(1, "insukind");
  1253. var ownbrate = ds_send_cond.getColumn(0, "ownbrate");
  1254. var lastoptodd = ds_main_list2_opcdlist.getColumn((group3.grd_operlist.rows-1), "todd");
  1255. var cretno = ds_send_cond.getColumn(0, "cretno");
  1256. var cfe = ds_send_cond.getColumn(0, "cfe");
  1257. // 추가 : 20091029 JHP 기간적용시 instcd가 없어서 이후 중증요율 적용시 inpt의 suppkind가 변경이 없다. 하여 보험정보에서 추가함.
  1258. var instcd = ds_main_list3_insulist.getColumn(1, "instcd");
  1259. temptodd = lastoptodd.toDate("YYYYMMDD");
  1260. temptodd = temptodd.getAddDate(1);
  1261. temptodd = temptodd.getDateFormat();
  1262. // ds_hidden_list5_kindlist.clearData();
  1263. // model.makeNode("ds_hidden_list5_kindlist[1]_fromdd");
  1264. // model.makeNode("ds_hidden_list5_kindlist[1]_todd");
  1265. // model.makeNode("ds_hidden_list5_kindlist[1]_suppkind");
  1266. // loop의 범위는 입원일로 부터 마지막 수술적용일자 + 1 까지이다.
  1267. var period = utlf_getDateInterval(indd,temptodd);
  1268. // alert(period);
  1269. var applydate = indd;
  1270. for(i=1; i<= period; i++) {
  1271. // 지정된 수술일자를 판단하여 해당일에 대한 보조유형을 산출
  1272. for(j=1; j< group3.grd_operlist.rows;j++) {
  1273. var opfromdd = ds_main_list2_opcdlist.getColumn(j, "fromdd");
  1274. var optodd = ds_main_list2_opcdlist.getColumn(j, "todd");
  1275. if ((applydate >= opfromdd) && (applydate <= optodd)) {
  1276. days[i] = applydate;
  1277. // 20090325 차상위적용
  1278. if (cfe == "E" || cfe == "F") {
  1279. daysuppkind[i] = "39";
  1280. }else {
  1281. daysuppkind[i] = "05";
  1282. }
  1283. //alert(applydate);
  1284. } // if ((applydate >= fromdd) && (applydate <= todd))
  1285. else {
  1286. if (daysuppkind[i] != "05" && daysuppkind[i] != "39") {
  1287. //alert("a" + applydate);
  1288. days[i] = applydate;
  1289. if (cfe == "E" || cfe == "F") {
  1290. daysuppkind[i] = "33";
  1291. } else {
  1292. daysuppkind[i] = "00";
  1293. }
  1294. } // if (daysuppkind[i] != "05")
  1295. } // else
  1296. } // for j
  1297. // applydate를 하루씩 증가
  1298. // alert(days[i] + " " + daysuppkind[i]);
  1299. applydate = applydate.toDate("YYYYMMDD");
  1300. applydate = applydate.getAddDate(1);
  1301. applydate = applydate.getDateFormat();
  1302. } // for i
  1303. // 유형의 기본 자료를 생성한다.
  1304. var kindcnt = 1;
  1305. var kindchange = "N";
  1306. for (k=1; k<= period; k++) {
  1307. var beforefromdd;
  1308. var basisdd;
  1309. var todd;
  1310. var suppkind;
  1311. var basissuppkind;
  1312. if(k == 1) {
  1313. fromdd = days[k];
  1314. basisdd = days[k];
  1315. suppkind = daysuppkind[k];
  1316. basissuppkind = daysuppkind[k];
  1317. kindchage = "N";
  1318. } else {
  1319. if (kindchange == "Y") {
  1320. fromdd = days[k];
  1321. suppkind = daysuppkind[k];
  1322. kindchange = "N";
  1323. }
  1324. basisdd = days[k];
  1325. basissuppkind = daysuppkind[k];
  1326. }
  1327. if (suppkind != basissuppkind) {
  1328. todd = days[k];
  1329. todd = todd.toDate("YYYYMMDD");
  1330. todd = todd.getAddDate(-1);
  1331. todd = todd.getDateFormat();
  1332. if (kindcnt == 1) {
  1333. ds_hidden_list1.setColumn( kindcnt , "pid", pid);
  1334. ds_hidden_list1.setColumn( kindcnt , "hngnm", hngnm);
  1335. ds_hidden_list1.setColumn( kindcnt , "indd", indd);
  1336. ds_hidden_list1.setColumn( kindcnt , "appdd", fromdd);
  1337. ds_hidden_list1.setColumn( kindcnt , "insukind", insukind);
  1338. ds_hidden_list1.setColumn( kindcnt , "col01", suppkind);
  1339. ds_hidden_list1.setColumn( kindcnt , "fromdd", fromdd);
  1340. ds_hidden_list1.setColumn( kindcnt , "todd", todd);
  1341. ds_hidden_list1.setColumn( kindcnt , "cretno", cretno);
  1342. if (suppkind == "00") {
  1343. ds_hidden_list1.setColumn( kindcnt , "ownbrate", 20);
  1344. } else if (suppkind == "33") {
  1345. ds_hidden_list1.setColumn( kindcnt , "ownbrate", 14);
  1346. } else {
  1347. ds_hidden_list1.setColumn( kindcnt , "ownbrate", "10");
  1348. ds_hidden_list1.setColumn( kindcnt , "opertodd", todd);
  1349. }
  1350. // 추가 : 20091029 JHP 기간적용시 instcd가 없어서 이후 중증요율 적용시 inpt의 suppkind가 변경이 없다. 하여 보험정보에서 추가함.
  1351. ds_hidden_list1.setColumn( kindcnt , "instcd", instcd);
  1352. /* ds_hidden_list5.setColumn( kindcnt , "fromdd", fromdd);
  1353. ds_hidden_list5.setColumn( kindcnt , "todd", todd);
  1354. ds_hidden_list5.setColumn( kindcnt , "suppkind", suppkind); */
  1355. kindcnt++;
  1356. kindchange = "Y";
  1357. } else {
  1358. group3.grd_appterm.addRow(true, true);
  1359. fromdd = ds_hidden_list1_insulist.getColumn((kindcnt-1), "todd").toDate("YYYYMMDD");
  1360. fromdd = fromdd.getAddDate(1);
  1361. fromdd = fromdd.getDateFormat();
  1362. ds_hidden_list1.setColumn( kindcnt , "pid", pid);
  1363. ds_hidden_list1.setColumn( kindcnt , "hngnm", hngnm);
  1364. ds_hidden_list1.setColumn( kindcnt , "indd", indd);
  1365. ds_hidden_list1.setColumn( kindcnt , "appdd", fromdd);
  1366. ds_hidden_list1.setColumn( kindcnt , "insukind", insukind);
  1367. ds_hidden_list1.setColumn( kindcnt , "col01", suppkind);
  1368. ds_hidden_list1.setColumn( kindcnt , "fromdd", fromdd);
  1369. ds_hidden_list1.setColumn( kindcnt , "todd", todd);
  1370. ds_hidden_list1.setColumn( kindcnt , "cretno", cretno);
  1371. if (suppkind == "00") {
  1372. ds_hidden_list1.setColumn( kindcnt , "ownbrate", 20);
  1373. } else if (suppkind == "33") {
  1374. ds_hidden_list1.setColumn( kindcnt , "ownbrate", 14);
  1375. } else {
  1376. ds_hidden_list1.setColumn( kindcnt , "ownbrate", "10");
  1377. ds_hidden_list1.setColumn( kindcnt , "opertodd", todd);
  1378. }
  1379. // 추가 : 20091029 JHP 기간적용시 instcd가 없어서 이후 중증요율 적용시 inpt의 suppkind가 변경이 없다. 하여 보험정보에서 추가함.
  1380. ds_hidden_list1.setColumn( kindcnt , "instcd", instcd);
  1381. kindcnt++;
  1382. kindchange = "Y";
  1383. }
  1384. }
  1385. if (k == period) {
  1386. if(suppkind == "05" || suppkind == "39") {
  1387. todd = lastoptodd;
  1388. if(kindcnt != 1) {
  1389. fromdd = ds_hidden_list1_insulist.getColumn((kindcnt-1), "todd").toDate("YYYYMMDD");
  1390. fromdd = fromdd.getAddDate(1);
  1391. fromdd = fromdd.getDateFormat();
  1392. }
  1393. group3.grd_appterm.addRow(true, true);
  1394. ds_hidden_list1.setColumn( kindcnt , "pid", pid);
  1395. ds_hidden_list1.setColumn( kindcnt , "hngnm", hngnm);
  1396. ds_hidden_list1.setColumn( kindcnt , "indd", indd);
  1397. ds_hidden_list1.setColumn( kindcnt , "appdd", fromdd);
  1398. ds_hidden_list1.setColumn( kindcnt , "insukind", insukind);
  1399. ds_hidden_list1.setColumn( kindcnt , "col01", suppkind);
  1400. ds_hidden_list1.setColumn( kindcnt , "fromdd", fromdd);
  1401. ds_hidden_list1.setColumn( kindcnt , "todd", todd);
  1402. ds_hidden_list1.setColumn( kindcnt , "ownbrate", "10");
  1403. ds_hidden_list1.setColumn( kindcnt , "opertodd", todd);
  1404. ds_hidden_list1.setColumn( kindcnt , "cretno", cretno);
  1405. // 추가 : 20091029 JHP 기간적용시 instcd가 없어서 이후 중증요율 적용시 inpt의 suppkind가 변경이 없다. 하여 보험정보에서 추가함.
  1406. ds_hidden_list1.setColumn( kindcnt , "instcd", instcd);
  1407. kindcnt ++;
  1408. var lastfromdd = lastoptodd.toDate("YYYYMMDD");
  1409. lastfromdd = lastfromdd.getAddDate(1);
  1410. lastfromdd = lastfromdd.getDateFormat();
  1411. todd = "99991231";
  1412. group3.grd_appterm.addRow(true, true);
  1413. ds_hidden_list1.setColumn( kindcnt , "pid", pid);
  1414. ds_hidden_list1.setColumn( kindcnt , "hngnm", hngnm);
  1415. ds_hidden_list1.setColumn( kindcnt , "indd", indd);
  1416. ds_hidden_list1.setColumn( kindcnt , "appdd", lastfromdd);
  1417. ds_hidden_list1.setColumn( kindcnt , "insukind", insukind);
  1418. ds_hidden_list1.setColumn( kindcnt , "fromdd", lastfromdd);
  1419. ds_hidden_list1.setColumn( kindcnt , "todd", todd);
  1420. if (cfe == "E" || cfe == "F") {
  1421. ds_hidden_list1.setColumn( kindcnt , "col01","33");
  1422. } else {
  1423. ds_hidden_list1.setColumn( kindcnt , "col01","00");
  1424. }
  1425. ds_hidden_list1.setColumn( kindcnt , "cretno", cretno);
  1426. var suppkindcd = ds_hidden_list1_insulist.getColumn(kindcnt, "col01"));
  1427. if (suppkindcd == "00") {
  1428. ds_hidden_list1.setColumn( kindcnt , "ownbrate", 20);
  1429. } if (suppkindcd == "33") {
  1430. ds_hidden_list1.setColumn( kindcnt , "ownbrate", 14);
  1431. }else {
  1432. ds_hidden_list1.setColumn( kindcnt , "ownbrate", ownbrate);
  1433. }
  1434. // 추가 : 20091029 JHP 기간적용시 instcd가 없어서 이후 중증요율 적용시 inpt의 suppkind가 변경이 없다. 하여 보험정보에서 추가함.
  1435. ds_hidden_list1.setColumn( kindcnt , "instcd", instcd);
  1436. kindcnt++;
  1437. } else {
  1438. if (kindcnt != 1) {
  1439. fromdd = ds_hidden_list1_insulist.getColumn((kindcnt-1), "todd").toDate("YYYYMMDD");
  1440. // alert(fromdd);
  1441. fromdd = fromdd.getAddDate(1);
  1442. fromdd = fromdd.getDateFormat();
  1443. // alert(fromdd);
  1444. }
  1445. todd = "99991231";
  1446. group3.grd_appterm.addRow(true, true);
  1447. ds_hidden_list1.setColumn( kindcnt , "pid", pid);
  1448. ds_hidden_list1.setColumn( kindcnt , "hngnm", hngnm);
  1449. ds_hidden_list1.setColumn( kindcnt , "indd", indd);
  1450. ds_hidden_list1.setColumn( kindcnt , "appdd", fromdd);
  1451. ds_hidden_list1.setColumn( kindcnt , "insukind", insukind);
  1452. if (cfe == "E" || cfe == "F") {
  1453. ds_hidden_list1.setColumn( kindcnt , "col01","33");
  1454. } else {
  1455. ds_hidden_list1.setColumn( kindcnt , "col01","00");
  1456. }
  1457. ds_hidden_list1.setColumn( kindcnt , "fromdd", fromdd);
  1458. ds_hidden_list1.setColumn( kindcnt , "todd", todd);
  1459. ds_hidden_list1.setColumn( kindcnt , "cretno", cretno);
  1460. var suppkindcd = ds_hidden_list1_insulist.getColumn(kindcnt, "col01"));
  1461. if (suppkindcd == "00") {
  1462. ds_hidden_list1.setColumn( kindcnt , "ownbrate", 20);
  1463. } if (suppkindcd == "33") {
  1464. ds_hidden_list1.setColumn( kindcnt , "ownbrate", 14);
  1465. }else {
  1466. ds_hidden_list1.setColumn( kindcnt , "ownbrate", ownbrate);
  1467. }
  1468. // 추가 : 20091029 JHP 기간적용시 instcd가 없어서 이후 중증요율 적용시 inpt의 suppkind가 변경이 없다. 하여 보험정보에서 추가함.
  1469. ds_hidden_list1.setColumn( kindcnt , "instcd", instcd);
  1470. kindcnt++;
  1471. }
  1472. }
  1473. } // for k
  1474. /* var insulist = instance1.selectSingleNode("ds_main_list2_opcdlist");
  1475. var new_todd = "";
  1476. var thisYear = ""; // 현재 입력된 연
  1477. var thisMonth = ""; // 현재 입력된 월
  1478. var thisDay = ""; // 현재 입력된 일
  1479. var nextDate = "";
  1480. var nextfromdd = "";
  1481. var beforefromdd = "";
  1482. var nexttodd = "";
  1483. var maxtodd = "";
  1484. var row = 0;
  1485. if(insulist != null){
  1486. ds_hidden_list3.clearData();
  1487. var vcode = ds_send_cond.getColumn(0, "vcode");
  1488. var opcdcnt = ds_main_list2_opcdlist.rowcount;
  1489. if (opcdcnt == 1) {
  1490. dsf_makeValue( ds_hidden_list3_opcdlist, "fromdd", "string", "" );
  1491. dsf_makeValue( ds_hidden_list3_opcdlist, "todd", "string", "" );
  1492. ds_hidden_list3.setColumn( opcdcnt , "fromdd",ds_main_list2_opcdlist.getColumn(opcdcnt, "fromdd")));
  1493. ds_hidden_list3.setColumn( opcdcnt , "todd",ds_main_list2_opcdlist.getColumn(opcdcnt, "todd")));
  1494. } else {
  1495. opcdcnt = eval(opcdcnt) +1;
  1496. var vfromdd = "";
  1497. var vtodd = "";
  1498. var vflag = "";
  1499. var pfromdd = "";
  1500. var ptodd = "";
  1501. for (i=1; i<opcdcnt; i++) {
  1502. row = row + 1;
  1503. vfromdd = ds_main_list2_opcdlist.getColumn(row, "fromdd"));
  1504. vtodd = ds_main_list2_opcdlist.getColumn(row, "todd"));
  1505. vflag = ds_main_list2_opcdlist.getColumn(row, "flag"));
  1506. if (vfromdd == "") {
  1507. sysf_messageBox("적용시작일자는","I003");
  1508. return;
  1509. }
  1510. if (vtodd == "") {
  1511. sysf_messageBox("적용종료일자는","I003");
  1512. return;
  1513. }
  1514. if (row == 1) {
  1515. pfromdd = vfromdd;
  1516. ptodd = vtodd;
  1517. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_fromdd");
  1518. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_todd");
  1519. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_flag");
  1520. ds_hidden_list3.setColumn( row , "fromdd",vfromdd);
  1521. ds_hidden_list3.setColumn( row , "todd",vtodd);
  1522. ds_hidden_list3.setColumn( row , "flag",vflag);
  1523. } else {
  1524. if (ptodd > vfromdd) {
  1525. row = row -1;
  1526. ds_hidden_list3.setColumn( row , "todd",vtodd);
  1527. row = row +1;
  1528. } else {
  1529. var beforefromdd = "";
  1530. var nexttodd = "";
  1531. thisYear = ptodd.substring(0,4); // 현재 입력된 연
  1532. thisMonth = ptodd.substring(4,6); // 현재 입력된 월
  1533. thisDay = ptodd.substring(6,8); // 현재 입력된 일
  1534. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1535. nextDate.setHours(24); // 24시간 뒤인 다음날 날짜를 구한다.
  1536. beforefromdd = "";
  1537. beforefromdd += nextDate.getYear();
  1538. if ((nextDate.getMonth() + 1) < 10) {
  1539. beforefromdd += "0" + (nextDate.getMonth() + 1);
  1540. }
  1541. else {
  1542. beforefromdd += (nextDate.getMonth() + 1);
  1543. }
  1544. if (nextDate.getDate() < 10) {
  1545. beforefromdd += "0" + nextDate.getDate();
  1546. }
  1547. else {
  1548. beforefromdd += nextDate.getDate();
  1549. }
  1550. thisYear = vfromdd.substring(0,4); // 현재 입력된 연
  1551. thisMonth = vfromdd.substring(4,6); // 현재 입력된 월
  1552. thisDay = vfromdd.substring(6,8); // 현재 입력된 일
  1553. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1554. nextDate.setHours(24); // 24시간 뒤인 다음날 날짜를 구한다. vv
  1555. nexttodd = "";
  1556. nexttodd += nextDate.getYear();
  1557. if ((nextDate.getMonth() + 1) < 10) {
  1558. nexttodd += "0" + (nextDate.getMonth() + 1);
  1559. }
  1560. else {
  1561. nexttodd += (nextDate.getMonth() + 1);
  1562. }
  1563. if (nextDate.getDate() < 10) {
  1564. nexttodd += "0" + nextDate.getDate();
  1565. }
  1566. else {
  1567. nexttodd += nextDate.getDate();
  1568. }
  1569. pfromdd = vfromdd;
  1570. ptodd = vtodd;
  1571. // 적용 수술 건 중 적용기간 사이 기간을 새로운 기간으로 생성
  1572. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_fromdd");
  1573. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_todd");
  1574. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_flag");
  1575. ds_hidden_list3.setColumn( row , "fromdd",beforefromdd);
  1576. ds_hidden_list3.setColumn( row , "todd",nexttodd);
  1577. ds_hidden_list3.setColumn( row , "flag","N");
  1578. // 해당 수술 건의 적용 기간 설정
  1579. row = row +1;
  1580. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_fromdd");
  1581. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_todd");
  1582. model.makeNode("ds_hidden_list3_opcdlist[" + row + " ]_flag");
  1583. ds_hidden_list3.setColumn( row , "fromdd",vfromdd);
  1584. ds_hidden_list3.setColumn( row , "todd",vtodd);
  1585. ds_hidden_list3.setColumn( row , "flag",vflag);
  1586. }
  1587. }
  1588. }
  1589. }
  1590. }
  1591. //model.refresh();
  1592. var rowcnt = ds_hidden_list3_opcdlist.rowcount;
  1593. ds_hidden_list1.clearData();
  1594. ds_hidden_list2.clearData();
  1595. //model.refresh();
  1596. for (m=0; m<rowcnt; m++) {
  1597. var vcode = ds_send_cond.getColumn(0, "vcode");
  1598. var row = m+1;
  1599. var fromdd = ds_hidden_list3_opcdlist.getColumn(row, "fromdd"));
  1600. var todd = ds_hidden_list3_opcdlist.getColumn(row, "todd"));
  1601. var flag = ds_hidden_list3_opcdlist.getColumn(row, "flag"));
  1602. var insucnt = group3.grd_insulist.rows;
  1603. // 시작일자와 현재일자까지 30일 미만인 경우
  1604. if (utlf_getDateInterval(fromdd,utlf_getCurrentDate()) < 30 ) {
  1605. //보험정보 갯수 만큼 돌면서 체크한다.
  1606. for (var i = 1; i < insucnt; i++) {
  1607. var fromdd_term = ds_main_list3_insulist.getColumn(i, "fromdd");
  1608. var todd_term = ds_main_list3_insulist.getColumn(i, "todd");
  1609. var clamflag = ds_main_list3_insulist.getColumn(i, "clamflag");
  1610. if(fromdd_term < fromdd && todd_term == '99991231' && clamflag == 'N'){
  1611. group3.grd_appterm.addrow();
  1612. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1613. thisYear = fromdd.substring(0,4); // 현재 입력된 연
  1614. thisMonth = fromdd.substring(4,6); // 현재 입력된 월
  1615. thisDay = fromdd.substring(6,8); // 현재 입력된 일
  1616. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1617. nextDate.setHours(-24); // 24시간 뒤인 다음날 날짜를 구한다.
  1618. nextfromdd = "";
  1619. nextfromdd += nextDate.getYear();
  1620. if ((nextDate.getMonth() + 1) < 10) {
  1621. nextfromdd += "0" + (nextDate.getMonth() + 1);
  1622. }
  1623. else {
  1624. nextfromdd += (nextDate.getMonth() + 1);
  1625. }
  1626. if (nextDate.getDate() < 10) {
  1627. nextfromdd += "0" + nextDate.getDate();
  1628. }
  1629. else {
  1630. nextfromdd += nextDate.getDate();
  1631. }
  1632. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd",nextfromdd);
  1633. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_opertodd",nextfromdd);
  1634. group3.grd_appterm.addrow();
  1635. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1636. if(vcode == "V191"){
  1637. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1638. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1639. }else if(vcode == "V192"){
  1640. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1641. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1642. }
  1643. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_opertodd",todd);
  1644. }else if(todd_term != '99991231' && clamflag == 'Y'){
  1645. group3.grd_appterm.addrow();
  1646. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1647. }else{
  1648. group3.grd_appterm.addrow();
  1649. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1650. if(vcode == "V191"){
  1651. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1652. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1653. }else if(vcode == "V192"){
  1654. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1655. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1656. }
  1657. if(todd_term > todd){
  1658. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_opertodd",todd);
  1659. }
  1660. }
  1661. }
  1662. } else {
  1663. //보험정보 갯수 만큼 돌면서 체크한다.
  1664. for (var i = 1; i < insucnt; i++) {
  1665. var fromdd_term = ds_main_list3_insulist.getColumn(i, "fromdd");
  1666. var todd_term = ds_main_list3_insulist.getColumn(i, "todd");
  1667. //원유형 시작일자가, 적용 종료기간 보다 크면 해당 없음.
  1668. if(fromdd_term > todd){
  1669. continue;
  1670. }
  1671. maxtodd = ds_hidden_list1_insulist.getColumn(group3.grd_appterm.row, "todd");
  1672. // 이전에 생성된 기간별 본인 부담율 적용 내역의 종료일자 이후 일 경우에만 추가 생성
  1673. if (todd_term > maxtodd) {
  1674. //해당유형의 Fromdd 기 심사자 선택한 기간보다 작은경우 선택한 기간이전 유형을 하나더 발생시킨다.
  1675. if(fromdd_term < fromdd){
  1676. group3.grd_appterm.addrow();
  1677. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1678. thisYear = fromdd.substring(0,4); // 현재 입력된 연
  1679. thisMonth = fromdd.substring(4,6); // 현재 입력된 월
  1680. thisDay = fromdd.substring(6,8); // 현재 입력된 일
  1681. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1682. nextDate.setHours(-24); // 24시간 뒤인 다음날 날짜를 구한다.
  1683. nextfromdd = "";
  1684. nextfromdd += nextDate.getYear();
  1685. if ((nextDate.getMonth() + 1) < 10) {
  1686. nextfromdd += "0" + (nextDate.getMonth() + 1);
  1687. }
  1688. else {
  1689. nextfromdd += (nextDate.getMonth() + 1);
  1690. }
  1691. if (nextDate.getDate() < 10) {
  1692. nextfromdd += "0" + nextDate.getDate();
  1693. }
  1694. else {
  1695. nextfromdd += nextDate.getDate();
  1696. }
  1697. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd",nextfromdd);
  1698. maxtodd = nextfromdd;
  1699. //해당유형의 Todd 기 심사자 선택한 기간보다 작은경우 선택한 기간이후 유형을 하나더 발생시킨다.
  1700. if(todd_term > todd){
  1701. group3.grd_appterm.addrow();
  1702. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1703. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", fromdd);
  1704. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd", todd);
  1705. if(vcode == "V191"){
  1706. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1707. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1708. }else if(vcode == "V192"){
  1709. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1710. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1711. }
  1712. group3.grd_appterm.addrow();
  1713. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1714. new_todd = todd;
  1715. thisYear = new_todd.substring(0,4); // 현재 입력된 연
  1716. thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  1717. thisDay = new_todd.substring(6,8); // 현재 입력된 일
  1718. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1719. nextDate.setHours(24); // 24시간 뒤인 다음날 날짜를 구한다.
  1720. nextfromdd = "";
  1721. nextfromdd += nextDate.getYear();
  1722. if ((nextDate.getMonth() + 1) < 10) {
  1723. nextfromdd += "0" + (nextDate.getMonth() + 1);
  1724. }
  1725. else {
  1726. nextfromdd += (nextDate.getMonth() + 1);
  1727. }
  1728. if (nextDate.getDate() < 10) {
  1729. nextfromdd += "0" + nextDate.getDate();
  1730. }
  1731. else {
  1732. nextfromdd += nextDate.getDate();
  1733. }
  1734. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", nextfromdd);
  1735. }else if(todd_term == todd){
  1736. group3.grd_appterm.addrow();
  1737. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1738. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", fromdd);
  1739. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd", todd);
  1740. if(vcode == "V191"){
  1741. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1742. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1743. }else if(vcode == "V192"){
  1744. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1745. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1746. }
  1747. //심사자가 선택한 Todd가 기존데이터 보다 큰경우는 미래 날짜로 미리 유형을 하나 더 만들어 놓는다.
  1748. }else{
  1749. group3.grd_appterm.addrow();
  1750. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1751. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", fromdd);
  1752. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_opertodd", todd);
  1753. if(vcode == "V191"){
  1754. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1755. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1756. }else if(vcode == "V192"){
  1757. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1758. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1759. }
  1760. }
  1761. }else if(fromdd_term == fromdd){
  1762. if(todd_term > todd){
  1763. group3.grd_appterm.addrow();
  1764. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1765. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", fromdd);
  1766. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd", todd);
  1767. if(vcode == "V191"){
  1768. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1769. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1770. }else if(vcode == "V192"){
  1771. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1772. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1773. }
  1774. group3.grd_appterm.addrow();
  1775. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1776. new_todd = todd;
  1777. thisYear = new_todd.substring(0,4); // 현재 입력된 연
  1778. thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  1779. thisDay = new_todd.substring(6,8); // 현재 입력된 일
  1780. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1781. nextDate.setHours(24); // 24시간 뒤인 다음날 날짜를 구한다.
  1782. nextfromdd = "";
  1783. nextfromdd += nextDate.getYear();
  1784. if ((nextDate.getMonth() + 1) < 10) {
  1785. nextfromdd += "0" + (nextDate.getMonth() + 1);
  1786. }
  1787. else {
  1788. nextfromdd += (nextDate.getMonth() + 1);
  1789. }
  1790. if (nextDate.getDate() < 10) {
  1791. nextfromdd += "0" + nextDate.getDate();
  1792. }
  1793. else {
  1794. nextfromdd += nextDate.getDate();
  1795. }
  1796. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", nextfromdd);
  1797. //심사자가 선택한 Todd가 기존데이터 보다 큰경우는 미래 날짜로 미리 유형을 하나 더 만들어 놓는다.
  1798. }else{
  1799. group3.grd_appterm.addrow();
  1800. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1801. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd", todd);
  1802. maxtodd = todd;
  1803. if(vcode == "V191"){
  1804. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1805. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1806. }else if(vcode == "V192"){
  1807. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1808. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1809. }
  1810. group3.grd_appterm.addrow();
  1811. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1812. new_todd = todd;
  1813. thisYear = new_todd.substring(0,4); // 현재 입력된 연
  1814. thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  1815. thisDay = new_todd.substring(6,8); // 현재 입력된 일
  1816. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1817. nextDate.setHours(24); // 24시간 뒤인 다음날 날짜를 구한다.
  1818. nextfromdd = "";
  1819. nextfromdd += nextDate.getYear();
  1820. if ((nextDate.getMonth() + 1) < 10) {
  1821. nextfromdd += "0" + (nextDate.getMonth() + 1);
  1822. }
  1823. else {
  1824. nextfromdd += (nextDate.getMonth() + 1);
  1825. }
  1826. if (nextDate.getDate() < 10) {
  1827. nextfromdd += "0" + nextDate.getDate();
  1828. }
  1829. else {
  1830. nextfromdd += nextDate.getDate();
  1831. }
  1832. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", nextfromdd);
  1833. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd", "99991211");
  1834. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_opertodd", todd);
  1835. }
  1836. }else{
  1837. group3.grd_appterm.addrow();
  1838. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1839. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd",todd);
  1840. //해당유형의 Todd가 심사자 선택한 기간보다 작은경우 선택한 기간이후 유형을 하나더 발생시킨다.
  1841. if(todd_term > todd){
  1842. new_todd = todd;
  1843. thisYear = new_todd.substring(0,4); // 현재 입력된 연
  1844. thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  1845. thisDay = new_todd.substring(6,8); // 현재 입력된 일
  1846. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1847. nextDate.setHours(24); // 24시간 뒤인 다음날 날짜를 구한다.
  1848. nextfromdd = "";
  1849. nextfromdd += nextDate.getYear();
  1850. if ((nextDate.getMonth() + 1) < 10) {
  1851. nextfromdd += "0" + (nextDate.getMonth() + 1);
  1852. }
  1853. else {
  1854. nextfromdd += (nextDate.getMonth() + 1);
  1855. }
  1856. if (nextDate.getDate() < 10) {
  1857. nextfromdd += "0" + nextDate.getDate();
  1858. }
  1859. else {
  1860. nextfromdd += nextDate.getDate();
  1861. }
  1862. if ( fromdd_term < todd && todd_term > todd ) {
  1863. if (flag == "Y") {
  1864. if(vcode == "V191"){
  1865. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1866. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1867. }else if(vcode == "V192"){
  1868. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1869. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1870. }
  1871. }
  1872. }
  1873. group3.grd_appterm.addrow();
  1874. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1875. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", nextfromdd);
  1876. //심사자가 선택한 Todd가 기존데이터 보다 큰경우는 미래 날짜로 미리 유형을 하나 더 만들어 놓는다.
  1877. }else{
  1878. group3.grd_appterm.addrow();
  1879. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1880. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd", todd);
  1881. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_opertodd", todd);
  1882. }
  1883. }
  1884. } else {
  1885. // 수술일자가 적용 기간에 포함 되지 않을 경우 이면서 마지막 수술건을 경우
  1886. if ( todd >= nextfromdd && todd_term > todd ) {
  1887. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_todd", todd);
  1888. group3.grd_appterm.addrow();
  1889. model.copyNode("ds_hidden_list1_insulist[" + group3.grd_appterm.row + " ]", "ds_main_list3_insulist[" + i + " ]");
  1890. new_todd = todd;
  1891. thisYear = new_todd.substring(0,4); // 현재 입력된 연
  1892. thisMonth = new_todd.substring(4,6); // 현재 입력된 월
  1893. thisDay = new_todd.substring(6,8); // 현재 입력된 일
  1894. nextDate = new Date(thisYear, (thisMonth - 1), thisDay);
  1895. nextDate.setHours(24); // 24시간 뒤인 다음날 날짜를 구한다.
  1896. nextfromdd = "";
  1897. nextfromdd += nextDate.getYear();
  1898. if ((nextDate.getMonth() + 1) < 10) {
  1899. nextfromdd += "0" + (nextDate.getMonth() + 1);
  1900. }
  1901. else {
  1902. nextfromdd += (nextDate.getMonth() + 1);
  1903. }
  1904. if (nextDate.getDate() < 10) {
  1905. nextfromdd += "0" + nextDate.getDate();
  1906. }
  1907. else {
  1908. nextfromdd += nextDate.getDate();
  1909. }
  1910. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_fromdd", nextfromdd);
  1911. } else {
  1912. if (flag == "Y") {
  1913. if(vcode == "V191"){
  1914. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1915. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1916. }else if(vcode == "V192"){
  1917. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_suppkind", "05");
  1918. ds_hidden_list1.setColumn( 0, "insulist[" + group3.grd_appterm.row + " ]_ownbrate", "10");
  1919. }
  1920. }
  1921. }
  1922. } // end fi
  1923. } // end for
  1924. } // end for
  1925. } */
  1926. //보험유형에 따른 유형보조의 콤보값을 셋팅해준다.
  1927. for (var i=1; i<group3.grd_appterm.rows; i++) {
  1928. var insukind = ds_hidden_list1_insulist.getColumn(i, "insukind");
  1929. group3.grd_appterm.cellComboNodeset(i,6) = "ds_main_list4_pmbminsu[insukind = '"+insukind+"']";
  1930. }
  1931. //model.refresh();
  1932. }
  1933. function group1_btn_iphsrebuild_onclick(obj:Button, e:ClickEventInfo) {
  1934. // 2008.08.12 박창원
  1935. // 유형복원은 자료수집이 되었을때는 안된다.
  1936. // 유형복원은 현재 보험유형에서 선택된 row에 대해서만 작업한다.
  1937. // 유형복원은 보조유형을 정상으로 바꾸고 똑같은 유형끼리 합친다.(이부분은 추가 확인이 필요)
  1938. // 유형이 05 유형 하나밖에 없을 때에는 00으로 변경한다 - 20080926 박창원
  1939. var count = group3.grd_insulist.rows;
  1940. if (count == 2) {
  1941. // 유형을 정상유형으로 -> 이부분은 다른 케이스가 있는지 찾아봐야함
  1942. ds_hidden_list2_insulist.clearData(); ds_hidden_list2_insulist.addRow();
  1943. var pid = ds_main_list3_insulist.getColumn(1, "pid");
  1944. var indd = ds_main_list3_insulist.getColumn(1, "indd");
  1945. var cretno = ds_main_list3_insulist.getColumn(1, "cretno");
  1946. var fromdd = ds_main_list3_insulist.getColumn(1, "fromdd");
  1947. var seqno = ds_main_list3_insulist.getColumn(1, "seqno");
  1948. var mskind = ds_main_list3_insulist.getColumn(1, "mskind");
  1949. var todd = ds_main_list3_insulist.getColumn(1, "todd");
  1950. var insukind = ds_main_list3_insulist.getColumn(1, "insukind");
  1951. var instcd = ds_main_list3_insulist.getColumn(1, "instcd");
  1952. var cfe = ds_send_cond.getColumn(0, "cfe");
  1953. if (cfe == "E" || cfe == "F") {
  1954. suppkind = "33";
  1955. } else {
  1956. suppkind = "00";
  1957. }
  1958. var cNode = instance1.selectSingleNode("ds_hidden_list2_insulist");
  1959. if(cNode == null){
  1960. if(pid){
  1961. dsf_makeValue( ds_hidden_list2_insulist, "iphs_status", "string", "" );
  1962. dsf_makeValue( ds_hidden_list2_insulist, "iphs_pid", "string", "" );
  1963. dsf_makeValue( ds_hidden_list2_insulist, "iphs_indd", "string", "" );
  1964. dsf_makeValue( ds_hidden_list2_insulist, "iphs_cretno", "string", "" );
  1965. dsf_makeValue( ds_hidden_list2_insulist, "iphs_fromdd", "string", "" );
  1966. dsf_makeValue( ds_hidden_list2_insulist, "iphs_seqno", "string", "" );
  1967. dsf_makeValue( ds_hidden_list2_insulist, "iphs_mskind", "string", "" );
  1968. dsf_makeValue( ds_hidden_list2_insulist, "iphs_todd", "string", "" );
  1969. dsf_makeValue( ds_hidden_list2_insulist, "iphs_insukind", "string", "" );
  1970. dsf_makeValue( ds_hidden_list2_insulist, "iphs_suppkind", "string", "" );
  1971. dsf_makeValue( ds_hidden_list2_insulist, "iphs_instcd", "string", "" );
  1972. ds_hidden_list2_insulist.setColumn( 0, "iphs_status","B");
  1973. ds_hidden_list2_insulist.setColumn( 0, "iphs_pid",pid);
  1974. ds_hidden_list2_insulist.setColumn( 0, "iphs_indd",indd);
  1975. ds_hidden_list2_insulist.setColumn( 0, "iphs_cretno",cretno);
  1976. ds_hidden_list2_insulist.setColumn( 0, "iphs_fromdd",fromdd);
  1977. ds_hidden_list2_insulist.setColumn( 0, "iphs_seqno",seqno);
  1978. ds_hidden_list2_insulist.setColumn( 0, "iphs_mskind",mskind);
  1979. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd",todd);
  1980. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd);
  1981. ds_hidden_list2_insulist.setColumn( 0, "iphs_insukind",insukind);
  1982. ds_hidden_list2_insulist.setColumn( 0, "iphs_suppkind",suppkind);
  1983. }
  1984. }else{
  1985. if(pid){
  1986. ds_hidden_list2_insulist.setColumn( 0, "iphs_status","B");
  1987. ds_hidden_list2_insulist.setColumn( 0, "iphs_pid",pid);
  1988. ds_hidden_list2_insulist.setColumn( 0, "iphs_indd",indd);
  1989. ds_hidden_list2_insulist.setColumn( 0, "iphs_cretno",cretno);
  1990. ds_hidden_list2_insulist.setColumn( 0, "iphs_fromdd",fromdd);
  1991. ds_hidden_list2_insulist.setColumn( 0, "iphs_seqno",seqno);
  1992. ds_hidden_list2_insulist.setColumn( 0, "iphs_mskind",mskind);
  1993. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd",todd);
  1994. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd);
  1995. ds_hidden_list2_insulist.setColumn( 0, "iphs_insukind",insukind);
  1996. ds_hidden_list2_insulist.setColumn( 0, "iphs_suppkind",suppkind);
  1997. }
  1998. }
  1999. ds_hidden_list2_rslt.clearData();
  2000. // if (submit("TXPIJ01902")) { // 유형변경
  2001. var oParam = {};
  2002. oParam.id = "TXPIJ01902";
  2003. oParam.service = "ipatmngtapp.InhospUpdt";
  2004. oParam.method = "reqSetInhospUpdt4";
  2005. oParam.inds = "s_iphs=ds_";
  2006. oParam.outds = "ds_=result";
  2007. oParam.async = false;
  2008. oParam.callback = "cf_TXPIJ01902";
  2009. tranf_submit(oParam);
  2010. /*
  2011. function cf_TXPIJ01902(sSvcId, nErrorCode, sErrorMsg) {
  2012. if(nErrorCode < 0) return;
  2013. }
  2014. function cf_TXPIJ01902(sSvcId, nErrorCode, sErrorMsg) {
  2015. arErrorCode.push(sSvcId, nErrorCode);
  2016. }
  2017. arErrorCode.pop("TXPIJ01902") > -1
  2018. arErrorCode.pop("TXPIJ01902") < 0
  2019. */
  2020. ds_main_list3_insulist.clearData();
  2021. // ds_main_list3_insulist.clearData(); ds_main_list3_insulist.addRow();
  2022. // submit("TRPIJ01903") // 유형 다시로드
  2023. var oParam = {};
  2024. oParam.id = "TRPIJ01903";
  2025. oParam.service = "bfjudgapp.SerDiagOpTermEstm";
  2026. oParam.method = "reqGetEssc";
  2027. oParam.inds = "req=ds_";
  2028. oParam.outds = "ds_=insulist";
  2029. oParam.async = false;
  2030. oParam.callback = "cf_TRPIJ01903";
  2031. tranf_submit(oParam);
  2032. /*
  2033. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2034. if(nErrorCode < 0) return;
  2035. }
  2036. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2037. arErrorCode.push(sSvcId, nErrorCode);
  2038. }
  2039. arErrorCode.pop("TRPIJ01903") > -1
  2040. arErrorCode.pop("TRPIJ01903") < 0
  2041. */
  2042. //model.refresh();
  2043. if(sysf_messageBox("유형복원이 완료 되었습니다. 변경된 내역의 소급처리를", "Q004") == 6){
  2044. var sWindowMsg = "수가계산중입니다...";
  2045. callLoadingWindow(sWindowMsg);
  2046. fReCalc() ;
  2047. removeLoadingWindow();
  2048. }
  2049. //opener.model.refresh();
  2050. opener.javascript.fGetItemInfo();
  2051. sysf_messageBox("소급계산이", "I002");
  2052. fInitialize();
  2053. return;
  2054. } else {
  2055. return;
  2056. }
  2057. }
  2058. // 선택된 유형의 자료수집여부를 판단하여 자료수집된 경우에는 유형복원 불가
  2059. var row = group3.grd_insulist.row;
  2060. var clamflag = ds_main_list3_insulist.getColumn(row, "clamflag"));
  2061. if (clamflag == "Y") {
  2062. sysf_messageBox("자료수집이 되어 유형변경을 ","E001");
  2063. return;
  2064. }
  2065. var suppkind = ds_main_list3_insulist.getColumn(row, "suppkind"));
  2066. if (suppkind != "05" && suppkind != "39") {
  2067. sysf_messageBox(" 개두개심술 외에는 유형변경을 ","E001");
  2068. return;
  2069. }
  2070. // 유형을 정상유형으로 -> 이부분은 다른 케이스가 있는지 찾아봐야함
  2071. ds_hidden_list2_insulist.clearData(); ds_hidden_list2_insulist.addRow();
  2072. var pid = ds_main_list3_insulist.getColumn(row, "pid"));
  2073. var indd = ds_main_list3_insulist.getColumn(row, "indd"));
  2074. var cretno = ds_main_list3_insulist.getColumn(row, "cretno"));
  2075. var fromdd = ds_main_list3_insulist.getColumn(row, "fromdd"));
  2076. var seqno = ds_main_list3_insulist.getColumn(row, "seqno"));
  2077. var mskind = ds_main_list3_insulist.getColumn(row, "mskind"));
  2078. var todd = ds_main_list3_insulist.getColumn(row, "todd"));
  2079. var insukind = ds_main_list3_insulist.getColumn(row, "insukind"));
  2080. var instcd = ds_main_list3_insulist.getColumn(1, "instcd");
  2081. suppkind = "00"
  2082. var cNode = instance1.selectSingleNode("ds_hidden_list2_insulist");
  2083. if(cNode == null){
  2084. if(pid){
  2085. dsf_makeValue( ds_hidden_list2_insulist, "iphs_status", "string", "" );
  2086. dsf_makeValue( ds_hidden_list2_insulist, "iphs_pid", "string", "" );
  2087. dsf_makeValue( ds_hidden_list2_insulist, "iphs_indd", "string", "" );
  2088. dsf_makeValue( ds_hidden_list2_insulist, "iphs_cretno", "string", "" );
  2089. dsf_makeValue( ds_hidden_list2_insulist, "iphs_fromdd", "string", "" );
  2090. dsf_makeValue( ds_hidden_list2_insulist, "iphs_seqno", "string", "" );
  2091. dsf_makeValue( ds_hidden_list2_insulist, "iphs_mskind", "string", "" );
  2092. dsf_makeValue( ds_hidden_list2_insulist, "iphs_todd", "string", "" );
  2093. dsf_makeValue( ds_hidden_list2_insulist, "iphs_insukind", "string", "" );
  2094. dsf_makeValue( ds_hidden_list2_insulist, "iphs_suppkind", "string", "" );
  2095. dsf_makeValue( ds_hidden_list2_insulist, "iphs_instcd", "string", "" );
  2096. ds_hidden_list2_insulist.setColumn( 0, "iphs_status","B");
  2097. ds_hidden_list2_insulist.setColumn( 0, "iphs_pid",pid);
  2098. ds_hidden_list2_insulist.setColumn( 0, "iphs_indd",indd);
  2099. ds_hidden_list2_insulist.setColumn( 0, "iphs_cretno",cretno);
  2100. ds_hidden_list2_insulist.setColumn( 0, "iphs_fromdd",fromdd);
  2101. ds_hidden_list2_insulist.setColumn( 0, "iphs_seqno",seqno);
  2102. ds_hidden_list2_insulist.setColumn( 0, "iphs_mskind",mskind);
  2103. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd",todd);
  2104. ds_hidden_list2_insulist.setColumn( 0, "iphs_insukind",insukind);
  2105. ds_hidden_list2_insulist.setColumn( 0, "iphs_suppkind",suppkind);
  2106. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd);
  2107. }
  2108. }else{
  2109. if(pid){
  2110. ds_hidden_list2_insulist.setColumn( 0, "iphs_status","B");
  2111. ds_hidden_list2_insulist.setColumn( 0, "iphs_pid",pid);
  2112. ds_hidden_list2_insulist.setColumn( 0, "iphs_indd",indd);
  2113. ds_hidden_list2_insulist.setColumn( 0, "iphs_cretno",cretno);
  2114. ds_hidden_list2_insulist.setColumn( 0, "iphs_fromdd",fromdd);
  2115. ds_hidden_list2_insulist.setColumn( 0, "iphs_seqno",seqno);
  2116. ds_hidden_list2_insulist.setColumn( 0, "iphs_mskind",mskind);
  2117. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd",todd);
  2118. ds_hidden_list2_insulist.setColumn( 0, "iphs_insukind",insukind);
  2119. ds_hidden_list2_insulist.setColumn( 0, "iphs_suppkind",suppkind);
  2120. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd);
  2121. }
  2122. }
  2123. ds_hidden_list2_rslt.clearData();
  2124. // submit("TXPIJ01902"); // 유형변경
  2125. var oParam = {};
  2126. oParam.id = "TXPIJ01902";
  2127. oParam.service = "ipatmngtapp.InhospUpdt";
  2128. oParam.method = "reqSetInhospUpdt4";
  2129. oParam.inds = "s_iphs=ds_";
  2130. oParam.outds = "ds_=result";
  2131. oParam.async = false;
  2132. oParam.callback = "cf_TXPIJ01902";
  2133. tranf_submit(oParam);
  2134. /*
  2135. function cf_TXPIJ01902(sSvcId, nErrorCode, sErrorMsg) {
  2136. if(nErrorCode < 0) return;
  2137. }
  2138. function cf_TXPIJ01902(sSvcId, nErrorCode, sErrorMsg) {
  2139. arErrorCode.push(sSvcId, nErrorCode);
  2140. }
  2141. arErrorCode.pop("TXPIJ01902") > -1
  2142. arErrorCode.pop("TXPIJ01902") < 0
  2143. */
  2144. ds_main_list3_insulist.clearData();
  2145. // ds_main_list3_insulist.clearData(); ds_main_list3_insulist.addRow();
  2146. // submit("TRPIJ01903") // 유형 다시로드
  2147. var oParam = {};
  2148. oParam.id = "TRPIJ01903";
  2149. oParam.service = "bfjudgapp.SerDiagOpTermEstm";
  2150. oParam.method = "reqGetEssc";
  2151. oParam.inds = "req=ds_";
  2152. oParam.outds = "ds_=insulist";
  2153. oParam.async = false;
  2154. oParam.callback = "cf_TRPIJ01903";
  2155. tranf_submit(oParam);
  2156. /*
  2157. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2158. if(nErrorCode < 0) return;
  2159. }
  2160. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2161. arErrorCode.push(sSvcId, nErrorCode);
  2162. }
  2163. arErrorCode.pop("TRPIJ01903") > -1
  2164. arErrorCode.pop("TRPIJ01903") < 0
  2165. */
  2166. //model.refresh();
  2167. // 여기서부터는 유형 합치기
  2168. // 합치기 위한 시작일자와 종료일자를 선정한다.(보험유형과 보조유형이 같으면 합치기 단, 자료수집이 된 유형은 합치는 대상에서 제외)
  2169. var curmskind = ds_main_list3_insulist.getColumn(row, "mskind"));
  2170. if (row == 1) {
  2171. var nextsuppkind = ds_main_list3_insulist.getColumn((row + 1), "suppkind"));
  2172. var nexttodd = ds_main_list3_insulist.getColumn((row + 1), "todd"));
  2173. var nextmskind = ds_main_list3_insulist.getColumn((row + 1), "mskind"));
  2174. var instcd = ds_main_list3_insulist.getColumn(1, "instcd");
  2175. if (nextsuppkind == "00" && (curmskind == nextmskind)) {
  2176. todd = nexttodd;
  2177. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd",todd);
  2178. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd); // 임시
  2179. } else {
  2180. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd",todd);
  2181. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd); // 임시
  2182. }
  2183. // if(submit("TXPIJ01904")){
  2184. var oParam = {};
  2185. oParam.id = "TXPIJ01904";
  2186. oParam.service = "ipatmngtapp.InhospUpdt";
  2187. oParam.method = "reqExeIphsMerge";
  2188. oParam.inds = "req=ds_";
  2189. oParam.outds = "ds_=result";
  2190. oParam.async = false;
  2191. oParam.callback = "cf_TXPIJ01904";
  2192. tranf_submit(oParam);
  2193. /*
  2194. function cf_TXPIJ01904(sSvcId, nErrorCode, sErrorMsg) {
  2195. if(nErrorCode < 0) return;
  2196. }
  2197. function cf_TXPIJ01904(sSvcId, nErrorCode, sErrorMsg) {
  2198. arErrorCode.push(sSvcId, nErrorCode);
  2199. }
  2200. arErrorCode.pop("TXPIJ01904") > -1
  2201. arErrorCode.pop("TXPIJ01904") < 0
  2202. */
  2203. ds_main_list3_insulist.clearData();
  2204. // submit("TRPIJ01903") // 유형 다시로드
  2205. var oParam = {};
  2206. oParam.id = "TRPIJ01903";
  2207. oParam.service = "bfjudgapp.SerDiagOpTermEstm";
  2208. oParam.method = "reqGetEssc";
  2209. oParam.inds = "req=ds_";
  2210. oParam.outds = "ds_=insulist";
  2211. oParam.async = false;
  2212. oParam.callback = "cf_TRPIJ01903";
  2213. tranf_submit(oParam);
  2214. /*
  2215. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2216. if(nErrorCode < 0) return;
  2217. }
  2218. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2219. arErrorCode.push(sSvcId, nErrorCode);
  2220. }
  2221. arErrorCode.pop("TRPIJ01903") > -1
  2222. arErrorCode.pop("TRPIJ01903") < 0
  2223. */
  2224. //model.refresh();
  2225. if(sysf_messageBox("유형복원이 완료 되었습니다. 변경된 내역의 소급처리를", "Q004") == 6){
  2226. var sWindowMsg = "수가계산중입니다...";
  2227. callLoadingWindow(sWindowMsg);
  2228. fReCalc() ;
  2229. removeLoadingWindow();
  2230. }
  2231. //opener.model.refresh();
  2232. opener.javascript.fGetItemInfo();
  2233. sysf_messageBox("소급계산이", "I002");
  2234. fInitialize();
  2235. // activateOpener(); // (common.js)에서 제공하는 함수로 opener를 activate한다.
  2236. // window.close(); // F5 실행시 IE를 종료시킨다.
  2237. }
  2238. } else if (row > 1) {
  2239. var prevsuppkind = model.getValue("ds_main_list3_insulist[" + (row - 1) + "]_suppkind");
  2240. var prevfromdd = model.getValue("ds_main_list3_insulist[" + (row - 1) + "]_fromdd");
  2241. var prevmskind = model.getValue("ds_main_list3_insulist[" + (row - 1) + "]_mskind");
  2242. var prevclamflag = ds_main_list3_insulist.getColumn(row, "clamflag"));
  2243. var nextsuppkind = ds_main_list3_insulist.getColumn((row + 1), "suppkind"));
  2244. var nexttodd = ds_main_list3_insulist.getColumn((row + 1), "todd"));
  2245. var nextclamflag = ds_main_list3_insulist.getColumn((row + 1), "clamflag"));
  2246. var nextmskind = ds_main_list3_insulist.getColumn((row + 1), "mskind"));
  2247. var instcd = ds_main_list3_insulist.getColumn(1, "instcd");
  2248. if (prevsuppkind == "00" && prevclamflag == "N" && (curmskind == prevmskind)) {
  2249. fromdd = prevfromdd;
  2250. ds_hidden_list2_insulist.setColumn( 0, "iphs_fromdd",fromdd);
  2251. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd); // 임시
  2252. }
  2253. if (nextsuppkind == "00"&& nextclamflag == "N" && (curmskind == nextmskind)) {
  2254. todd = nexttodd;
  2255. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd",todd);
  2256. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd",instcd); // 임시
  2257. }
  2258. // if(submit("TXPIJ01904")){
  2259. var oParam = {};
  2260. oParam.id = "TXPIJ01904";
  2261. oParam.service = "ipatmngtapp.InhospUpdt";
  2262. oParam.method = "reqExeIphsMerge";
  2263. oParam.inds = "req=ds_";
  2264. oParam.outds = "ds_=result";
  2265. oParam.async = false;
  2266. oParam.callback = "cf_TXPIJ01904";
  2267. tranf_submit(oParam);
  2268. /*
  2269. function cf_TXPIJ01904(sSvcId, nErrorCode, sErrorMsg) {
  2270. if(nErrorCode < 0) return;
  2271. }
  2272. function cf_TXPIJ01904(sSvcId, nErrorCode, sErrorMsg) {
  2273. arErrorCode.push(sSvcId, nErrorCode);
  2274. }
  2275. arErrorCode.pop("TXPIJ01904") > -1
  2276. arErrorCode.pop("TXPIJ01904") < 0
  2277. */
  2278. ds_main_list3_insulist.clearData();
  2279. // submit("TRPIJ01903") // 유형 다시로드
  2280. var oParam = {};
  2281. oParam.id = "TRPIJ01903";
  2282. oParam.service = "bfjudgapp.SerDiagOpTermEstm";
  2283. oParam.method = "reqGetEssc";
  2284. oParam.inds = "req=ds_";
  2285. oParam.outds = "ds_=insulist";
  2286. oParam.async = false;
  2287. oParam.callback = "cf_TRPIJ01903";
  2288. tranf_submit(oParam);
  2289. /*
  2290. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2291. if(nErrorCode < 0) return;
  2292. }
  2293. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2294. arErrorCode.push(sSvcId, nErrorCode);
  2295. }
  2296. arErrorCode.pop("TRPIJ01903") > -1
  2297. arErrorCode.pop("TRPIJ01903") < 0
  2298. */
  2299. //model.refresh();
  2300. if(sysf_messageBox("유형복원이 완료 되었습니다. 변경된 내역의 소급처리를", "Q004") == 6){
  2301. var sWindowMsg = "수가계산중입니다...";
  2302. callLoadingWindow(sWindowMsg);
  2303. fReCalc() ;
  2304. removeLoadingWindow();
  2305. }
  2306. //opener.model.refresh();
  2307. opener.javascript.fGetItemInfo();
  2308. sysf_messageBox("소급계산이", "I002");
  2309. // activateOpener(); // (common.js)에서 제공하는 함수로 opener를 activate한다.
  2310. // window.close(); // F5 실행시 IE를 종료시킨다.
  2311. }
  2312. }
  2313. /*ds_hidden_list2_insulist.setColumn( 0, "iphs_fromdd","20080715");
  2314. ds_hidden_list2_insulist.setColumn( 0, "iphs_todd","99991231");
  2315. ds_hidden_list2_insulist.setColumn( 0, "iphs_instcd","012");
  2316. // submit("TXPIJ01904"); */
  2317. var oParam = {};
  2318. oParam.id = "TXPIJ01904";
  2319. oParam.service = "ipatmngtapp.InhospUpdt";
  2320. oParam.method = "reqExeIphsMerge";
  2321. oParam.inds = "req=ds_";
  2322. oParam.outds = "ds_=result";
  2323. oParam.async = false;
  2324. oParam.callback = "cf_TXPIJ01904";
  2325. tranf_submit(oParam);
  2326. /*
  2327. function cf_TXPIJ01904(sSvcId, nErrorCode, sErrorMsg) {
  2328. if(nErrorCode < 0) return;
  2329. }
  2330. function cf_TXPIJ01904(sSvcId, nErrorCode, sErrorMsg) {
  2331. arErrorCode.push(sSvcId, nErrorCode);
  2332. }
  2333. arErrorCode.pop("TXPIJ01904") > -1
  2334. arErrorCode.pop("TXPIJ01904") < 0
  2335. */
  2336. ds_main_list3_insulist.clearData();
  2337. // submit("TRPIJ01903") // 유형 다시로드
  2338. var oParam = {};
  2339. oParam.id = "TRPIJ01903";
  2340. oParam.service = "bfjudgapp.SerDiagOpTermEstm";
  2341. oParam.method = "reqGetEssc";
  2342. oParam.inds = "req=ds_";
  2343. oParam.outds = "ds_=insulist";
  2344. oParam.async = false;
  2345. oParam.callback = "cf_TRPIJ01903";
  2346. tranf_submit(oParam);
  2347. /*
  2348. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2349. if(nErrorCode < 0) return;
  2350. }
  2351. function cf_TRPIJ01903(sSvcId, nErrorCode, sErrorMsg) {
  2352. arErrorCode.push(sSvcId, nErrorCode);
  2353. }
  2354. arErrorCode.pop("TRPIJ01903") > -1
  2355. arErrorCode.pop("TRPIJ01903") < 0
  2356. */
  2357. //model.refresh();
  2358. /* ds_hidden_source.clearData(); ds_hidden_source.addRow();
  2359. dsf_makeValue( ds_hidden_source, "pid", "string", ds_send_cond.getColumn(0, "pid"));
  2360. dsf_makeValue( ds_hidden_source, "indd", "string", ds_send_cond.getColumn(0, "indd"));
  2361. dsf_makeValue( ds_hidden_source, "cretno", "string", ds_send_cond.getColumn(0, "cretno"));
  2362. dsf_makeValue( ds_hidden_source, "mskind", "string", ds_send_cond.getColumn(0, "mskind"));
  2363. frmf_modal("../../.._pam_ipatmngtweb_xrw_SMPMI00400", "SMPMI00400", "ds_hidden_source""-"ds_hidden_source"", "", "1", "50", "50", "", "", "", "", "", "M"); */
  2364. }
  2365. function btn_save_onclick(obj:Button, e:ClickEventInfo) {
  2366. var arow = group3.grd_insulist.rows;
  2367. var hrow = group3.grd_insulist.row;
  2368. if (hrow <= "0"){
  2369. sysf_messageBox("변경할 유형이력을","C002");
  2370. }else{
  2371. var newoperdd = ds_hidden_newoperddsend.getColumn(0, "newoperdd");
  2372. if(newoperdd == ""){
  2373. sysf_messageBox("변경할 유형종료예정일을","C001");
  2374. }else{
  2375. var pid = ds_main_list3_insulist.getColumn(hrow, "pid"));
  2376. var indd = ds_main_list3_insulist.getColumn(hrow, "indd"));
  2377. var cretno = ds_main_list3_insulist.getColumn(hrow, "cretno"));
  2378. var instcd = ds_main_list3_insulist.getColumn(hrow, "instcd"));
  2379. var insukind = ds_main_list3_insulist.getColumn(hrow, "insukind"));
  2380. var suppkind = ds_main_list3_insulist.getColumn(hrow, "suppkind"));
  2381. var fromdd = ds_main_list3_insulist.getColumn(hrow, "fromdd"));
  2382. var todd = ds_main_list3_insulist.getColumn(hrow, "todd"));
  2383. var mskind = ds_main_list3_insulist.getColumn(hrow, "mskind"));
  2384. ds_send_uptoperdd.setColumn( 0, "pid",pid);
  2385. ds_send_uptoperdd.setColumn( 0, "indd",indd);
  2386. ds_send_uptoperdd.setColumn( 0, "cretno",cretno);
  2387. ds_send_uptoperdd.setColumn( 0, "instcd",instcd);
  2388. ds_send_uptoperdd.setColumn( 0, "insukind",insukind);
  2389. ds_send_uptoperdd.setColumn( 0, "suppkind",suppkind);
  2390. ds_send_uptoperdd.setColumn( 0, "fromdd",fromdd);
  2391. ds_send_uptoperdd.setColumn( 0, "todd",todd);
  2392. ds_send_uptoperdd.setColumn( 0, "mskind",mskind);
  2393. ds_send_uptoperdd.setColumn( 0, "newoperdd",newoperdd);
  2394. // submit("TXPIJ01905");
  2395. var oParam = {};
  2396. oParam.id = "TXPIJ01905";
  2397. oParam.service = "bfjudgapp.InHospJudg";
  2398. oParam.method = "reqExeInptOperToddSet";
  2399. oParam.inds = "req=ds_";
  2400. oParam.outds = "ds_=result";
  2401. oParam.async = false;
  2402. oParam.callback = "cf_TXPIJ01905";
  2403. tranf_submit(oParam);
  2404. /*
  2405. function cf_TXPIJ01905(sSvcId, nErrorCode, sErrorMsg) {
  2406. if(nErrorCode < 0) return;
  2407. }
  2408. function cf_TXPIJ01905(sSvcId, nErrorCode, sErrorMsg) {
  2409. arErrorCode.push(sSvcId, nErrorCode);
  2410. }
  2411. arErrorCode.pop("TXPIJ01905") > -1
  2412. arErrorCode.pop("TXPIJ01905") < 0
  2413. */
  2414. var result = ds_hidden_newoperddresult_result.getColumn(0, "inpt_count");
  2415. if(result == "완료"){
  2416. sysf_messageBox("유형종료예정일 저장이","I002");
  2417. fInitialize();
  2418. }else {
  2419. sysf_messageBox("유형종료예정일 저장에","E009");
  2420. }
  2421. }
  2422. }
  2423. }
  2424. ]]></Script>
  2425. </Form>
  2426. </FDL>