source: WorldVistAEHR/trunk/r/FEE_BASIS-FB/FBAAPP.m@ 862

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

initial load of WorldVistAEHR

File size: 4.6 KB
Line 
1FBAAPP ;AISC/GRR-ENTER FEE PHARMACY DETERMINATION ;5/10/2005
2 ;;3.5;FEE BASIS;**61,80,91**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 N FBADJ,FBRRMK
5 D HOME^%ZIS S FBAAOUT=0 K ^TMP($J,"FBWP") D DT^DICRW
6 I '$D(^FBAA(162.1,"AC",1)) W !!,"There are no Fee Basis prescriptions Pending Pharmacy review" G END
7 D WAIT^DICD S (CNT,L,M)=0 F S L=$O(^FBAA(162.1,"AC",1,L)) Q:L'>0 I $D(^FBAA(162.1,L,"RX","AC",1)) F S M=$O(^FBAA(162.1,L,"RX","AC",1,M)) Q:M'>0 S CNT=CNT+1
8 W !!,*7,"There are ",CNT," Fee Prescription(s) Pending Pharmacy review"
9ASKRV Q:CNT'>0 W ! S DIR("A")="Want to review some now",DIR("B")="Yes",DIR(0)="Y" D ^DIR K DIR G END:$D(DIRUT)!('Y)
10RDIN W ! S FBAAOUT=0,DIC="^FBAA(162.1,",DIC(0)="AEQ",DIC("S")="S ZZ=^(0) I $P(ZZ,U,5)=1&($D(^FBAA(162.1,+ZZ,""RX"",""AC"",1))) K ZZ" D ^DIC K DIC G END:X=""!(X="^"),HELPI^FBAAPP0:X["?" S FBJ=+Y
11 L +^FBAA(162.1,"AC",1,FBJ):1 G:'$T ALRDY^FBAAPP0 I $D(^FBAA(162.1,FBJ,"RX","AC",1)) S FBK=0 F S FBK=$O(^FBAA(162.1,FBJ,"RX","AC",1,FBK)) Q:FBK'>0!(FBAAOUT) I $D(^FBAA(162.1,FBJ,"RX",FBK,0)) S FBY(0)=^(0) D GOT,CHK:$D(^FBAA(162.1,"AC",1))
12 L -^FBAA(162.1,"AC",1,FBJ) I '$D(^FBAA(162.1,"AC",1)) W !,*7,"No more prescriptions pending review!" G END
13 G RDIN
14END K DFN,FBJ,FBK,Y,X,FBAAOUT,L,CNT,STAT,DA,DAT,DIC,FBAAGP,FBAAPR,FBDX,FDT,SSN,HY,I,T,VIFN,Z,ZZ,VAL,FBAASC,M,W,FBY,FBASSOC,FB583,FB7078,FBPROG,FBTYPE,FBDMRA,FBAUT,^TMP($J,"FBWP")
15 K FBNO1,FBNO2,FBDA,FBDRUG,PI,DIRUT,DTOUT,DUOUT
16 Q
17GOT S STAT=2,DFN=$P(FBY(0),"^",5) Q:'$D(^DPT(+DFN,0))
18 S FBPROG=$P($G(^FBAA(162.1,FBJ,"RX",FBK,2)),"^",7),FBPROG=$S(FBPROG:"I FBI="_FBPROG,1:"")
19 S HY=Y,PI="" D ^FBAADEM
20 D FBPH^FBAAUTL2 W ! F X=1:1:IOM-1 W "-"
21 I $Y+5>IOSL,$E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR Q:'Y W @IOF
22 S Y=HY,VIFN=$P(^FBAA(162.1,FBJ,0),"^",4)
23 W !!,"Vendor: ",$P($G(^FBAAV(+VIFN,0)),"^"),!
24 I $P(FBY(0),"^",20)="R" W *7,!?20,">> PATIENT REIMBURSEMENT <<",!
25 S FDT=$P(FBY(0),"^",3) W !,"Prescription #: ",$P(FBY(0),"^")," Drug: ",$P(FBY(0),"^",2),!!,"Fill Date: ",$E(FDT,4,5),"/",$E(FDT,6,7),"/",$E(FDT,2,3)," Strength: ",$P(FBY(0),"^",12)
26 W " Qty: ",$P(FBY(0),"^",13)
27DIR ; DISPLAY FOR PHARMACY EDIT
28 S (FBAAGP,FBAAPR,FBDA,FBDRUG,FBNO1,FBNO2)="" K FBADJ,FBRRMK
29 I '$D(IOM) D HOME^%ZIS
30DIR1 S DIR("A")="Is Prescription for an Authorized Condition"
31 S DIR("B")=$S(FBNO1'="":FBNO1,1:"Yes")
32 S DIR(0)="Y",DIR("?")="A 'No' answer will deny payment."
33 D ^DIR K DIR Q:$D(DIRUT)
34 I Y S FBNO1="Yes"
35 I 'Y S FBNO1="No" D D NO1^FBAAPP0 Q:'$D(FBADJ) G REVIEW
36 . S (FBAAGP,FBDA,FBDRUG,FBNO2)=""
37 ;
38 S DIR("A")="Was a Generic Drug issued to patient"
39 S DIR("B")=$S(FBAAGP'="":FBAAGP,1:"Yes")
40 S DIR(0)="Y"
41 S DIR("?")="A 'No' answer alerts FEE to pay the generic equivalent, if one exists."
42 D ^DIR K DIR Q:$D(DIRUT)
43 S FBAAGP=$S(Y:"Yes",1:"No")
44 ;
45 S DIR("A")="Enter VA Generic Drug equivalent"
46 I FBDRUG'="" S DIR("B")=FBDRUG
47 S DIR("?")="Match the drug entered by FEE to an entry in the VA Drug file."
48 S DIR(0)="Pr^50:EM"
49 D ^DIR K DIR Q:$D(DIRUT)!('Y)
50 S FBDA=+Y,FBDRUG=$P(Y,"^",2)
51 ;
52 S DIR("A")="Is this an emergency medication"
53 S DIR("B")=$S(FBNO2'="":FBNO2,1:"Yes")
54 S DIR("?")="A 'No' answer will DENY payment."
55 S DIR(0)="Y"
56 D ^DIR K DIR Q:$D(DIRUT)
57 I Y S FBNO2="Yes" K FBADJ,FBRRMK
58 I 'Y S FBNO2="No" D NO1^FBAAPP0 Q:'$D(FBADJ)
59 ;
60REVIEW W !
61 S DIR("A")="Optional Pharmacy Remarks "
62 S:FBAAPR]"" DIR("B")=FBAAPR
63 S DIR(0)="162.11,22"
64 K DA
65 D ^DIR K DIR Q:$D(DUOUT)!($D(DTOUT))
66 S FBAAPR=Y
67 ;
68 W ! F I=1:1:IOM-2 W "-"
69 W !!?22,">>> PRESCRIPTION REVIEW <<<",!
70 W !,"Rx for Authorized condition: ",FBNO1
71 W ?36,"Emergency Medication: ",FBNO2
72 W !,"Generic Drug Issued: ",FBAAGP
73 W ?36,"Generic Drug Name: ",$E(FBDRUG,1,25)
74 I $D(FBADJ) D
75 . N FBI
76 . W !!,"Current list of Adjustments: "
77 . I '$O(FBADJ(0)) W "none"
78 . S FBI=0 F S FBI=$O(FBADJ(FBI)) Q:'FBI D
79 . . W ?30,"Code: "
80 . . W:$P(FBADJ(FBI),U)]"" $P($G(^FB(161.91,$P(FBADJ(FBI),U),0)),U)
81 . . W ?44,"Group: "
82 . . W:$P(FBADJ(FBI),U,2)]"" $P($G(^FB(161.92,$P(FBADJ(FBI),U,2),0)),U)
83 . . W ?56,"Amount: "
84 . . W "$",$FN($P(FBADJ(FBI),U,3),"",2),!
85 . W !!,"Current list of Remittance Remarks: "
86 . I '$O(FBRRMK(0)) W "none"
87 . S FBI=0 F S FBI=$O(FBRRMK(FBI)) Q:'FBI D
88 . . W:$P(FBRRMK(FBI),U)]"" $P($G(^FB(161.93,$P(FBRRMK(FBI),U),0)),U),", "
89 W !!,"Optional Pharmacy Remarks: ",FBAAPR
90 ;
91 W !
92 S DIR("A")="Want to edit prior to release"
93 S DIR(0)="Y",DIR("B")="No"
94 D ^DIR K DIR Q:$D(DIRUT) G DIR1:Y
95 ;
96 I $D(FBADJ) G GOON^FBAAPP0
97 S $P(FBY(0),"^",10)=FBDA
98 S $P(FBY(0),"^",11)=1
99 S $P(FBY(0),"^",14)=DUZ
100 S $P(FBY(0),"^",15)=DT
101 S $P(FBY(0),"^",9)=2
102 G RSET^FBAAPP0
103 ;
104CHK S FBAAOUT=0 W ! S DIR("A")="Want to review another Prescription",DIR("B")="Yes",DIR(0)="Y" D ^DIR K DIR S:'Y FBAAOUT=1 K ^TMP($J,"FBWP"),FBDRUG
105 Q
Note: See TracBrowser for help on using the repository browser.