source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR4LI.m@ 1389

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1RMPR4LI ;PHX/HNB,RVD-DISPLAY ITEMS ON PURCHASE CARD TRANSACTION ;3/1/1996
2 ;;3.0;PROSTHETICS;**3,12,19,20,28,30,41,90**;Feb 09, 1996
3 ;pass RMPRA
4 S:'$D(RMPRDELN) RMPRDELN="" S (RMPRI,RMPRCNT)=0,RMPRX="" D HOME^%ZIS W @IOF S:'$D(RMPRSER) RMPRSER=""
5 W !?5,$G(RMPRSSNE)
6 W ?55,"Purchase Card",!
7 W ?5,$$STA^RMPRUTIL,"-",$P(^RMPR(664,RMPRA,4),U,5)
8 I DUZ=$P(^RMPR(664,RMPRA,0),U,9)!($D(^XUSEC("RMPR FCP MANAGER",DUZ))) W ?55,$$DEC($P(^RMPR(664,RMPRA,4),U,1),$P(^RMPR(664,RMPRA,0),U,9),RMPRA)
9 E W ?55,"encrypted"
10 W !
11 N RBO S RBO=0
12 W !,RMPR("L")
13LI F S RMPRI=$O(^RMPR(664,RMPRA,1,RMPRI)) Q:RMPRI'>0 D G:$G(RMPRX)["^" EXIT
14 .S RMPRCNT=RMPRCNT+1
15 .S RMPRI1=^RMPR(664,RMPRA,1,RMPRI,0)
16 .D PRT
17 I $D(^RMPR(664,RMPRA,1)) W !!,?25,"SUB TOTAL: ",?65,"$",$J(RBO,7,2)
18 I $D(^RMPR(664,RMPRA,2)),$P(^(2),U,6) S DCT=$P(^(2),U,6),DCT=DCT/100
19 I $D(DCT) D
20 .W !!,?25,"% DISCOUNT: "
21 .Q:'$D(DCT)
22 .W DCT*100
23 .S DCTT=$J(RBO*DCT,7,2)
24 .W ?65,"$",DCTT
25 .S DCTT=$TR(DCTT," ","")
26 .S RBO=RBO-DCTT
27 .K DCT,DCTT
28 W !?25,"SHIPPING CHARGE: "
29 S R2=$S($P(^RMPR(664,RMPRA,0),U,11)]"":$P(^(0),U,11),$P(^(0),U,10):$P(^(0),U,10),1:"") W ?65,"$",$J(R2,7,2) W !
30 W !,?25,"TOTAL COST: ",?65,"$",$J(R2+RBO,7,2)
31 W !,?5,"BANK AUTHORIZATION: ",$P(^RMPR(664,RMPRA,4),U,2)
32 G EXIT
33PRT I RMPRCNT<0 W !,"NO ITEMS ON FILE" Q
34 W !!?5,"ITEM: "
35 S RMPRIT=$P(RMPRI1,U,1),RMPRIT1=$P(^RMPR(661,RMPRIT,0),U,1)
36 W $P(^PRC(441,RMPRIT1,0),U,1)," ",$P(^(0),U,2)," ",?45,"AMIS: " S RMPRAMIS=$S($P(RMPRI1,U,9)'="X":$P(^RMPR(661,RMPRIT,0),U,3),1:$P(^RMPR(661,RMPRIT,0),U,4))
37 W $S(RMPRAMIS="":"NO CODE FOR THIS ITEM",1:$P(^RMPR(663,RMPRAMIS,0),U,1))
38 W !,?5,"VENDOR TRACKING: ",$P($G(^RMPR(664,RMPRA,1,RMPRI,4)),U,1)
39 S RCPT=$P(^RMPR(664,RMPRA,1,RMPRI,0),U,16)
40 S:RCPT RMPRCPT=$G(^RMPR(661.1,RCPT,0))
41 I $D(RMPRCPT) W !,?5,"PSAS HCPCS CODE: ",$P(RMPRCPT,U,1),?31,$P(RMPRCPT,U,2)
42 K RCPT,RMPRCPT
43 W !,?5,"CPT MODIFIER: ",$P($G(^RMPR(664,RMPRA,1,RMPRI,4)),U,2)
44 I $P(^RMPR(664,RMPRA,1,RMPRI,0),U,8)'="" W !?5,"REMARKS: ",$P(^(0),U,8)
45 I $D(RMPRF),RMPRF=2 W !!?5,"DELIVER TO: ",RMPRDELN
46 W !!?5,"DESCRIPTION: ",$P(RMPRI1,U,2)
47 W !?5,"SERIAL NUMBER: " S RMPRSER=$S($P(^RMPR(664,RMPRA,1,RMPRI,0),U,15)]"":$P(^(0),U,15),$D(^RMPR(660,+$P(^(0),U,13),0)):$P(^(0),U,11),1:"") W RMPRSER
48 ;W !?5,"UNIT COST: ",$J($S($P(RMPRI1,U,7):$P(RMPRI1,U,7),1:$P(RMPRI1,U,3)),0,2),?25,"UNIT OF ISSUE: "
49 W !,?5,"UNIT COST: " S R1=$P(RMPRI1,U,7) S:R1=""!(R1<0) R1=$P(RMPRI1,U,3) W R1,?25,"UNIT OF ISSUE: "
50 S RMPRU=$P(RMPRI1,U,5) W:RMPRU'="" $P(^PRCD(420.5,RMPRU,0),U,1),?45,"QTY: ",$P(RMPRI1,U,4),?55,"ITEM COST: "
51 ;S R1=$S($P(RMPRI1,U,7):$P(RMPRI1,U,7),1:$P(RMPRI1,U,3)),R2=$P(RMPRI1,U,4),RBO=RBO+(R1*R2) W $J(R1*R2,0,2)
52 S R2=$P(RMPRI1,U,4)
53 S RBO=RBO+(R1*R2) W $J(R1*R2,0,2)
54 W !?5,"TYPE: ",$S($P(RMPRI1,U,9)="X":"REPAIR",$P(RMPRI1,U,9)="I":"INITIAL",$P(RMPRI1,U,9)="R":"REPLACE",$P(RMPRI1,U,9)="S":"SPARE",$P(RMPRI1,U,9)=5:"RENTAL",1:"")
55 W ?25,"CATEGORY: ",$S($P(RMPRI1,U,10)=1:"SC/OP",$P(RMPRI1,U,10)=2:"SC/IP",$P(RMPRI1,U,10)=3:"NSC/IP",$P(RMPRI1,U,10)=4:"NSC/OP",1:"")
56 W ?44,"SPECIAL CATEGORY: "
57 W $S($P(RMPRI1,U,11)=1:"SPEC/LEG",$P(RMPRI1,U,11)=2:"A&A",$P(RMPRI1,U,11)=3:"PHC",$P(RMPRI1,U,11)=4:"ELIGIBILITY REFORM",1:"")
58ASK I $Y>17 R !!,"Enter '^' to Quit Display, <Return> to Continue : ",RMPRX:DTIME S:'$T RMPRX="^" Q:RMPRX="^"
59 W:$Y>17 @IOF
60 Q
61EXIT K RMPRI1,R1,R2,ON,OFF Q
62 ;
63ENC(X,X1,X2) ;encrypt
64 ;x is string to encrypt
65 ;x1 duz
66 ;x2 is ien to file 664
67 D EN^XUSHSHP Q X
68DEC(X,X1,X2) ;decript
69 ;x is encrypted string
70 ;x1 is duz
71 ;x2 is ien to file 664
72 D DE^XUSHSHP Q X
73 ;end
Note: See TracBrowser for help on using the repository browser.