source: FOIAVistA/trunk/r/MEDICINE-MC/MCPFTP5.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 4.8 KB
Line 
1MCPFTP5 ;WISC/TJK-PFT REPORT-SPECIAL STUDIES (PT 2) ;8/30/99 10:15
2 ;;2.3;Medicine;**18,25**;09/13/1996
3EX S ND=MCREC1,MCP1=MCP1S1,MCP2=MCP2S1,VE=$P(MCREC1,U,1),MCEX=$P(MCREC2,U,9)
4 S MEAS="VEmax(BTPS)",UNITS="L",PC=1 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
5 S MEAS="BR",PC=2 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
6 S MEAS="VD/VT REST",PC=14 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
7 S MEAS="VD/VT MAX",PC=15 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
8 S MEAS="VE/VCO2, AT",PC=16 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
9 S MEAS="VErest(BTPS)",UNITS="ml/beat",PC=5 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
10 K VE S MEAS="VO2rest",UNITS="L/min",PC=6 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
11 S MEAS="VO2max",UNITS="L/min",PC=7 I MCEX=1 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2
12 D:(MCEX=3)!(MCEX=2) VO2MAX Q:$D(MCOUT)
13 S MEAS="AT",UNITS="L",PC=3 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
14 S MEAS="HRrest",UNITS="BPM",PC=8 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
15 S MEAS="HRmax",PC=9 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
16 S MEAS="VO2/HR",PC=11,UNITS="ML" S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
17 S MEAS="BP MAX",PC=12,UNITS="" S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
18 S MEAS="EKG",PC=13 S ACT=$P(ND,U,PC) W !,?5,MEAS,?35,$S(ACT="N":"NORMAL",ACT="A":"ABNORMAL",1:"") X MCFF Q:$D(MCOUT)
19 S MEAS="RRrest",UNITS="brths/m",PC=10 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
20 S ND=MCREC2,MCP1=MCP1S2,MCP2=MCP2S2,MEAS="RRmax",PC=1 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
21 S MEAS="Wmax",UNITS="wrpm/min",PC=2 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
22 S MEAS="WRI/WRT",UNITS="watts/min",PC=6 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
23 S MEAS="Max Speed",UNITS="mph",PC=4 S ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
24 S MEAS="Max Grade",UNITS="%",PC=5 S ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
25 S PRED="",MEAS="TOTAL TIME",UNITS="min",PC=3 S ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
26 S MEAS="HCO3 Change",UNITS="mg/dl",PC=10 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q:$D(MCOUT)
27 W !,?5,"Exercise Testing Mode: ",$S(MCEX=1:"TREADMILL",MCEX=2:"BIKE ERGOMETER",MCEX=3:"HAND ERGOMETER",1:"") X MCFF Q:$D(MCOUT) K MCEX
28 W !,?5,"REASON(S) FOR STOPPING:"
29 S MCX(1)=0 F S MCX(1)=$O(^MCAR(700,MCARGDA,"S",MCX,3,MCX(1))) Q:MCX(1)'?1N.N S MCX(2)=$G(^(MCX(1),0)) I MCX(2) W ?32,$P($G(^MCAR(695.8,MCX(2),0)),U),! K MCX(2) X MCFF Q:$D(MCOUT)
30 Q:$D(MCOUT) K ^UTILITY($J,"W") S MCX(1)=0 F S MCX(1)=$O(^MCAR(700,MCARGDA,"S",MCX,4,MCX(1))) Q:MCX(1)'?1N.N S X=$G(^(MCX(1),0)),DIWL=33,DIWR=75,DIWF="W" D ^DIWP
31 D ^DIWW
32EXEND G SPEC1^MCPFTP4
33INT K HEAD1 Q:$E(MCDOT,1)=" "
34 W !! X MCFF Q:$D(MCOUT) W "INTERPRETATION",$E(MCDOT,1,66) X MCFF Q:$D(MCOUT)
35 K DXS,DIOT(2),^UTILITY($J) S ^UTILITY($J,1)=MCFF,D0=MCARGDA D ^MCAROPF K ^UTILITY($J,1)
36EXIT Q:$E(MCDOT)=" " D CONT Q:$D(MCOUT) D PV Q
37PV ;
38 I $G(MCPV)<1 S MCPV=$$MCPV^MCPFTP1(MCARGDA)
39 Q:'$D(MCPV) Q:'$D(^MCAR(700.1,MCPV))
40 D HEAD^MCARP
41PV1 ;
42 I $G(MCPV)<1 S MCPV=$$MCPV^MCPFTP1(MCARGDA)
43 Q:'$D(MCPV)
44 W !!?25,"PREDICTED VALUE FORMULAS USED",!
45 F J="TLC","VC","FRC","RV","FVC","FEV1","PF","FEF2575","MVV","DLCOSB","COHB","HB" D
46 .S I=$G(^MCAR(700.1,MCPV,J)) Q:'I
47 .Q:'$D(^MCAR(700.2,I,0)) S I=$G(^(0))
48 .W !,?5,$S(J="DLCOSB":"DLCO-SB",J="FEF2575":"FEF25-75",J="COHB":"COHB CORR.",J="HB":"HB CORR.",1:J)
49 .D PVW
50 .K J Q
51 G PVEXIT:'$D(MCRC1)
52 W !!?25,"RACE CORRECTION FORMULAS USED",!
53 ;I $D(MCRC2) S I=$P($G(^MCAR(700.1,MCPV,"RC")),U,2) I I,$D(^MCAR(700.2,I,0)) S I=$G(^(0)) W !,?5,"TLC,VC,FVC,FEV1" D PVW G PVEXIT
54 I $D(MCRC2) D G PVEXIT
55 . F J=2,6 S I=$P($G(^MCAR(700.1,MCPV,"RC")),U,J) I I,$D(^MCAR(700.2,I,0)) S I=$G(^(0)) W !,?5,$S(J=2:"TLC,VC,FVC,FEV1",J=6:"MVV",1:"") D PVW
56 . Q
57 F J=1,3,4,5 S I=$P($G(^MCAR(700.1,MCPV,"RC")),U,J) I I,$D(^MCAR(700.2,I,0)) S I=$G(^(0)) W !,?5,$S(J=1:"TLC,VC,FVC,FEV1",J=3:"FRC,RV",J=4:"FEF25-75",J=5:"MVV",1:"") D PVW
58PVEXIT W !,"NOTE: HT=height,WT=weight,ACT=actual measurement value" D CONT Q
59PVW W ?21,$P(I,U),?50,$P(I,U,3) Q
60CONT Q:($E(IOST,1,2)'="C-")!($D(MCOUT)) R !!,"Press Return to Continue, '^' to escape: ",MCY:DTIME S:'$T MCY=U S:MCY=U MCOUT=1 Q
61COMP S I=0 F S I=$O(^MCAR(700,MCARGDA,24,I)) Q:I'?1N.N I $D(^(I,0)),$P(^(0),U,2)="Y" S J=$P(^(0),U,1) W:$D(^MCAR(693.2,J,0)) ?17,$P(^(0),U,1),!
62 Q
63VO2ER1(MCSEX) ;
64 Q $S(MCSEX="F":(42.8+WT)*(22.78-(.17*AGE)),1:(.79*HT-60.7))
65VO2ER2(MCSEX) ;
66 Q $S(MCSEX="F":HT*(14.81-(.11*AGE)),1:50.72-(0.372*AGE))
67VO2MAX ;
68 S ER1=$$VO2ER1(MCSEX),ER2=$$VO2ER2(MCSEX),PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MCPFTP2 Q
Note: See TracBrowser for help on using the repository browser.