RMPRPAT ;PHX/RFM/JLT-DISPLAY 2319 FIRST PAGE ;8/29/1994
;;3.0;PROSTHETICS;**29,62,162**;Feb 09, 1996;Build 5
;
; RVD - patch # 62 - sets RMPRNAM, RMPRSSN,RMPRDOB and RMPRSSNE
;
ASK ;Set common variables
Q:$G(RMPRDFN)<1
;PATCH *162 => insure activity screen displays first time (RMPRFRST) in and Home Oxygen activity is NOT included (RCNT=7) for inside issue option
N RCNT
D HOME^%ZIS S DFN=RMPRDFN,RMPRBACK=1,RMPRFRST=1,RCNT=7 I $G(RSTCK)'=1 S RCNT=8,RFLG=1
D ADD^VADPT,OAD^VADPT,DEM^VADPT,ELIG^VADPT
;next 2 lines added by patch #62
S RMPRNAM=$P(VADM(1),U),RMPRSSN=$P(VADM(2),U)
S RMPRDOB=$P(VADM(3),U),RMPRSSNE=VA("PID")
W @IOF
S %X="^RMPR(665,"_RMPRDFN_",",%Y="R5(" D %XY^%RCR S RMPRCNUM=VAEL(7)
ASK1 ;CALL ROUTINE TO DISPLAY SCREEN SELECTI0N
Q:$G(RMPRDFN)'>0 S DFN=RMPRDFN
I '$D(VAEL(7)) D ELIG^VADPT
I '$D(VAPA(1)) D ADD^VADPT
I '$D(VADM(1)) D DEM^VADPT
I '$D(VAOA(1)) D OAD^VADPT
I $D(^RMPR(665,RMPRDFN,8,0)) W !,"*Comments on file"
I '$D(^RMPR(665,RMPRDFN,1,0)) W $C(7),!!,"*No Disability Code on File!"
I $D(^RMPR(665,RMPRDFN,1,0)),'$O(^(0)) W $C(7),!!,"*No Disability Code on File!"
D DISP^RMPRPAT5 K ANS W !
K RMPRQ,RMPRQUES,DIR,RMPREND1,RMPRL
D ASK1^RMPRPAT1 K ANS I $G(RMPRFRST)=1,$G(RSTCK) D HELP^RMPRPAT1 ;insure activity list appears upon entry
D ^DIR
K DIR,RMPRFRST
I Y["^" G EXIT
I Y="",'$D(RMPR1APN) G EXIT
I Y>0 S ANS=Y G QUE
;RMPR1APN is set in the entry action to menu RMPR PRINT 2319
;and killed in the exit action. We do not want to prompt
;patient name while creating records, only in display
;options
;prompt to select a new patient
I Y="",$D(RMPR1APN) S RMPR2APN=RMPRDFN D GETPAT^RMPRUTIL
I '$D(RMPRDFN) S RMPRDFN=RMPR2APN G EXIT
I $D(RMPR2APN) K RMPR2APN D ASK1
Q
ASK2 ;ASK TO CONTINUE AFTER SCREEN DISPLAY
G ASK1
HELP W !,"You may only enter screen 1-8,`^`, or `return`" G ASK2
Q
STAR ;DISPLAY ADDRESS INFO
Q:$G(DFN)'>0
S RMPRBACK=1
I '$D(VADM(1))!('$D(VAOA(8))!('$D(VAPA(8))!('$D(VAEL(7))))) N VAHOW D DEM^VADPT,ADD^VADPT,OAD^VADPT
W:$E(IOST)["C" @IOF
W !,$E(RMPRNAM,1,20),?23,"SSN: ",$P(VADM(2),U,2),?42
W "DOB: ",$P(VADM(3),U,2),?61,"CLAIM# ",VAEL(7) ;RMPRCNUM
STARD W !!,"Phone: ",VAPA(8),?40,"Phone: ",VAOA(8)
W !,"Current Address:",?40,"Primary Next of Kin Address:"
W !,VAPA(1),?40,VAOA(1)
I VAPA(2)=""&(VAPA(3)="") W:VAPA(4)'="" !,VAPA(4)_", "_$P(VAPA(5),U,2)_" "_VAPA(6) W:VAOA(4)'="" ?40,VAOA(4)_", "_$P(VAOA(5),U,2)_" "_VAOA(6) W:VAOA(10)'="" !,?40,"Relationship: ",VAOA(10) G END
I VAPA(2)'=""&(VAPA(3)="") W !,VAPA(2) W:VAOA(4)'="" ?40,VAOA(4)_", "_$P(VAOA(5),U,2)_" "_VAOA(6) W:VAPA(4)'="" !,VAPA(4)_", "_$P(VAPA(5),U,2)_" "_VAPA(6) W:VAOA(10)'="" ?40,"Relationship: ",VAOA(10) G END
I VAPA(2)'=""&(VAPA(3))'="" W !,VAPA(2) W:VAOA(4)'="" ?40,VAOA(4)_", ",$P(VAOA(5),U,2)_" "_VAOA(6),!,VAPA(3) W:VAOA(10)'="" ?40,"Relationship: ",VAOA(10)
I W:VAPA(4)'="" !,VAPA(4)_", "_$P(VAPA(5),U,2)_" "_VAPA(6)
END D ELIG^VADPT
W !!,"Patient Type: ",$P(VAEL(6),U,2),?40
W "Period of Service: ",$P(VAEL(2),U,2)
W !,"Primary Eligibility Code:",?40
W "Status: ",$P(VAEL(9),U,2),!,$P(VAEL(1),U,2)
W ?40,"Eligibility Status: ",$E($P(VAEL(8),U,2),1,19)
D MB^VADPT
W !!,"Receiving A&A Benefits? "
W:VAMB(1)=0 "NO" W:$P(VAMB(1),U,1)=1 $P(VAMB(1),U,2)
W ?40,"Receiving Housebound Benefits? "
W:VAMB(2)=0 "NO" W:$P(VAMB(2),U,1)=1 $P(VAMB(2),U,2)
W !,"Receiving Social Security? "
W:VAMB(3)=0 "NO" W:$P(VAMB(3),U,1)=1 $P(VAMB(3),U,2)
W ?40,"Receiving VA Pension? " W:VAMB(4)=0 "NO"
W:$P(VAMB(4),U,1)=1 $P(VAMB(4),U,2)
W !,"Receiving Military Retirement? "
W:VAMB(5)=0 "NO" W:$P(VAMB(5),U,1)=1 $P(VAMB(5),U,2)
W ?40,"Receiving VA Disability? " W:VAMB(7)=0 "NO"
W:$P(VAMB(7),U,1)=1 $P(VAMB(7),U,2)
S (RO,FG)=0 I '$D(^RMPR(665,RMPRDFN,1)) W !,"No Prosthetic Disability Codes entered for this Patient." S RO=1
I RO=0 F W:'FG !,"Prosthetic Disability Code(s):" S RO=$O(^RMPR(665,RMPRDFN,1,RO)) Q:RO'>0 S RR=^(RO,0) S:$P(RR,U,10) FG=1 I '$P(RR,U,10) W " ",$P(^RMPR(662,+RR,0),U,1),"-",$S($P(RR,U,3)=1:"SC",$P(RR,U,3)=2:"NSC",1:"") S FG=1
I $P($G(^DPT(DFN,.372,0)),U,4)>IOSL-2-$Y D QUEST2 G:$G(RMNOQUIT)=0 ASK1
S RO=0 F I=0:0 S RO=$O(^DPT(DFN,.372,RO)) Q:RO'>0!$D(RMPREND1) I +$P(^(RO,0),U,1),$D(^DIC(31,+$P(^(0),U,1))) W:'$D(RMPRL) !,"Patient Name: ",VADM(1),?40,"SSN: ",$P(VADM(2),U,2),!!,"MAS Disability Code(s):" D WRI
K RMNOQUIT G:$D(RMPREND1) ASK1
D SVC^VADPT W !!,"*POW? ",$S(VASV(4)=1:"YES",1:"NO")
G:$D(RMPRBACK) QUES
W @IOF G ASK1
WRI I $Y>(IOSL-6),'$D(RMPRQUES) D QUEST1 Q:$D(RMPREND1) ;patch *162, replace GOTO with Quit when within FOR loop
W !,$E($P(^DIC(31,$P(^DPT(DFN,.372,RO,0),U,1),0),U,1),1,30),?40,"Disability% ",$P(^DPT(DFN,.372,RO,0),U,2),?56," Service Connected? " W:$P(^DPT(DFN,.372,RO,0),U,3)=1 "YES" W:$P(^DPT(DFN,.372,RO,0),U,3)=0 "NO" S RMPRL=1 Q
QUES ;ASK WHAT PAGE OF A PATIENT'S 10-2319
K RMPRFLG,RMPRL F I=0:0 Q:$Y>21 W !
QUES1 R !,"Enter return to continue or `^` to exit: ",ANS:DTIME
G:'$T EXIT
I ANS="" G ASK1
I $G(ANS)="" G EXIT
I "^"[ANS G ASK1
E W $C(7),!,"You must enter an `^` to exit!" G QUES1
QUE W:ANS=5 @IOF
G EXIT:"^"[ANS,STAR^RMPRPAT:ANS=1,^RMPRPAT0:ANS=2,^RMPRPAT1:ANS=3
I ANS=4 G ^RMPRPAT2
I ANS=8 G 2319^RMPOBIL2
G DU^RMPRAINQ:ANS=5
G ^RMPRPAT5:ANS=6
I ANS=7 S RMPRDIR7=1 G EN^RMPRDIS
W !!,$C(7) G QUES
Q
EXIT ;EXIT FOR DISPLAY OF A PATIENT'S 10-2319
;must always exit through this point
I '$D(^RMPR(665,RMPRDFN,1,0)) D DIS^RMPRPAT5
I $D(^RMPR(665,RMPRDFN,1,0)),'$O(^(0)) D DIS^RMPRPAT5
I $D(^RMPR(665,RMPRDFN,1,0)),$O(^(0)) K RMPRKILL
D NPC^RMPRPAT5
K RMPRCOMB,Y,DIE,DIC,RMPRCCO,DIR,VASV,VAMB,VAEL,VADM,VAPA,FG,VAOA,TYPE,RMPROBL,RC,AMIS,CST,DATE,DEL,RFLG,QTY,REM,SN,STA,RR,RO,I,J,RMPRCNUM,RMPRFG,TRANS,TRANS1,RK,FLG,RA,RI,RT,RTCH,LC,MC,RMPRDT,RMPRJOB,RMPRWO
K RMPR2APN,RMPRQ,RR5,R5,DFN,FL,PAGE,AN,FRM,VEN,RZ,%X,%Y,VA,VAERR,TLC,TMC,R660,RCK,RJ,RDA,RL,RTC,RTCD,RTHD,RTR,RW,RWP,RMPRQUES,RMPREND1 D KVAR^VADPT
K:'$D(RMPRF)!($G(RMPRBACK)<1) RMPRDOB,RMPRDFN,RMPRNAM,RMPRSSN,RMPRBACK
Q
QUEST1 S RMPRQUES=1
N DIR S DIR(0)="E" W !! D ^DIR W @IOF
I $D(DTOUT)!($D(DUOUT)) S RMPREND1=1 Q ;patch *162, set quit flag if user chooses to exit option
W ! Q
QUEST2 ;PUT MAS DISABILITY CODES ON NEXT PAGE IF THEY WILL NOT ALL FIT ON THIS
;PAGE
N DIR S DIR(0)="E" W !! D ^DIR W @IOF S RMNOQUIT=1
I $D(DTOUT)!($D(DUOUT)) S RMNOQUIT=0
W @IOF
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPRPAT 6431 printed Oct 16, 2024@18:36:13 Page 2
RMPRPAT ;PHX/RFM/JLT-DISPLAY 2319 FIRST PAGE ;8/29/1994
+1 ;;3.0;PROSTHETICS;**29,62,162**;Feb 09, 1996;Build 5
+2 ;
+3 ; RVD - patch # 62 - sets RMPRNAM, RMPRSSN,RMPRDOB and RMPRSSNE
+4 ;
ASK ;Set common variables
+1 if $GET(RMPRDFN)<1
QUIT
+2 ;PATCH *162 => insure activity screen displays first time (RMPRFRST) in and Home Oxygen activity is NOT included (RCNT=7) for inside issue option
+3 NEW RCNT
+4 DO HOME^%ZIS
SET DFN=RMPRDFN
SET RMPRBACK=1
SET RMPRFRST=1
SET RCNT=7
IF $GET(RSTCK)'=1
SET RCNT=8
SET RFLG=1
+5 DO ADD^VADPT
DO OAD^VADPT
DO DEM^VADPT
DO ELIG^VADPT
+6 ;next 2 lines added by patch #62
+7 SET RMPRNAM=$PIECE(VADM(1),U)
SET RMPRSSN=$PIECE(VADM(2),U)
+8 SET RMPRDOB=$PIECE(VADM(3),U)
SET RMPRSSNE=VA("PID")
+9 WRITE @IOF
+10 SET %X="^RMPR(665,"_RMPRDFN_","
SET %Y="R5("
DO %XY^%RCR
SET RMPRCNUM=VAEL(7)
ASK1 ;CALL ROUTINE TO DISPLAY SCREEN SELECTI0N
+1 if $GET(RMPRDFN)'>0
QUIT
SET DFN=RMPRDFN
+2 IF '$DATA(VAEL(7))
DO ELIG^VADPT
+3 IF '$DATA(VAPA(1))
DO ADD^VADPT
+4 IF '$DATA(VADM(1))
DO DEM^VADPT
+5 IF '$DATA(VAOA(1))
DO OAD^VADPT
+6 IF $DATA(^RMPR(665,RMPRDFN,8,0))
WRITE !,"*Comments on file"
+7 IF '$DATA(^RMPR(665,RMPRDFN,1,0))
WRITE $CHAR(7),!!,"*No Disability Code on File!"
+8 IF $DATA(^RMPR(665,RMPRDFN,1,0))
IF '$ORDER(^(0))
WRITE $CHAR(7),!!,"*No Disability Code on File!"
+9 DO DISP^RMPRPAT5
KILL ANS
WRITE !
+10 KILL RMPRQ,RMPRQUES,DIR,RMPREND1,RMPRL
+11 ;insure activity list appears upon entry
DO ASK1^RMPRPAT1
KILL ANS
IF $GET(RMPRFRST)=1
IF $GET(RSTCK)
DO HELP^RMPRPAT1
+12 DO ^DIR
+13 KILL DIR,RMPRFRST
+14 IF Y["^"
GOTO EXIT
+15 IF Y=""
IF '$DATA(RMPR1APN)
GOTO EXIT
+16 IF Y>0
SET ANS=Y
GOTO QUE
+17 ;RMPR1APN is set in the entry action to menu RMPR PRINT 2319
+18 ;and killed in the exit action. We do not want to prompt
+19 ;patient name while creating records, only in display
+20 ;options
+21 ;prompt to select a new patient
+22 IF Y=""
IF $DATA(RMPR1APN)
SET RMPR2APN=RMPRDFN
DO GETPAT^RMPRUTIL
+23 IF '$DATA(RMPRDFN)
SET RMPRDFN=RMPR2APN
GOTO EXIT
+24 IF $DATA(RMPR2APN)
KILL RMPR2APN
DO ASK1
+25 QUIT
ASK2 ;ASK TO CONTINUE AFTER SCREEN DISPLAY
+1 GOTO ASK1
HELP WRITE !,"You may only enter screen 1-8,`^`, or `return`"
GOTO ASK2
+1 QUIT
STAR ;DISPLAY ADDRESS INFO
+1 if $GET(DFN)'>0
QUIT
+2 SET RMPRBACK=1
+3 IF '$DATA(VADM(1))!('$DATA(VAOA(8))!('$DATA(VAPA(8))!('$DATA(VAEL(7)))))
NEW VAHOW
DO DEM^VADPT
DO ADD^VADPT
DO OAD^VADPT
+4 if $EXTRACT(IOST)["C"
WRITE @IOF
+5 WRITE !,$EXTRACT(RMPRNAM,1,20),?23,"SSN: ",$PIECE(VADM(2),U,2),?42
+6 ;RMPRCNUM
WRITE "DOB: ",$PIECE(VADM(3),U,2),?61,"CLAIM# ",VAEL(7)
STARD WRITE !!,"Phone: ",VAPA(8),?40,"Phone: ",VAOA(8)
+1 WRITE !,"Current Address:",?40,"Primary Next of Kin Address:"
+2 WRITE !,VAPA(1),?40,VAOA(1)
+3 IF VAPA(2)=""&(VAPA(3)="")
if VAPA(4)'=""
WRITE !,VAPA(4)_", "_$PIECE(VAPA(5),U,2)_" "_VAPA(6)
if VAOA(4)'=""
WRITE ?40,VAOA(4)_", "_$PIECE(VAOA(5),U,2)_" "_VAOA(6)
if VAOA(10)'=""
WRITE !,?40,"Relationship: ",VAOA(10)
GOTO END
+4 IF VAPA(2)'=""&(VAPA(3)="")
WRITE !,VAPA(2)
if VAOA(4)'=""
WRITE ?40,VAOA(4)_", "_$PIECE(VAOA(5),U,2)_" "_VAOA(6)
if VAPA(4)'=""
WRITE !,VAPA(4)_", "_$PIECE(VAPA(5),U,2)_" "_VAPA(6)
if VAOA(10)'=""
WRITE ?40,"Relationship: ",VAOA(10)
GOTO END
+5 IF VAPA(2)'=""&(VAPA(3))'=""
WRITE !,VAPA(2)
if VAOA(4)'=""
WRITE ?40,VAOA(4)_", ",$PIECE(VAOA(5),U,2)_" "_VAOA(6),!,VAPA(3)
if VAOA(10)'=""
WRITE ?40,"Relationship: ",VAOA(10)
+6 IF $TEST
if VAPA(4)'=""
WRITE !,VAPA(4)_", "_$PIECE(VAPA(5),U,2)_" "_VAPA(6)
END DO ELIG^VADPT
+1 WRITE !!,"Patient Type: ",$PIECE(VAEL(6),U,2),?40
+2 WRITE "Period of Service: ",$PIECE(VAEL(2),U,2)
+3 WRITE !,"Primary Eligibility Code:",?40
+4 WRITE "Status: ",$PIECE(VAEL(9),U,2),!,$PIECE(VAEL(1),U,2)
+5 WRITE ?40,"Eligibility Status: ",$EXTRACT($PIECE(VAEL(8),U,2),1,19)
+6 DO MB^VADPT
+7 WRITE !!,"Receiving A&A Benefits? "
+8 if VAMB(1)=0
WRITE "NO"
if $PIECE(VAMB(1),U,1)=1
WRITE $PIECE(VAMB(1),U,2)
+9 WRITE ?40,"Receiving Housebound Benefits? "
+10 if VAMB(2)=0
WRITE "NO"
if $PIECE(VAMB(2),U,1)=1
WRITE $PIECE(VAMB(2),U,2)
+11 WRITE !,"Receiving Social Security? "
+12 if VAMB(3)=0
WRITE "NO"
if $PIECE(VAMB(3),U,1)=1
WRITE $PIECE(VAMB(3),U,2)
+13 WRITE ?40,"Receiving VA Pension? "
if VAMB(4)=0
WRITE "NO"
+14 if $PIECE(VAMB(4),U,1)=1
WRITE $PIECE(VAMB(4),U,2)
+15 WRITE !,"Receiving Military Retirement? "
+16 if VAMB(5)=0
WRITE "NO"
if $PIECE(VAMB(5),U,1)=1
WRITE $PIECE(VAMB(5),U,2)
+17 WRITE ?40,"Receiving VA Disability? "
if VAMB(7)=0
WRITE "NO"
+18 if $PIECE(VAMB(7),U,1)=1
WRITE $PIECE(VAMB(7),U,2)
+19 SET (RO,FG)=0
IF '$DATA(^RMPR(665,RMPRDFN,1))
WRITE !,"No Prosthetic Disability Codes entered for this Patient."
SET RO=1
+20 IF RO=0
FOR
if 'FG
WRITE !,"Prosthetic Disability Code(s):"
SET RO=$ORDER(^RMPR(665,RMPRDFN,1,RO))
if RO'>0
QUIT
SET RR=^(RO,0)
if $PIECE(RR,U,10)
SET FG=1
IF '$PIECE(RR,U,10)
WRITE " ",$PIECE(^RMPR(662,+RR,0),U,1),"-",$SELECT($PIECE(RR,U,3)=1:"SC",$PIECE(RR,U,3)=2:"NSC",1:"")
SET FG=1
+21 IF $PIECE($GET(^DPT(DFN,.372,0)),U,4)>IOSL-2-$Y
DO QUEST2
if $GET(RMNOQUIT)=0
GOTO ASK1
+22 SET RO=0
FOR I=0:0
SET RO=$ORDER(^DPT(DFN,.372,RO))
if RO'>0!$DATA(RMPREND1)
QUIT
IF +$PIECE(^(RO,0),U,1)
IF $DATA(^DIC(31,+$PIECE(^(0),U,1)))
if '$DATA(RMPRL)
WRITE !,"Patient Name: ",VADM(1),?40,"SSN: ",$PIECE(VADM(2),U,2),!!,"MAS Disability Code(s):"
DO WRI
+23 KILL RMNOQUIT
if $DATA(RMPREND1)
GOTO ASK1
+24 DO SVC^VADPT
WRITE !!,"*POW? ",$SELECT(VASV(4)=1:"YES",1:"NO")
+25 if $DATA(RMPRBACK)
GOTO QUES
+26 WRITE @IOF
GOTO ASK1
WRI ;patch *162, replace GOTO with Quit when within FOR loop
IF $Y>(IOSL-6)
IF '$DATA(RMPRQUES)
DO QUEST1
if $DATA(RMPREND1)
QUIT
+1 WRITE !,$EXTRACT($PIECE(^DIC(31,$PIECE(^DPT(DFN,.372,RO,0),U,1),0),U,1),1,30),?40,"Disability% ",$PIECE(^DPT(DFN,.372,RO,0),U,2),?56," Service Connected? "
if $PIECE(^DPT(DFN,.372,RO,0),U,3)=1
WRITE "YES"
if $PIECE(^DPT(DFN,.372,RO,0),U,3)=0
WRITE "NO"
SET RMPRL=1
QUIT
QUES ;ASK WHAT PAGE OF A PATIENT'S 10-2319
+1 KILL RMPRFLG,RMPRL
FOR I=0:0
if $Y>21
QUIT
WRITE !
QUES1 READ !,"Enter return to continue or `^` to exit: ",ANS:DTIME
+1 if '$TEST
GOTO EXIT
+2 IF ANS=""
GOTO ASK1
+3 IF $GET(ANS)=""
GOTO EXIT
+4 IF "^"[ANS
GOTO ASK1
+5 IF '$TEST
WRITE $CHAR(7),!,"You must enter an `^` to exit!"
GOTO QUES1
QUE if ANS=5
WRITE @IOF
+1 if "^"[ANS
GOTO EXIT
if ANS=1
GOTO STAR^RMPRPAT
if ANS=2
GOTO ^RMPRPAT0
if ANS=3
GOTO ^RMPRPAT1
+2 IF ANS=4
GOTO ^RMPRPAT2
+3 IF ANS=8
GOTO 2319^RMPOBIL2
+4 if ANS=5
GOTO DU^RMPRAINQ
+5 if ANS=6
GOTO ^RMPRPAT5
+6 IF ANS=7
SET RMPRDIR7=1
GOTO EN^RMPRDIS
+7 WRITE !!,$CHAR(7)
GOTO QUES
+8 QUIT
EXIT ;EXIT FOR DISPLAY OF A PATIENT'S 10-2319
+1 ;must always exit through this point
+2 IF '$DATA(^RMPR(665,RMPRDFN,1,0))
DO DIS^RMPRPAT5
+3 IF $DATA(^RMPR(665,RMPRDFN,1,0))
IF '$ORDER(^(0))
DO DIS^RMPRPAT5
+4 IF $DATA(^RMPR(665,RMPRDFN,1,0))
IF $ORDER(^(0))
KILL RMPRKILL
+5 DO NPC^RMPRPAT5
+6 KILL RMPRCOMB,Y,DIE,DIC,RMPRCCO,DIR,VASV,VAMB,VAEL,VADM,VAPA,FG,VAOA,TYPE,RMPROBL,RC,AMIS,CST,DATE,DEL,RFLG,QTY,REM,SN,STA,RR,RO,I,J,RMPRCNUM,RMPRFG,TRANS,TRANS1,RK,FLG,RA,RI,RT,RTCH,LC,MC,RMPRDT,RMPRJOB,RMPRWO
+7 KILL RMPR2APN,RMPRQ,RR5,R5,DFN,FL,PAGE,AN,FRM,VEN,RZ,%X,%Y,VA,VAERR,TLC,TMC,R660,RCK,RJ,RDA,RL,RTC,RTCD,RTHD,RTR,RW,RWP,RMPRQUES,RMPREND1
DO KVAR^VADPT
+8 if '$DATA(RMPRF)!($GET(RMPRBACK)<1)
KILL RMPRDOB,RMPRDFN,RMPRNAM,RMPRSSN,RMPRBACK
+9 QUIT
QUEST1 SET RMPRQUES=1
+1 NEW DIR
SET DIR(0)="E"
WRITE !!
DO ^DIR
WRITE @IOF
+2 ;patch *162, set quit flag if user chooses to exit option
IF $DATA(DTOUT)!($DATA(DUOUT))
SET RMPREND1=1
QUIT
+3 WRITE !
QUIT
QUEST2 ;PUT MAS DISABILITY CODES ON NEXT PAGE IF THEY WILL NOT ALL FIT ON THIS
+1 ;PAGE
+2 NEW DIR
SET DIR(0)="E"
WRITE !!
DO ^DIR
WRITE @IOF
SET RMNOQUIT=1
+3 IF $DATA(DTOUT)!($DATA(DUOUT))
SET RMNOQUIT=0
+4 WRITE @IOF
+5 QUIT