source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPAT.m@ 1042

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

initial load of WorldVistAEHR

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