SPSTP01100_통합수익집계.xfdl 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPSTP01100" position="absolute 0 0 1199 784" titletext="수익집계" oninit="SPSTP01100_oninit" onload="SPSTP01100_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button position="absolute 1145 74 1195 93" id="btn_excel" class="btn7" taborder="30" text="엑셀" anchor="top right" onclick="btn_excel_onclick"/>
  8. <Button position="absolute 1145 74 1195 93" id="btn_excel2" class="btn7" visible="false" text="엑셀" anchor="top right" onclick="btn_excel2_onclick"/>
  9. <Grid position="absolute 0 98 1195 773" id="grd_main" binddataset="ds_main_gridlist_gridinfo" oncelldblclick="grd_main_oncelldblclick" anchor="all">
  10. <Formats>
  11. <Format id="default"/>
  12. </Formats>
  13. </Grid>
  14. <Grid position="absolute 605 98 1195 773" id="grd_ptlist" visible="false" anchor="top right bottom" autoenter="select" cellsizingtype="col" binddataset="ds_main_ptlist_gridinfo">
  15. <Formats>
  16. <Format id="default">
  17. <Columns>
  18. <Column size="30"/>
  19. </Columns>
  20. <Rows>
  21. <Row size="24" band="head"/>
  22. <Row size="24"/>
  23. </Rows>
  24. <Band id="head">
  25. <Cell/>
  26. </Band>
  27. <Band id="body">
  28. <Cell celltype="head" expr="currow+1"/>
  29. </Band>
  30. </Format>
  31. </Formats>
  32. </Grid>
  33. <Div id="grp_sea" taborder="31" position="absolute 0 23 1195 63" class="div_SA" anchor="left top right">
  34. <Layouts>
  35. <Layout width="1195" height="40"/>
  36. </Layouts>
  37. </Div>
  38. <Shape position="absolute 1110 29 1116 56" linetype="vertical" id="line13" anchor="top right"/>
  39. <Static text="조회기간 :" position="absolute 9 34 95 51" id="caption21" class="search_name"/>
  40. <Button position="absolute 1124 32 1180 52" id="btn_search" class="btn1" taborder="3" text="조회" anchor="top right" onclick="btn_search_onclick"/>
  41. <Static text="수익집계" position="absolute 0 0 143 24" align="align:center middle;" id="cap_title" class="tit_1"/>
  42. <Static text="~" position="absolute 191 36 206 51" id="caption6"/>
  43. <Calendar position="absolute 89 33 187 52" align="align:center middle;" id="ipt_fromdd" class="input_search" taborder="1" autoselect="true" autoskip="true"/>
  44. <Calendar position="absolute 204 33 302 52" align="align:center middle;" id="ipt_todd" class="input_search" taborder="1" autoselect="true"/>
  45. <Static text="조회 결과" position="absolute 0 77 90 99" id="caption1" class="tit_2"/>
  46. <Shape position="absolute 0 93 1195 99" linetype="horizontal" id="line1" class="line_10" anchor="left top right"/>
  47. <Static text="집계코드 :" position="absolute 494 35 580 52" id="cap_jipcode" class="search_name" visible="false"/>
  48. <Combo position="absolute 579 33 679 52" id="cmb_jipcode" class="input_search" visible="false" innerdataset="@ds_init_P0108list_P0108" datacolumn="cdnm" codecolumn="cdid"/>
  49. <Button position="absolute 85 409 127 428" id="btn_errclose" class="btn2" visible="false" text="닫기" onclick="btn_errclose_onclick" anchor="left bottom"/>
  50. <Static text="오류 내역" position="absolute 0 412 80 433" id="cap_err" class="tit_2" visible="false" anchor="left bottom"/>
  51. <Grid position="absolute 0 433 1195 773" id="grd_err" visible="false" autoenter="select" cellsizingtype="col" anchor="left right bottom" binddataset="ds_main_errlist_gridinfo">
  52. <Formats>
  53. <Format id="default">
  54. <Columns/>
  55. <Band id="head"/>
  56. <Band id="body"/>
  57. </Format>
  58. </Formats>
  59. </Grid>
  60. <Shape position="absolute 0 428 1195 434" linetype="horizontal" id="line_err" class="line_10" visible="false" anchor="left right bottom"/>
  61. <Button position="absolute 1115 409 1195 428" id="btn_errxls" class="btn7" visible="false" text="엑셀저장" anchor="right bottom" onclick="btn_errxls_onclick"/>
  62. <Static text="환자목록" position="absolute 605 77 680 98" id="caption2" class="tit_2" visible="false" anchor="top right"/>
  63. <Button position="absolute 685 74 727 93" id="btn_ptclose" class="btn2" visible="false" text="닫기" onclick="btn_ptclose_onclick" anchor="top right"/>
  64. <CheckBox position="absolute 689 33 772 53" id="chk_drflag" visible="false" text="의사별 합계" truevalue="Y" onclick="chk_drflag_onclick"/>
  65. <CheckBox position="absolute 325 62 430 82" id="chk_deptsum" visible="false" text="진료과별 합계" truevalue="Y" onclick="chk_deptsum_onclick"/>
  66. <CheckBox position="absolute 325 92 460 112" id="chk_specflag" visible="false" text="선택진료비 제외 내역" truevalue="Y" onclick="chk_specflag_onclick"/>
  67. <Static text="입원/외래 :" position="absolute 321 35 416 52" id="cap_brate" class="search_name" visible="false"/>
  68. <Combo position="absolute 410 33 470 53" id="cmb_brate" class="input_search" visible="false" codecolumn="codecolumn" datacolumn="datacolumn">
  69. <Dataset id="innerdataset">
  70. <ColumnInfo>
  71. <Column id="codecolumn"/>
  72. <Column id="datacolumn"/>
  73. </ColumnInfo>
  74. <Rows>
  75. <Row>
  76. <Col id="codecolumn">T</Col>
  77. <Col id="datacolumn">전체</Col>
  78. </Row>
  79. <Row>
  80. <Col id="codecolumn">I</Col>
  81. <Col id="datacolumn">입원</Col>
  82. </Row>
  83. <Row>
  84. <Col id="codecolumn">O</Col>
  85. <Col id="datacolumn">외래</Col>
  86. </Row>
  87. </Rows>
  88. </Dataset>
  89. </Combo>
  90. <Button position="absolute 943 32 1023 54" id="btn_file" class="btn4" text="파일생성" anchor="top right" onclick="btn_file_onclick"/>
  91. <Button position="absolute 1024 32 1104 54" id="btn_log" class="btn4" text="생성로그" anchor="top right" onclick="btn_log_onclick"/>
  92. <CheckBox position="absolute 590 55 730 75" id="chk_uscm" visible="false" text="개인별 등록 수가 적용" truevalue="Y" onclick="chk_uscm_onclick"/>
  93. <Combo position="absolute 735 55 835 74" id="cmb_uscm" class="combo_search" visible="false" innerdataset="@ds_hidden_uscmlist_uscminfo" datacolumn="listnm" codecolumn="listid"/>
  94. <CheckBox position="absolute 500 55 585 75" id="chk_deptflag" visible="false" text="진료과 포함" truevalue="Y" onclick="chk_deptflag_onclick"/>
  95. <CheckBox position="absolute 325 120 410 140" id="chk_roomdeptflag" visible="false" text="진료과 포함" truevalue="Y" onclick="chk_roomdeptflag_onclick"/>
  96. <Static text="등록번호 :" position="absolute 321 10 416 27" id="cap_pid" class="search_name" visible="false"/>
  97. <Edit position="absolute 412 9 492 28" id="ipt_pid" class="input_search" visible="false" autoselect="true" onkeyup="ipt_pid_onkeyup"/>
  98. <CheckBox position="absolute 864 33 932 53" id="chk_hiflag" text="건진제외" truevalue="Y" onclick="chk_hiflag_onclick" anchor="top right"/>
  99. <CheckBox position="absolute 781 33 856 53" id="chk_ptflag" visible="false" text="환자 내역" truevalue="Y" onclick="chk_ptflag_onclick"/>
  100. <CheckBox position="absolute 711 12 854 35" id="chk_specshow" visible="false" text="선택 진료비 별도 표시" truevalue="Y" onclick="chk_specshow_onclick"/>
  101. <CheckBox position="absolute 325 150 500 170" id="chk_esdflag" visible="false" text="영상의학과, 핵의학과만 조회" truevalue="Y" onclick="chk_esdflag_onclick"/>
  102. <CheckBox position="absolute 845 55 940 75" id="chk_grupflag" visible="false" text="그룹수가 조회" truevalue="Y" onclick="chk_grupflag_onclick"/>
  103. <Shape id="line3" class="line_10" position="absolute 605 93 1195 99" anchor="top right"/>
  104. <CheckBox id="chk_u18yn" taborder="32" text="만18세이하" truevalue="Y" visible="false" position="absolute 949 55 1044 75" onclick="chk_u18yn_onclick"/>
  105. <Static id="cap_cdgubnflag" text="진단서 구분 :" class="search_name" visible="false" position="absolute 513 34 608 51"/>
  106. <Combo id="cmb_cdgubnflag" taborder="33" codecolumn="codecolumn" datacolumn="datacolumn" class="input_search" visible="false" position="absolute 619 33 719 52">
  107. <Dataset id="innerdataset">
  108. <ColumnInfo>
  109. <Column id="codecolumn" size="256"/>
  110. <Column id="datacolumn" size="256"/>
  111. </ColumnInfo>
  112. <Rows>
  113. <Row>
  114. <Col id="codecolumn">T</Col>
  115. <Col id="datacolumn">전체</Col>
  116. </Row>
  117. <Row>
  118. <Col id="codecolumn">A</Col>
  119. <Col id="datacolumn">진단서(소견서)</Col>
  120. </Row>
  121. <Row>
  122. <Col id="codecolumn">B</Col>
  123. <Col id="datacolumn">병사용진단서</Col>
  124. </Row>
  125. <Row>
  126. <Col id="codecolumn">03</Col>
  127. <Col id="datacolumn">진료확인서</Col>
  128. </Row>
  129. <Row>
  130. <Col id="codecolumn">04</Col>
  131. <Col id="datacolumn">입퇴원확인서</Col>
  132. </Row>
  133. <Row>
  134. <Col id="codecolumn">05</Col>
  135. <Col id="datacolumn">상해진단서</Col>
  136. </Row>
  137. <Row>
  138. <Col id="codecolumn">06</Col>
  139. <Col id="datacolumn">출생증명서</Col>
  140. </Row>
  141. <Row>
  142. <Col id="codecolumn">07</Col>
  143. <Col id="datacolumn">사망진단서</Col>
  144. </Row>
  145. <Row>
  146. <Col id="codecolumn">08</Col>
  147. <Col id="datacolumn">장애진단서</Col>
  148. </Row>
  149. <Row>
  150. <Col id="codecolumn">09</Col>
  151. <Col id="datacolumn">후유장애진단서</Col>
  152. </Row>
  153. <Row>
  154. <Col id="codecolumn">99</Col>
  155. <Col id="datacolumn">기타</Col>
  156. </Row>
  157. </Rows>
  158. </Dataset>
  159. </Combo>
  160. </Layout>
  161. </Layouts>
  162. <Objects>
  163. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  164. <ColumnInfo>
  165. <Column id="fromdd" type="STRING" size="256"/>
  166. <Column id="todd" type="STRING" size="256"/>
  167. <Column id="srchflag" type="STRING" size="256"/>
  168. <Column id="jipcode" type="STRING" size="256"/>
  169. <Column id="dayflag" type="STRING" size="256"/>
  170. <Column id="readdrid" type="STRING" size="256"/>
  171. <Column id="brateflag" type="STRING" size="256"/>
  172. <Column id="batchflag" type="STRING" size="256"/>
  173. <Column id="uscmflag" type="STRING" size="256"/>
  174. <Column id="uscmid" type="STRING" size="256"/>
  175. <Column id="pid" type="STRING" size="256"/>
  176. <Column id="hiflag" type="STRING" size="256"/>
  177. <Column id="cdgubnflag" type="STRING" size="256"/>
  178. </ColumnInfo>
  179. <Rows>
  180. <Row>
  181. <Col id="fromdd"/>
  182. <Col id="todd"/>
  183. <Col id="srchflag"/>
  184. <Col id="jipcode"/>
  185. <Col id="dayflag"/>
  186. <Col id="readdrid"/>
  187. <Col id="brateflag">T</Col>
  188. <Col id="batchflag">E</Col>
  189. <Col id="uscmflag"/>
  190. <Col id="uscmid"/>
  191. <Col id="pid"/>
  192. <Col id="hiflag"/>
  193. <Col id="cdgubnflag">T</Col>
  194. </Row>
  195. </Rows>
  196. </Dataset>
  197. <Dataset id="ds_main_gridlist_gridinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  198. <Dataset id="ds_main_ptlist_gridinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  199. <Dataset id="ds_main_errlist_gridinfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  200. <Dataset id="ds_init_P0108list_P0108" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  201. <Dataset id="ds_hidden_uscmlist_uscminfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  202. <Dataset id="ds_hidden" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  203. <ColumnInfo>
  204. <Column id="drflag" type="STRING" size="256"/>
  205. <Column id="deptsum" type="STRING" size="256"/>
  206. <Column id="specflag" type="STRING" size="256"/>
  207. <Column id="deptflag" type="STRING" size="256"/>
  208. <Column id="roomdeptflag" type="STRING" size="256"/>
  209. <Column id="ptflag" type="STRING" size="256"/>
  210. <Column id="specshow" type="STRING" size="256"/>
  211. <Column id="esdflag" type="STRING" size="256"/>
  212. <Column id="grupflag" type="STRING" size="256"/>
  213. <Column id="u18yn" type="STRING" size="256"/>
  214. </ColumnInfo>
  215. <Rows>
  216. <Row>
  217. <Col id="drflag"/>
  218. <Col id="deptsum"/>
  219. <Col id="specflag"/>
  220. <Col id="deptflag"/>
  221. <Col id="roomdeptflag"/>
  222. <Col id="ptflag"/>
  223. <Col id="specshow"/>
  224. <Col id="esdflag"/>
  225. <Col id="grupflag"/>
  226. <Col id="u18yn"/>
  227. </Row>
  228. </Rows>
  229. </Dataset>
  230. <Dataset id="ds_temp_header" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  231. <Dataset id="ds_temp_gridlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  232. </Objects>
  233. <Bind>
  234. <BindItem id="item0" compid="ipt_fromdd" propid="value" datasetid="ds_send" columnid="fromdd"/>
  235. <BindItem id="item1" compid="ipt_todd" propid="value" datasetid="ds_send" columnid="todd"/>
  236. <BindItem id="item2" compid="ipt_pid" propid="value" datasetid="ds_send" columnid="pid"/>
  237. <BindItem id="item3" compid="cmb_brate" propid="value" datasetid="ds_send" columnid="brateflag"/>
  238. <BindItem id="item4" compid="cmb_jipcode" propid="value" datasetid="ds_send" columnid="jipcode"/>
  239. <BindItem id="item5" compid="chk_drflag" propid="value" datasetid="ds_hidden" columnid="drflag"/>
  240. <BindItem id="item6" compid="chk_ptflag" propid="value" datasetid="ds_hidden" columnid="ptflag"/>
  241. <BindItem id="item7" compid="chk_hiflag" propid="value" datasetid="ds_send" columnid="hiflag"/>
  242. <BindItem id="item8" compid="chk_specshow" propid="value" datasetid="ds_hidden" columnid="specshow"/>
  243. <BindItem id="item9" compid="chk_grupflag" propid="value" datasetid="ds_hidden" columnid="grupflag"/>
  244. <BindItem id="item10" compid="chk_u18yn" propid="value" datasetid="ds_hidden" columnid="u18yn"/>
  245. <BindItem id="item11" compid="chk_uscm" propid="value" datasetid="ds_send" columnid="uscmflag"/>
  246. <BindItem id="item12" compid="chk_deptflag" propid="value" datasetid="ds_hidden" columnid="deptflag"/>
  247. <BindItem id="item13" compid="chk_deptsum" propid="value" datasetid="ds_hidden" columnid="deptsum"/>
  248. <BindItem id="item14" compid="chk_specflag" propid="value" datasetid="ds_hidden" columnid="specflag"/>
  249. <BindItem id="item15" compid="chk_roomdeptflag" propid="value" datasetid="ds_hidden" columnid="roomdeptflag"/>
  250. <BindItem id="item16" compid="chk_esdflag" propid="value" datasetid="ds_hidden" columnid="esdflag"/>
  251. <BindItem id="item17" compid="cmb_uscm" propid="value" datasetid="ds_send" columnid="uscmid"/>
  252. <BindItem id="item18" compid="cmb_cdgubnflag" propid="value" datasetid="ds_send" columnid="cdgubnflag"/>
  253. </Bind>
  254. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  255. * System Name :
  256. * Job Name :
  257. * Creator :
  258. * Make Date : 2016-05-24
  259. * Description :
  260. *---------------------------------------------------------------------------------------
  261. * Modify Date Modifier Modify Description
  262. *---------------------------------------------------------------------------------------
  263. * 2016-05-24 Live Converter TF->XP
  264. *
  265. *---------------------------------------------------------------------------------------
  266. ****************************************************************************************/
  267. include "com_commonxp::comm_main.xjs";
  268. include "pam_pamcomnxp::PAM001.xjs";
  269. include "com_batchinfoxp::ZSB001.xjs";
  270. var FLAG = "";
  271. var FLAGNM = "";
  272. var SPECFLAG = "";
  273. var PT_ROW = 0;
  274. // grd_main 더블 클릭 시 위치 수정하기 위한 변수 선언함 2019-04-05 이아영.
  275. var grd_main_h;
  276. var grd_main_b;
  277. function SPSTP01100_oninit(obj:Form, e:InitEventInfo)
  278. {
  279. frmf_initForm(obj);
  280. }
  281. function SPSTP01100_onload(obj:Form, e:LoadEventInfo)
  282. {
  283. grd_main_h = grd_main.position.height;
  284. grd_main_b = grd_main.position.bottom;
  285. chk_deptsum.position.top = 32;
  286. chk_deptsum.position.height = 20;
  287. chk_specflag.position.top = 32;
  288. chk_specflag.position.height = 20;
  289. chk_uscm.position.top = 32;
  290. chk_uscm.position.height = 20;
  291. cmb_uscm.position.top = 31;
  292. cmb_uscm.position.height = 20;
  293. chk_deptflag.position.top = 32;
  294. chk_deptflag.position.height = 20;
  295. cap_pid.position.top = 32;
  296. cap_pid.position.height = 20;
  297. ipt_pid.position.top = 31;
  298. ipt_pid.position.height = 20;
  299. chk_roomdeptflag.position.top = 32;
  300. chk_roomdeptflag.position.height = 20;
  301. chk_specshow.position.top = 32;
  302. chk_specshow.position.height = 20;
  303. chk_esdflag.position.top = 32;
  304. chk_esdflag.position.height= 20;
  305. chk_grupflag.position.top = 32;
  306. chk_grupflag.position.height = 20;
  307. cap_cdgubnflag.position.top = 32;
  308. cap_cdgubnflag.position.height = 20;
  309. cmb_cdgubnflag.position.top = 31;
  310. cmb_cdgubnflag.position.height = 20;
  311. chk_u18yn.position.left = 865
  312. chk_u18yn.position.top = 32;
  313. chk_u18yn.position.height = 20;
  314. ds_send.setColumn(0, "fromdd", utlf_getCurrentDate().toDate().getAddDate(-1).getDateFormat());
  315. ds_send.setColumn(0, "todd", utlf_getCurrentDate().toDate().getAddDate(-1).getDateFormat());
  316. FLAG = frmf_getMenuParam();
  317. ds_send.setColumn(0, "srchflag", FLAG);
  318. var titlesize = 143;
  319. if (FLAG == "11")
  320. {
  321. FLAGNM = "진료과별 의사별 수익 집계";
  322. titlesize = 200;
  323. }
  324. else if (FLAG == "12D")
  325. {
  326. FLAGNM = "진료과별 의사별 급비 항목별 수익 집계";
  327. titlesize = 300;
  328. chk_deptsum.visible = true;
  329. }
  330. else if (FLAG == "12")
  331. {
  332. FLAGNM = "급비 항목별 수익 집계";
  333. titlesize = 200;
  334. cap_brate.visible = true;
  335. cmb_brate.visible = true;
  336. }
  337. else if (FLAG == "13")
  338. {
  339. FLAGNM = "수익 명세서";
  340. cap_brate.visible = true;
  341. cmb_brate.visible = true;
  342. }
  343. else if (FLAG == "14")
  344. {
  345. FLAGNM = "과별 보험 유형별 수익 명세서";
  346. cap_brate.visible = true;
  347. cmb_brate.visible = true;
  348. chk_specshow.visible = true;
  349. titlesize = 300;
  350. }
  351. else if (FLAG == "15")
  352. {
  353. FLAGNM = "과별 수가 종류별 수익 명세서";
  354. cap_brate.visible = true;
  355. cmb_brate.visible = true;
  356. titlesize = 300;
  357. }
  358. else if (FLAG == "16")
  359. {
  360. FLAGNM = "선택 진료비 의사별 일자별 수익 집계";
  361. chk_specflag.visible = true;
  362. chk_hiflag.visible = false;
  363. titlesize = 300;
  364. }
  365. else if (FLAG == "17")
  366. {
  367. FLAGNM = "선택 진료 수당 집계";
  368. cap_jipcode.visible = true;
  369. cmb_jipcode.visible = true;
  370. chk_drflag.visible = true;
  371. cap_brate.visible = true;
  372. cmb_brate.visible = true;
  373. chk_ptflag.visible = true;
  374. titlesize = 300;
  375. pamfGetCodeList([{ dsNm: "ds_init_P0108list_P0108", cdGrpId: "P0108" }]);
  376. ds_send.setColumn(0, "jipcode", "B");
  377. }
  378. else if (FLAG == "18")
  379. {
  380. FLAGNM = "병동별 수익 집계";
  381. chk_roomdeptflag.visible = true;
  382. chk_hiflag.visible = false;
  383. titlesize = 200;
  384. }
  385. else if (FLAG == "26")
  386. {
  387. FLAGNM = "어린이병원 수익 집계";
  388. chk_hiflag.visible = false;
  389. chk_u18yn.visible = true;
  390. titlesize = 300;
  391. }
  392. else if (FLAG == "20")
  393. {
  394. FLAGNM = "수가 코드별 수익 집계";
  395. cap_brate.visible = true;
  396. cmb_brate.visible = true;
  397. chk_uscm.visible = true;
  398. cmb_uscm.visible = true;
  399. chk_deptflag.visible = true;
  400. chk_hiflag.visible = false;
  401. chk_grupflag.visible = true;
  402. titlesize = 300;
  403. var oParam = {};
  404. oParam.id = "TRSTP01903";
  405. oParam.service = "stspamapp.StsPam";
  406. oParam.method = "reqGetUscmTitle";
  407. oParam.outds = "ds_hidden_uscmlist_uscminfo=uscm";
  408. oParam.async = false;
  409. //oParam.callback = "cf_TRSTP01903";
  410. tranf_submit(oParam);
  411. cmb_uscm.index = 0;
  412. }
  413. else if (FLAG == "14S")
  414. {
  415. FLAGNM = "보험 유형별 수익 집계";
  416. cap_brate.visible = true;
  417. cmb_brate.visible = true;
  418. titlesize = 300;
  419. }
  420. else if (FLAG == "14SI")
  421. {
  422. FLAGNM = "선택 진료비 보험 유형별 수익 집계";
  423. titlesize = 300;
  424. }
  425. else if (FLAG == "18R")
  426. {
  427. FLAGNM = "병동별 병실별 수익 집계";
  428. chk_hiflag.visible = false;
  429. titlesize = 300;
  430. }
  431. else if (FLAG == "21Day")
  432. {
  433. FLAGNM = "진료과별 일자별 수익 집계";
  434. titlesize = 300;
  435. }
  436. else if (FLAG == "23")
  437. {
  438. FLAGNM = "센터별 진료과별 급비항목별 수익 집계";
  439. titlesize = 300;
  440. }
  441. else if (FLAG == "P")
  442. {
  443. cap_pid.visible = true;
  444. ipt_pid.visible = true;
  445. FLAGNM = "환자별 수익 집계";
  446. titlesize = 300;
  447. }
  448. else if (FLAG == "ES")
  449. {
  450. chk_hiflag.visible = false;
  451. chk_esdflag.visible = true;
  452. FLAGNM = "선택 진료 가상 수익 집계";
  453. titlesize = 300;
  454. }
  455. else if (FLAG == "PR")
  456. {
  457. chk_uscm.visible = true;
  458. cmb_uscm.visible = true;
  459. var oParam = {};
  460. oParam.id = "TRSTP01903";
  461. oParam.service = "stspamapp.StsPam";
  462. oParam.method = "reqGetUscmTitle";
  463. oParam.outds = "ds_hidden_uscmlist_uscminfo=uscm";
  464. oParam.async = false;
  465. //oParam.callback = "cf_TRSTP01903";
  466. tranf_submit(oParam);
  467. cmb_uscm.index = 0;
  468. FLAGNM = "과내 검사 판독의 및 처방의별 수익 집계";
  469. titlesize = 300;
  470. }
  471. else if (FLAG == "RE")
  472. {
  473. chk_hiflag.visible = false;
  474. FLAGNM = "영상의학과 선택진료 판독의 기준 수익 집계";
  475. titlesize = 300;
  476. }
  477. else if (FLAG == "25")
  478. {
  479. FLAGNM = "진단서 내역";
  480. cap_brate.visible = true;
  481. cmb_brate.visible = true;
  482. cap_cdgubnflag.visible = true;
  483. cmb_cdgubnflag.visible = true;
  484. }
  485. else if (FLAG == "dent")
  486. {
  487. chk_hiflag.visible = false;
  488. FLAGNM = "구강악안면외과 수익 집계";
  489. titlesize = 300;
  490. }
  491. cap_title.text = FLAGNM;
  492. cap_title.position.width = titlesize;
  493. }
  494. function ipt_pid_onkeyup(obj:Edit, e:KeyEventInfo)
  495. {
  496. if(e.keycode == 13)
  497. {
  498. obj.updateToDataset();
  499. btn_search.click();
  500. }
  501. }
  502. function chk_drflag_onclick(obj:CheckBox, e:ClickEventInfo)
  503. {
  504. if(obj.value == "Y" && chk_ptflag.value == "Y")
  505. {
  506. ds_hidden.setColumn(0, "ptflag", "");
  507. }
  508. else if(obj.value == "Y" && chk_ptflag.value != "Y")
  509. {
  510. }
  511. else
  512. {
  513. ds_hidden.setColumn(0, "drflag", "");
  514. }
  515. }
  516. function chk_ptflag_onclick(obj:CheckBox, e:ClickEventInfo)
  517. {
  518. if(obj.value == "Y" && chk_drflag.value == "Y")
  519. {
  520. ds_hidden.setColumn(0, "drflag", "");
  521. }
  522. else if(obj.value == "Y" && chk_drflag.value != "Y")
  523. {
  524. }
  525. else
  526. {
  527. ds_hidden.setColumn(0, "ptflag", "");
  528. }
  529. }
  530. function chk_specshow_onclick(obj:CheckBox, e:ClickEventInfo)
  531. {
  532. if(obj.value == "Y")
  533. {
  534. }
  535. else
  536. {
  537. ds_hidden.setColumn(0, "specshow", "");
  538. }
  539. }
  540. function chk_hiflag_onclick(obj:CheckBox, e:ClickEventInfo)
  541. {
  542. if(obj.value == "Y")
  543. {
  544. }
  545. else
  546. {
  547. ds_send.setColumn(0, "hiflag", "");
  548. }
  549. }
  550. function chk_grupflag_onclick(obj:CheckBox, e:ClickEventInfo)
  551. {
  552. if (obj.value == "Y")
  553. {
  554. ds_hidden.setColumn(0, "deptflag", "");
  555. }
  556. else
  557. {
  558. ds_hidden.setColumn(0, "grupflag", "");
  559. }
  560. }
  561. function chk_u18yn_onclick(obj:CheckBox, e:ClickEventInfo)
  562. {
  563. if (obj.value == "Y")
  564. {
  565. ds_hidden.setColumn(0, "deptflag", "");
  566. }
  567. else
  568. {
  569. ds_hidden.setColumn(0, "u18yn", "");
  570. }
  571. }
  572. function chk_uscm_onclick(obj:CheckBox, e:ClickEventInfo)
  573. {
  574. if(obj.value == "Y")
  575. {
  576. }
  577. else
  578. {
  579. ds_send.setColumn(0, "uscmflag", "");
  580. }
  581. }
  582. function chk_deptflag_onclick(obj:CheckBox, e:ClickEventInfo)
  583. {
  584. if (obj.value == "Y")
  585. {
  586. ds_hidden.setColumn(0, "grupflag", "");
  587. }
  588. else
  589. {
  590. ds_hidden.setColumn(0, "deptflag", "");
  591. }
  592. }
  593. function chk_deptsum_onclick(obj:CheckBox, e:ClickEventInfo)
  594. {
  595. if(obj.value == "Y")
  596. {
  597. }
  598. else
  599. {
  600. ds_hidden.setColumn(0, "deptsum", "");
  601. }
  602. }
  603. function chk_specflag_onclick(obj:CheckBox, e:ClickEventInfo)
  604. {
  605. if(obj.value == "Y")
  606. {
  607. }
  608. else
  609. {
  610. ds_hidden.setColumn(0, "specflag", "");
  611. }
  612. }
  613. function chk_roomdeptflag_onclick(obj:CheckBox, e:ClickEventInfo)
  614. {
  615. if (FLAG == "18")
  616. {
  617. if (obj.value == "Y")
  618. {
  619. chk_hiflag.visible = true;
  620. }
  621. else
  622. {
  623. chk_hiflag.visible = false;
  624. ds_hidden.setColumn(0, "roomdeptflag", "");
  625. }
  626. }
  627. else
  628. {
  629. if (obj.value == "Y")
  630. {
  631. }
  632. else
  633. {
  634. ds_hidden.setColumn(0, "roomdeptflag", "");
  635. }
  636. }
  637. }
  638. function chk_esdflag_onclick(obj:CheckBox, e:ClickEventInfo)
  639. {
  640. if(obj.value == "Y")
  641. {
  642. }
  643. else
  644. {
  645. ds_hidden.setColumn(0, "esdflag", "");
  646. }
  647. }
  648. function btn_search_onclick(obj:Button, e:ClickEventInfo)
  649. {
  650. if (String(FLAG).length < 1)
  651. {
  652. return;
  653. }
  654. fSetErrControl(false);
  655. fSetPtControl(false);
  656. SPECFLAG = "";
  657. if (ds_hidden.getColumn(0, "drflag") == "Y" || ds_hidden.getColumn(0, "deptsum") == "Y")
  658. {
  659. ds_send.setColumn(0, "srchflag", FLAG + "S");
  660. }
  661. else if (ds_hidden.getColumn(0, "specflag") == "Y")
  662. {
  663. SPECFLAG = "Y";
  664. ds_send.setColumn(0, "srchflag", FLAG + "E");
  665. }
  666. else if (ds_hidden.getColumn(0, "deptflag") == "Y")
  667. {
  668. ds_send.setColumn(0, "srchflag", "22");
  669. }
  670. else if (ds_hidden.getColumn(0, "roomdeptflag") == "Y")
  671. {
  672. ds_send.setColumn(0, "srchflag", FLAG + "D");
  673. }
  674. else if (ds_hidden.getColumn(0, "ptflag") == "Y")
  675. {
  676. ds_send.setColumn(0, "srchflag", FLAG + "P");
  677. }
  678. else if (ds_hidden.getColumn(0, "specshow") == "Y")
  679. {
  680. ds_send.setColumn(0, "srchflag", FLAG + "spec");
  681. }
  682. else if (ds_hidden.getColumn(0, "esdflag") == "Y")
  683. {
  684. ds_send.setColumn(0, "srchflag", FLAG + "D");
  685. }
  686. else if (ds_hidden.getColumn(0, "grupflag") == "Y")
  687. {
  688. ds_send.setColumn(0, "srchflag", "24");
  689. }
  690. else if (ds_hidden.getColumn(0, "u18yn") == "Y") // 어린이병원 수익에서 18세 이하 추출 시
  691. {
  692. ds_send.setColumn(0, "srchflag", "27");
  693. }
  694. else
  695. {
  696. ds_send.setColumn(0, "srchflag", FLAG);
  697. }
  698. ds_send.setColumn(0, "dayflag", (ds_send.getColumn(0, "fromdd") == ds_send.getColumn(0, "todd")) ? "Y" : "N");
  699. if (FLAG == "P" && utlf_isNull(ds_send.getColumn(0, "pid")) && ds_send.getColumn(0, "dayflag") != "Y")
  700. {
  701. sysf_messageBox("모든 환자 조회는 하루만 조회할 수 있습니다.", "E999");
  702. return;
  703. }
  704. fSetDynamicGrid(grd_main, "ds_main_gridlist_gridinfo", "TRSTP01802");
  705. if (ds_main_gridlist_gridinfo.getColumn(0, "errflag") == "Y")
  706. {
  707. grd_main.setCellProperty("Body", 0, "background", "yellow");
  708. grd_main.setCellProperty("Body", 0, "background2", "yellow");
  709. grd_main.setCellProperty("Body", 0, "color", "red");
  710. grd_main.setCellProperty("Body", 0, "font", "arial,9,bold");
  711. }
  712. else
  713. {
  714. if (FLAG == "P")
  715. {
  716. return;
  717. }
  718. var cnt = ds_main_gridlist_gridinfo.rowcount;
  719. var dept = "";
  720. for (var i = 0; i < cnt; i++)
  721. {
  722. if(ds_main_gridlist_gridinfo.getColumnInfo("earndeptnm"))
  723. {
  724. dept = ds_main_gridlist_gridinfo.getColumn(i, "earndeptnm");
  725. if(utlf_isNull(dept))
  726. {
  727. if(ds_main_gridlist_gridinfo.getColumnInfo("wardnm"))
  728. {
  729. dept = ds_main_gridlist_gridinfo.getColumn(i, "wardnm");
  730. }
  731. }
  732. }
  733. var drname = ""
  734. var hngnm = "";
  735. var insunm = "";
  736. if(ds_main_gridlist_gridinfo.getColumnInfo("earndrname"))
  737. {
  738. drname = ds_main_gridlist_gridinfo.getColumn(i, "earndrname");
  739. }
  740. if(ds_main_gridlist_gridinfo.getColumnInfo("hngnm"))
  741. {
  742. hngnm = ds_main_gridlist_gridinfo.getColumn(i, "hngnm");
  743. }
  744. if(ds_main_gridlist_gridinfo.getColumnInfo("insukindnm"))
  745. {
  746. insunm = ds_main_gridlist_gridinfo.getColumn(i, "insukindnm");
  747. }
  748. var row = i;
  749. if (dept == "소계" || dept == "합계" || drname == "계" || hngnm == "합계" || insunm == "합계")
  750. {
  751. var color = (dept == "소계" || drname == "계") ? "#ffffc8" : "#ffffa0";
  752. dsf_makeValue(ds_main_gridlist_gridinfo, "bgColor", "string", color, row);
  753. dsf_makeValue(ds_main_gridlist_gridinfo, "fontStyle", "string", "arial,9,bold", row);
  754. }
  755. if (FLAG == "18R" || FLAG == "13")
  756. {
  757. var sinfo = String(ds_main_gridlist_gridinfo.getColumn(i, "suminfo")).split(",");
  758. var slv = sinfo[0];
  759. var scol = sinfo[1];
  760. if (slv > 0)
  761. {
  762. if (slv == 3)
  763. {
  764. color = "#ffffe6";
  765. }
  766. else if (slv == 2)
  767. {
  768. color = "#ffffc8";
  769. }
  770. else if (slv == 1)
  771. {
  772. color = "#ffffa0";
  773. }
  774. dsf_makeValue(ds_main_gridlist_gridinfo, "bgColor", "string", color, row);
  775. if (scol > 0)
  776. {
  777. dsf_makeValue(ds_main_gridlist_gridinfo, "fontStyle", "string", "arial,9,bold", row);
  778. }
  779. dsf_makeValue(ds_main_gridlist_gridinfo, "fontStyle", "string", "arial,9,bold", row);
  780. }
  781. }
  782. }
  783. if (cnt > 1 && ( FLAG == "21Day" || FLAG == "23" ))
  784. {
  785. dsf_makeValue(ds_main_gridlist_gridinfo, "bgColor", "string", "#ffffa0", row);
  786. dsf_makeValue(ds_main_gridlist_gridinfo, "fontStyle", "string", "arial,9,bold", row);
  787. }
  788. }
  789. }
  790. function fSetErrControl(show)
  791. {
  792. cap_err.visible = btn_errclose.visible = line_err.visible = btn_errxls.visible = grd_err.visible = show;
  793. if(show)
  794. {
  795. grd_main.position.height = parseInt(cap_err.position.top-20)
  796. grd_main.position.bottom = parseInt(cap_err.position.top-20)
  797. }
  798. else
  799. {
  800. grd_main.position.height = grd_main_h;
  801. grd_main.position.bottom = grd_main_b;
  802. }
  803. }
  804. function fSetPtControl(show)
  805. {
  806. var val = grp_sea.position.width;
  807. var pos = parseInt(grd_ptlist.position.left-10);
  808. if (!show)
  809. {
  810. if (PT_ROW >= 0)
  811. {
  812. dsf_makeValue(ds_main_gridlist_gridinfo, "bgColor", "string", "#ffffff", PT_ROW);
  813. dsf_makeValue(ds_main_gridlist_gridinfo, "fontStyle", "string", "", PT_ROW);
  814. PT_ROW = 0;
  815. }
  816. grd_main.position.width = val;
  817. line1.position.width = val;
  818. btn_excel.position.right = btn_excel2.position.right;
  819. btn_excel.position.left = btn_excel2.position.left;
  820. btn_excel.position.width = 50;
  821. }
  822. else
  823. {
  824. grd_main.position.width = pos;
  825. line1.position.width = pos;
  826. btn_excel.position.right = parseInt(pos-50);
  827. btn_excel.position.width = 50;
  828. }
  829. caption2.visible = show;
  830. grd_ptlist.visible = show;
  831. btn_excel2.visible = show;
  832. btn_ptclose.visible = show;
  833. }
  834. function fSetDynamicGrid(grd, ref, sid)
  835. {
  836. ds_temp_header.clearData();
  837. ds_temp_gridlist.clearData();
  838. eval(ref).clearData();
  839. var cols = grd.getFormatColCount();
  840. for (var i = cols; i >= 0; i--)
  841. {
  842. grd.deleteContentsCol(i);
  843. }
  844. var oParam = {};
  845. oParam.id = sid;
  846. oParam.service = "stspamapp.StsPam";
  847. oParam.method = (sid == "TRSTP01802") ? "reqGetPaasMagm" : "reqGetPaasMagmErrlog";
  848. oParam.inds = "req=ds_send";
  849. oParam.outds = "ds_temp_header=header ds_temp_gridlist=gridinfo";
  850. oParam.async = false;
  851. //oParam.callback = "cf_TRSTP01802";
  852. tranf_submit(oParam);
  853. var attr = ds_temp_header.getColumn(0, "attr");
  854. if (utlf_isNull(attr) || String(attr).length < 1)
  855. {
  856. if(grd.getCellCount("Head")>0)
  857. {
  858. grd.setCellProperty("Head", 0, "text", "");
  859. }
  860. return;
  861. }
  862. var gridCaption = ds_temp_header.getColumn(0, "caption");
  863. var titleArr = gridCaption.split("|"); // '|'로 입력된 Head값 처리를 위해 변경함 kimdo3, 2017-03-25
  864. var refarr = new Array();
  865. var k = 0;
  866. for(var i = 0; i < titleArr.length; i++)
  867. {
  868. grd.appendContentsRow("head");
  869. var s_titleArr = titleArr[i].split("^");
  870. for(var j = 0; j < s_titleArr.length; j++)
  871. {
  872. // 0 번째 컬럼은 이미 생성, 하나 줄여서 컬럼 생성해야하므로 j > 0 보다 큰 조건을 줌
  873. if(i == 0 && j > 0)
  874. {
  875. grd.appendContentsCol();
  876. }
  877. refarr[k] = s_titleArr[j];
  878. k++;
  879. }
  880. }
  881. // head Text 지정
  882. for(var i = 0; i < refarr.length; i++)
  883. {
  884. grd.setCellProperty("head", i, "text", refarr[i]);
  885. }
  886. grd.appendContentsRow("body");
  887. // Column Bind setting
  888. var attrArr = String(attr).split("^");
  889. var col = "";
  890. var type = "";
  891. var font = "";
  892. var align = "";
  893. var chk_Font = new Array();
  894. var cnt = 0;
  895. for(var i = 0; i < attrArr.length; i++)
  896. {
  897. var dataType = String(attrArr[i]).replace("; ", ",");
  898. var s_dataType = dataType.split(",");
  899. for(var j = 0; j < s_dataType.length; j++)
  900. {
  901. if(String(s_dataType[j]).indexOf("ref") == 0)
  902. {
  903. col = String(s_dataType[j]).replace("ref:", "");
  904. grd.setCellProperty("Body", i, "text", "bind:"+col);
  905. }
  906. if(String(s_dataType[j]).indexOf("type") == 0)
  907. {
  908. type = String(s_dataType[j]).replace("type:", "");
  909. if(type == "Number")
  910. {
  911. grd.setCellProperty("Body", i, "displaytype", "number");
  912. }
  913. else
  914. {
  915. grd.setCellProperty("Body", i, "displaytype", "text");
  916. }
  917. }
  918. if(String(s_dataType[j]).indexOf("visibility") == 0)
  919. {
  920. visibility = String(s_dataType[j]).replace("visibility:", "");
  921. visibility = visibility.replace(";", "");
  922. if(visibility == "hidden")
  923. {
  924. grd.setCellProperty("Head", i, "size", 0);
  925. }
  926. }
  927. if(String(s_dataType[j]).indexOf("text-align") == 0)
  928. {
  929. align = String(s_dataType[j]).replace("text-align:", "");
  930. align = align.replace(";", "");
  931. grd.setCellProperty("Body", i, "align", align+" middle");
  932. }
  933. //Grid Background Setting
  934. grd.setCellProperty("Body", i, "background", "BIND(bgColor)");
  935. grd.setCellProperty("Body", i, "background2", "BIND(bgColor)");
  936. if(String(s_dataType[j]).indexOf("font-weight") == 0)
  937. {
  938. chk_Font[cnt] = i;
  939. cnt++;
  940. }
  941. }
  942. }
  943. var width = ds_temp_header.getColumn(0, "width");
  944. var widthArr = String(width).split("^");
  945. // 컬럼 사이즈 조절을 위한 for문
  946. for(var i = 0; i < widthArr.length; i++)
  947. {
  948. grd.setFormatColProperty(i, "size", widthArr[i]);
  949. }
  950. //Grid Font Setting
  951. cnt = 0;
  952. for(var k = 0; k < grd_main.getCellCount("body"); k++)
  953. {
  954. if(k == chk_Font[cnt])
  955. {
  956. grd.setCellProperty("Body", k, "font", "arial,9,bold");
  957. cnt++;
  958. }
  959. else
  960. {
  961. grd.setCellProperty("Body", k, "font", "BIND(fontStyle)");
  962. }
  963. }
  964. //Grid Merge Setting
  965. grdTitleMerge(grd);
  966. eval(ref).copyData(ds_temp_gridlist);
  967. }
  968. function btn_file_onclick(obj:Button, e:ClickEventInfo)
  969. {
  970. SPECFLAG = "";
  971. if (ds_hidden.getColumn(0, "drflag") == "Y" || ds_hidden.getColumn(0, "deptsum") == "Y")
  972. {
  973. ds_send.setColumn(0, "srchflag", FLAG + "S");
  974. }
  975. else if (ds_hidden.getColumn(0, "specflag") == "Y")
  976. {
  977. SPECFLAG = "Y";
  978. ds_send.setColumn(0, "srchflag", FLAG + "E");
  979. }
  980. else if (ds_hidden.getColumn(0, "deptflag") == "Y")
  981. {
  982. ds_send.setColumn(0, "srchflag", "22");
  983. }
  984. else if (ds_hidden.getColumn(0, "roomdeptflag") == "Y")
  985. {
  986. ds_send.setColumn(0, "srchflag", FLAG + "D");
  987. }
  988. else if (ds_hidden.getColumn(0, "ptflag") == "Y")
  989. {
  990. ds_send.setColumn(0, "srchflag", FLAG + "P");
  991. }
  992. else if (ds_hidden.getColumn(0, "specshow") == "Y")
  993. {
  994. ds_send.setColumn(0, "srchflag", FLAG + "spec");
  995. }
  996. else if (ds_hidden.getColumn(0, "esdflag") == "Y")
  997. {
  998. ds_send.setColumn(0, "srchflag", FLAG + "D");
  999. }
  1000. else if (ds_hidden.getColumn(0, "grupflag") == "Y")
  1001. {
  1002. ds_send.setColumn(0, "srchflag", "24");
  1003. }
  1004. else if (ds_hidden.getColumn(0, "deptflag") == "Y") // 어린이병원 수익에서 18세 이하 추출 시
  1005. {
  1006. ds_send.setColumn(0, "srchflag", "27");
  1007. }
  1008. else
  1009. {
  1010. ds_send.setColumn(0, "srchflag", FLAG);
  1011. }
  1012. ds_send.setColumn(0, "dayflag", (ds_send.getColumn(0, "fromdd") == ds_send.setColumn(0, "todd")) ? "Y" : "N");
  1013. dsf_makeValue(ds_send, "accflag", "string", ds_send.getColumn(0, "brateflag"));
  1014. var oParam = {};
  1015. oParam.id = "TXSTP01804";
  1016. oParam.service = "stspamapp.StsPam";
  1017. oParam.method = "reqExePamFileBatch";
  1018. oParam.inds = "req=ds_send";
  1019. oParam.async = false;
  1020. //oParam.callback = "cf_TXSTP01804";
  1021. tranf_submit(oParam);
  1022. btn_log.click();
  1023. }
  1024. function btn_log_onclick(obj:Button, e:ClickEventInfo)
  1025. {
  1026. var todd = utlf_getCurrentDate();
  1027. todd = todd.toDate().getAddDate(1, "D").getDateFormat();
  1028. var objArg = new Object();
  1029. objArg.todd = todd;
  1030. objArg.execrid = sysf_getUserId();
  1031. objArg.prgmid = "StsPamFileBatch";
  1032. frmf_open("SPZSB00301", "SPZSB00301", objArg, "","","","","","","","","","M");
  1033. }
  1034. function btn_ptclose_onclick(obj:Button, e:ClickEventInfo)
  1035. {
  1036. fSetPtControl(false);
  1037. }
  1038. function grd_main_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  1039. {
  1040. if (ds_main_gridlist_gridinfo.rowposition < 0)
  1041. {
  1042. return;
  1043. }
  1044. if (ds_main_gridlist_gridinfo.getColumn(0, "errflag") == "Y")
  1045. { // 오류 항목 조회
  1046. fSetErrControl(true);
  1047. fSetDynamicGrid(grd_err, "ds_main_errlist_gridinfo", "TRSTP01817");
  1048. }
  1049. // 선택진료비 의사별 일자별 수입집계
  1050. if (FLAG == "16" && SPECFLAG != "Y")
  1051. {
  1052. ds_send.setColumn(0, "srchflag", "16D");
  1053. fGetPtList();
  1054. }
  1055. // 어린이병원 수입집계
  1056. if (FLAG == "26")
  1057. {
  1058. if (ds_hidden.getColumn(0, "u18yn") == "Y")
  1059. {
  1060. ds_send.setColumn(0, "srchflag", "27D");
  1061. }
  1062. else
  1063. {
  1064. ds_send.setColumn(0, "srchflag", "26");
  1065. }
  1066. fGetPtList();
  1067. }
  1068. }
  1069. function fGetPtList()
  1070. {
  1071. var fromdd = ds_send.getColumn(0, "fromdd");
  1072. var todd = ds_send.getColumn(0, "todd");
  1073. fSetPtControl(true);
  1074. if (ds_main_gridlist_gridinfo.rowcount > 0)
  1075. {
  1076. var row = ds_main_gridlist_gridinfo.rowposition;
  1077. var dRow = row ;
  1078. if (row >= 0)
  1079. {
  1080. dsf_makeValue(ds_main_gridlist_gridinfo, "bgColor", "string", "#ffffff", row);
  1081. dsf_makeValue(ds_main_gridlist_gridinfo, "fontStyle", "string", "", row);
  1082. }
  1083. dsf_makeValue(ds_main_gridlist_gridinfo, "bgColor", "string", "#ffd2d2", row);
  1084. dsf_makeValue(ds_main_gridlist_gridinfo, "fontStyle", "string", "arial,9,bold", row);
  1085. PT_ROW = row;
  1086. }
  1087. // 조회구분에 따른 조건변경 by 조중래 20170821
  1088. // 16D : 의사별 환자별 선택진료비 집계, 26D : 어린이병원 의사별 환자별 수익집계, 27D : 18세 이하 의사별 환자별 수익집계
  1089. if (ds_send.setColumn(0, "srchflag") == "26D" || ds_send.getColumn(0, "srchflag") == "27D")
  1090. {
  1091. ds_send.setColumn(0, "readdrid", ds_main_gridlist_gridinfo.getColumn(dRow, "earndrid"));
  1092. }
  1093. else
  1094. {
  1095. ds_send.setColumn(0, "readdrid", ds_main_gridlist_gridinfo.getColumn(dRow, "readdrid"));
  1096. }
  1097. fSetDynamicGrid(grd_ptlist, "ds_main_ptlist_gridinfo", "TRSTP01802");
  1098. var cnt = ds_main_ptlist_gridinfo.rowcount;
  1099. var prevPid = "";
  1100. var flag = true;
  1101. for (var i = 0; i < cnt; i++)
  1102. {
  1103. var pid = ds_main_ptlist_gridinfo.getColumn(i, "pid");
  1104. if (utlf_isNull(pid))
  1105. {
  1106. break;
  1107. }
  1108. if (pid != prevPid)
  1109. {
  1110. flag = !flag;
  1111. prevPid = pid;
  1112. }
  1113. dsf_makeValue(ds_main_gridlist_gridinfo, "bgColor", "string", flag ? "#f4f4f4" : "#ffffff", i);
  1114. }
  1115. }
  1116. function grdTitleMerge(grid)
  1117. {
  1118. var headCols = grid.getCellCount("body");
  1119. var headCells = grid.getCellCount("head");
  1120. var headArrR1 = new Array();
  1121. var headArrR2 = new Array();
  1122. var headArrR3 = new Array();
  1123. var headArrR2No = new Array();
  1124. var headArrR3No = new Array();
  1125. var headArrR2NoIdx = 0;
  1126. var headArrR3NoIdx = 0;
  1127. var headArrMer12No = "";
  1128. var headArrMer13No = "";
  1129. var headArrMer12NoIdx = 0;
  1130. var headArrMer13NoIdx = 0;
  1131. var mergeScol = 0;
  1132. var mergeEcol = 0;
  1133. var index = 0;
  1134. var calindex = 0;
  1135. var calindex1 = 0;
  1136. var calindex11 = 0;
  1137. grid.splitContentsCell("head",0,0,3,headCols,true);
  1138. for(var i=0; i<headCells;i++)
  1139. {
  1140. if( parseInt(i/headCols)==0 )
  1141. {
  1142. headArrR1[i%headCols] = grid.getCellText(-1,i);
  1143. }
  1144. if( parseInt(i/headCols)==1 )
  1145. {
  1146. headArrR2[i%headCols] = grid.getCellText(-1,i);
  1147. }
  1148. if( parseInt(i/headCols)==2 )
  1149. {
  1150. headArrR3[i%headCols] = grid.getCellText(-1,i);
  1151. }
  1152. }//for(var i=0; i<headCells;i++) 끝
  1153. //로우 병합
  1154. for(var i = 0; i < headCols; i++)
  1155. {
  1156. if(headArrR1[i]==headArrR2[i])
  1157. {
  1158. index = i;
  1159. calindex++;
  1160. grid.mergeContentsCell("head",0,i,1,i,index,false);
  1161. headArrMer12No+=i+"^";
  1162. headArrMer12NoIdx++;
  1163. }
  1164. else
  1165. {
  1166. headArrR2No[headArrR2NoIdx]=i;
  1167. headArrR2NoIdx++;
  1168. }
  1169. if(headArrR2[i]==headArrR3[i])
  1170. {
  1171. index = eval(i)+eval(headCols)-calindex;
  1172. grid.mergeContentsCell("head",1,i,2,i,index,false);
  1173. calindex1++;
  1174. if(headArrR2[i]==headArrR1[i])
  1175. {
  1176. index = eval(i)+eval(headCols)-calindex;
  1177. grid.mergeContentsCell("head",0,i,2,i,i,false);
  1178. calindex11++;
  1179. headArrMer13No+=i+"^";
  1180. headArrMer13NoIdx++;
  1181. }
  1182. }
  1183. else
  1184. {
  1185. headArrR3No[headArrR3NoIdx]=i;
  1186. headArrR3NoIdx++;
  1187. }
  1188. }//for(var i=0; i<headCols; i++) 끝
  1189. //배치가 바뀌어 재분배
  1190. var headCells2 = grid.getCellCount("head");
  1191. var headArr1 = new Array();
  1192. var headArr2 = new Array();
  1193. var headArr3 = new Array();
  1194. var headArr3idx = 0;
  1195. var headArr2idx = 0;
  1196. for(var i=0; i<headCells2;i++)
  1197. {
  1198. if( parseInt(i/headCols)==0 )
  1199. {
  1200. headArr1[i%headCols] = grid.getCellText(-1,i);
  1201. }
  1202. else if( eval(i)< headCols*2-eval(calindex))
  1203. {
  1204. headArr2[headArr2idx] = grid.getCellText(-1,i);
  1205. headArr2idx++;
  1206. }
  1207. else
  1208. {
  1209. headArr3[headArr3idx] = grid.getCellText(-1,i);
  1210. headArr3idx++;
  1211. }
  1212. }//for(var i=0; i<headCells;i++) 끝
  1213. //컬럼 병합
  1214. var tmp1 = "";
  1215. var tmp1idx = 0;
  1216. var tmp2 = "";
  1217. var tmp2idx = 0;
  1218. var col = 0;
  1219. var index = 0;
  1220. var calcolindex = 0;
  1221. for(var i=0; i<headArr1.length;i++)
  1222. {
  1223. if(i==0)
  1224. {
  1225. tmp1 = headArr1[0];
  1226. tmp1idx = 0;
  1227. }
  1228. else
  1229. {
  1230. tmp2 = headArr1[i];
  1231. tmp2idx = i;
  1232. }
  1233. idx = i-calcolindex-1;
  1234. if(tmp1==tmp2)
  1235. {
  1236. grid.mergeContentsCell("head",0,tmp1idx,0,tmp2idx,idx,false);
  1237. calcolindex++;
  1238. }
  1239. else
  1240. {
  1241. tmp1 = headArr1[i];
  1242. tmp1idx = i;
  1243. }
  1244. }//for(var i=0; headArr1.legnth();i++) 끝
  1245. var tmp1 = "!";
  1246. var tmp2 = "!";
  1247. var tmp2idx = 0;
  1248. var calcolindex1 = 0;
  1249. var idx = 0;
  1250. for(var i=0; i<headArr2.length;i++)
  1251. {
  1252. if(i==0)
  1253. {
  1254. tmp1 = headArr2[0];
  1255. tmp1idx = 0;
  1256. }
  1257. else
  1258. {
  1259. tmp2 = headArr2[i];
  1260. tmp2idx = headArrR2No[i];
  1261. }
  1262. var cnt12R = biggerCnt(headArrR2No[i],headArrMer12No);
  1263. idx = (headCols+headArrR2No[i]) - calcolindex - eval(calindex) + cnt12R - eval(calcolindex1)-1;
  1264. if(tmp1==tmp2)
  1265. {
  1266. grid.mergeContentsCell("head",1,tmp1idx,1,tmp2idx,idx,false);
  1267. calcolindex1++;
  1268. }
  1269. else
  1270. {
  1271. tmp1 = headArr2[i];
  1272. tmp1idx = headArrR2No[i];
  1273. }
  1274. }//for(var i=0; headArr2.legnth();i++) 끝
  1275. var tmp1 = "!";
  1276. var tmp2 = "!";
  1277. var tmp2idx = 0;
  1278. var calcolindex11 = 0;
  1279. for(var i=0; i<headArr3.length; i++)
  1280. {
  1281. if(i==0)
  1282. {
  1283. tmp1 = headArr3[0];
  1284. tmp1idx = 0;
  1285. }
  1286. else
  1287. {
  1288. tmp2 = headArr3[i];
  1289. tmp2idx = headArrR3No[i];
  1290. }
  1291. var cnt13R = biggerCnt(headArrR3No[i],headArrMer13No);
  1292. idx = (headCols*2+headArrR3No[i]) - calcolindex - calcolindex1 - calcolindex11 - calindex - calindex1 + cnt13R;
  1293. if(tmp1==tmp2)
  1294. {
  1295. grid.mergeContentsCell("head",2,tmp1idx,2,tmp2idx,idx,false);
  1296. calcolindex11++;
  1297. }
  1298. else
  1299. {
  1300. tmp1 = headArr3[i];
  1301. tmp1idx = headArrR3No[i];
  1302. }
  1303. }
  1304. }
  1305. function biggerCnt(num,idxArr)
  1306. {
  1307. var rtn=0;
  1308. var arr = new Array();
  1309. var idxA = new String(idxArr);
  1310. arr = idxA.substr(0,idxA.length-1).split("^");
  1311. for(var i=0; i<arr.length; i++)
  1312. {
  1313. if(num<arr[i])
  1314. {
  1315. rtn++;
  1316. }
  1317. }
  1318. return rtn;
  1319. }
  1320. function btn_excel2_onclick(obj:Button, e:ClickEventInfo)
  1321. {
  1322. var fromdd = ds_send.getColumn(0, "fromdd");
  1323. var todd = ds_send.getColumn(0, "todd");
  1324. grdf_exportExcel(grd_ptlist, cap_title.value + "(환자목록)_" + fromdd + "-" + todd, "Sheet1", "true", "", "");
  1325. sysf_messageBox("엑셀 저장이 완료되었습니다.", "I999");
  1326. }
  1327. function btn_excel_onclick(obj:Button, e:ClickEventInfo)
  1328. {
  1329. var fromdd = ds_send.getColumn(0, "fromdd");
  1330. var todd = ds_send.getColumn(0, "todd");
  1331. grdf_exportExcel(grd_main, FLAGNM + "_" + fromdd + "-" + todd, "Sheet1", "true", "", "");
  1332. sysf_messageBox("엑셀 저장이 완료되었습니다.", "I999");
  1333. }
  1334. function btn_errxls_onclick(obj:Button, e:ClickEventInfo)
  1335. {
  1336. grdf_exportExcel(grd_err, "Sheet1", "sheet1", "true", "", "");
  1337. sysf_messageBox("엑셀 저장이 완료되었습니다.", "I999");
  1338. }
  1339. function btn_errclose_onclick(obj:Button, e:ClickEventInfo)
  1340. {
  1341. fSetErrControl(false);
  1342. }
  1343. ]]></Script>
  1344. </Form>
  1345. </FDL>