SPARH00100_병원지역코드관리.xfdl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPARH05100" classname="SPARH05100_심평원HIE병원조회" inheritanceid="" position="absolute 0 0 793 548" titletext="심평원HIE병원조회" onload="SPARH05100_onload" oninit="SPARH05100_oninit">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="통합병원지역관리" class="tit_1" position="absolute 0 0 178 24"/>
  8. <ActiveX id="ActiveX01" position="absolute 179 4 218 21" progid="{72906CD8-4ABE-300F-BC7C-DBF567CEED2C}" useautobitmapcache="1" anchor="default" taborder="4" windowed="true" visible="false"/>
  9. <Grid id="grd_list" taborder="6" binddataset="ds_main_areadelt" useinputpanel="false" position="absolute 0 58 349 540" anchor="left top bottom">
  10. <Formats>
  11. <Format id="default">
  12. <Columns>
  13. <Column size="50"/>
  14. <Column size="50"/>
  15. <Column size="120"/>
  16. <Column size="120"/>
  17. </Columns>
  18. <Rows>
  19. <Row size="24" band="head"/>
  20. <Row size="24"/>
  21. </Rows>
  22. <Band id="head">
  23. <Cell text="지역명"/>
  24. <Cell col="1" text="지역코드"/>
  25. <Cell col="2" text="지역상세명"/>
  26. <Cell col="3" text="지역상세코드"/>
  27. </Band>
  28. <Band id="body">
  29. <Cell text="bind:sidonm" suppress="1" suppressalign="middle,over"/>
  30. <Cell col="1" text="bind:sidocd" suppress="2" suppressalign="middle,over"/>
  31. <Cell col="2" text="bind:sidonmdetl"/>
  32. <Cell col="3" text="bind:sidocddetl"/>
  33. </Band>
  34. </Format>
  35. </Formats>
  36. </Grid>
  37. <Button id="btn_save" taborder="7" text="저장" position="absolute 739 33 782 56" class="btn5" onclick="btn_save_onclick"/>
  38. <Grid id="grd_list01" taborder="8" binddataset="ds_init_areacd" useinputpanel="false" position="absolute 433 58 782 540" autoenter="select" cellsizingtype="col" autofittype="col" anchor="all">
  39. <Formats>
  40. <Format id="default">
  41. <Columns>
  42. <Column size="27"/>
  43. <Column size="50"/>
  44. <Column size="50"/>
  45. <Column size="120"/>
  46. <Column size="120"/>
  47. </Columns>
  48. <Rows>
  49. <Row size="24" band="head"/>
  50. <Row size="24"/>
  51. </Rows>
  52. <Band id="head">
  53. <Cell/>
  54. <Cell col="1" text="지역명"/>
  55. <Cell col="2" text="지역코드"/>
  56. <Cell col="3" text="지역상세명"/>
  57. <Cell col="4" text="지역상세코드"/>
  58. </Band>
  59. <Band id="body">
  60. <Cell celltype="head"/>
  61. <Cell col="1" text="bind:sidonm" suppress="1" suppressalign="middle,over"/>
  62. <Cell col="2" text="bind:sidocd" suppress="2" suppressalign="middle,over"/>
  63. <Cell col="3" displaytype="text" edittype="text" text="bind:sidonmdetl" editimemode="hangul"/>
  64. <Cell col="4" displaytype="text" edittype="text" text="bind:sidocddetl"/>
  65. </Band>
  66. </Format>
  67. </Formats>
  68. </Grid>
  69. <Button id="btn_sync" taborder="9" position="absolute 377 292 408 314" class="icon_right" onclick="btn_sync_onclick"/>
  70. <Button id="btn_delt" taborder="10" text="행삭제" class="btn2" position="absolute 687 33 738 56" onclick="btn_delt_onclick"/>
  71. <Button id="btn_insert" taborder="11" text="행삽입" onclick="btn_insert_onclick" class="btn2" position="absolute 634 33 685 56"/>
  72. </Layout>
  73. </Layouts>
  74. <Objects>
  75. <Dataset id="ds_main_area" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  76. <ColumnInfo>
  77. <Column id="sidocd" type="STRING" size="256"/>
  78. <Column id="sidonm" type="STRING" size="256"/>
  79. </ColumnInfo>
  80. </Dataset>
  81. <Dataset id="ds_main_areadelt" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  82. <ColumnInfo>
  83. <Column id="sidocd" type="STRING" size="256"/>
  84. <Column id="sidonm" type="STRING" size="256"/>
  85. <Column id="sidocddetl" type="STRING" size="256"/>
  86. <Column id="sidonmdetl" type="STRING" size="256"/>
  87. </ColumnInfo>
  88. </Dataset>
  89. <Dataset id="ds_init_areacd" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  90. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  91. <ColumnInfo>
  92. <Column id="instcd" type="STRING" size="256"/>
  93. </ColumnInfo>
  94. <Rows>
  95. <Row/>
  96. </Rows>
  97. </Dataset>
  98. <Dataset id="ds_temp" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  99. <ColumnInfo>
  100. <Column id="sidocd" type="STRING" size="256"/>
  101. <Column id="sidonm" type="STRING" size="256"/>
  102. <Column id="sidocddetl" type="STRING" size="256"/>
  103. <Column id="sidonmdetl" type="STRING" size="256"/>
  104. </ColumnInfo>
  105. </Dataset>
  106. <Dataset id="ds_send_save" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  107. </Objects>
  108. <Bind/>
  109. <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs";
  110. include "ast_soclworkxp::AWMCommon.xjs";
  111. var lib;
  112. var YadmId;
  113. var objActiveX;
  114. var arErrorCode = new HashArray();
  115. function SPARH05100_oninit(obj:Form, e:InitEventInfo)
  116. {
  117. frmf_initForm(obj);
  118. }
  119. function SPARH05100_onload(obj:Form, e:LoadEventInfo)
  120. {
  121. grdf_initGrid(grd_list);
  122. grdf_initGrid(grd_list01);
  123. grdf_setRowTypeIcon(grd_list01, 0);
  124. fInit();
  125. }
  126. function fInit()
  127. {
  128. fInit_Hira();
  129. // 조회 파라미터 입력
  130. var instcd = sysf_getUserInfo("dutplceinstcd");
  131. ds_send.setColumn(0, "instcd", instcd);
  132. if(instcd == "031") YadmId = "37100017";
  133. else if(instcd == "032") YadmId = "37100467";
  134. fInit_Data();
  135. }
  136. function fInit_Data()
  137. {
  138. var oParam = {};
  139. oParam.id = "TXARH00101";
  140. oParam.service = "healcarecoopapp.CoopHospMngt";
  141. oParam.method = "reqGetAreaList";
  142. oParam.inds = "req=ds_send";
  143. oParam.outds = "ds_init_areacd=hosparea";
  144. oParam.async = false;
  145. tranf_submit(oParam);
  146. }
  147. function fInit_Hira()
  148. {
  149. try{
  150. lib = ActiveX01.createObject("Hira.Di.Com.Service.Library.ServiceLibrary");
  151. fSearchInitCode_Hira();
  152. }catch(e){
  153. sysf_messageBox("진료의뢰회송 중계포털 Agent 다운받아 설치 후 이용바랍니다.\n( https://di.hira.or.kr/rsweb/index.do )","E999");
  154. this.close();
  155. }
  156. }
  157. function fSearchInitCode_Hira()
  158. {
  159. ds_main_area.clearData();
  160. // 조회 파라미터 입력
  161. var instcd = sysf_getUserInfo("dutplceinstcd");
  162. trace(instcd)
  163. if(instcd == "031") YadmId = "37100017";
  164. else if(instcd == "032") YadmId = "37100467";
  165. var res = lib.SrchSdbkYadmInfoList(YadmId);
  166. if (!res.Success) {
  167. sysf_messageBox( "심평원 진료의뢰회송 연계 프로그램에 조건 오류가 발생했습니다.\n\n" + res.ErrCd + ": " + res.ErrMsg + "\n\n조건 수정 후 전송 바랍니다.", "E999");
  168. return;
  169. }
  170. var info = res.SdbkYadmInfo;
  171. if (info.LenSdbkYadmSidoInfos() > 0) {
  172. for (i = 0; i < info.LenSdbkYadmSidoInfos(); i++) {
  173. var item = info.GetSdbkYadmSidoInfo(i);
  174. var addRow = ds_main_area.addRow();
  175. ds_main_area.setColumn(addRow, "sidonm", item.SidoNm);
  176. ds_main_area.setColumn(addRow, "sidocd", item.SidoCd);
  177. }
  178. }
  179. fSearchSidoDetl_Hira();
  180. }
  181. function fSearchSidoDetl_Hira()
  182. {
  183. ds_main_areadelt.clearData();
  184. for(var i = 0; i < ds_main_area.rowcount; i++)
  185. {
  186. var sidoCD = ds_main_area.getColumn(i, "sidocd");
  187. var sidoNM = ds_main_area.getColumn(i, "sidonm");
  188. var res = lib.SrchSdbkYadmAddrCityList(YadmId, sidoCD);
  189. if (!res.Success)
  190. {
  191. sysf_messageBox( "심평원 진료의뢰회송 연계 프로그램에 조건 오류가 발생했습니다.\n\n" + res.ErrCd + ": " + res.ErrMsg + "\n\n조건 수정 후 전송 바랍니다.", "E999");
  192. return;
  193. }
  194. if (res.LenSdbkYadmAddrCitys() > 0)
  195. {
  196. for (var j = 0; j < res.LenSdbkYadmAddrCitys(); j++)
  197. {
  198. var item = res.GetSdbkYadmAddrCity(j);
  199. var addRow = ds_main_areadelt.addRow();
  200. ds_main_areadelt.setColumn(addRow, "sidocd", sidoCD);
  201. ds_main_areadelt.setColumn(addRow, "sidonm", sidoNM);
  202. ds_main_areadelt.setColumn(addRow, "sidocddetl", item.SgguCd);
  203. ds_main_areadelt.setColumn(addRow, "sidonmdetl", item.SgguNm);
  204. }
  205. }
  206. }
  207. }
  208. function btn_save_onclick(obj:Button, e:ClickEventInfo)
  209. {
  210. var updategrid = grdf_getGridUpdateData(grd_list01);
  211. grdf_setStatusColumn(updategrid, "status");
  212. ds_send_save.copyData(updategrid, true);
  213. var oParam = {};
  214. oParam.id = "TXARH00101";
  215. oParam.service = "healcarecoopapp.CoopHospMngt";
  216. oParam.method = "reqSetAreaInfo";
  217. oParam.inds = "req=ds_send_save";
  218. //oParam.outds = "ds_main_hosplist_hospinfo_gr=hospinfo_gr";
  219. oParam.async = false;
  220. tranf_submit(oParam);
  221. fInit_Data();
  222. }
  223. function btn_sync_onclick(obj:Button, e:ClickEventInfo)
  224. {
  225. ds_init_areacd.copyData(ds_main_areadelt);
  226. ds_init_areacd.updatecontrol = false;
  227. for(var i = 0; i < ds_init_areacd.rowcount; i++)
  228. {
  229. ds_init_areacd.setRowType(i, "i");
  230. }
  231. ds_init_areacd.updatecontrol = true;
  232. }
  233. function btn_insert_onclick(obj:Button, e:ClickEventInfo)
  234. {
  235. if(ds_init_areacd.rowposition < 0)
  236. {
  237. sysf_messageBox("행을 선택 후 행삽입을 시도하세요.");
  238. return;
  239. }
  240. var selRow = ds_init_areacd.rowposition;
  241. var sidocd = ds_init_areacd.getColumn(selRow, "sidocd");
  242. var sidonm = ds_init_areacd.getColumn(selRow, "sidonm");
  243. var row = ds_init_areacd.insertRow(selRow);
  244. ds_init_areacd.setColumn(row, "sidocd", sidocd);
  245. ds_init_areacd.setColumn(row, "sidonm", sidonm);
  246. }
  247. function btn_delt_onclick(obj:Button, e:ClickEventInfo)
  248. {
  249. ds_init_areacd.updatecontrol = false;
  250. ds_init_areacd.setRowType(ds_init_areacd.rowposition, "d");
  251. ds_init_areacd.updatecontrol = true;
  252. }
  253. ]]></Script>
  254. </Form>
  255. </FDL>