source: FOIAVistA/tag/r/DIETETICS-FH/FHASM5.m@ 1540

Last change on this file since 1540 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 4.6 KB
Line 
1FHASM5 ; HISC/REL - Energy/Calorie Factors ;3/20/95 08:18
2 ;;5.5;DIETETICS;**8**;Jan 28, 2005;Build 28
3 I AGE<19 G PED
4 S CB="Energy" D GETW G HARRIS:CB=3,KIL^FHASM1:CB=0 W !!,"Calculate Energy Needs by: "
5 W !!?6,"1 Harris-Benedict",!?6,"2 Kcal/Kg",!?6,"3 Mifflin-St Jeor"
6 W !,?6,"4 Enter Manually"
7E2 W !!,"Choose: " W:CENB CENB_"// " R CM:DTIME S:CM=U FHQUIT=1 G:'$T!(CM["^") KIL^FHASM1
8 I CM="",CENB S CM=CENB
9 I "1234"'[CM!(CM'?1N) W !,*7,"Choose Either 1, 2, 3 or 4" G E2
10 S CENB=CM
11 S:CM=1 FHCM="Harris-Benedict"
12 S:CM=2 FHCM="Kcal/Kg"
13 S:CM=3 FHCM="Mifflin-St Jeor"
14 S:CM=4 FHCM="Enter Manually"
15 G HARRIS:CM=1,KCAL:CM=2,MIF:CM=3,MAN
16MAN ; Manual Entry
17M1 W !!,"Enter Energy Requirements (Kcal/day): " W:KCAL'="" KCAL_"// " R X:DTIME G:'$T!(X["^") KIL^FHASM1
18 I (X'=""),(KCAL'=X) S KCAL=X
19 S KCAL=+$J(KCAL,0,0) I KCAL'>0 W *7,!,"KCAL must be greater than 0" G M1
20 G P5
21MIF ;Mifflin - St. Jeor entry; adding this new calculation for cal needs.
22 I SEX="M" S KCAL=10*(W2)+(6.25*(2.5*HGT))-(5*AGE)+5
23 I SEX="F" S KCAL=10*(W2)+(6.25*(2.5*HGT))-(5*AGE)-161
24 S KCAL=$J(KCAL,0,0)
25 G P5
26SUR ;add for s/p bariatic surgery
27 ;S KCAL=20*W2
28 ;S KCAL=KCAL+20,KCAL=$J(KCAL,0,0)
29 ;G P5
30PED ; Pediatric
31 S FHCM=" Pediatric"
32 I AGE<11 S KCAL=$S(AGE<.6:115,AGE<1:105,AGE<4:100,AGE<7:85,1:86) G P1
33 I SEX="M" S KCAL=$S(AGE<15:60,1:42) G P1
34 S KCAL=$S(AGE<15:48,1:38)
35P1 S KCAL=+$J(KCAL*WGT/2.2,0,0) G P5
36HARRIS ; Harris Method
37 I SEX="F" S KCAL=(655.10+(9.56*W2)+(1.85*HGT*2.54)-(4.68*AGE))
38 I SEX="M" S KCAL=(66.47+(13.75*W2)+(5.0*HGT*2.54)-(6.67*AGE))
39 S KCAL=$J(KCAL,0,0)
40H1 W !!,"Is patient confined to bed (Y/N): " W:FHYN'="" FHYN_"//" W:FHYN="" "N //" R AF:DTIME
41 I '$T!(AF["^") S FHQUIT=1 G KIL^FHASM1
42 I AF="",FHYN'="" S AF=FHYN
43 I AF="",FHYN="" S AF="N"
44 S X=AF D TR^FHASM1 S AF=X
45 I $P("YES",AF,1)'="",$P("NO",AF,1)'="" W *7,!," Answer YES or NO" G H1
46 S FHYN=AF
47 S AF=$S(AF?1"Y".E:1.2,1:1.3) W " (Activity Factor = ",AF,")"
48 W !!?27,"Injury/Stress Factors",!
49 W !,"Surgery",?25,"1.1 - 1.3",?40,"Skeletal Trauma",?65,"1.35",!,"Major Sepsis",?25,"1.6",?40,"Severe Burn",?65,"2.1"
50 W !,"Blunt Trauma",?25,"1.35",?40,"Trauma w/ Steroid",?65,"1.68",!,"Starvation",?25,".7",?40,"Trauma on Ventilator",?65,"1.6"
51 W !,"Mild Infection",?25,"1.2",?40,"0-20% BSA Burn",?65,"1.25",!,"Moderate Infection",?25,"1.4",?40,"20-40% BSA Burn",?65,"1.5"
52 W !,"Long Bone Fracture",?25,"1.6",?40,">40% BSA Burn",?65,"1.85",!,"Peritonitis",?25,"1.15"
53 W !,"Stress - Low",?25,"1.3",?40,"Anabolism",?65,"1.5-1.75"
54 W !," - Moderate",?25,"1.5",?40,"Cancer",?65,"1.6"
55 W !," - Severe",?25,"2.0"
56 W !!,"BEE = ",KCAL," Kcal/day"
57H2 W !!,"Select Energy Factor: " W:SEF SEF_"// " R EF:DTIME S:EF=U FHQUIT=1 G:'$T!(EF["^") KIL^FHASM1
58 I EF="",SEF S EF=SEF
59 I EF<.7!(EF>2.5) W !,*7,"Energy Factor must be Between .7 and 2.5" G H2
60 S:EF<1 EF=0_EF
61 S SEF=EF
62 S FHEF="Energy Factor of "_EF
63 S KCAL=+$J(KCAL*AF*EF,0,0) G P5
64KCAL ; KCAL Method
65 W !!?35,"Caloric Factors"
66 W !!,"Basal Energy",?30,"25",!,"Ambulatory w/ Weight Maint.",?30,"30"
67 W !,"Malnutrition w/ Mild Sepsis",?30,"40",!,"Injuries/ Sepsis - Severe",?30,"50"
68 W !,"Burn - Extensive",?30,"80",!,"Non-Dialysis Renal Failure",?30,"35"
69 W !,"Dialysis",?30,"40",!,"Dialysis w/ Diabetes",?30,"30",!,"Anabolism",?30,"35-45"
70 W !,"Conservative Mgnt Pre-Dialysis:"
71 W !," (<60 years old)",?30,"35"
72 W !," (>60 years old)",?30,"30-35"
73 S FHECAL=""
74P4 W !!,"Enter Kcal/Kg (10-100): " W:EKKG'="" EKKG_"// " R FHECAL:DTIME I '$T!(FHECAL["^") S FHQUIT=1 G KIL^FHASM1
75 I FHECAL="",EKKG'="" S FHECAL=EKKG
76 I FHECAL'?1.3N!(FHECAL<10)!(FHECAL>100) W !,*7,"Kcal/Kg Must be Between 10 and 100" G P4
77 I FHECAL'="" S (EKKG,KCAL)=FHECAL
78 S FHKCAL="Caloric Factor of "_KCAL
79 S KCAL=+$J(KCAL*W2,0,0)
80P5 ;
81 S FHFEC=""
82 S:FHEF'="" FHFEC=FHFEC_FHEF_", "
83 S:FHCM'="" FHFEC=FHFEC_FHCM_", "
84 S:FHKCAL'="" FHFEC=FHFEC_FHKCAL
85 S:FHCFRBO'="" FHFEC=FHFEC_" and "_FHCFRBO
86 W !!,"Enter Caloric Requirements (Kcal/day): ",KCAL,"// " R X:DTIME I '$T!(X["^") G KIL^FHASM1
87 I X="",KCAL S X=KCAL
88 I X'="",X'?.N.1".".N!(X<1)!(X>10000) W *7,!?5,"Enter a value between 1-10000" G P5
89 I X'="",X'=KCAL S KCAL=+$J(X,0,0) S FHFEC="User sets the Calorie data"
90NEXT G ^FHASM6
91GETW W !!,"Calculate ",CB," Requirements Based On:" S CM="12"
92 W !!?2,"1 Actual Body Weight",!?2,"2 Target Body Weight"
93 I WGT/IBW'<1.2 W !?2,"3 Obese Calculation" S CM="123"
94E1 W !!,"Choose: " W:CFRBO CFRBO_"// " R CB:DTIME I '$T!(CB["^") S CB=0,FHQUIT=1 Q
95 I CB="",CFRBO S CB=CFRBO
96 I CM'[CB!(CB'?1N) W !,*7,"Choose either 1 or 2" W:CM["3" " or 3" G E1
97 S CFRBO=CB
98 S W2=$S(CB=2:IBW,CB=3:WGT-IBW*.25+IBW,1:WGT)/2.2 S:CB=3 CM=1
99 S FHCFRBO=$S(CB=1:"Actual Body Wt",CB=2:"Target Body Wt",CB=3:"Obese Calculation",1:"")
100 Q
Note: See TracBrowser for help on using the repository browser.