SPANC00302_복막투석액계산.xfdl 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SPANC00302" position="absolute 0 0 619 343" titletext="복막투석액계산" oninit="SPANC00302_oninit" onload="SPANC00302_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 501 306" id="grp_biz" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static text="복막투석액 계산" position="absolute 0 10 135 26" id="caption1" class="tit_2"/>
  11. <Shape position="absolute 0 26 500 32" linetype="horizontal" id="line1" class="line_10"/>
  12. <Grid position="absolute 0 31 500 306" align="align:center middle;" id="grd_dextrose" binddataset="ds_main_dextrosegrid">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="136"/>
  17. <Column size="105"/>
  18. <Column size="105"/>
  19. <Column size="127"/>
  20. </Columns>
  21. <Rows>
  22. <Row size="24" band="head"/>
  23. <Row size="24"/>
  24. </Rows>
  25. <Band id="head">
  26. <Cell text="Dextrose농도(g/dl)"/>
  27. <Cell col="1" text="용량(L)"/>
  28. <Cell col="2" text="횟수(회)"/>
  29. <Cell col="3" text="농도*용량*횟수"/>
  30. </Band>
  31. <Band id="body">
  32. <Cell displaytype="number" edittype="masknumber" style="align:center;line:EXPR(currow == 4 ? '1 solid #808080ff,0 none #808080ff,1 solid #808080ff,1 solid #808080ff' : '');" text="bind:concen" mask="99" editlimitbymask="integer"/>
  33. <Cell col="1" displaytype="number" edittype="masknumber" style="align:center;line:EXPR(currow == 4 ? '1 solid #808080ff,0 none #808080ff,1 solid #808080ff,1 solid #808080ff' : '');" text="bind:volume" mask="##.9" editlimitbymask="both"/>
  34. <Cell col="2" displaytype="number" edittype="masknumber" style="align:center;line:EXPR(currow == 4 ? '1 solid #808080ff,1 solid #808080ff,1 solid #808080ff,0 none #808080ff' : '');" text="bind:time" mask="9" editlimitbymask="integer"/>
  35. <Cell col="3" displaytype="number" edittype="none" style="align:center;" text="bind:rowtotal" mask="##9.9"/>
  36. </Band>
  37. </Format>
  38. </Formats>
  39. </Grid>
  40. <Static text="Total * 0.7 * 3.4 =" position="absolute 135 195 270 208" id="caption2"/>
  41. <MaskEdit readonly="true" position="absolute 240 190 300 209" align="align:center middle;" id="output1" mask="9999"/>
  42. <Static text="kcal" position="absolute 305 195 360 208" id="caption3"/>
  43. </Layout>
  44. </Layouts>
  45. </Div>
  46. <Div position="absolute 0 306 501 333" id="grp_btn" scrollbars="autoboth">
  47. <Layouts>
  48. <Layout>
  49. <Button position="absolute 385 5 441 27" id="btn_cfm" class="btn4" text="확인" onclick="grp_btn_btn_cfm_onclick"/>
  50. <Button position="absolute 444 5 500 27" id="btn_can" class="btn4" text="취소" onclick="grp_btn_btn_can_onclick"/>
  51. </Layout>
  52. </Layouts>
  53. </Div>
  54. </Layout>
  55. </Layouts>
  56. <Objects>
  57. <Dataset id="ds_main_dextrosegrid" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" oncolumnchanged="ds_main_dextrosegrid_oncolumnchanged">
  58. <ColumnInfo>
  59. <Column id="concen" type="STRING"/>
  60. <Column id="volume" type="STRING"/>
  61. <Column id="time" type="STRING"/>
  62. <Column id="rowtotal" type="STRING"/>
  63. </ColumnInfo>
  64. <Rows>
  65. <Row/>
  66. <Row/>
  67. <Row/>
  68. <Row/>
  69. <Row>
  70. <Col id="concen"></Col>
  71. <Col id="volume">Total</Col>
  72. <Col id="time"></Col>
  73. </Row>
  74. </Rows>
  75. </Dataset>
  76. <Dataset id="ds_main_maindata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  77. <ColumnInfo>
  78. <Column id="kcal" type="STRING" size="256"/>
  79. </ColumnInfo>
  80. <Rows>
  81. <Row/>
  82. </Rows>
  83. </Dataset>
  84. </Objects>
  85. <Bind>
  86. <BindItem id="item0" compid="grp_biz.output1" propid="value" datasetid="ds_main_maindata" columnid="kcal"/>
  87. </Bind>
  88. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  89. * System Name : 경대 의료정보시스템
  90. * Job Name : ast_dietxp -> SPANC00302
  91. * Creator : yjh
  92. * Make Date : 2018-03-28
  93. * Description :
  94. *---------------------------------------------------------------------------------------
  95. * Modify Date Modifier Modify Description
  96. *---------------------------------------------------------------------------------------
  97. * 2018-03-28 yjh TF->XP
  98. *
  99. *---------------------------------------------------------------------------------------
  100. ****************************************************************************************/
  101. //=======================================================================================
  102. // Lib Include
  103. //---------------------------------------------------------------------------------------
  104. include "com_commonxp::comm_main.xjs";
  105. //=======================================================================================
  106. // Global Form Variable
  107. //---------------------------------------------------------------------------------------
  108. //=======================================================================================
  109. // Function
  110. //---------------------------------------------------------------------------------------
  111. //=======================================================================================
  112. // Event
  113. //---------------------------------------------------------------------------------------
  114. /****************************************************************************************
  115. * Components : Form
  116. * Components ID : SPANC00302
  117. * Event : oninit
  118. * Argument : 01.obj : Object Event has occurred
  119. * : 02.e : Event Object
  120. * Description : 화면 처음 초기화시
  121. ****************************************************************************************/
  122. function SPANC00302_oninit(obj:Form, e:InitEventInfo)
  123. {
  124. frmf_initForm(obj); //폼 초기화
  125. }
  126. /****************************************************************************************
  127. * Components : Form
  128. * Components ID : SPANC00302
  129. * Event : onload
  130. * Argument : 01.obj : Object Event has occurred
  131. * : 02.e : Event Object
  132. * Description : 화면 로딩 완료시
  133. ****************************************************************************************/
  134. function SPANC00302_onload(obj:Form, e:LoadEventInfo)
  135. {
  136. // grd_dextrose.mergerow(1)=false;
  137. // grd_dextrose.mergerow(2)=false;
  138. // grd_dextrose.mergerow(3)=false;
  139. // grd_dextrose.mergerow(4)=false;
  140. }
  141. /****************************************************************************************
  142. * Components : Dataset
  143. * Components ID : ds_main_dextrosegrid
  144. * Event : oncolumnchanged
  145. * Argument : 01.obj : Object Event has occurred
  146. * : 02.e : Event Object
  147. * Description : 데이터셋 값 변경시
  148. ****************************************************************************************/
  149. function ds_main_dextrosegrid_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  150. {
  151. var total = 0;
  152. var kcal = 0;
  153. for ( var i = 0; i <= 3; i++ ) {
  154. var concen = Number(utlf_transNullToEmpty(ds_main_dextrosegrid.getColumn(i, "concen"))); // 농도
  155. var volume = Number(utlf_transNullToEmpty(ds_main_dextrosegrid.getColumn(i, "volume"))); // 용량
  156. var times = Number(utlf_transNullToEmpty(ds_main_dextrosegrid.getColumn(i, "time"))); // 횟수
  157. var rowtotal = concen * volume * times; // row별 total
  158. //rowtotal = rowtotal.toString().getRound(-2, "DOWN");
  159. ds_main_dextrosegrid.setColumn(i, "rowtotal", rowtotal);
  160. var total = total + rowtotal; // 총 total
  161. //total = total.toString().getRound(-2, "DOWN");
  162. ds_main_dextrosegrid.setColumn(4, "rowtotal", total);
  163. var kcal = total * 0.7 * 3.4; // 복막투석액(kcal)
  164. kcal = kcal.toString().getRound(-1, "HALF_UP");
  165. ds_main_maindata.setColumn(0, "kcal", kcal);
  166. }
  167. }
  168. /****************************************************************************************
  169. * Components : Button
  170. * Components ID : btn_cfm
  171. * Event : onclick
  172. * Argument : 01.obj : Object Event has occurred
  173. * : 02.e : Event Object
  174. * Description : 확인버튼 클릭시
  175. ****************************************************************************************/
  176. function grp_btn_btn_cfm_onclick(obj:Button, e:ClickEventInfo)
  177. {
  178. opener.frmf_setParameter("iParam_kcal", ds_main_maindata.getColumn(0, "kcal"));
  179. this.close();
  180. }
  181. /****************************************************************************************
  182. * Components : Button
  183. * Components ID : btn_can
  184. * Event : onclick
  185. * Argument : 01.obj : Object Event has occurred
  186. * : 02.e : Event Object
  187. * Description : 취소버튼 클릭시
  188. ****************************************************************************************/
  189. function grp_btn_btn_can_onclick(obj:Button, e:ClickEventInfo)
  190. {
  191. opener.frmf_setParameter("iParam_kcal", "");
  192. this.close();
  193. }
  194. ]]></Script>
  195. </Form>
  196. </FDL>