source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPOPAT.m@ 896

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

initial load of FOIAVistA 6/30/08 version

File size: 5.2 KB
Line 
1RMPOPAT ;HINES CIO/RVD-DISPLAY 2319 FIRST PAGE READ ONLY ;7/5/02
2 ;;3.0;PROSTHETICS;**70**;Feb 09, 1996
3 ;
4 ; RVD 7/5/02 - patch # 70 - this routine is a copy of RMPRPAT for
5 ; Read Only 2319, without comments and
6 ; disability codes.
7 ;
8ASK ;Set common variables
9 Q:$G(RMPRDFN)<1
10 D HOME^%ZIS S DFN=RMPRDFN,RMPRBACK=1
11 D ADD^VADPT,OAD^VADPT,DEM^VADPT,ELIG^VADPT
12 S RMPRNAM=$P(VADM(1),U),RMPRSSN=$P(VADM(2),U)
13 S RMPRDOB=$P(VADM(3),U),RMPRSSNE=VA("PID")
14 W @IOF
15 S %X="^RMPR(665,"_RMPRDFN_",",%Y="R5(" D %XY^%RCR S RMPRCNUM=VAEL(7)
16ASK1 ;CALL ROUTINE TO DISPLAY SCREEN SELECTI0N
17 Q:$G(RMPRDFN)'>0 S DFN=RMPRDFN
18 I '$D(VAEL(7)) D ELIG^VADPT
19 I '$D(VAPA(1)) D ADD^VADPT
20 I '$D(VADM(1)) D DEM^VADPT
21 I '$D(VAOA(1)) D OAD^VADPT
22 ;I $D(^RMPR(665,RMPRDFN,8,0)) W !,"*Comments on file"
23 ;I '$D(^RMPR(665,RMPRDFN,1,0)) W $C(7),!!,"*No Disability Code on File!"
24 ;I $D(^RMPR(665,RMPRDFN,1,0)),'$O(^(0)) W $C(7),!!,"*No Disability Code on File!"
25 ;D DISP^RMPRPAT5 K ANS
26 ;K RMPRQ,RMPRQUES,DIR
27 D ASK1^RMPOPAT1 K ANS
28 D ^DIR
29 K DIR
30 I Y["^" G EXIT
31 I Y="",'$D(RMPR1APN) G EXIT
32 I (Y="I")!(Y="H") S ANS=Y G QUE
33 ;RMPR1APN is set in the entry action to menu RMPR PRINT 2319
34 ;and killed in the exit action. We do not want to prompt
35 ;patient name while creating records, only in display
36 ;options
37 ;prompt to select a new patient
38 I Y="",$D(RMPR1APN) S RMPR2APN=RMPRDFN D GETPAT^RMPRUTIL
39 I '$D(RMPRDFN) S RMPRDFN=RMPR2APN G EXIT
40 I $D(RMPR2APN) K RMPR2APN D ASK1
41 Q
42ASK2 ;ASK TO CONTINUE AFTER SCREEN DISPLAY
43 G ASK1
44HELP W !,"You may only enter screen (I-H),`^`, or `return`" G ASK2
45 Q
46STAR ;DISPLAY ADDRESS INFO
47 Q:$G(DFN)'>0
48 S RMPRBACK=1
49 I '$D(VADM(1))!('$D(VAOA(8))!('$D(VAPA(8))!('$D(VAEL(7))))) N VAHOW D DEM^VADPT,ADD^VADPT,OAD^VADPT
50 W:$E(IOST)["C" @IOF
51 W !,$E(RMPRNAM,1,20),?23,"SSN: ",$P(VADM(2),U,2),?42
52 W "DOB: ",$P(VADM(3),U,2),?61,"CLAIM# ",VAEL(7) ;RMPRCNUM
53STARD W !!,"Phone: ",VAPA(8),?40,"Phone: ",VAOA(8)
54 W !,"Current Address:",?40,"Primary Next of Kin Address:"
55 W !,VAPA(1),?40,VAOA(1)
56 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
57 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
58 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)
59 I W:VAPA(4)'="" !,VAPA(4)_", "_$P(VAPA(5),U,2)_" "_VAPA(6)
60END D ELIG^VADPT
61 W !!,"Patient Type: ",$P(VAEL(6),U,2),?40
62 W "Period of Service: ",$P(VAEL(2),U,2)
63 W !,"Primary Eligibility Code:",?40
64 W "Status: ",$P(VAEL(9),U,2),!,$P(VAEL(1),U,2)
65 W ?40,"Eligibility Status: ",$E($P(VAEL(8),U,2),1,19)
66 D MB^VADPT
67 W !!,"Receiving A&A Benefits? "
68 W:VAMB(1)=0 "NO" W:$P(VAMB(1),U,1)=1 $P(VAMB(1),U,2)
69 W ?40,"Receiving Housebound Benefits? "
70 W:VAMB(2)=0 "NO" W:$P(VAMB(2),U,1)=1 $P(VAMB(2),U,2)
71 W !,"Receiving Social Security? "
72 W:VAMB(3)=0 "NO" W:$P(VAMB(3),U,1)=1 $P(VAMB(3),U,2)
73 W ?40,"Receiving VA Pension? " W:VAMB(4)=0 "NO"
74 W:$P(VAMB(4),U,1)=1 $P(VAMB(4),U,2)
75 W !,"Receiving Military Retirement? "
76 W:VAMB(5)=0 "NO" W:$P(VAMB(5),U,1)=1 $P(VAMB(5),U,2)
77 W ?40,"Receiving VA Disability? " W:VAMB(7)=0 "NO"
78 W:$P(VAMB(7),U,1)=1 $P(VAMB(7),U,2)
79 S (RO,FG)=0 I '$D(^RMPR(665,RMPRDFN,1)) W !,"No Prosthetic Disability Codes entered for this Patient." S RO=1
80 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
81 K RMNOQUIT G:$D(RMPREND1) EXIT
82 D SVC^VADPT W !!,"*POW? ",$S(VASV(4)=1:"YES",1:"NO")
83 G:$D(RMPRBACK) QUES
84 W @IOF G ASK1
85WRI I $Y>(IOSL-7),'$D(RMPRQUES) D QUEST1 G:$D(RMPREND1) ASK1
86QUES ;ASK WHAT PAGE OF A PATIENT'S 10-2319
87 K RMPRFLG,RMPRL F I=0:0 Q:$Y>21 W !
88QUES1 R !,"Enter return to continue or `^` to exit: ",ANS:DTIME
89 G:'$T EXIT
90 I ANS="" G ASK1
91 I $G(ANS)="" G EXIT
92 I "^"[ANS G ASK1
93 E W $C(7),!,"You must enter an `^` to exit!" G QUES1
94QUE ;W:ANS=5 @IOF
95 G EXIT:"^"[ANS
96 I ANS="I" G ^RMPOPAT2
97 I ANS="H" G 2319^RMPOBIL6
98 W !!,$C(7) G QUES
99 Q
100EXIT ;EXIT FOR DISPLAY OF A PATIENT'S 10-2319
101 ;must always exit through this point
102 ;I '$D(^RMPR(665,RMPRDFN,1,0)) D DIS^RMPRPAT5
103 ;I $D(^RMPR(665,RMPRDFN,1,0)),'$O(^(0)) D DIS^RMPRPAT5
104 I $D(^RMPR(665,RMPRDFN,1,0)),$O(^(0)) K RMPRKILL
105 ;D NPC^RMPRPAT5
106 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
107 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
108 K:'$D(RMPRF)!($G(RMPRBACK)<1) RMPRDOB,RMPRDFN,RMPRNAM,RMPRSSN,RMPRBACK
109 K RMPOPFLG,RMPR1APN
110 Q
111QUEST1 S RMPRQUES=1
112 N DIR S DIR(0)="E" W !! D ^DIR W @IOF
113 I $D(DTOUT)!($D(DUOUT)) S RMPREND1=1 G ASK1
114 W ! Q
115QUEST2 ;PUT MAS DISABILITY CODES ON NEXT PAGE IF THEY WILL NOT ALL FIT ON THIS
116 ;PAGE
117 N DIR S DIR(0)="E" W !! D ^DIR W @IOF S RMNOQUIT=1
118 I $D(DTOUT)!($D(DUOUT)) S RMNOQUIT=0
119 W @IOF
120 Q
Note: See TracBrowser for help on using the repository browser.