SPANC00302_복막투석액계산.xrw 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>복막투석액계산</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <dextrosegrid>
  11. <concen/>
  12. <volume/>
  13. <time/>
  14. <rowtotal/>
  15. </dextrosegrid>
  16. <dextrosegrid>
  17. <concen/>
  18. <volume/>
  19. <time/>
  20. <rowtotal/>
  21. </dextrosegrid>
  22. <dextrosegrid>
  23. <concen/>
  24. <volume/>
  25. <time/>
  26. <rowtotal/>
  27. </dextrosegrid>
  28. <dextrosegrid>
  29. <concen/>
  30. <volume/>
  31. <time/>
  32. <rowtotal/>
  33. </dextrosegrid>
  34. <dextrosegrid>
  35. <concen>Total</concen>
  36. <volume>Total</volume>
  37. <time>Total</time>
  38. <rowtotal/>
  39. </dextrosegrid>
  40. <maindata>
  41. <kcal/>
  42. </maindata>
  43. </main>
  44. <send/>
  45. <init/>
  46. <hidden/>
  47. </root>
  48. </instance>
  49. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  50. <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  52. <script type="javascript" ev:event="xforms-ready">
  53. <![CDATA[
  54. grd_dextrose.mergerow(1)=false;
  55. grd_dextrose.mergerow(2)=false;
  56. grd_dextrose.mergerow(3)=false;
  57. grd_dextrose.mergerow(4)=false;
  58. ]]>
  59. </script>
  60. </model>
  61. </xhtml:head>
  62. <xhtml:body pagewidth="619" pageheight="343" guideline="2,13;1,1194;2,784;2,757;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  63. <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:501px; height:306px; ">
  64. <caption id="caption1" class="tit_2" style="left:5px; top:11px; width:135px; height:13px; ">복막투석액 계산</caption>
  65. <line id="line1" class="line_1" style="x1:0px; y1:26px; x2:500px; y2:26px; "/>
  66. <datagrid id="grd_dextrose" nodeset="/root/main/dextrosegrid" caption="Dextrose농도(g/dl)^용량(L)^횟수(회)^농도*용량*횟수" colsep="^" colwidth="136, 105, 105, 127" dataheight="25" extendlastcol="scroll" mergecells="byrow" rowheight="25" rowsep="|" style="left:0px; top:31px; width:500px; height:275px; text-align:center; ">
  67. <col autonext="false" ref="concen" type="input" format="99" maxlength="2"/>
  68. <col autonext="false" ref="volume" type="input" format="#.9" maxlength="2"/>
  69. <col autonext="false" ref="time" type="input" format="9" maxlength="1"/>
  70. <col autonext="false" ref="rowtotal" type="output" format="###.9" maxlength="4"/>
  71. <script type="javascript" ev:event="onendedit">
  72. <![CDATA[
  73. var total = 0;
  74. var kcal = 0;
  75. for ( i = 1; i <= 4; i++ ) {
  76. var concen = model.getValue("/root/main/dextrosegrid["+i+"]/concen"); // 농도
  77. var volume = model.getValue("/root/main/dextrosegrid["+i+"]/volume"); // 용량
  78. var times = model.getValue("/root/main/dextrosegrid["+i+"]/time"); // 횟수
  79. var rowtotal = concen * volume * times; // row별 total
  80. //rowtotal = rowtotal.toString().getRound(-2, "DOWN");
  81. model.setValue("/root/main/dextrosegrid["+i+"]/rowtotal", rowtotal);
  82. var total = total + rowtotal; // 총 total
  83. //total = total.toString().getRound(-2, "DOWN");
  84. model.setValue("/root/main/dextrosegrid[5]/rowtotal", total);
  85. var kcal = total * 0.7 * 3.4; // 복막투석액(kcal)
  86. kcal = kcal.toString().getRound(-1, "HALF_UP");
  87. model.setValue("/root/main/maindata/kcal", kcal);
  88. model.refresh();
  89. }
  90. ]]>
  91. </script>
  92. </datagrid>
  93. <caption id="caption2" style="left:135px; top:195px; width:135px; height:13px; ">Total * 0.7 * 3.4 =</caption>
  94. <output id="output1" ref="/root/main/maindata/kcal" class="output_fix" format="9999" style="left:240px; top:190px; width:60px; height:19px; text-align:center; "/>
  95. <caption id="caption3" style="left:305px; top:195px; width:55px; height:13px; ">kcal</caption>
  96. </group>
  97. <group id="grp_btn" scroll="auto" style="left:0px; top:306px; width:501px; height:27px; ">
  98. <button id="btn_cfm" class="btn4_letter2" style="left:385px; top:5px; width:56px; height:22px; ">
  99. <caption>확인</caption>
  100. <script type="javascript" ev:event="onclick">
  101. <![CDATA[
  102. model.setAttribute("iParam_kcal", model.getvalue("/root/main/maindata/kcal"));
  103. window.close();
  104. ]]>
  105. </script>
  106. </button>
  107. <button id="btn_can" class="btn4_letter2" style="left:444px; top:5px; width:56px; height:22px; ">
  108. <caption>취소</caption>
  109. <script type="javascript" ev:event="xforms-activate">
  110. <![CDATA[
  111. model.setAttribute("iParam_kcal", "");
  112. window.close();
  113. ]]>
  114. </script>
  115. </button>
  116. </group>
  117. </xhtml:body>
  118. </xhtml:html>