MDPFTP3 ; HOIFO/NCA - PFT REPORT-SPECIAL STUDIES (PT 2) ;3/17/04 12:48
;;1.0;CLINICAL PROCEDURES;**2**;Apr 01, 2004
; Reference IA #10060 New Person File (#200 Read w/FM)
;
EX S ND=MCREC1,MCP1=MCP1S1,MCP2=MCP2S1,VE=$P(MCREC1,U,1),MCEX=$P(MCREC2,U,9)
S MEAS="VEmax(BTPS)",UNITS="L",PC=1 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="BR",PC=2 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="VD/VT REST",PC=14 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="VD/VT MAX",PC=15 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="VE/VCO2, AT",PC=16 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="VErest(BTPS)",UNITS="ml/beat",PC=5 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
K VE S MEAS="VO2rest",UNITS="L/min",PC=6 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="VO2max",UNITS="L/min",PC=7 I MCEX=1 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
D:(MCEX=3)!(MCEX=2) VO2MAX
S MEAS="AT",UNITS="L",PC=3 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="HRrest",UNITS="BPM",PC=8 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="HRmax",PC=9 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="VO2/HR",PC=11,UNITS="ML" S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="BP MAX",PC=12,UNITS="" S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="EKG",PC=13 S ACT=$P(ND,U,PC) S SS=" "_MEAS,SS=SS_$J(" ",35-$L(SS))_$S(ACT="N":"NORMAL",ACT="A":"ABNORMAL",1:"") D SETNODE(MDGRS,SS) S SS=""
S MEAS="RRrest",UNITS="brths/m",PC=10 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S ND=MCREC2,MCP1=MCP1S2,MCP2=MCP2S2,MEAS="RRmax",PC=1 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="Wmax",UNITS="wrpm/min",PC=2 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="WRI/WRT",UNITS="watts/min",PC=6 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="Max Speed",UNITS="mph",PC=4 S ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="Max Grade",UNITS="%",PC=5 S ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S PRED="",MEAS="TOTAL TIME",UNITS="min",PC=3 S ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S MEAS="HCO3 Change",UNITS="mg/dl",PC=10 S PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2
S SS="Exercise Testing Mode: "_$S(MCEX=1:"TREADMILL",MCEX=2:"BIKE ERGOMETER",MCEX=3:"HAND ERGOMETER",1:"") K MCEX D SETNODE(MDGRS,SS) S SS=""
D SETNODE(MDGRS,"REASON(S) FOR STOPPING:")
S MCX(1)=0 F S MCX(1)=$O(^MCAR(700,MDR,"S",MCX,3,MCX(1))) Q:MCX(1)'?1N.N S MCX(2)=$G(^(MCX(1),0)) I MCX(2) D SETNODE(MDGRS,$J(" ",27)_$P($G(^MCAR(695.8,MCX(2),0)),U)) K MCX(2)
N KK,MDORS S MDLL=0 F S MDLL=$O(^MCAR(700,+MDR,"S",MCX,4,MDLL)) Q:MDLL<1 S MDORS=$G(^(MDLL,0)) D LNE
EXEND G SPEC1^MDPFTP2A
INT K HEAD1 Q:$E(MCDOT,1)=" "
D SETNODE(MDGRS," "),SETNODE(MDGRS,"INTERPRETATION:")
D COMP
K ^TMP("MDWP",$J) N MDLL,MDWP,MDXX,MDY S MDWP=$$GET1^DIQ(700,MDR_",",33.5,"Z","^TMP(""MDWP"",$J)")
S MDLL=0 F S MDLL=$O(^TMP("MDWP",$J,MDLL)) Q:MDLL<1 D SETNODE(MDGRS,$J(" ",16)_$G(^(MDLL,0)))
K ^TMP("MDWP",$J)
D SETNODE(MDGRS," "),SETNODE(MDGRS,"COMMENTS AND RECOMMENDATIONS:")
S MDLL=0 F S MDLL=$O(^MCAR(700,+MDR,16,MDLL)) Q:MDLL<1 D SETNODE(MDGRS,$G(^(MDLL,0)))
D SETNODE(MDGRS," "),SETNODE(MDGRS,"INTERPRETED BY: ")
S MDLL=0 F S MDLL=$O(^MCAR(700,+MDR,7,MDLL)) Q:MDLL<1 S MDY=+$G(^(MDLL,0)) I +MDY S MDXX=$J(" ",16)_$E($$GET1^DIQ(200,+MDY_",",.01,"E"),1,35) D SETNODE(MDGRS,MDXX)
D SETNODE(MDGRS," ") S MDXX=$G(^MCAR(700,+MDR,17)),MDY=+$P(MDXX,U,1)
I +MDY S MDXX=$E($$GET1^DIQ(200,+MDY_",",.01,"E"),1,35) D SETNODE(MDGRS,"REVIEWED BY: "_MDXX)
D SETNODE(MDGRS," ") K MDXX,MDY
EXIT Q:$E(MCDOT)=" " D PV Q
PV ;
I $G(MCPV)<1 S MCPV=$$MCPV^MDPFTP1(MDR)
Q:'$D(MCPV) Q:'$D(^MCAR(700.1,MCPV))
PV1 ;
I $G(MCPV)<1 S MCPV=$$MCPV^MDPFTP1(MDR)
Q:'$D(MCPV)
S SS="" D SETNODE(MDGRS," ") D SETNODE(MDGRS,$J(" ",24)_"PREDICTED VALUE FORMULAS USED")
F J="TLC","VC","FRC","RV","FVC","FEV1","PF","FEF2575","MVV","DLCOSB","COHB","HB" D
.S I=$G(^MCAR(700.1,MCPV,J)) Q:'I
.Q:'$D(^MCAR(700.2,I,0)) S I=$G(^(0))
.S SS=" "_$S(J="DLCOSB":"DLCO-SB",J="FEF2575":"FEF25-75",J="COHB":"COHB CORR.",J="HB":"HB CORR.",1:J)
.D PVW
.K J Q
G:'$D(MCRC1) PVEXIT
D SETNODE(MDGRS," "),SETNODE(MDGRS,$J(" ",24)_"RACE CORRECTION FORMULAS USED")
;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)) S SS=" TLC,VC,FVC,FEV1" D PVW G PVEXIT
I $D(MCRC2) D G PVEXIT
. 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)) S SS=" "_$S(J=2:"TLC,VC,FVC,FEV1",J=6:"MVV",1:"") D PVW
. Q
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)) S SS=" "_$S(J=1:"TLC,VC,FVC,FEV1",J=3:"FRC,RV",J=4:"FEF25-75",J=5:"MVV",1:"") D PVW
PVEXIT D SETNODE(MDGRS,"NOTE: HT=height,WT=weight,ACT=actual measurement value") Q
PVW S SS=SS_$J(" ",21-$L(SS))_$P(I,U),SS=SS_$J(" ",50-$L(SS))_$P(I,U,3)
D SETNODE(MDGRS,SS) S SS=""
Q
COMP S I=0 F S I=$O(^MCAR(700,+MDR,24,I)) Q:I'?1N.N I $D(^(I,0)),$P(^(0),U,2)="Y" S J=$P(^(0),U,1) D:$D(^MCAR(693.2,J,0)) SETNODE(MDGRS,$J(" ",16)_$P(^(0),U,1))
Q
VO2ER1(MCSEX) ;
Q $S(MCSEX="F":(42.8+WT)*(22.78-(.17*AGE)),1:(.79*HT-60.7))
VO2ER2(MCSEX) ;
Q $S(MCSEX="F":HT*(14.81-(.11*AGE)),1:50.72-(0.372*AGE))
VO2MAX ;
S ER1=$$VO2ER1(MCSEX),ER2=$$VO2ER2(MCSEX),PRED="",ACT=$P(ND,U,PC) D:ACT'="" PRTLINE^MDPFTP2 Q
SETNODE(NODE,VALUE) ;Set the node with the string
S MDLNE=MDLNE+1,@NODE@(MDLNE,0)=VALUE
Q
LNE ; Break line if longer than 48 chars
I $L(MDORS)<49 D SETNODE(MDGRS,$J(" ",27)_MDORS) Q
F KK=49:-1:1 Q:$E(MDORS,KK)?1P
I KK=1 S KK=48 D SETNODE(MDGRS,$J(" ",27)_$E(MDORS,1,48))
E D SETNODE(MDGRS,$J(" ",27)_$E(MDORS,1,KK-1))
S MDORS=$E(MDORS,KK+1,999) G LNE
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMDPFTP3 5824 printed Nov 22, 2024@16:53:24 Page 2
MDPFTP3 ; HOIFO/NCA - PFT REPORT-SPECIAL STUDIES (PT 2) ;3/17/04 12:48
+1 ;;1.0;CLINICAL PROCEDURES;**2**;Apr 01, 2004
+2 ; Reference IA #10060 New Person File (#200 Read w/FM)
+3 ;
EX SET ND=MCREC1
SET MCP1=MCP1S1
SET MCP2=MCP2S1
SET VE=$PIECE(MCREC1,U,1)
SET MCEX=$PIECE(MCREC2,U,9)
+1 SET MEAS="VEmax(BTPS)"
SET UNITS="L"
SET PC=1
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+2 SET MEAS="BR"
SET PC=2
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+3 SET MEAS="VD/VT REST"
SET PC=14
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+4 SET MEAS="VD/VT MAX"
SET PC=15
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+5 SET MEAS="VE/VCO2, AT"
SET PC=16
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+6 SET MEAS="VErest(BTPS)"
SET UNITS="ml/beat"
SET PC=5
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+7 KILL VE
SET MEAS="VO2rest"
SET UNITS="L/min"
SET PC=6
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+8 SET MEAS="VO2max"
SET UNITS="L/min"
SET PC=7
IF MCEX=1
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+9 if (MCEX=3)!(MCEX=2)
DO VO2MAX
+10 SET MEAS="AT"
SET UNITS="L"
SET PC=3
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+11 SET MEAS="HRrest"
SET UNITS="BPM"
SET PC=8
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+12 SET MEAS="HRmax"
SET PC=9
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+13 SET MEAS="VO2/HR"
SET PC=11
SET UNITS="ML"
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+14 SET MEAS="BP MAX"
SET PC=12
SET UNITS=""
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+15 SET MEAS="EKG"
SET PC=13
SET ACT=$PIECE(ND,U,PC)
SET SS=" "_MEAS
SET SS=SS_$JUSTIFY(" ",35-$LENGTH(SS))_$SELECT(ACT="N":"NORMAL",ACT="A":"ABNORMAL",1:"")
DO SETNODE(MDGRS,SS)
SET SS=""
+16 SET MEAS="RRrest"
SET UNITS="brths/m"
SET PC=10
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+17 SET ND=MCREC2
SET MCP1=MCP1S2
SET MCP2=MCP2S2
SET MEAS="RRmax"
SET PC=1
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+18 SET MEAS="Wmax"
SET UNITS="wrpm/min"
SET PC=2
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+19 SET MEAS="WRI/WRT"
SET UNITS="watts/min"
SET PC=6
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+20 SET MEAS="Max Speed"
SET UNITS="mph"
SET PC=4
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+21 SET MEAS="Max Grade"
SET UNITS="%"
SET PC=5
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+22 SET PRED=""
SET MEAS="TOTAL TIME"
SET UNITS="min"
SET PC=3
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+23 SET MEAS="HCO3 Change"
SET UNITS="mg/dl"
SET PC=10
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
+24 SET SS="Exercise Testing Mode: "_$SELECT(MCEX=1:"TREADMILL",MCEX=2:"BIKE ERGOMETER",MCEX=3:"HAND ERGOMETER",1:"")
KILL MCEX
DO SETNODE(MDGRS,SS)
SET SS=""
+25 DO SETNODE(MDGRS,"REASON(S) FOR STOPPING:")
+26 SET MCX(1)=0
FOR
SET MCX(1)=$ORDER(^MCAR(700,MDR,"S",MCX,3,MCX(1)))
if MCX(1)'?1N.N
QUIT
SET MCX(2)=$GET(^(MCX(1),0))
IF MCX(2)
DO SETNODE(MDGRS,$JUSTIFY(" ",27)_$PIECE($GET(^MCAR(695.8,MCX(2),0)),U))
KILL MCX(2)
+27 NEW KK,MDORS
SET MDLL=0
FOR
SET MDLL=$ORDER(^MCAR(700,+MDR,"S",MCX,4,MDLL))
if MDLL<1
QUIT
SET MDORS=$GET(^(MDLL,0))
DO LNE
EXEND GOTO SPEC1^MDPFTP2A
INT KILL HEAD1
if $EXTRACT(MCDOT,1)=" "
QUIT
+1 DO SETNODE(MDGRS," ")
DO SETNODE(MDGRS,"INTERPRETATION:")
+2 DO COMP
+3 KILL ^TMP("MDWP",$JOB)
NEW MDLL,MDWP,MDXX,MDY
SET MDWP=$$GET1^DIQ(700,MDR_",",33.5,"Z","^TMP(""MDWP"",$J)")
+4 SET MDLL=0
FOR
SET MDLL=$ORDER(^TMP("MDWP",$JOB,MDLL))
if MDLL<1
QUIT
DO SETNODE(MDGRS,$JUSTIFY(" ",16)_$GET(^(MDLL,0)))
+5 KILL ^TMP("MDWP",$JOB)
+6 DO SETNODE(MDGRS," ")
DO SETNODE(MDGRS,"COMMENTS AND RECOMMENDATIONS:")
+7 SET MDLL=0
FOR
SET MDLL=$ORDER(^MCAR(700,+MDR,16,MDLL))
if MDLL<1
QUIT
DO SETNODE(MDGRS,$GET(^(MDLL,0)))
+8 DO SETNODE(MDGRS," ")
DO SETNODE(MDGRS,"INTERPRETED BY: ")
+9 SET MDLL=0
FOR
SET MDLL=$ORDER(^MCAR(700,+MDR,7,MDLL))
if MDLL<1
QUIT
SET MDY=+$GET(^(MDLL,0))
IF +MDY
SET MDXX=$JUSTIFY(" ",16)_$EXTRACT($$GET1^DIQ(200,+MDY_",",.01,"E"),1,35)
DO SETNODE(MDGRS,MDXX)
+10 DO SETNODE(MDGRS," ")
SET MDXX=$GET(^MCAR(700,+MDR,17))
SET MDY=+$PIECE(MDXX,U,1)
+11 IF +MDY
SET MDXX=$EXTRACT($$GET1^DIQ(200,+MDY_",",.01,"E"),1,35)
DO SETNODE(MDGRS,"REVIEWED BY: "_MDXX)
+12 DO SETNODE(MDGRS," ")
KILL MDXX,MDY
EXIT if $EXTRACT(MCDOT)=" "
QUIT
DO PV
QUIT
PV ;
+1 IF $GET(MCPV)<1
SET MCPV=$$MCPV^MDPFTP1(MDR)
+2 if '$DATA(MCPV)
QUIT
if '$DATA(^MCAR(700.1,MCPV))
QUIT
PV1 ;
+1 IF $GET(MCPV)<1
SET MCPV=$$MCPV^MDPFTP1(MDR)
+2 if '$DATA(MCPV)
QUIT
+3 SET SS=""
DO SETNODE(MDGRS," ")
DO SETNODE(MDGRS,$JUSTIFY(" ",24)_"PREDICTED VALUE FORMULAS USED")
+4 FOR J="TLC","VC","FRC","RV","FVC","FEV1","PF","FEF2575","MVV","DLCOSB","COHB","HB"
Begin DoDot:1
+5 SET I=$GET(^MCAR(700.1,MCPV,J))
if 'I
QUIT
+6 if '$DATA(^MCAR(700.2,I,0))
QUIT
SET I=$GET(^(0))
+7 SET SS=" "_$SELECT(J="DLCOSB":"DLCO-SB",J="FEF2575":"FEF25-75",J="COHB":"COHB CORR.",J="HB":"HB CORR.",1:J)
+8 DO PVW
+9 KILL J
QUIT
End DoDot:1
+10 if '$DATA(MCRC1)
GOTO PVEXIT
+11 DO SETNODE(MDGRS," ")
DO SETNODE(MDGRS,$JUSTIFY(" ",24)_"RACE CORRECTION FORMULAS USED")
+12 ;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)) S SS=" TLC,VC,FVC,FEV1" D PVW G PVEXIT
+13 IF $DATA(MCRC2)
Begin DoDot:1
+14 FOR J=2,6
SET I=$PIECE($GET(^MCAR(700.1,MCPV,"RC")),U,J)
IF I
IF $DATA(^MCAR(700.2,I,0))
SET I=$GET(^(0))
SET SS=" "_$SELECT(J=2:"TLC,VC,FVC,FEV1",J=6:"MVV",1:"")
DO PVW
+15 QUIT
End DoDot:1
GOTO PVEXIT
+16 FOR J=1,3,4,5
SET I=$PIECE($GET(^MCAR(700.1,MCPV,"RC")),U,J)
IF I
IF $DATA(^MCAR(700.2,I,0))
SET I=$GET(^(0))
SET SS=" "_$SELECT(J=1:"TLC,VC,FVC,FEV1",J=3:"FRC,RV",J=4:"FEF25-75",J=5:"MVV",1:"")
DO PVW
PVEXIT DO SETNODE(MDGRS,"NOTE: HT=height,WT=weight,ACT=actual measurement value")
QUIT
PVW SET SS=SS_$JUSTIFY(" ",21-$LENGTH(SS))_$PIECE(I,U)
SET SS=SS_$JUSTIFY(" ",50-$LENGTH(SS))_$PIECE(I,U,3)
+1 DO SETNODE(MDGRS,SS)
SET SS=""
+2 QUIT
COMP SET I=0
FOR
SET I=$ORDER(^MCAR(700,+MDR,24,I))
if I'?1N.N
QUIT
IF $DATA(^(I,0))
IF $PIECE(^(0),U,2)="Y"
SET J=$PIECE(^(0),U,1)
if $DATA(^MCAR(693.2,J,0))
DO SETNODE(MDGRS,$JUSTIFY(" ",16)_$PIECE(^(0),U,1))
+1 QUIT
VO2ER1(MCSEX) ;
+1 QUIT $SELECT(MCSEX="F":(42.8+WT)*(22.78-(.17*AGE)),1:(.79*HT-60.7))
VO2ER2(MCSEX) ;
+1 QUIT $SELECT(MCSEX="F":HT*(14.81-(.11*AGE)),1:50.72-(0.372*AGE))
VO2MAX ;
+1 SET ER1=$$VO2ER1(MCSEX)
SET ER2=$$VO2ER2(MCSEX)
SET PRED=""
SET ACT=$PIECE(ND,U,PC)
if ACT'=""
DO PRTLINE^MDPFTP2
QUIT
SETNODE(NODE,VALUE) ;Set the node with the string
+1 SET MDLNE=MDLNE+1
SET @NODE@(MDLNE,0)=VALUE
+2 QUIT
LNE ; Break line if longer than 48 chars
+1 IF $LENGTH(MDORS)<49
DO SETNODE(MDGRS,$JUSTIFY(" ",27)_MDORS)
QUIT
+2 FOR KK=49:-1:1
if $EXTRACT(MDORS,KK)?1P
QUIT
+3 IF KK=1
SET KK=48
DO SETNODE(MDGRS,$JUSTIFY(" ",27)_$EXTRACT(MDORS,1,48))
+4 IF '$TEST
DO SETNODE(MDGRS,$JUSTIFY(" ",27)_$EXTRACT(MDORS,1,KK-1))
+5 SET MDORS=$EXTRACT(MDORS,KK+1,999)
GOTO LNE