SMPMI06200_외국인일자별수납리스트.xfdl 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMPMI06200" position="absolute 0 0 1173 734" titletext="외국인 일자별 수납리스트" onload="SMPMI06200_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="외국인 수납 내역" class="tit_1" position="absolute 0 0 160 25" anchor="left top"/>
  8. <Div id="grp" taborder="1" position="absolute 0 25 1172 60" class="div_SA" anchor="left top right">
  9. <Layouts>
  10. <Layout width="1172" height="35">
  11. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1097 7 1103 29" anchor="top right"/>
  12. <Static id="caption39" text="수납기간조회 :" class="search_name" position="absolute 8 9 108 26" anchor="left top"/>
  13. <Button id="btn_search" taborder="5" text="조회" class="btn1" position="absolute 1111 7 1167 29" anchor="top right" onclick="grp_btn_search_onclick"/>
  14. <Calendar id="input1" taborder="6" position="absolute 122 8 207 27" anchor="left top" autoselect="true" autoskip="true"/>
  15. <Calendar id="input2" taborder="7" position="absolute 225 8 310 27" anchor="left top" autoselect="true" autoskip="true"/>
  16. <Static id="caption1" text="~" position="absolute 211 10 221 25" anchor="left top"/>
  17. <Static id="caption3" text="진료구분 :" class="search_name" position="absolute 345 9 431 26" anchor="left top"/>
  18. <cp_checkboxList id="radio1" taborder="9" scrollbars="none" position="absolute 435 8 580 28" style="background:transparent;" col="1" row="1" cellspacing="2" vcellspacing="0" itemWidth="100" itemHeight="20" overflow="visible" anchor="left top"/>
  19. </Layout>
  20. </Layouts>
  21. </Div>
  22. <Static id="caption2" text="일자별 수납리스트" class="tit_2" position="absolute 0 70 134 91" anchor="left top"/>
  23. <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 87 1170 91" style="strokepen:3 solid #33bbbbff;" anchor="left top right"/>
  24. <Grid id="grd_rcptlist" taborder="2" binddataset="ds_main_rcptlist" useinputpanel="false" position="absolute 0 91 1170 731" anchor="all">
  25. <Formats>
  26. <Format id="default">
  27. <Columns>
  28. <Column size="100"/>
  29. <Column size="76"/>
  30. <Column size="90"/>
  31. <Column size="45"/>
  32. <Column size="45"/>
  33. <Column size="70"/>
  34. <Column size="40"/>
  35. <Column size="40"/>
  36. <Column size="85"/>
  37. <Column size="85"/>
  38. <Column size="85"/>
  39. <Column size="60"/>
  40. <Column size="50"/>
  41. <Column size="110"/>
  42. <Column size="74"/>
  43. <Column size="74"/>
  44. <Column size="74"/>
  45. <Column size="76"/>
  46. <Column size="110"/>
  47. <Column size="100"/>
  48. <Column size="180"/>
  49. <Column size="100"/>
  50. <Column size="180"/>
  51. </Columns>
  52. <Rows>
  53. <Row size="24" band="head"/>
  54. <Row size="24"/>
  55. </Rows>
  56. <Band id="head">
  57. <Cell text="국가"/>
  58. <Cell col="1" text="환자번호"/>
  59. <Cell col="2" text="성명"/>
  60. <Cell col="3" text="생년"/>
  61. <Cell col="4" text="월일"/>
  62. <Cell col="5" text="주민번호"/>
  63. <Cell col="6" text="성별"/>
  64. <Cell col="7" text="구분"/>
  65. <Cell col="8" text="진료일자"/>
  66. <Cell col="9" text="퇴원일자"/>
  67. <Cell col="10" text="수납일"/>
  68. <Cell col="11" colspan="2" text="진료의" taborder="undefined"/>
  69. <Cell col="13" text="진료과"/>
  70. <Cell col="14" text="진료비총액"/>
  71. <Cell col="15" text="본인부담금"/>
  72. <Cell col="16" text="조합부담금"/>
  73. <Cell col="17" text="보험유형"/>
  74. <Cell col="18" text="보조유형"/>
  75. <Cell col="19" text="상병코드"/>
  76. <Cell col="20" text="상병명"/>
  77. <Cell col="21" text="대표 EDI코드"/>
  78. <Cell col="22" text="대표 EDI처방명"/>
  79. </Band>
  80. <Band id="body">
  81. <Cell style="align:center middle;" text="bind:state"/>
  82. <Cell col="1" text="bind:pid"/>
  83. <Cell col="2" text="bind:hngnm" wordwrap="char"/>
  84. <Cell col="3" text="bind:brthyy"/>
  85. <Cell col="4" text="bind:brthmd"/>
  86. <Cell col="5" text="bind:rrgstno2"/>
  87. <Cell col="6" displaytype="combo" style="align:center middle;" text="bind:sex" combodataset="ds_static_sex" combocodecol="value" combodatacol="label" enable="false"/>
  88. <Cell col="7" displaytype="combo" style="align:center middle;" text="bind:ordflag" combodataset="ds_static_ordflag" combocodecol="value" combodatacol="label" enable="false"/>
  89. <Cell col="8" displaytype="date" text="bind:orddd" mask="yyyy-MM-dd" calendardisplaynulltype="none"/>
  90. <Cell col="9" displaytype="date" text="bind:dschdd" mask="yyyy-MM-dd" calendardisplaynulltype="none"/>
  91. <Cell col="10" displaytype="date" text="bind:rcptdd" mask="yyyy-MM-dd" calendardisplaynulltype="none"/>
  92. <Cell col="11" style="align:center middle;" text="bind:orddrnm"/>
  93. <Cell col="12" style="align:center middle;" text="bind:orddrid"/>
  94. <Cell col="13" text="bind:orddeptnm"/>
  95. <Cell col="14" displaytype="number" style="align:right middle;" text="bind:totalamt" mask="9,999"/>
  96. <Cell col="15" displaytype="number" style="align:right middle;" text="bind:payment" mask="9,999"/>
  97. <Cell col="16" displaytype="number" style="align:right middle;" text="bind:markpay" mask="9,999"/>
  98. <Cell col="17" text="bind:insukind"/>
  99. <Cell col="18" text="bind:suppkind" wordwrap="char"/>
  100. <Cell col="19" text="bind:diagcd"/>
  101. <Cell col="20" text="bind:diagnm" wordwrap="char"/>
  102. <Cell col="21" text="bind:edicd"/>
  103. <Cell col="22" style="align:center top;" text="bind:edinm" wordwrap="char"/>
  104. </Band>
  105. </Format>
  106. </Formats>
  107. </Grid>
  108. <Button id="button1" taborder="3" text="출력" class="btn6" position="absolute 1041 66 1094 86" onclick="button1_onclick" anchor="top right"/>
  109. <Button id="button2" taborder="4" text="엑셀저장" class="btn7" position="absolute 1095 67 1170 86" onclick="button2_onclick" anchor="top right"/>
  110. <Button id="button3" taborder="5" text="파일생성" class="btn5" position="absolute 884 66 947 86" onclick="button3_onclick" anchor="top right"/>
  111. <Button id="button4" taborder="6" text="파일생성로그" class="btn5" position="absolute 950 66 1038 86" onclick="button4_onclick" anchor="top right"/>
  112. </Layout>
  113. </Layouts>
  114. <Objects>
  115. <Dataset id="ds_grd_rcptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="state" type="STRING"/>
  118. <Column id="pid" type="STRING"/>
  119. <Column id="hngnm" type="STRING"/>
  120. <Column id="brthyy" type="STRING"/>
  121. <Column id="brthmd" type="STRING"/>
  122. <Column id="rrgstno2" type="STRING"/>
  123. <Column id="sex" type="STRING"/>
  124. <Column id="ordflag" type="STRING"/>
  125. <Column id="orddd" type="STRING"/>
  126. <Column id="dschdd" type="STRING"/>
  127. <Column id="rcptdd" type="STRING"/>
  128. <Column id="orddeptnm" type="STRING"/>
  129. <Column id="totalamt" type="STRING"/>
  130. <Column id="payment" type="STRING"/>
  131. <Column id="markpay" type="STRING"/>
  132. <Column id="insukind" type="STRING"/>
  133. <Column id="suppkind" type="STRING"/>
  134. <Column id="diagcd" type="STRING"/>
  135. <Column id="diagnm" type="STRING"/>
  136. <Column id="edicd" type="STRING"/>
  137. <Column id="edinm" type="STRING"/>
  138. </ColumnInfo>
  139. </Dataset>
  140. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  141. <ColumnInfo>
  142. <Column id="fromdd" type="STRING" size="256"/>
  143. <Column id="todd" type="STRING" size="256"/>
  144. <Column id="ioflag" type="STRING" size="256"/>
  145. </ColumnInfo>
  146. <Rows>
  147. <Row>
  148. <Col id="fromdd"/>
  149. <Col id="todd"/>
  150. <Col id="ioflag">I O S</Col>
  151. </Row>
  152. </Rows>
  153. </Dataset>
  154. <Dataset id="ds_hidden_session" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false"/>
  155. <Dataset id="ds_radio1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  156. <ColumnInfo>
  157. <Column id="label" type="STRING" size="256"/>
  158. <Column id="value" type="STRING" size="256"/>
  159. </ColumnInfo>
  160. <Rows>
  161. <Row>
  162. <Col id="label">입원</Col>
  163. <Col id="value">I</Col>
  164. </Row>
  165. <Row>
  166. <Col id="label">외래</Col>
  167. <Col id="value">O</Col>
  168. </Row>
  169. <Row>
  170. <Col id="label">건진</Col>
  171. <Col id="value">S</Col>
  172. </Row>
  173. </Rows>
  174. </Dataset>
  175. <Dataset id="ds_main_rcptlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  176. <ColumnInfo>
  177. <Column id="ordflag" type="STRING" size="256" sumtext="진료구분"/>
  178. <Column id="state" type="STRING" size="256" sumtext="국가"/>
  179. <Column id="pid" type="STRING" size="256" sumtext="환자번호"/>
  180. <Column id="hngnm" type="STRING" size="256" sumtext="환자이름"/>
  181. <Column id="orddd" type="STRING" size="256" sumtext="진료일자"/>
  182. <Column id="dschdd" type="STRING" size="256" sumtext="퇴원일자"/>
  183. <Column id="rcptdd" type="STRING" size="256" sumtext="수납일자"/>
  184. <Column id="orddeptnm" type="STRING" size="256" sumtext="진료과"/>
  185. <Column id="orddrnm" type="STRING" size="256" sumtext="진료의"/>
  186. <Column id="orddrid" type="STRING" size="256" sumtext="진료의사번"/>
  187. <Column id="totalamt" type="STRING" size="256" sumtext="총진료비"/>
  188. <Column id="payment" type="STRING" size="256" sumtext="본인부담금"/>
  189. <Column id="markpay" type="STRING" size="256" sumtext="조합부담금"/>
  190. <Column id="insukind" type="STRING" size="256" sumtext="보험유형"/>
  191. <Column id="suppkind" type="STRING" size="256" sumtext="보조유형"/>
  192. <Column id="diagcd" type="STRING" size="256" sumtext="상병코드"/>
  193. <Column id="diagnm" type="STRING" size="256" sumtext="상병명"/>
  194. <Column id="brthyy" type="STRING" size="256" sumtext="생년월일"/>
  195. <Column id="brthmd" type="STRING" size="256" sumtext="생년월일"/>
  196. <Column id="rrgstno2" type="STRING" size="256" sumtext="주민번호"/>
  197. <Column id="sex" type="STRING" size="256" sumtext="성별"/>
  198. <Column id="edicd" type="STRING" size="256" sumtext="EDI코드"/>
  199. <Column id="edinm" type="STRING" size="256" sumtext="EDI처방명"/>
  200. </ColumnInfo>
  201. </Dataset>
  202. <Dataset id="ds_static_sex" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  203. <ColumnInfo>
  204. <Column id="label" type="STRING" size="256"/>
  205. <Column id="value" type="STRING" size="256"/>
  206. </ColumnInfo>
  207. <Rows>
  208. <Row>
  209. <Col id="label">남</Col>
  210. <Col id="value">M</Col>
  211. </Row>
  212. <Row>
  213. <Col id="label">여</Col>
  214. <Col id="value">F</Col>
  215. </Row>
  216. </Rows>
  217. </Dataset>
  218. <Dataset id="ds_static_ordflag" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  219. <ColumnInfo>
  220. <Column id="label" type="STRING" size="256"/>
  221. <Column id="value" type="STRING" size="256"/>
  222. </ColumnInfo>
  223. <Rows>
  224. <Row>
  225. <Col id="label">입원</Col>
  226. <Col id="value">I</Col>
  227. </Row>
  228. <Row>
  229. <Col id="label">외래</Col>
  230. <Col id="value">O</Col>
  231. </Row>
  232. <Row>
  233. <Col id="label">건진</Col>
  234. <Col id="value">S</Col>
  235. </Row>
  236. </Rows>
  237. </Dataset>
  238. </Objects>
  239. <Bind>
  240. <BindItem id="item0" compid="grp.input2" propid="value" datasetid="ds_send" columnid="todd"/>
  241. <BindItem id="item1" compid="grp.input1" propid="value" datasetid="ds_send" columnid="fromdd"/>
  242. </Bind>
  243. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  244. * System Name :
  245. * Job Name :
  246. * Creator :
  247. * Make Date : 2016-05-24
  248. * Description :
  249. *---------------------------------------------------------------------------------------
  250. * Modify Date Modifier Modify Description
  251. *---------------------------------------------------------------------------------------
  252. * 2016-05-24 Live Converter TF->XP
  253. *
  254. *---------------------------------------------------------------------------------------
  255. ****************************************************************************************/
  256. //=======================================================================================
  257. // Lib Include
  258. //---------------------------------------------------------------------------------------
  259. include 'com_commonxp::comm_main.xjs';
  260. include 'pam_opatmngtxp::PMOCOM.xjs';
  261. include 'com_batchinfoxp::ZSB001.xjs';
  262. var arErrorCode = new HashArray();
  263. //=======================================================================================
  264. // Local methods
  265. //---------------------------------------------------------------------------------------
  266. /**
  267. * [cb_radio1 description]
  268. * @return {[type]} [description]
  269. */
  270. function cb_radio1() {
  271. ds_send.setColumn(0, "ioflag", String(grp.radio1.getData()).replace(",", " "));
  272. }
  273. /**
  274. * 외국인 수납파일 생성
  275. * @return {[type]} [description]
  276. */
  277. function fMakeForeRcptFile() {
  278. //조회조건 체크
  279. var vcheck_fromdd = utlf_transNullToEmpty(String(ds_send.getColumn(0, "fromdd")).getTrim());
  280. var vcheck_todd = utlf_transNullToEmpty(String(ds_send.getColumn(0, "todd")).getTrim());
  281. //환자번호 존재시 기간 상관없이 조회
  282. if (vcheck_fromdd == "" || vcheck_fromdd == " " || vcheck_fromdd == "-") {
  283. sysf_messageBox("시작일자가 입력되지", "E007");
  284. grp.ipt_fromdd.setFocus();
  285. return;
  286. }
  287. if (vcheck_todd == "" || vcheck_todd == " " || vcheck_todd == "-") {
  288. sysf_messageBox("종료일자가 입력되지", "E007");
  289. grp.ipt_todd.setFocus();
  290. return;
  291. }
  292. if (isValidDateTime(vcheck_fromdd, "YYYYMMDD") != true) {
  293. sysf_messageBox("시작일자 형식 오류입니다!", "E999", "");
  294. return false;
  295. }
  296. if (isValidDateTime(vcheck_todd, "YYYYMMDD") != true) {
  297. sysf_messageBox("종료일자 형식 오류입니다!", "E999", "");
  298. return false;
  299. }
  300. if (parseInt(vcheck_fromdd) > parseInt(vcheck_todd)) {
  301. sysf_messageBox("종료일자는 시작일자보다 같거나 커야 합니다!", "E999", "");
  302. return false;
  303. }
  304. dsf_createDsRow('ds_res', [{ col: 'ordflag', type: 'string', size: 256, val: '' }], false);
  305. var oParam = {};
  306. oParam.id = "TRPMI06200";
  307. oParam.service = "ipatmngtapp.InReport";
  308. oParam.method = "reqExeMakeForeRcptFileBatch";
  309. oParam.inds = "req=ds_send";
  310. oParam.outds = "ds_res=rcptlist";
  311. oParam.async = false;
  312. oParam.callback = "callback";
  313. tranf_submit(oParam);
  314. if (arErrorCode.pop("TRPMI06200") > -1) {
  315. sysf_messageBox("외국인수납파일생성 배치가 실행되었습니다.", "I000");
  316. }
  317. }
  318. /**
  319. * submit 후 호출 될 공통 콜백
  320. * @param {[type]} sSvcId [description]
  321. * @param {[type]} nErrorCode [description]
  322. * @param {[type]} sErrorMsg [description]
  323. * @return {Function} [description]
  324. */
  325. function callback(sSvcId, nErrorCode, sErrorMsg){
  326. arErrorCode.push(sSvcId, nErrorCode);
  327. }
  328. //=======================================================================================
  329. // Events
  330. //---------------------------------------------------------------------------------------
  331. /**
  332. * onload 이벤트 발생 시 호출
  333. * @param {[type]} obj:Form [description]
  334. * @param {[type]} e:LoadEventInfo [description]
  335. */
  336. function SMPMI06200_onload(obj: Form, e: LoadEventInfo) {
  337. frmf_initForm(obj);
  338. // checkboxList 설정
  339. var props = "col=3,row=1,cellspacing=2,vcellspacing=0,itemWidth=-1,itemHeight=20,overflow='visible'";
  340. grp.radio1.setInitComp(props, ds_radio1, "value", "label", "cb_radio1");
  341. grp.radio1.setCheckAll(true);
  342. fGetUserInfosSampling(); //세션정보
  343. ds_send.setColumn(0, "fromdd", utlf_getCurrentDate());
  344. ds_send.setColumn(0, "todd", utlf_getCurrentDate());
  345. }
  346. /**
  347. * 조회 버튼 클릭 이벤트
  348. * @param {[type]} obj: Button [description]
  349. * @param {[type]} e: ClickEventInfo [description]
  350. * @return {[type]} [description]
  351. */
  352. function grp_btn_search_onclick(obj: Button, e: ClickEventInfo) {
  353. if (String(ds_send.getColumn(0, "ioflag")).length < 1) {
  354. sysf_messageBox("진료구분은 적어도 1개 이상 선택해야 합니다.", "E999");
  355. return;
  356. }
  357. var fromdd = ds_send.getColumn(0, "fromdd");
  358. var todd = ds_send.getColumn(0, "todd");
  359. if (utlf_isNull(fromdd) || utlf_isNull(todd)) {
  360. sysf_messageBox("시작일자 및 종료일자는 반드시 입력해야 합니다.", "E999");
  361. return;
  362. }
  363. var minusrslt = utlf_getDateInterval(fromdd, todd);
  364. if (minusrslt > 93) {
  365. sysf_messageBox("최대 3개월까지 조회가능합니다.\r\n장기간 데이터는 파일생성 기능을 통해 처리하십시오.", "E999");
  366. return;
  367. }
  368. ds_main_rcptlist.clearData();
  369. var oParam = {};
  370. oParam.id = "TRPMI06200";
  371. oParam.service = "ipatmngtapp.InReport";
  372. oParam.method = "reqGetForeRcptList";
  373. oParam.inds = "req=ds_send";
  374. oParam.outds = "ds_main_rcptlist=rcptlist";
  375. oParam.async = false;
  376. tranf_submit(oParam);
  377. }
  378. /**
  379. * 파일생성 버튼 클릭 이벤트
  380. * @param {[type]} obj: Button [description]
  381. * @param {[type]} e: ClickEventInfo [description]
  382. * @return {[type]} [description]
  383. */
  384. function button3_onclick(obj: Button, e: ClickEventInfo) {
  385. fMakeForeRcptFile();
  386. }
  387. /**
  388. * 파일생성로그 버튼 클릭 이벤트
  389. * @param {[type]} obj: Button [description]
  390. * @param {[type]} e: ClickEventInfo [description]
  391. * @return {[type]} [description]
  392. */
  393. function button4_onclick(obj: Button, e: ClickEventInfo) {
  394. var todd = utlf_getCurrentDate().toDate().getAddDate(1, 'D');
  395. zsbfOpenBatchLogPopup("ipatmngtmgr.ForeRcptFileBatch", utlf_getCurrentDate(), todd.getDateFormat());
  396. }
  397. /**
  398. * 출력 버튼 클릭 이벤트
  399. * @param {[type]} obj: Button [description]
  400. * @param {[type]} e: ClickEventInfo [description]
  401. * @return {[type]} [description]
  402. */
  403. function button1_onclick(obj: Button, e: ClickEventInfo) {
  404. var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0";
  405. var objDOM = rptf_createDOM(); // DOM 객체 설정
  406. rptf_setNodeListToDOM(objDOM, "root/send", ds_send);
  407. rptf_setNodeListToDOM(objDOM, "root/main/rcptlist", ds_main_rcptlist);
  408. rptf_exeReportPreview30(["RPPMI06200"], [{ xml_data_XML1: objDOM.documentElement.source }], option);
  409. }
  410. /**
  411. * 엑셀저장 버튼 클릭 이벤트
  412. * @param {[type]} obj: Button [description]
  413. * @param {[type]} e: ClickEventInfo [description]
  414. * @return {[type]} [description]
  415. */
  416. function button2_onclick(obj: Button, e: ClickEventInfo) {
  417. grdf_exportExcel(grd_rcptlist, "excel", "SheetName", true, "", "user", false);
  418. }
  419. ]]></Script>
  420. </Form>
  421. </FDL>