source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPOBIL7.m@ 1720

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

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1RMPOBIL7 ;HINES CIO/RVD - HOME OXYGEN BILLING TRANSACTIONS ;9/16/02 11:11
2 ;;3.0;PROSTHETICS;**70,99**;Feb 09, 1996
3 ;RVD 7/8/02 patch #70 - this is a copy of RMPOBIL5 routine.
4 ; For Read Only 2319.
5 ;
6 ;DBIA # 800 - for this routine, the agreement covers the field #.01 NAME
7 ; file #440.
8 ;DBIA # 801 - for this routine, the agreement covers the field
9 ; #.05 Short Description, file #441.
10 ;DBIA # 10090 - Fileman read of file #4, field #99.
11 ;
12 N DA,DR,DIQ,DIC
13 K ^UTILITY("DIQ1",$J)
14 S (RC,RA,AN,ANS,RK,RZ)=0 D HDR
15 F S RA=$O(^RMPR(660,"AC",RMPRDFN,RA)) Q:RA="" D
16 . S AN=""
17 . F S AN=$O(^RMPR(660,"AC",RMPRDFN,RA,AN)) Q:AN="" D
18 . . I $D(^RMPO(665.72,"AC",AN))>0 S RC=RC+1,IT(RC)=AN
19 G:'$D(IT) END
20DIS ;DISPLAY APPLIANCES OR REPAIRS
21 I $G(RK)="" S (RC,RK)=""
22 I RK+1'>RC S RK=RK+1,AN=+IT(RK) D G:$$XIT EXIT G DIS
23 . S Y=^RMPR(660,AN,0) D PRT,OVER:((IOSL-4)<$Y)
24END I RC=0 W !,"No home oxygen items for this veteran!",!! H 3 G EXIT
25 E D G EXIT
26 .I RC>0 D I $G(RK)+1'>$G(RC) D DIS
27 . . W !!,"End of Home Oxygen records for this veteran!" D OVER
28 .I $G(RC)="" Q
29EXIT Q:'$D(RMPRDFN)
30 W ! K I,J,L,R0,IT,RA
31 I $D(DUOUT)!($D(DTOUT)) G ASK1^RMPOPAT
32 S FL=4 G ASK2^RMPOPAT
33 K RMPRCNUM,TRANS,TRANS1,TYPE,VEN,RMPRSTN,DIQ,^UTILITY("DIQ1",$J)
34 K AMIS,AN,CST,DATE,DEL,DUOUT,DTOUT,FL,FRM,PAGE,QTY,RC,REM,RZ,RK,SN,STA
35 Q
36XIT() Q '$D(ANS)!(ANS=U)!($D(DUOUT))!($D(DTOUT))
37PRT MERGE RMY=Y
38 S DATE=$P(Y,U,3),TYPE=$P(Y,U,6),QTY=$P(Y,U,7)
39 S VEN=$P(Y,U,9),TRANS=$P(Y,U,4),STA=$P(Y,U,10),SN=$P(Y,U,11)
40 S DEL=$P(Y,U,12)
41 S CST=$S($P(Y,U,16)'="":$P(Y,U,16),$D(^RMPR(660,AN,"LB")):$P(^RMPR(660,AN,"LB"),U,9),1:"")
42 ;form requested on
43 S FRM=$P(Y,U,13),REM=$P(Y,U,18)
44 S DATE=$E(DATE,4,5)_"/"_$E(DATE,6,7)_"/"_$E(DATE,2,3)
45 ;S TYPE=$S(TYPE="":"",$D(^RMPR(661,TYPE,0)):$P(^(0),U,1),1:"")
46 S TYPE=$P($G(^RMPR(660,AN,1)),U,4)
47 S AMIS=$P(Y,U,15),VEN=$S(VEN="":"",$D(^PRC(440,VEN,0)):$P(^(0),U,1),1:"")
48 I $D(^RMPR(660.1,"AC",AN)),$P(^RMPR(660.1,$O(^RMPR(660.1,"AC",AN,0)),0),U,11)]"" S AMIS=AMIS_"+"
49 S TRANS=$S(TRANS]"":TRANS,1:""),TRANS1=""
50 S:TRANS="X" TRANS1=TRANS,TRANS=""
51 S DEL=$E(DEL,4,5)_"/"_$E(DEL,6,7)_"/"_$E(DEL,2,3) S:DEL="//" DEL=""
52 W !,RK,". ",DATE,?13,QTY,?17
53 ;W AMIS_$S(TYPE'="":$E($P(^PRC(441,TYPE,0),U,2),1,10),$P(Y,U,26)="D":"DELIVERY",$P(Y,U,26)="P":"PICKUP",$P(Y,U,17):"SHIPPING",1:"")
54 W AMIS_$S(TYPE'="":$E($P($G(^RMPR(661.1,TYPE,0)),U,1),1,10),$P(Y,U,26)="D":"DELIVERY",$P(Y,U,26)="P":"PICKUP",$P(Y,U,17):"SHIPPING",1:"")
55 ;W:$D(^RMPR(660,$P(IT(RK),U,1),"HST")) $E($P(^("HST"),U,1),1,10)
56 I TYPE=""&($D(^RMPR(660,$P(IT(RK),U,1),"HST"))) W $E($P(^("HST"),U,1),1,10)
57 W ?30,TRANS,?31,TRANS1
58 ;display source of procurement for 2529-3 under vendor header
59 I $D(RMPRLPRO) W ?33,RMPRLPRO
60 K RMPRLPRO
61 I VEN'="" W ?33,$E(VEN,1,10)
62 W:$D(^RMPR(660,$P(IT(RK),U,1),"HST")) $E($P(^("HST"),U,3),1,10)
63 I STA'="" D
64 .S DIC="^DIC(4,",DIQ(0)="E",DR=99,DIQ="RMPRSTN",DA=STA D EN^DIQ1
65 .W:$D(RMPRSTN(4,STA,99,"E")) ?45,RMPRSTN(4,STA,99,"E")
66 W ?50,$E(SN,1,9),?60,DEL
67 W ?71,$J($FN($S(CST'="":CST,$P(RMY,U,17):$P(RMY,U,17),1:""),"T",2),9)
68 W:REM]"" !,?3,REM
69 I $P(IT(RK),U,2)="" S IT(RK)=IT(RK)_"^"_RZ
70 Q
71OVER N ANS
72 S RZ=RK W !,"+=Turned-In *=Historical Data I=Initial X=Repair S=Spare R=Replacement",!,"Enter 1-",RK," to show full entry, '^' to exit or `return` to continue. " R ANS:DTIME S:'$T ANS="^"
73 I ANS="^^" S ANS="^" G ASK1^RMPOPAT Q
74 I ANS="^" G ASK1^RMPOPAT Q
75 I ANS="",RK+1'>RC D HDR Q
76 I ANS="" Q
77 I ANS'?1N.N!(ANS>RK)!(+ANS=0)!(+ANS'=ANS) W $C(7),!," Must be between 1 and ",RK," to be valid" G OVER
78 I ANS>0,(ANS<(RK+1)) S AN=ANS,RZ=RK D ^RMPOPAT3 I RMOXY=0 K RK Q
79 S RK=$P(IT(ANS),U,2)
80 Q
81HDR ;Print Header, Screen 4
82 W @IOF
83 S PAGE=3
84 W !,$E(RMPRNAM,1,20),?23,"SSN: "
85 W $E(RMPRSSN,1,3)_"-"_$E(RMPRSSN,4,5)_"-"_$E(RMPRSSN,6,10)
86 W ?42,"DOB: "
87 S Y=RMPRDOB X ^DD("DD") W Y K Y
88 W ?61,"CLAIM# ",$G(RMPRCNUM)
89 W !?4,"Date",?12,"Qty",?19,"Item",?28,"Type",?34,"Vendor",?45,"Sta",?50,"Serial",?58,"Delivery Date",?72,"Tot Cost"
90 Q
Note: See TracBrowser for help on using the repository browser.