123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>열량HB계산</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <maledata>
- <wt/>
- <ht/>
- <age/>
- <kcal/>
- </maledata>
- <femaledata>
- <wt/>
- <ht/>
- <age/>
- <kcal/>
- </femaledata>
- <receivedata>
- <sex/>
- <age/>
- <wt/>
- <abw/>
- <pibw/>
- <ht/>
- <flag/>
- </receivedata>
- </main>
- <send>
- <kcal/>
- </send>
- <init/>
- <hidden/>
- </root>
- </instance>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- var sex = model.getValue("/root/main/receivedata/sex");
- var age = model.getValue("/root/main/receivedata/age");
- var wt = model.getValue("/root/main/receivedata/wt");
- var ht = model.getValue("/root/main/receivedata/ht");
- var abw = model.getValue("/root/main/receivedata/abw");
- var pibw = model.getValue("/root/main/receivedata/pibw");
- var kcal = 0;
-
- //화면 오픈시 해당 데이터 셋팅
- if (sex == "M") { //남자일 경우
- model.setValue("/root/main/maledata/age", age);
- model.setValue("/root/main/maledata/ht", ht);
- if (pibw < 120) { //PIBW가 120 이상인 경우는 WT 대신 ABW로 계산
- model.setValue("/root/main/maledata/wt", wt);
- kcal = 66+13.7*wt+5*ht-6.8*age;
- } else {
- model.setValue("/root/main/maledata/wt", abw);
- kcal = 66+13.7*abw+5*ht-6.8*age;
- }
- model.setValue("/root/main/maledata/kcal", kcal);
- } else if (sex == "F") { //여자일 경우
- model.setValue("/root/main/femaledata/age", age);
- model.setValue("/root/main/femaledata/ht", ht);
- if (pibw < 120) { //PIBW가 120 이상인 경우는 WT 대신 ABW로 계산
- model.setValue("/root/main/femaledata/wt", wt);
- kcal = 655+9.6*wt+1.8*ht-4.7*age;
- } else {
- model.setValue("/root/main/femaledata/wt", abw);
- kcal = 655+9.6*abw+1.8*ht-4.7*age;
- }
- model.setValue("/root/main/femaledata/kcal", kcal);
- }
-
- //계산된 최종값을 메인 화면으로 전달하기위해
- model.setValue("/root/send/kcal", kcal)
- model.refresh();
- ]]>
- </script>
- </model>
- </xhtml:head>
- <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; ">
- <group id="grp_biz" scroll="auto" style="left:0px; top:0px; width:501px; height:155px; ">
- <caption id="caption1" class="tit_2" style="left:5px; top:11px; width:135px; height:13px; ">열량-HB 계산</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:26px; x2:500px; y2:26px; "/>
- <caption id="caption2" style="left:10px; top:60px; width:80px; height:13px; ">남: 66 + 13.7 *</caption>
- <input id="opt_mwt" ref="/root/main/maledata/wt" class="output_fix" format="###.##" editable="true" autonext="false" style="left:95px; top:55px; width:40px; height:19px; text-align:center; "/>
- <caption id="caption3" style="left:135px; top:60px; width:55px; height:13px; ">kg + 5 *</caption>
- <input id="opt_mht" ref="/root/main/maledata/ht" class="output_fix" format="###.##" editable="true" autonext="false" style="left:185px; top:55px; width:40px; height:19px; text-align:center; "/>
- <caption id="caption4" style="left:225px; top:60px; width:60px; height:13px; ">cm - 6.8 *</caption>
- <input id="opt_mage" ref="/root/main/maledata/age" class="output_fix" format="###.##" editable="true" autonext="false" style="left:285px; top:55px; width:40px; height:19px; text-align:center; "/>
- <caption id="caption5" style="left:325px; top:60px; width:25px; height:13px; ">yr =</caption>
- <output id="opt_mkcal" ref="/root/main/maledata/kcal" class="output_fix" format="###.##" autonext="false" style="left:350px; top:55px; width:48px; height:19px; text-align:center; "/>
- <caption id="caption6" style="left:400px; top:60px; width:25px; height:13px; ">kcal</caption>
- <output id="opt_fmkcal" ref="/root/main/femaledata/kcal" class="output_fix" format="###.##" autonext="false" style="left:360px; top:85px; width:48px; height:19px; text-align:center; "/>
- <caption id="caption7" style="left:10px; top:90px; width:80px; height:13px; ">여: 655 + 9.6 *</caption>
- <caption id="caption8" style="left:135px; top:90px; width:55px; height:13px; ">kg + 1.8 *</caption>
- <caption id="caption9" style="left:235px; top:90px; width:60px; height:13px; ">cm - 4.7 *</caption>
- <caption id="caption10" style="left:335px; top:90px; width:25px; height:13px; ">yr =</caption>
- <caption id="caption11" style="left:410px; top:90px; width:25px; height:13px; ">kcal</caption>
- <input id="opt_fmwt" ref="/root/main/femaledata/wt" class="output_fix" format="###.##" autonext="false" style="left:95px; top:85px; width:40px; height:19px; text-align:center; "/>
- <input id="opt_fmht" ref="/root/main/femaledata/ht" class="output_fix" format="###.##" editable="true" autonext="false" style="left:195px; top:85px; width:40px; height:19px; text-align:center; "/>
- <input id="opt_fmage" ref="/root/main/femaledata/age" class="output_fix" format="###.##" editable="true" autonext="false" style="left:295px; top:85px; width:40px; height:19px; text-align:center; "/>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:156px; width:501px; height:27px; ">
- <button id="btn_cfm" class="btn4_letter2" style="left:385px; top:5px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- var sex = model.getValue("/root/main/receivedata/sex");
-
- //열량-HB 재계산
- if (sex == "M") { // 남자일 경우
- var wt = opt_mwt.value;
- var ht = opt_mht.value;
- var age = opt_mage.value;
- var kcal = 66+13.7*wt+5*ht-6.8*age;
- model.setValue("/root/main/maledata/kcal", kcal);
- } else if (sex == "F") { // 여자일 경우
- var wt = opt_fmwt.value;
- var ht = opt_fmht.value;
- var age = opt_fmage.value;
- var kcal = 655+9.6*wt+1.8*ht-4.7*age;
- model.setValue("/root/main/femaledata/kcal", kcal);
- }
-
- // 계산된 최종값을 메인 화면으로 전달하기위해
- model.setValue("/root/send/kcal", kcal)
- model.refresh();
-
- var flag = model.getValue("/root/main/receivedata/flag");
- if ( flag == 1 ) { // 협진의뢰 tab화면의 열량HB에 값 셋팅
- opener.model.setValue("/root/main/maindata/cnstreq/optcalrhb1", model.getValue("/root/send/kcal"));
- } else if ( flag == 2 ) { // 추구관리 tab화면의 열량HB에 값 셋팅
- opener.model.setValue("/root/main/maindata/pursmngt/optcalrhb2", model.getValue("/root/send/kcal"));
- }
- window.close();
- ]]>
- </script>
- </button>
- <button id="btn_can" class="btn4_letter2" style="left:444px; top:5px; width:56px; height:22px; ">
- <caption>취소</caption>
- <script type="javascript" ev:event="xforms-activate">
- <![CDATA[
- window.close();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|