source: FOIAVistA/tag/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR4D1.m@ 949

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

initial load of FOIAVistA 6/30/08 version

File size: 4.1 KB
Line 
1RMPR4D1 ;PHX/HNB -DISPLAY/LOOKUP/DIC(W) PURCHASE CARD ;3/1/1996
2 ;;3.0;PROSTHETICS;**3**;Feb 09, 1996
3EN ;DISPLAY DATE,PATIENT,ITEM,COST FROM 660
4 S Z=^RMPR(660,+Y,0)
5 ;should call getpat instead.
6 S RMPRDFN=$P(Z,U,2),RMPRNAM=$P(^DPT(RMPRDFN,0),U,1),RMPRIT=$P(Z,U,6)
7 I RMPRIT'="" S RMPRIT=$P(^RMPR(661,RMPRIT,0),U,1),RMPRIT=$P(^PRC(441,RMPRIT,0),U,2)
8 I RMPRIT="" S RMPRIT=$S($P(^RMPR(660,+Y,0),U,26)="P":"SHIPPING",$P(^RMPR(660,+Y,0),U,26)="D":"DELIVERY",1:"SHIPPING")
9 S RMPRCST="$"_$J($FN($P(Z,U,16),"T",2),8)
10 W ?25,$E(RMPRNAM,1,18),?45,$E(RMPRIT,1,23),?70,RMPRCST
11 K RMPRDFN,RMPRNAM,RMPRIT,RMPRCST,Z Q
12EN1 ;DISPLAY DATE,REFERENCE,PATIENT FROM 664
13 ;called from en2
14 N RZ,RZZ
15 Q:$G(RMPRQT)=1
16 I $G(DIC)="^RMPR(664," S RZ=^RMPR(664,+Y,0),RZZ=$P(RZ,U,7)
17 W:$P(RZ,U,8) ?49,"Closed" W:$P(RZ,U,5) ?49,"Cancelled"
18 W:$G(^RMPR(664,+Y,4)) ?49,"BA:",$P(^(4),U,2)
19 I $G(RZZ)="",$P(RZ,U,15),$D(^RMPR(664.2,+$P(RZ,U,15),0)) W ?40,$P(^(0),U)
20 I $D(^RMPR(664,+Y,1,0)) D
21 .S RMPRI=0
22 .F S RMPRI=$O(^RMPR(664,+Y,1,RMPRI)) Q:$G(RMPRI)'>0 D
23 ..S RMPRI1=$P(^RMPR(664,+Y,1,RMPRI,0),U,1) Q:$G(RMPRI1)'>0
24 ..S RMPRIT=$P(^RMPR(661,RMPRI1,0),U,1)
25 ..S RMPRN=$P(^PRC(441,RMPRIT,0),U,2)
26 ..W ?64,$E(RMPRN,1,15)
27 ..I $O(^RMPR(664,+Y,1,RMPRI)) W !
28 I '$D(^RMPR(664,+Y,1)),$P(^RMPR(664,+Y,0),U,12) W ?64,"PICKUP/DELIVERY",!
29 Q
30EN2 ;DISPLAY NAME
31 ;used for dic(w) only, file 664
32 N RZ
33 S RZ=$P(^RMPR(664,+Y,0),U,2) I +RZ W ?33,$E($P(^DPT(+RZ,0),U,1),1,15) G EN1
34 Q
35EN5 ;Inquire to purchase card transaction
36 I '$D(RMPR) D DIV4^RMPRSIT Q:$D(X)
37 N DIC
38 S RMPRQT=1
39 S DIC="^RMPR(664,",DIC(0)="AEQMZ" ;,DIC("W")="D EN2^RMPR4D1"
40 K IOP I $E(IOST)["C" G EN6
41 S DIC("S")="I $D(^(4)) I $P(^(0),U,14)=RMPR(""STA"")"
42 D ^DIC Q:Y'>0
43 S RMPRDA=+Y
44 S %ZIS="MQ" D ^%ZIS G:POP EXIT
45 I $D(IO("Q")) D G EXIT
46 .S ZTSAVE("RMPRDA")="",ZTSAVE("RMPR(")=""
47 .S ZTSAVE("DATE(")="",ZTSAVE("RMPRSITE")=""
48 .S ZTIO=ION,ZTRTN="EN6^RMPRD1",ZTDESC="Inquire To Purchase Card"
49 .D ^%ZTLOAD K ZTDESC,ZTIO,ZTRTN,ZTSAVE
50EN6 ;Printinig Purchase Card
51 N RPO,RPO1 K DR
52 S DA=RMPRDA,DIQ="RPO",DR=".01:24",RMPRDA=DA
53 D EN^DIQ1
54 S DR(664.02)=".01:16"
55 S RPO1=0
56 F S RPO1=$O(^RMPR(664,DA,1,RPO1)) Q:RPO1'>0 D
57 .S DA(664.02)=RPO1
58 .D EN^DIQ1
59 ;Display
60 U IO
61 I $Y>1 W @IOF
62 W "Patient: ",RPO(664,RMPRDA,1),?40,"Vendor:",RPO(664,RMPRDA,4)
63 W !,"Request Date: ",RPO(664,RMPRDA,.01),?33,"Date Required: ",RPO(664,RMPRDA,20),?69,"Days: ",RPO(664,RMPRDA,21)
64 W !,"Form: ",RPO(664,RMPRDA,15),?33,"Initiator: ",$E(RPO(664,RMPRDA,10),1,12),?60,"Sta.: ",$E(RPO(664,RMPRDA,18),1,11)
65 I $G(RPO(664,RMPRDA,8))'="" D
66 .W !!,"Close Out Date:",RPO(664,RMPRDA,8),?40,"Closed By:",RPO(664,RMPRDA,8.5)
67 .W !,"Remarks: ",RPO(664,RMPRDA,8.1)
68 I $G(RPO(664,RMPRDA,12))'="" D
69 .W !!,"Shipping Entry: ",RPO(664,RMPRDA,13)
70 .W ?40,"Shipping Charge: ",RPO(664,RMPRDA,12)
71 I $G(RPO(664,RMPRDA,3))'="" D
72 .W !!,"Canceled Date: ",RPO(664,RMPRDA,3),?40,"Canceled By: ",RPO(664,RMPRDA,3.2)
73 .W !,"Cancelation Remarks: ",RPO(664,RMPRDA,3.1)
74 I $G(RPO(664,RMPRDA,22))'="" D
75 .W !!,"Work Order #: ",RPO(664,RMPRDA,22),?33,"Lab Tech.: ",$E(RPO(664,RMPRDA,23),1,12),?60,"Date: ",RPO(664,RMPRDA,24)
76 W !!,"Obligation #:",RPO(664,RMPRDA,.5)
77 W ?35,"C.P.:",RPO(664,RMPRDA,6)
78 W !,"Reference: ",RPO(664,RMPRDA,7)
79 W ?35,"% Discount: ",RPO(664,RMPRDA,17)
80 W ?60,"PSC Category: ",RPO(664,RMPRDA,16)
81 ;Item Mult. Display
82 S RD1=0 F S RD1=$O(^RMPR(664,DA,1,RD1)) Q:$G(RD1)'>0 D
83 .W !!,"Item:",RPO(664.02,RD1,.01)
84 .W ?34,"Qty:",RPO(664.02,RD1,3)_" "_RPO(664.02,RD1,4)
85 .W ?60,"Unit Cost :",RPO(664.02,RD1,2)
86 .W !,?2,"Actual Unit Cost: ",RPO(664.02,RD1,2)
87 .W ?34,"Source:",RPO(664.02,RD1,11)
88 .W ?60,"Serial #:",RPO(664.02,RD1,15)
89 .W !,?2,"Patient Category: ",RPO(664.02,RD1,9),?34,"Type of Transaction: ",RPO(664.02,RD1,9)
90 .W !,?2,"Special Category: ",RPO(664.02,RD1,10),?34,"Appliance/Repair: ",RPO(664.02,RD1,12)
91 .W !!,?2,"Item Remarks: ",RPO(664.02,RD1,7)
92 S RPO1=0
93 F S RPO1=$O(RPO(664.02,RPO1)) Q:RPO1'>0 D
94 .W !,?2,"Brief Description: ",RPO(664.02,RPO1,1)
95 .W !,?2,"Extended Description:"
96 .M RPOD=RPO(664.02,RPO1,14)
97 .D EN^DDIOL(.RPOD)
98 .K RPOD
99 .W !!
100 ;end
101 N DIR
102 I $Y>11&($G(IO("Q"))<1) S DIR(0)="E" D ^DIR
103EXIT ;EXIT FROM EN5/EN6
104 K DA,RMPRDA,RMPRQT,RPO,IO("Q")
105 D ^%ZISC
Note: See TracBrowser for help on using the repository browser.