SMPMI03800_병상가동률조회.xfdl 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMPMI03800" position="absolute 0 0 1256 805" titletext="병상가동률조회" onload="SMPMI03800_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="병상가동률조회" class="tit_1" position="absolute 0 0 140 25"/>
  8. <Div id="div" taborder="1" position="absolute 0 25 1194 60" class="div_SA">
  9. <Layouts>
  10. <Layout width="1194" height="35">
  11. <Shape id="line2" linetype="vertical" class="line_4" position="absolute 1105 7 1111 29" anchor="default"/>
  12. <Static id="caption17" text="조회구분 :" class="search_name" position="absolute 5 9 91 26" anchor="default"/>
  13. <Radio id="radio1" taborder="1" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 87 9 337 26" style="textpadding:0 3 0 3;" onitemchanged="div_radio1_onitemchanged" anchor="default">
  14. <Dataset id="innerdataset">
  15. <ColumnInfo>
  16. <Column id="codecolumn"/>
  17. <Column id="datacolumn"/>
  18. </ColumnInfo>
  19. <Rows>
  20. <Row>
  21. <Col id="codecolumn">WARD</Col>
  22. <Col id="datacolumn">병동별</Col>
  23. </Row>
  24. <Row>
  25. <Col id="codecolumn">CENTER</Col>
  26. <Col id="datacolumn">센터별</Col>
  27. </Row>
  28. <Row>
  29. <Col id="codecolumn">DEPT</Col>
  30. <Col id="datacolumn">진료과별(재원기준)</Col>
  31. </Row>
  32. </Rows>
  33. </Dataset>
  34. </Radio>
  35. <Button id="btn_search" taborder="2" text="조회" class="btn1" position="absolute 1123 7 1179 29" onclick="div_btn_search_onclick" anchor="default"/>
  36. <CheckBox id="chk_term" taborder="3" position="absolute 458 10 515 25" text="기간별" falsevalue="F" value="F" truevalue="T" onclick="div_chk_term_onclick" anchor="default"/>
  37. <Calendar id="ipt_fromdd" taborder="4" class="input_search" visible="false" position="absolute 602 8 697 27" autoselect="true" autoskip="true" dateformat="yyyy-MM-dd" anchor="default"/>
  38. <Calendar id="ipt_todd" taborder="5" class="input_search" visible="false" position="absolute 724 8 819 27" autoselect="true" autoskip="true" dateformat="yyyy-MM-dd" value="null" anchor="default"/>
  39. <Static id="caption5" text="~" visible="false" position="absolute 705 11 716 26" anchor="default"/>
  40. <Static id="caption7" text="조회일자 :" class="search_name" visible="false" position="absolute 520 9 606 26" anchor="default"/>
  41. <CheckBox id="chk_kindflag" taborder="6" enable="false" position="absolute 365 10 445 25" text="병동구분별" falsevalue="N" truevalue="Y" anchor="default"/>
  42. <Static id="Static00" text="※ 조회기간 최대 6개월 지정 가능" position="absolute 832 8 1034 28" style="color:blue;"/>
  43. </Layout>
  44. </Layouts>
  45. </Div>
  46. <Static id="caption2" text="병상가동률" class="tit_2" position="absolute 5 69 97 85"/>
  47. <Shape id="line1" linetype="horizontal" class="line_1" position="absolute 0 87 1194 93" style="strokepen:3 solid #33bbbbff;"/>
  48. <Div id="grp_report" taborder="2" visible="false" position="absolute 865 66 930 81"/>
  49. <Button id="btn_preview" taborder="3" text="미리보기" class="btn2" visible="false" position="absolute 710 66 774 85" onclick="btn_preview_onclick"/>
  50. <Button id="btn_print" taborder="4" text="출력" class="btn6" visible="false" position="absolute 777 66 828 85" onclick="btn_print_onclick"/>
  51. <Button id="btn_excel" taborder="5" text="엑셀저장" class="btn7" position="absolute 831 66 906 85" onclick="btn_excel_onclick"/>
  52. <Grid id="grd_list" class="datagrid2" taborder="6" binddataset="ds_main_bedoperatingratelist" useinputpanel="false" position="absolute 0 91 908 759" oncelldblclick="grd_list_oncelldblclick">
  53. <Formats>
  54. <Format id="default">
  55. <Columns>
  56. <Column size="100" band="left"/>
  57. <Column size="100"/>
  58. <Column size="100"/>
  59. <Column size="150"/>
  60. <Column size="200"/>
  61. <Column size="90"/>
  62. <Column size="90"/>
  63. <Column size="90"/>
  64. <Column size="90"/>
  65. <Column size="90"/>
  66. <Column size="90"/>
  67. <Column size="90"/>
  68. <Column size="0"/>
  69. </Columns>
  70. <Rows>
  71. <Row size="24" band="head"/>
  72. <Row size="24"/>
  73. </Rows>
  74. <Band id="head">
  75. <Cell text="층"/>
  76. <Cell col="1" text="구분"/>
  77. <Cell col="2" text="센터"/>
  78. <Cell col="3" text="병동"/>
  79. <Cell col="4" text="진료과"/>
  80. <Cell col="5" text="병상수"/>
  81. <Cell col="6" text="재원병상"/>
  82. <Cell col="7" text="빈병상"/>
  83. <Cell col="8" text="퇴원예정(통보)"/>
  84. <Cell col="9" text="입원예정"/>
  85. <Cell col="10" text="전실예정"/>
  86. <Cell col="11" text="가동률(%)"/>
  87. <Cell col="12"/>
  88. </Band>
  89. <Band id="body">
  90. <Cell celltype="head" style="align:center middle;background:#b5e8e3ff;background2:#b5e8e3ff;" text="bind:posinfocd" suppress="1" suppressalign="middle,over"/>
  91. <Cell col="1" celltype="head" style="align:center middle;background:#b5e8e3ff;background2:#b5e8e3ff;" text="bind:wardkind" suppress="1" suppressalign="middle,over"/>
  92. <Cell col="2" celltype="head" displaytype="normal" edittype="none" style="align:center middle;" text="bind:spaceflag" enable="false"/>
  93. <Cell col="3" style="align:left middle;" text="bind:wardcdnm" suppress="1" suppressalign="middle"/>
  94. <Cell col="4" celltype="head" style="align:center middle;" text="bind:spaceflag"/>
  95. <Cell col="5" displaytype="number" style="align:center middle;" text="bind:bedcnt" mask="9,999"/>
  96. <Cell col="6" displaytype="number" style="align:center middle;" text="bind:inpatcnt" mask="9,999"/>
  97. <Cell col="7" displaytype="number" style="align:center middle;background:BIND(bgColor);background2:BIND(bgColor);" text="bind:vacantcnt" mask="9,999"/>
  98. <Cell col="8" displaytype="number" style="align:center middle;" text="bind:dschnoticnt" mask="9,999"/>
  99. <Cell col="9" displaytype="number" style="align:center middle;" text="bind:inrsrvcnt" mask="9,999"/>
  100. <Cell col="10" displaytype="number" style="align:center middle;" text="bind:intrnscnt" mask="9,999"/>
  101. <Cell col="11" style="align:right middle;" text="bind:operatingrate"/>
  102. <Cell col="12"/>
  103. </Band>
  104. </Format>
  105. </Formats>
  106. </Grid>
  107. <Static id="caption8" text="★ 병동 기간별 가동률 조회시 병상정보는 자정12시를 기준으로 저장된 데이터 조회" position="absolute 115 67 616 82" style="color:blue;font:Dotum,9,bold;"/>
  108. <Button id="button3" taborder="7" text="초기화" class="btn4" position="absolute 1126 768 1194 790" onclick="button3_onclick"/>
  109. <Shape id="line4" linetype="horizontal" class="line_6" position="absolute 0 759 1194 765"/>
  110. <Shape id="rectangle3" type="rectangle" position="absolute 0 771 12 783" style="fillbrush:solid #7fffd4ff true;"/>
  111. <Shape id="rectangle4" type="rectangle" position="absolute 57 771 69 783" style="fillbrush:solid #faf58cff true;"/>
  112. <Shape id="rectangle5" type="rectangle" position="absolute 114 771 126 783" style="fillbrush:solid #ff4646ff true;"/>
  113. <Static id="caption1" text=": 여유" position="absolute 14 771 49 783"/>
  114. <Static id="caption3" text=": 경고" position="absolute 71 771 106 785"/>
  115. <Static id="caption4" text=": 부족" position="absolute 128 771 163 785"/>
  116. <Grid id="Grid00" taborder="8" useinputpanel="false" position="absolute 912 91 1194 759" binddataset="ds_main_patinfolist">
  117. <Formats>
  118. <Format id="default">
  119. <Columns>
  120. <Column size="50"/>
  121. <Column size="60"/>
  122. <Column size="60"/>
  123. <Column size="80"/>
  124. <Column size="120"/>
  125. <Column size="120"/>
  126. </Columns>
  127. <Rows>
  128. <Row size="24" band="head"/>
  129. <Row size="24"/>
  130. </Rows>
  131. <Band id="head">
  132. <Cell text="병실"/>
  133. <Cell col="1" text="병상"/>
  134. <Cell col="2" text="성명"/>
  135. <Cell col="3" text="상태"/>
  136. <Cell col="4" text="진료과"/>
  137. <Cell col="5" text="병동"/>
  138. </Band>
  139. <Band id="body">
  140. <Cell text="bind:roomcd"/>
  141. <Cell col="1" text="bind:bednm"/>
  142. <Cell col="2" text="bind:hngnm"/>
  143. <Cell col="3" style="align:left middle;" text="bind:indschacptstat"/>
  144. <Cell col="4" text="bind:orddeptnm"/>
  145. <Cell col="5" text="bind:wardnm"/>
  146. </Band>
  147. </Format>
  148. </Formats>
  149. </Grid>
  150. <Static id="Static00" text="-" position="absolute 1059 67 1194 87" style="color:deeppink;align:center;"/>
  151. <Static id="caption00" text="세부환자내역" class="tit_2" position="absolute 959 69 1062 85"/>
  152. </Layout>
  153. </Layouts>
  154. <Objects>
  155. <Dataset id="ds_send_data1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  156. <ColumnInfo>
  157. <Column id="refcond" type="STRING" size="256"/>
  158. <Column id="fromdd" type="STRING" size="256"/>
  159. <Column id="todd" type="STRING" size="256"/>
  160. <Column id="termflag" type="STRING" size="256"/>
  161. <Column id="kindflag" type="STRING" size="256"/>
  162. <Column id="type" type="STRING" size="256"/>
  163. <Column id="wardcd" type="STRING" size="256"/>
  164. </ColumnInfo>
  165. <Rows>
  166. <Row>
  167. <Col id="refcond"/>
  168. <Col id="fromdd"/>
  169. <Col id="todd"/>
  170. <Col id="termflag"/>
  171. <Col id="kindflag"/>
  172. </Row>
  173. </Rows>
  174. </Dataset>
  175. <Dataset id="ds_main_bedoperatingratelist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  176. <ColumnInfo>
  177. <Column id="posinfocd" type="STRING" size="256" sumtext="층(위치)"/>
  178. <Column id="wardkind" type="STRING" size="256" sumtext="병동구분"/>
  179. <Column id="dispseq" type="STRING" size="256" sumtext="정렬순서"/>
  180. <Column id="spaceflag" type="STRING" size="256" sumtext="병동"/>
  181. <Column id="wardcd" type="STRING" size="256" sumtext="병동코드"/>
  182. <Column id="wardcdnm" type="STRING" size="256" sumtext="병동코드명"/>
  183. <Column id="bedcnt" type="STRING" size="256" sumtext="총병상수"/>
  184. <Column id="inpatcnt" type="STRING" size="256" sumtext="재원병상수"/>
  185. <Column id="vacantcnt" type="STRING" size="256" sumtext="가용병상수"/>
  186. <Column id="dschnoticnt" type="STRING" size="256" sumtext="퇴원예정자수"/>
  187. <Column id="inrsrvcnt" type="STRING" size="256" sumtext="입원예정자수"/>
  188. <Column id="intrnscnt" type="STRING" size="256" sumtext="전실예정자수"/>
  189. <Column id="operatingrate" type="STRING" size="256" sumtext="병상가동률"/>
  190. <Column id="bgColor" type="STRING" size="256"/>
  191. </ColumnInfo>
  192. </Dataset>
  193. <Dataset id="ds_main_patinfolist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  194. <ColumnInfo>
  195. <Column id="wardnm" type="STRING" size="256"/>
  196. <Column id="roomcd" type="STRING" size="256"/>
  197. <Column id="orddeptnm" type="STRING" size="256"/>
  198. <Column id="bednm" type="STRING" size="256"/>
  199. <Column id="hngnm" type="STRING" size="256"/>
  200. <Column id="indschacptstat" type="STRING" size="256"/>
  201. </ColumnInfo>
  202. </Dataset>
  203. </Objects>
  204. <Bind>
  205. <BindItem id="item0" compid="div.radio1" propid="value" datasetid="ds_send_data1" columnid="refcond"/>
  206. <BindItem id="item1" compid="div.chk_kindflag" propid="value" datasetid="ds_send_data1" columnid="kindflag"/>
  207. <BindItem id="item2" compid="div.chk_term" propid="value" datasetid="ds_send_data1" columnid="termflag"/>
  208. <BindItem id="item3" compid="div.ipt_todd" propid="value" datasetid="ds_send_data1" columnid="todd"/>
  209. <BindItem id="item4" compid="div.ipt_fromdd" propid="value" datasetid="ds_send_data1" columnid="fromdd"/>
  210. </Bind>
  211. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  212. * System Name :
  213. * Job Name :
  214. * Creator :
  215. * Make Date : 2015-10-27
  216. * Description :
  217. *---------------------------------------------------------------------------------------
  218. * Modify Date Modifier Modify Description
  219. *---------------------------------------------------------------------------------------
  220. * 2015-10-27 Live Converter TF->XP
  221. *
  222. *---------------------------------------------------------------------------------------
  223. ****************************************************************************************/
  224. //=======================================================================================
  225. // Lib Include
  226. //---------------------------------------------------------------------------------------
  227. include 'com_commonxp::comm_main.xjs';
  228. var arErrorCode = new HashArray();
  229. //=======================================================================================
  230. // Local methods
  231. //---------------------------------------------------------------------------------------
  232. /**
  233. * 그리드 조건에 따라 컬럼 감추기
  234. * @param {[type]} pRefCond [description]
  235. * @return {[type]} [description]
  236. */
  237. function fShowGridWithRefCond(pRefCond) {
  238. var kindflag = ds_send_data1.getColumn(0, "kindflag");
  239. var termflag = ds_send_data1.getColumn(0, "termflag");
  240. if (pRefCond == "WARD") {
  241. if (termflag == "T") {
  242. grd_list.setFormatColProperty(8, 'size', 0);
  243. } else {
  244. grd_list.setFormatColProperty(8, 'size', 100);
  245. }
  246. if (kindflag == "Y") {
  247. grd_list.setFormatColProperty(0, 'size', 0);
  248. grd_list.setFormatColProperty(1, 'size', 100);
  249. } else {
  250. grd_list.setFormatColProperty(0, 'size', 100);
  251. grd_list.setFormatColProperty(1, 'size', 0);
  252. }
  253. grd_list.setFormatColProperty(2, 'size', 0);
  254. grd_list.setFormatColProperty(3, 'size', 150);
  255. grd_list.setFormatColProperty(4, 'size', 0);
  256. } else if (pRefCond == "CENTER") {
  257. grd_list.setFormatColProperty(0, 'size', 0);
  258. grd_list.setFormatColProperty(1, 'size', 0);
  259. grd_list.setFormatColProperty(2, 'size', 100);
  260. grd_list.setFormatColProperty(3, 'size', 0);
  261. grd_list.setFormatColProperty(4, 'size', 0);
  262. grd_list.setFormatColProperty(8, 'size', 100);
  263. } else if (pRefCond == "DEPT") {
  264. grd_list.setFormatColProperty(0, 'size', 0);
  265. grd_list.setFormatColProperty(1, 'size', 0);
  266. grd_list.setFormatColProperty(2, 'size', 0);
  267. grd_list.setFormatColProperty(3, 'size', 0);
  268. grd_list.setFormatColProperty(4, 'size', 200);
  269. grd_list.setFormatColProperty(8, 'size', 100);
  270. } else {
  271. if (kindflag == "Y") {
  272. grd_list.setFormatColProperty(0, 'size', 0);
  273. grd_list.setFormatColProperty(1, 'size', 100);
  274. } else {
  275. grd_list.setFormatColProperty(0, 'size', 100);
  276. grd_list.setFormatColProperty(1, 'size', 0);
  277. }
  278. grd_list.setFormatColProperty(2, 'size', 0);
  279. grd_list.setFormatColProperty(3, 'size', 150);
  280. grd_list.setFormatColProperty(8, 'size', 100);
  281. }
  282. }
  283. /**
  284. * [fSetColor description]
  285. * @return {[type]} [description]
  286. */
  287. function fSetColor() {
  288. var iGridCount = ds_main_bedoperatingratelist.rowcount;
  289. for (var idx = 0; idx < iGridCount; idx++) {
  290. var sOperatingRate = ds_main_bedoperatingratelist.getColumn(idx, "operatingrate");
  291. var iOperatingRate = parseInt(sOperatingRate); // parseIn("19.9") -> 19 floor와 같은 작용
  292. // 0 <= xx < 90
  293. if (iOperatingRate >= 0 && iOperatingRate < 90) {
  294. ds_main_bedoperatingratelist.setColumn(idx, 'bgColor', '#7FFFD4');
  295. }
  296. // 90 <= xx < 95
  297. if (iOperatingRate >= 90 && iOperatingRate < 95) {
  298. ds_main_bedoperatingratelist.setColumn(idx, 'bgColor', '#FAF58C');
  299. }
  300. // 95 <= xx
  301. if (iOperatingRate >= 95) {
  302. ds_main_bedoperatingratelist.setColumn(idx, 'bgColor', '#FF4646');
  303. }
  304. }
  305. }
  306. /**
  307. * 이 메서드는 SMPMI03600_VIP재원환자조회 의 메서드와 동일함(TF에서도)
  308. * 따라서 이 메서드 수행 시 ds_main_vipinpatlist 인스턴스가 존재하지 않기 때문에
  309. * 에러가 발생할 것 임. DBS227 written
  310. * @param {[type]} pCond [description]
  311. * @return {[type]} [description]
  312. */
  313. function fPrint(pCond) {
  314. var sPrintYN = "print=";
  315. var sAutoCloseYN = "false";
  316. var sViewYN = "";
  317. if (pCond == "PREVIEW") {
  318. sPrintYN += "0";
  319. // sAutoCloseYN = "false";
  320. sViewYN = "";
  321. }
  322. if (pCond == "PRINT") {
  323. sPrintYN += "1";
  324. sAutoCloseYN = "false";
  325. // sViewYN = "grp_report";
  326. }
  327. sPrintYN += ';'
  328. var iCount = ds_main_vipinpatlist.rowcount;
  329. if (iCount > 0) {
  330. var sPrintFromdd = String(ds_send.getColumn(0, "fromdd"));
  331. var sPrinttodd = ds_send.getColumn(0, "todd");
  332. sPrintFromdd = sPrintFromdd.substr(0, 4) + "-" + sPrintFromdd.substr(4, 2) + "-" + sPrintFromdd.substr(6, 4);
  333. dsf_makeValue(ds_hidden_printtype, "printkind", 'string', "VIP재원");
  334. dsf_makeValue(ds_hidden_printtype, "printfromdd", 'string', sPrintFromdd);
  335. dsf_makeValue(ds_hidden_printtype, "printtodd", 'string', sPrinttodd);
  336. var objDOM = rptf_createDOM(); // DOM 객체 설정
  337. rptf_setNodeListToDOM(objDOM, "root/main/vipinpatlist/vipinpatspec" , ds_main_vipinpatlist);
  338. rptf_setNodeListToDOM(objDOM, "root/hidden/printtype" , ds_hidden_printtype);
  339. var option = "open=1;save=1;directprint=1;printdialog=0;zoom=0";
  340. option += sPrintYN;
  341. rptf_exeReportPreview30(["RPPMI03601"],[{ xml_data_XML1 : objDOM.documentElement.source }], option);
  342. }
  343. else {
  344. sysf_messageBox("출력할 내용이 없습니다!!", "I");
  345. }
  346. }
  347. /**
  348. * [fInitialize description]
  349. * @return {[type]} [description]
  350. */
  351. function fInitialize() {
  352. ds_main_bedoperatingratelist.clearData();
  353. ds_send_data1.clearData();
  354. ds_send_data1.addRow();
  355. ds_send_data1.setColumn(0, "refcond", "WARD");
  356. }
  357. /**
  358. * submit 후 호출 될 공통 콜백
  359. * @param {[type]} sSvcId [description]
  360. * @param {[type]} nErrorCode [description]
  361. * @param {[type]} sErrorMsg [description]
  362. * @return {Function} [description]
  363. */
  364. function callback(sSvcId, nErrorCode, sErrorMsg){
  365. arErrorCode.push(sSvcId, nErrorCode);
  366. }
  367. //=======================================================================================
  368. // Events
  369. //---------------------------------------------------------------------------------------
  370. /**
  371. * onload 이벤트 발생 시 호출
  372. * @param {[type]} obj:Form [description]
  373. * @param {[type]} e:LoadEventInfo [description]
  374. */
  375. function SMPMI03800_onload(obj: Form, e: LoadEventInfo) {
  376. // sort 기능 추가
  377. grdf_initGrid(Grid00);
  378. frmf_initForm(obj);
  379. ds_send_data1.setColumn(0, "refcond", "WARD");
  380. ds_send_data1.setColumn(0, "fromdd", utlf_getCurrentDate());
  381. ds_send_data1.setColumn(0, "todd", utlf_getCurrentDate());
  382. fShowGridWithRefCond("WARD");
  383. if (sysf_getUserInfo("dutplceinstcd") == "032" || sysf_getUserId() == "PAM") {
  384. div.chk_kindflag.enable = true;
  385. }
  386. }
  387. /**
  388. * 조회구분 라디오 아이템 변경 후 이벤트
  389. * @param {[type]} obj: Radio [description]
  390. * @param {[type]} e: ItemChangeEventInfo [description]
  391. * @return {[type]} [description]
  392. */
  393. function div_radio1_onitemchanged(obj: Radio, e: ItemChangeEventInfo) {
  394. if (e.postvalue == "WARD") {
  395. div.chk_kindflag.visible = true;
  396. div.chk_term.visible = true;
  397. }
  398. else if (e.postvalue == "CENTER") {
  399. div.chk_kindflag.visible = true;
  400. div.chk_term.visible = false;
  401. }
  402. else {
  403. div.chk_kindflag.visible = false;
  404. div.chk_term.visible = false;
  405. }
  406. frmf_inputEnterKey("div.chk_term", "onclick", new ClickEventInfo);
  407. }
  408. /**
  409. * 조회구분 기간별 체크박스 아이템 클릭 이벤트
  410. * @param {[type]} obj: CheckBox [description]
  411. * @param {[type]} e: ClickEventInfo [description]
  412. * @return {[type]} [description]
  413. */
  414. function div_chk_term_onclick(obj: CheckBox, e: ClickEventInfo) {
  415. if (ds_send_data1.getColumn(0, 'termflag') == "T") {
  416. div.caption7.visible = true;
  417. div.caption5.visible = true;
  418. div.ipt_fromdd.visible = true;
  419. div.ipt_todd.visible = true;
  420. }
  421. else {
  422. div.caption7.visible = false;
  423. div.caption5.visible = false;
  424. div.ipt_fromdd.visible = false;
  425. div.ipt_todd.visible = false;
  426. }
  427. }
  428. /**
  429. * 조회 버튼 클릭 이벤트
  430. * @param {[type]} obj: Button [description]
  431. * @param {[type]} e: ClickEventInfo [description]
  432. * @return {[type]} [description]
  433. */
  434. function div_btn_search_onclick(obj: Button, e: ClickEventInfo) {
  435. fShowGridWithRefCond(ds_send_data1.getColumn(0, 'refcond'));
  436. if (ds_send_data1.getColumn(0, 'termflag') == "T") {
  437. var fromdd = ds_send_data1.getColumn(0, 'fromdd');
  438. var todd = ds_send_data1.getColumn(0, 'todd');
  439. var term = utlf_getDateInterval(fromdd, todd);
  440. if (term > 185) {
  441. sysf_messageBox("조회기간은 6개월을 넘을수 없습니다.", "E999");
  442. ds_send_data1.setColumn(0, 'fromdd', utlf_getCurrentDate);
  443. ds_send_data1.setColumn(0, 'todd', utlf_getCurrentDate);
  444. return;
  445. }
  446. }
  447. ds_main_bedoperatingratelist.clearData();
  448. // 병상가동률 조회
  449. var oParam = {};
  450. oParam.id = "TRPMI03801";
  451. oParam.service = "ipatmngtapp.IPatRef";
  452. oParam.method = "reqGetBedInfoWithWard";
  453. oParam.inds = "req=ds_send_data1";
  454. oParam.outds = "ds_main_bedoperatingratelist=bedoperatingratelist";
  455. oParam.async = false;
  456. tranf_submit(oParam);
  457. ds_main_bedoperatingratelist.addColumn('bgColor', 'string');
  458. // color setting
  459. fSetColor();
  460. }
  461. /**
  462. * 미리보기 버튼 클릭 이벤트
  463. * @param {[type]} obj: Button [description]
  464. * @param {[type]} e: ClickEventInfo [description]
  465. * @return {[type]} [description]
  466. */
  467. function btn_preview_onclick(obj: Button, e: ClickEventInfo) {
  468. fPrint("PREVIEW");
  469. }
  470. /**
  471. * 출력 버튼 클릭 이벤트
  472. * @param {[type]} obj: Button [description]
  473. * @param {[type]} e: ClickEventInfo [description]
  474. * @return {[type]} [description]
  475. */
  476. function btn_print_onclick(obj: Button, e: ClickEventInfo) {
  477. fPrint("PRINT");
  478. }
  479. /**
  480. * 엑셀저장 버튼 클릭 이벤트
  481. * @param {[type]} obj: Button [description]
  482. * @param {[type]} e: ClickEventInfo [description]
  483. * @return {[type]} [description]
  484. */
  485. function btn_excel_onclick(obj: Button, e: ClickEventInfo) {
  486. grdf_exportExcel(grd_list, "병상가동율", "병상가동율");
  487. }
  488. /**
  489. * 초기화 버튼 클릭 이벤트
  490. * @param {[type]} obj: Button [description]
  491. * @param {[type]} e: ClickEventInfo [description]
  492. * @return {[type]} [description]
  493. */
  494. function button3_onclick(obj: Button, e: ClickEventInfo) {
  495. fInitialize();
  496. }
  497. function caption8_onclick(obj:Static, e:ClickEventInfo)
  498. {
  499. }
  500. function grd_list_oncelldblclick(obj:Grid, e:GridClickEventInfo)
  501. {
  502. if (ds_send_data1.getColumn(0, "refcond") != "WARD") {
  503. sysf_messageBox("병동별로만 세부내역 조회가 가능합니다.", "C000");
  504. return;
  505. }
  506. var rowidx = obj.currentrow;
  507. var wardcd = ds_main_bedoperatingratelist.getColumn(rowidx, "wardcd");
  508. var type = "";
  509. // 6:재원환자
  510. if (e.cell == 6) {
  511. type = "INPT";
  512. // 8:퇴원예정(통보)
  513. } else if (e.cell == 8) {
  514. type = "DSCH";
  515. // 9:입원예정
  516. } else if (e.cell == 9) {
  517. type = "ADRV";
  518. // 10:전실예정
  519. } else if (e.cell == 10) {
  520. type = "CDCR";
  521. } else {
  522. // 상기 컬럼 이외에는 조회 불필요
  523. return;
  524. }
  525. ds_send_data1.setColumn(0, "type", type);
  526. ds_send_data1.setColumn(0, "wardcd", wardcd);
  527. var oParam = {};
  528. oParam.id = "reqGetPatInfoWithWard";
  529. oParam.service = "ipatmngtapp.IPatRef";
  530. oParam.method = "reqGetPatInfoWithWard";
  531. oParam.inds = "req=ds_send_data1";
  532. oParam.outds = "ds_main_patinfolist=patinfolist";
  533. oParam.async = false;
  534. tranf_submit(oParam);
  535. }
  536. ]]></Script>
  537. </Form>
  538. </FDL>