SMPMI05201_전체병상전용병상가동률.xfdl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMPMI05201" position="absolute 0 0 1256 805" titletext="전용병상 가동률 현황" onload="SMPMI05201_onload">
  5. <Layouts>
  6. <Layout>
  7. <Static id="caption6" text="전용병상 가동률 현황" class="tit_1" position="absolute 0 0 180 25"/>
  8. <Shape id="line5" linetype="vertical" class="line_1" position="absolute 0 42 1175 48"/>
  9. <Static id="caption7" text="진료과별 병동별 병상가동현황 - 과별" class="tit_2" position="absolute 5 26 244 40"/>
  10. <Button id="btn_print5" taborder="1" text="출력" class="btn2_letter2" visible="false" position="absolute 1050 31 1092 50"/>
  11. <Grid id="grd_bedlist" class="datagrid" taborder="2" binddataset="ds_main_bedinfo_bedlist" useinputpanel="false" position="absolute 0 80 1170 720">
  12. <Formats>
  13. <Format id="default">
  14. <Columns>
  15. <Column size="120"/>
  16. <Column size="80"/>
  17. <Column size="90"/>
  18. <Column size="80"/>
  19. <Column size="80"/>
  20. <Column size="100"/>
  21. <Column size="125"/>
  22. <Column size="120"/>
  23. <Column size="100"/>
  24. <Column size="126"/>
  25. <Column size="120"/>
  26. </Columns>
  27. <Rows>
  28. <Row size="24" band="head"/>
  29. <Row size="24" band="head"/>
  30. <Row size="24"/>
  31. </Rows>
  32. <Band id="head">
  33. <Cell rowspan="2" text="진료과" taborder="undefined"/>
  34. <Cell col="1" rowspan="2" text="기본병상수" taborder="undefined"/>
  35. <Cell col="2" rowspan="2" text="총병상수" taborder="undefined"/>
  36. <Cell col="3" rowspan="2" text="환자수" taborder="undefined"/>
  37. <Cell col="4" rowspan="2" text="가동율" taborder="undefined"/>
  38. <Cell col="5" colspan="3" text="진료과별(주진료과)" taborder="undefined"/>
  39. <Cell col="8" colspan="3" text="진료과별(주.부진료과)" taborder="undefined"/>
  40. <Cell row="1" col="5" text="환자수"/>
  41. <Cell row="1" col="6" text="가동률"/>
  42. <Cell row="1" col="7" text="전체가동률대비병상"/>
  43. <Cell row="1" col="8" text="환자수"/>
  44. <Cell row="1" col="9" text="가동률"/>
  45. <Cell row="1" col="10" text="전체가동률대비병상"/>
  46. </Band>
  47. <Band id="body">
  48. <Cell displaytype="normal" edittype="none" text="bind:orddeptnm" enable="false"/>
  49. <Cell col="1" text="bind:wardcnt"/>
  50. <Cell col="2" text="bind:bedcnt"/>
  51. <Cell col="3" text="bind:allinpatcnt"/>
  52. <Cell col="4" text="bind:allorddrate"/>
  53. <Cell col="5" text="bind:maininpatcnt"/>
  54. <Cell col="6" text="bind:mainorddrate"/>
  55. <Cell col="7" text="bind:mainpoint"/>
  56. <Cell col="8" text="bind:bothinpatcnt"/>
  57. <Cell col="9" text="bind:bothorddrate"/>
  58. <Cell col="10" text="bind:bothpoint"/>
  59. </Band>
  60. </Format>
  61. </Formats>
  62. </Grid>
  63. <Div id="grp" taborder="3" position="absolute 0 25 1172 60" class="div_SA">
  64. <Layouts>
  65. <Layout width="1172" height="35">
  66. <Shape id="line13" linetype="vertical" class="line_4" position="absolute 1099 7 1105 29" anchor="default"/>
  67. <Button id="btn_search2" taborder="1" text="조회" class="btn1" position="absolute 1110 7 1166 29" anchor="default" onclick="grp_btn_search2_onclick"/>
  68. <Button id="btn_saveexcel5" taborder="2" text="엑셀저장" class="btn3" position="absolute 1014 7 1094 29" anchor="default" onclick="grp_btn_saveexcel5_onclick"/>
  69. <Static id="caption39" text="조회기간 :" class="search_name" position="absolute 21 9 108 26" anchor="default"/>
  70. <Calendar id="ipt_fromdd" taborder="3" class="input_essential" position="absolute 102 8 192 28" anchor="default" autoselect="true" autoskip="true" dateformat="yyyy-MM-dd" value="null"/>
  71. <Calendar id="ipt_todd" taborder="4" class="input_essential" position="absolute 217 8 307 27" anchor="default" autoselect="true" autoskip="true" dateformat="yyyy-MM-dd"/>
  72. <Static id="caption1" text="~" position="absolute 197 8 212 28" anchor="default"/>
  73. <Static id="caption2" text="검색조건 :" class="search_name" position="absolute 338 9 425 26" anchor="default"/>
  74. <Radio id="rdo_termflag" taborder="5" columncount="-1" rowcount="-1" codecolumn="codecolumn" datacolumn="datacolumn" position="absolute 422 8 607 28" anchor="default" style="textpadding:0 3 0 3;" onitemchanged="grp_rdo_termflag_onitemchanged">
  75. <Dataset id="innerdataset">
  76. <ColumnInfo>
  77. <Column id="codecolumn"/>
  78. <Column id="datacolumn"/>
  79. </ColumnInfo>
  80. <Rows>
  81. <Row>
  82. <Col id="codecolumn">D</Col>
  83. <Col id="datacolumn">당일</Col>
  84. </Row>
  85. <Row>
  86. <Col id="codecolumn">T</Col>
  87. <Col id="datacolumn">기간별</Col>
  88. </Row>
  89. </Rows>
  90. </Dataset>
  91. </Radio>
  92. </Layout>
  93. </Layouts>
  94. </Div>
  95. </Layout>
  96. </Layouts>
  97. <Objects>
  98. <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  99. <ColumnInfo>
  100. <Column id="fromdd" type="STRING" size="256"/>
  101. <Column id="todd" type="STRING" size="256"/>
  102. <Column id="termflag" type="STRING" size="256"/>
  103. </ColumnInfo>
  104. <Rows>
  105. <Row/>
  106. </Rows>
  107. </Dataset>
  108. <Dataset id="ds_main_bedinfo_bedlist" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  109. <ColumnInfo>
  110. <Column id="orddeptnm" type="STRING" size="256" sumtext="진료과명"/>
  111. <Column id="wardcnt" type="STRING" size="256" sumtext="병상수"/>
  112. <Column id="bedcnt" type="STRING" size="256" sumtext="총병상수"/>
  113. <Column id="allinpatcnt" type="STRING" size="256" sumtext="총환자수"/>
  114. <Column id="maininpatcnt" type="STRING" size="256" sumtext="주진료과환자수"/>
  115. <Column id="bothinpatcnt" type="STRING" size="256" sumtext="주.부진료과환자수"/>
  116. <Column id="allorddrate" type="STRING" size="256" sumtext="전체병상가동률"/>
  117. <Column id="mainorddrate" type="STRING" size="256" sumtext="주진료과기준가동률"/>
  118. <Column id="bothorddrate" type="STRING" size="256" sumtext="주.부진료과기준가동률"/>
  119. <Column id="mainpoint" type="STRING" size="256" sumtext="가동률대비 주진료과병상수가감"/>
  120. <Column id="bothpoint" type="STRING" size="256" sumtext="가동률대비 주.부진료과병상수가감"/>
  121. <Column id="subcnt" type="STRING" size="256" sumtext="합계기준"/>
  122. </ColumnInfo>
  123. </Dataset>
  124. </Objects>
  125. <Bind>
  126. <BindItem id="item0" compid="grp.ipt_fromdd" propid="value" datasetid="ds_send" columnid="fromdd"/>
  127. <BindItem id="item1" compid="grp.ipt_todd" propid="value" datasetid="ds_send" columnid="todd"/>
  128. <BindItem id="item2" compid="grp.rdo_termflag" propid="value" datasetid="ds_send" columnid="termflag"/>
  129. </Bind>
  130. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  131. * System Name :
  132. * Job Name :
  133. * Creator :
  134. * Make Date : 2016-05-24
  135. * Description :
  136. *---------------------------------------------------------------------------------------
  137. * Modify Date Modifier Modify Description
  138. *---------------------------------------------------------------------------------------
  139. * 2016-05-24 Live Converter TF->XP
  140. *
  141. *---------------------------------------------------------------------------------------
  142. ****************************************************************************************/
  143. //=======================================================================================
  144. // Lib Include
  145. //---------------------------------------------------------------------------------------
  146. include 'com_commonxp::comm_main.xjs';
  147. var arErrorCode = new HashArray();
  148. //=======================================================================================
  149. // Local methods
  150. //---------------------------------------------------------------------------------------
  151. /**
  152. * submit 후 호출 될 공통 콜백
  153. * @param {[type]} sSvcId [description]
  154. * @param {[type]} nErrorCode [description]
  155. * @param {[type]} sErrorMsg [description]
  156. * @return {Function} [description]
  157. */
  158. function callback(sSvcId, nErrorCode, sErrorMsg){
  159. arErrorCode.push(sSvcId, nErrorCode);
  160. }
  161. //=======================================================================================
  162. // Events
  163. //---------------------------------------------------------------------------------------
  164. /**
  165. * onload 이벤트 발생 시 호출
  166. * @param {[type]} obj:Form [description]
  167. * @param {[type]} e:LoadEventInfo [description]
  168. */
  169. function SMPMI05201_onload(obj: Form, e: LoadEventInfo) {
  170. frmf_initForm(obj);
  171. ds_send.setColumn(0, 'termflag', 'D');
  172. ds_send.setColumn(0, 'fromdd', utlf_getCurrentDate());
  173. ds_send.setColumn(0, 'todd', utlf_getCurrentDate());
  174. frmf_inputEnterKey('grp.rdo_termflag', 'onitemchanged', new ItemChangeEventInfo);
  175. }
  176. /**
  177. * 검색조건 라디오 아이템 변경 후 이벤트
  178. * @param {[type]} obj: Radio [description]
  179. * @param {[type]} e: ItemChangeEventInfo [description]
  180. * @return {[type]} [description]
  181. */
  182. function grp_rdo_termflag_onitemchanged(obj: Radio, e: ItemChangeEventInfo) {
  183. ds_main_bedinfo_bedlist.clearData();
  184. var value = ds_send.getColumn(0, 'termflag');
  185. if (value == "D") {
  186. grp.ipt_fromdd.enable = false;
  187. grp.ipt_todd.enable = false;
  188. grd_bedlist.setRealColSize(2, 0);
  189. }
  190. else if (value == "T") {
  191. grp.ipt_fromdd.enable = true;
  192. grp.ipt_todd.enable = true;
  193. grd_bedlist.setRealColSize(2, 90);
  194. }
  195. }
  196. /**
  197. * 엑셀저장 버튼 클릭 이벤트
  198. * @param {[type]} obj: Button [description]
  199. * @param {[type]} e: ClickEventInfo [description]
  200. * @return {[type]} [description]
  201. */
  202. function grp_btn_saveexcel5_onclick(obj: Button, e: ClickEventInfo) {
  203. var value = ds_send.getColumn(0, 'termflag');
  204. if (value == "D") {
  205. grdf_exportExcel(grd_bedlist, "excel", "SheetName", false, "", 'user', true);
  206. }
  207. else {
  208. grdf_exportExcel(grd_bedlist, "excel", "SheetName", true, "", 'user', true);
  209. }
  210. }
  211. /**
  212. * 조회 버튼 클릭 이벤트
  213. * @param {[type]} obj: Button [description]
  214. * @param {[type]} e: ClickEventInfo [description]
  215. * @return {[type]} [description]
  216. */
  217. function grp_btn_search2_onclick(obj: Button, e: ClickEventInfo) {
  218. ds_main_bedinfo_bedlist.clearData();
  219. var oParam = {};
  220. oParam.id = "TRPMI05211";
  221. oParam.service = "ipatmngtapp.OrddInpat";
  222. oParam.method = "reqGetBedActInfo";
  223. oParam.inds = "req=ds_send";
  224. oParam.outds = "ds_main_bedinfo_bedlist=bedlist";
  225. oParam.async = false;
  226. tranf_submit(oParam);
  227. ds_main_bedinfo_bedlist.addColumn('mainpoint', 'string');
  228. ds_main_bedinfo_bedlist.addColumn('bothpoint', 'string');
  229. ds_main_bedinfo_bedlist.addColumn('bedcnt', 'string');
  230. var totalmainrate = ds_main_bedinfo_bedlist.getColumn(ds_main_bedinfo_bedlist.rowcount - 1, "mainorddrate");
  231. var totalbothrate = ds_main_bedinfo_bedlist.getColumn(ds_main_bedinfo_bedlist.rowcount - 1, "bothorddrate");
  232. var value = ds_send.getColumn(0, 'termflag');
  233. for (var i = 0; i < ds_main_bedinfo_bedlist.rowcount; i++) {
  234. var wardcnt = ds_main_bedinfo_bedlist.getColumn(i, "wardcnt");
  235. var bedcnt = ds_main_bedinfo_bedlist.getColumn(i, "bedcnt");
  236. var mainorddrate = ds_main_bedinfo_bedlist.getColumn(i, "mainorddrate");
  237. var bothorddrate = ds_main_bedinfo_bedlist.getColumn(i, "bothorddrate");
  238. if (value == "D") {
  239. var mainpoint = (mainorddrate - totalmainrate) / 100 * wardcnt;
  240. var bothpoint = (bothorddrate - totalbothrate) / 100 * wardcnt;
  241. ds_main_bedinfo_bedlist.setColumn(i, "mainpoint", Math.floor(mainpoint));
  242. ds_main_bedinfo_bedlist.setColumn(i, "bothpoint", Math.floor(bothpoint));
  243. }
  244. else if (value == "T") {
  245. var mainpoint = (mainorddrate - totalmainrate) / 100 * wardcnt;
  246. var bothpoint = (bothorddrate - totalbothrate) / 100 * wardcnt;
  247. ds_main_bedinfo_bedlist.setColumn(i, "mainpoint", Math.floor(mainpoint));
  248. ds_main_bedinfo_bedlist.setColumn(i, "bothpoint", Math.floor(bothpoint));
  249. }
  250. }
  251. }
  252. ]]></Script>
  253. </Form>
  254. </FDL>