123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SPANC00301" position="absolute 0 0 450 122" titletext="열량HB계산" oninit="SPANC00301_oninit" onload="SPANC00301_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 450 87" id="grp_biz" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Static text="열량-HB 계산" position="absolute 0 3 135 19" id="caption1" class="tit_2" anchor="default"/>
- <Shape position="absolute 0 19 450 25" linetype="horizontal" id="line1" class="line_10" anchor="default"/>
- <Static text="남: 66 + 13.7 *" position="absolute 10 36 90 49" id="caption2" anchor="default"/>
- <MaskEdit position="absolute 95 31 135 50" align="align:center middle;" id="opt_mwt" mask="###.##" readonly="true" anchor="default"/>
- <Static text="kg + 5 *" position="absolute 135 36 190 49" id="caption3" anchor="default"/>
- <MaskEdit position="absolute 195 31 235 50" align="align:center middle;" id="opt_mht" mask="###.##" readonly="true" anchor="default"/>
- <Static text="cm - 6.8 *" position="absolute 235 36 295 49" id="caption4" anchor="default"/>
- <MaskEdit position="absolute 295 31 335 50" align="align:center middle;" id="opt_mage" mask="###.##" readonly="true" anchor="default"/>
- <Static text="yr =" position="absolute 335 36 360 49" id="caption5" anchor="default"/>
- <MaskEdit readonly="true" position="absolute 360 31 420 50" align="align:center middle;" id="opt_mkcal" mask="###.##" anchor="default"/>
- <Static text="kcal" position="absolute 421 36 446 49" id="caption6" anchor="default"/>
- <MaskEdit readonly="true" position="absolute 360 61 420 80" align="align:center middle;" id="opt_fmkcal" mask="###.##" anchor="default"/>
- <Static text="여: 655 + 9.6 *" position="absolute 10 66 90 79" id="caption7" anchor="default"/>
- <Static text="kg + 1.8 *" position="absolute 135 66 190 79" id="caption8" anchor="default"/>
- <Static text="cm - 4.7 *" position="absolute 235 66 295 79" id="caption9" anchor="default"/>
- <Static text="yr =" position="absolute 335 66 360 79" id="caption10" anchor="default"/>
- <Static text="kcal" position="absolute 421 66 446 79" id="caption11" anchor="default"/>
- <MaskEdit position="absolute 95 61 135 80" align="align:center middle;" id="opt_fmwt" mask="###.##" readonly="true" anchor="default"/>
- <MaskEdit position="absolute 195 61 235 80" align="align:center middle;" id="opt_fmht" mask="###.##" readonly="true" anchor="default"/>
- <MaskEdit position="absolute 295 61 335 80" align="align:center middle;" id="opt_fmage" mask="###.##" readonly="true" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 0 94 450 117" id="grp_btn" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Button position="absolute 335 0 391 22" id="btn_cfm" class="btn4" text="확인" onclick="grp_btn_btn_cfm_onclick" anchor="default"/>
- <Button position="absolute 394 0 450 22" id="btn_can" class="btn4" text="취소" onclick="grp_btn_btn_can_onclick" anchor="default"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_main_maledata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="wt" type="STRING" size="256"/>
- <Column id="ht" type="STRING" size="256"/>
- <Column id="age" type="STRING" size="256"/>
- <Column id="kcal" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_femaledata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="wt" type="STRING" size="256"/>
- <Column id="ht" type="STRING" size="256"/>
- <Column id="age" type="STRING" size="256"/>
- <Column id="kcal" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- <Dataset id="ds_main_receivedata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="pid" type="STRING" size="256"/>
- <Column id="hngnm" type="STRING" size="256"/>
- <Column id="cretno" type="STRING" size="256"/>
- <Column id="brthdd" type="STRING" size="256"/>
- <Column id="sex" type="STRING" size="256"/>
- <Column id="age" type="STRING" size="256"/>
- <Column id="hometel" type="STRING" size="256"/>
- <Column id="mpphontel" type="STRING" size="256"/>
- <Column id="zipcd1" type="STRING" size="256"/>
- <Column id="zipcd2" type="STRING" size="256"/>
- <Column id="zipcdseq" type="STRING" size="256"/>
- <Column id="detladdr" type="STRING" size="256"/>
- <Column id="ioflag" type="STRING" size="256"/>
- <Column id="inout" type="STRING" size="256"/>
- <Column id="indd" type="STRING" size="256"/>
- <Column id="orddeptcd" type="STRING" size="256"/>
- <Column id="orddeptnm" type="STRING" size="256"/>
- <Column id="atdoctid" type="STRING" size="256"/>
- <Column id="atdoctnm" type="STRING" size="256"/>
- <Column id="wt" type="STRING" size="256"/>
- <Column id="ht" type="STRING" size="256"/>
- <Column id="flag" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="kcal" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row/>
- </Rows>
- </Dataset>
- </Objects>
- <Bind>
- <BindItem id="item0" compid="grp_biz.opt_mwt" propid="value" datasetid="ds_main_maledata" columnid="wt"/>
- <BindItem id="item1" compid="grp_biz.opt_mht" propid="value" datasetid="ds_main_maledata" columnid="ht"/>
- <BindItem id="item2" compid="grp_biz.opt_mage" propid="value" datasetid="ds_main_maledata" columnid="age"/>
- <BindItem id="item3" compid="grp_biz.opt_mkcal" propid="value" datasetid="ds_main_maledata" columnid="kcal"/>
- <BindItem id="item4" compid="grp_biz.opt_fmwt" propid="value" datasetid="ds_main_femaledata" columnid="wt"/>
- <BindItem id="item5" compid="grp_biz.opt_fmht" propid="value" datasetid="ds_main_femaledata" columnid="ht"/>
- <BindItem id="item6" compid="grp_biz.opt_fmage" propid="value" datasetid="ds_main_femaledata" columnid="age"/>
- <BindItem id="item7" compid="grp_biz.opt_fmkcal" propid="value" datasetid="ds_main_femaledata" columnid="kcal"/>
- </Bind>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : 경대 의료정보시스템
- * Job Name : ast_dietxp -> SPANC00301
- * Creator : yjh
- * Make Date : 2018-03-28
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2018-03-28 yjh TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SPANC00301
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시
- ****************************************************************************************/
- function SPANC00301_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SPANC00301
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 로딩 완료시
- ****************************************************************************************/
- function SPANC00301_onload(obj:Form, e:LoadEventInfo)
- {
- try{
- ds_main_receivedata.copyData(arg_ds_main_receivedata);
- }catch(e){
- }
-
- var sex = ds_main_receivedata.getColumn(0, "sex");
- var age = Number(utlf_transNullToEmpty(ds_main_receivedata.getColumn(0, "age")));
- var wt = Number(utlf_transNullToEmpty(ds_main_receivedata.getColumn(0, "wt")));
- var ht = Number(utlf_transNullToEmpty(ds_main_receivedata.getColumn(0, "ht")));
- var abw = Number(utlf_transNullToEmpty(ds_main_receivedata.getColumn(0, "abw")));
- var pibw = ds_main_receivedata.getColumn(0, "pibw");
- var kcal = 0;
-
- //화면 오픈시 해당 데이터 셋팅
- if (sex == "M") { //남자일 경우
- ds_main_maledata.setColumn(0, "age", age);
- ds_main_maledata.setColumn(0, "ht", ht);
- if (pibw < 120) { //PIBW가 120 이상인 경우는 WT 대신 ABW로 계산
- ds_main_maledata.setColumn(0, "wt", wt);
- kcal = 66+13.7*wt+5*ht-6.8*age;
- } else {
- ds_main_maledata.setColumn(0, "wt", abw);
- kcal = 66+13.7*abw+5*ht-6.8*age;
- }
- ds_main_maledata.setColumn(0, "kcal", kcal);
- } else if (sex == "F") { //여자일 경우
- ds_main_femaledata.setColumn(0, "age", age);
- ds_main_femaledata.setColumn(0, "ht", ht);
- if (pibw < 120) { //PIBW가 120 이상인 경우는 WT 대신 ABW로 계산
- ds_main_femaledata.setColumn(0, "wt", wt);
- kcal = 655+9.6*wt+1.8*ht-4.7*age;
- } else {
- ds_main_femaledata.setColumn(0, "wt", abw);
- kcal = 655+9.6*abw+1.8*ht-4.7*age;
- }
- ds_main_femaledata.setColumn(0, "kcal", kcal);
- }
- //계산된 최종값을 메인 화면으로 전달하기위해
- ds_send.setColumn(0, "kcal", kcal)
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_cfm
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 확인버튼 클릭시
- ****************************************************************************************/
- function grp_btn_btn_cfm_onclick(obj:Button, e:ClickEventInfo)
- {
- var sex = ds_main_receivedata.getColumn(0, "sex");
- //열량-HB 재계산
- if (sex == "M") { // 남자일 경우
- var wt = grp_biz.opt_mwt.value;
- var ht = grp_biz.opt_mht.value;
- var age = grp_biz.opt_mage.value;
- var kcal = 66+13.7*wt+5*ht-6.8*age;
- ds_main_maledata.setColumn(0, "kcal", kcal);
- } else if (sex == "F") { // 여자일 경우
- var wt = grp_biz.opt_fmwt.value;
- var ht = grp_biz.opt_fmht.value;
- var age = grp_biz.opt_fmage.value;
- var kcal = 655+9.6*wt+1.8*ht-4.7*age;
- ds_main_femaledata.setColumn(0, "kcal", kcal);
- }
- // 계산된 최종값을 메인 화면으로 전달하기위해
- ds_send.setColumn(0, "kcal", kcal)
-
- var flag = ds_main_receivedata.getColumn(0, "flag");
- if ( flag == 1 ) { // 협진의뢰 tab화면의 열량HB에 값 셋팅
- opener.ds_main_maindata_cnstreq.setColumn(0, "optcalrhb1", ds_send.getColumn(0, "kcal"));
- } else if ( flag == 2 ) { // 추구관리 tab화면의 열량HB에 값 셋팅
- opener.ds_main_maindata_pursmngt.setColumn(0, "optcalrhb2", ds_send.getColumn(0, "kcal"));
- }
- this.close();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_can
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 취소버튼 클릭시
- ****************************************************************************************/
- function grp_btn_btn_can_onclick(obj:Button, e:ClickEventInfo)
- {
- this.close();
- }
- ]]></Script>
- </Form>
- </FDL>
|