source: FOIAVistA/trunk/r/FEE_BASIS-FB/FBAAEPI1.m@ 1679

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1FBAAEPI1 ;WOIFO/SAB-EDIT PREVIOUSLY ENTERED PHARMACY INVOICE (cont) ;7/9/2003
2 ;;3.5;FEE BASIS;**61**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5CKINVEDI(FBFPPSC0,FBFPPSC1,FBDA1) ; Check Invoice for EDI
6 ; Input
7 ; FBFPPSC0 - old FPPS CLAIM ID
8 ; FBFPPSC1 - new FPPS CLAIM ID
9 ; FBDA1 - invoice (internal entry number)
10 ; Result
11 ; Prescriptions on invoice may be updated (FPPS LINE ITEM)
12 ;
13 ; If FBFPPSC0]"",FBFPPSC1="" then EDI changed from YES to NO
14 ; need to delete FPPS LINE ITEM
15 ; If FBFPPSC0="",FBFPPSC1]"" then EDI changed from NO to YES
16 ; need to prompt FPPS LINE ITEM
17 ; If FBFPPSC0]"",FBFPPSC1]"",FBFPPSC0'=FBFPPSC1 then
18 ; EDI stayed YES, but FPPS CLAIM ID was changed
19 ; prescriptions do not need to be updated
20 ;
21 N FBASKLN,FBDA,FBFDA,FBFPPSL,FBIENS,FBUPDLN
22 ;
23 I FBFPPSC0=FBFPPSC1 Q ; FPPS CLAIM ID was not changed
24 I FBFPPSC0]"",FBFPPSC1]"" Q ; EDI status not changed
25 ;
26 S (FBASKLN,FBUPDLN)=0
27 I FBFPPSC0]"",FBFPPSC1="" S FBFPPSL="@",FBUPDLN=1
28 I FBFPPSC0="",FBFPPSC1]"" S (FBASKLN,FBUPDLN)=1
29 ;
30 W !!,"EDI Claim from FPPS was changed. Updating each Rx on invoice..."
31 I FBASKLN D
32 . W !,"Since EDI Claim from FPPS was changed from NO to YES, the"
33 . W !,"FPPS LINE ITEM must be entered for each Rx on the invoice."
34 ;
35 ; loop thru Rx on invoice
36 S FBDA=0 F S FBDA=$O(^FBAA(162.1,FBDA1,"RX",FBDA)) Q:'FBDA D
37 . S FBIENS=FBDA_","_FBDA1_","
38 . I FBASKLN D DSPLIL(FBDA1,FBDA) S FBFPPSL=$$FPPSL^FBUTL5(,,1)
39 . I FBUPDLN,$G(FBFPPSL)]"" S FBFDA(162.11,FBIENS,36)=FBFPPSL
40 I $D(FBFDA) D FILE^DIE("","FBFDA") D MSG^DIALOG()
41 ;
42 W !,"Finished updating FPPS LINE ITEM on each Rx.",!
43 Q
44 ;
45DSPLIL(FBDA1,FBDA) ; Display Invoice Line (Rx)
46 ; input
47 ; FBDA1 - invoice ien
48 ; FBDA - prescription ien
49 N DFN,FBAC,FBDRUG,FBPATN,FBPID,FBQTY,FBRX,FBSTR,FBY
50 S FBY=$G(^FBAA(162.1,FBDA1,"RX",FBDA,0))
51 S DFN=+$P(FBY,"^",5)
52 S FBPATN=$$VET^FBUCUTL(DFN)
53 S FBPID=$$SSN^FBAAUTL(DFN)
54 S FBDRUG=$P(FBY,"^",2)
55 S FBRX=$P(FBY,"^")
56 S FBSTR=$P(FBY,"^",12)
57 S FBQTY=$P(FBY,"^",13)
58 S FBAC=$P(FBY,"^",4)
59 W !!,"Patient: ",FBPATN," Patient ID: ",FBPID
60 W !,"Drug Name",?32," RX # "," Strength "," Qty"," Amt Claimed ",!,$$REPEAT^XLFSTR("-",78)
61 W !,FBDRUG,?34,FBRX,?43,FBSTR,?54,FBQTY,?63,FBAC
62 Q
63 ;
64 ;FBAAEPI
Note: See TracBrowser for help on using the repository browser.