FBAAEPI1 ;WOIFO/SAB-EDIT PREVIOUSLY ENTERED PHARMACY INVOICE (cont) ;7/9/2003
;;3.5;FEE BASIS;**61**;JAN 30, 1995
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
CKINVEDI(FBFPPSC0,FBFPPSC1,FBDA1) ; Check Invoice for EDI
; Input
; FBFPPSC0 - old FPPS CLAIM ID
; FBFPPSC1 - new FPPS CLAIM ID
; FBDA1 - invoice (internal entry number)
; Result
; Prescriptions on invoice may be updated (FPPS LINE ITEM)
;
; If FBFPPSC0]"",FBFPPSC1="" then EDI changed from YES to NO
; need to delete FPPS LINE ITEM
; If FBFPPSC0="",FBFPPSC1]"" then EDI changed from NO to YES
; need to prompt FPPS LINE ITEM
; If FBFPPSC0]"",FBFPPSC1]"",FBFPPSC0'=FBFPPSC1 then
; EDI stayed YES, but FPPS CLAIM ID was changed
; prescriptions do not need to be updated
;
N FBASKLN,FBDA,FBFDA,FBFPPSL,FBIENS,FBUPDLN
;
I FBFPPSC0=FBFPPSC1 Q ; FPPS CLAIM ID was not changed
I FBFPPSC0]"",FBFPPSC1]"" Q ; EDI status not changed
;
S (FBASKLN,FBUPDLN)=0
I FBFPPSC0]"",FBFPPSC1="" S FBFPPSL="@",FBUPDLN=1
I FBFPPSC0="",FBFPPSC1]"" S (FBASKLN,FBUPDLN)=1
;
W !!,"EDI Claim from FPPS was changed. Updating each Rx on invoice..."
I FBASKLN D
. W !,"Since EDI Claim from FPPS was changed from NO to YES, the"
. W !,"FPPS LINE ITEM must be entered for each Rx on the invoice."
;
; loop thru Rx on invoice
S FBDA=0 F S FBDA=$O(^FBAA(162.1,FBDA1,"RX",FBDA)) Q:'FBDA D
. S FBIENS=FBDA_","_FBDA1_","
. I FBASKLN D DSPLIL(FBDA1,FBDA) S FBFPPSL=$$FPPSL^FBUTL5(,,1)
. I FBUPDLN,$G(FBFPPSL)]"" S FBFDA(162.11,FBIENS,36)=FBFPPSL
I $D(FBFDA) D FILE^DIE("","FBFDA") D MSG^DIALOG()
;
W !,"Finished updating FPPS LINE ITEM on each Rx.",!
Q
;
DSPLIL(FBDA1,FBDA) ; Display Invoice Line (Rx)
; input
; FBDA1 - invoice ien
; FBDA - prescription ien
N DFN,FBAC,FBDRUG,FBPATN,FBPID,FBQTY,FBRX,FBSTR,FBY
S FBY=$G(^FBAA(162.1,FBDA1,"RX",FBDA,0))
S DFN=+$P(FBY,"^",5)
S FBPATN=$$VET^FBUCUTL(DFN)
S FBPID=$$SSN^FBAAUTL(DFN)
S FBDRUG=$P(FBY,"^",2)
S FBRX=$P(FBY,"^")
S FBSTR=$P(FBY,"^",12)
S FBQTY=$P(FBY,"^",13)
S FBAC=$P(FBY,"^",4)
W !!,"Patient: ",FBPATN," Patient ID: ",FBPID
W !,"Drug Name",?32," RX # "," Strength "," Qty"," Amt Claimed ",!,$$REPEAT^XLFSTR("-",78)
W !,FBDRUG,?34,FBRX,?43,FBSTR,?54,FBQTY,?63,FBAC
Q
;
;FBAAEPI
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBAAEPI1 2342 printed Oct 16, 2024@17:56:13 Page 2
FBAAEPI1 ;WOIFO/SAB-EDIT PREVIOUSLY ENTERED PHARMACY INVOICE (cont) ;7/9/2003
+1 ;;3.5;FEE BASIS;**61**;JAN 30, 1995
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
CKINVEDI(FBFPPSC0,FBFPPSC1,FBDA1) ; Check Invoice for EDI
+1 ; Input
+2 ; FBFPPSC0 - old FPPS CLAIM ID
+3 ; FBFPPSC1 - new FPPS CLAIM ID
+4 ; FBDA1 - invoice (internal entry number)
+5 ; Result
+6 ; Prescriptions on invoice may be updated (FPPS LINE ITEM)
+7 ;
+8 ; If FBFPPSC0]"",FBFPPSC1="" then EDI changed from YES to NO
+9 ; need to delete FPPS LINE ITEM
+10 ; If FBFPPSC0="",FBFPPSC1]"" then EDI changed from NO to YES
+11 ; need to prompt FPPS LINE ITEM
+12 ; If FBFPPSC0]"",FBFPPSC1]"",FBFPPSC0'=FBFPPSC1 then
+13 ; EDI stayed YES, but FPPS CLAIM ID was changed
+14 ; prescriptions do not need to be updated
+15 ;
+16 NEW FBASKLN,FBDA,FBFDA,FBFPPSL,FBIENS,FBUPDLN
+17 ;
+18 ; FPPS CLAIM ID was not changed
IF FBFPPSC0=FBFPPSC1
QUIT
+19 ; EDI status not changed
IF FBFPPSC0]""
IF FBFPPSC1]""
QUIT
+20 ;
+21 SET (FBASKLN,FBUPDLN)=0
+22 IF FBFPPSC0]""
IF FBFPPSC1=""
SET FBFPPSL="@"
SET FBUPDLN=1
+23 IF FBFPPSC0=""
IF FBFPPSC1]""
SET (FBASKLN,FBUPDLN)=1
+24 ;
+25 WRITE !!,"EDI Claim from FPPS was changed. Updating each Rx on invoice..."
+26 IF FBASKLN
Begin DoDot:1
+27 WRITE !,"Since EDI Claim from FPPS was changed from NO to YES, the"
+28 WRITE !,"FPPS LINE ITEM must be entered for each Rx on the invoice."
End DoDot:1
+29 ;
+30 ; loop thru Rx on invoice
+31 SET FBDA=0
FOR
SET FBDA=$ORDER(^FBAA(162.1,FBDA1,"RX",FBDA))
if 'FBDA
QUIT
Begin DoDot:1
+32 SET FBIENS=FBDA_","_FBDA1_","
+33 IF FBASKLN
DO DSPLIL(FBDA1,FBDA)
SET FBFPPSL=$$FPPSL^FBUTL5(,,1)
+34 IF FBUPDLN
IF $GET(FBFPPSL)]""
SET FBFDA(162.11,FBIENS,36)=FBFPPSL
End DoDot:1
+35 IF $DATA(FBFDA)
DO FILE^DIE("","FBFDA")
DO MSG^DIALOG()
+36 ;
+37 WRITE !,"Finished updating FPPS LINE ITEM on each Rx.",!
+38 QUIT
+39 ;
DSPLIL(FBDA1,FBDA) ; Display Invoice Line (Rx)
+1 ; input
+2 ; FBDA1 - invoice ien
+3 ; FBDA - prescription ien
+4 NEW DFN,FBAC,FBDRUG,FBPATN,FBPID,FBQTY,FBRX,FBSTR,FBY
+5 SET FBY=$GET(^FBAA(162.1,FBDA1,"RX",FBDA,0))
+6 SET DFN=+$PIECE(FBY,"^",5)
+7 SET FBPATN=$$VET^FBUCUTL(DFN)
+8 SET FBPID=$$SSN^FBAAUTL(DFN)
+9 SET FBDRUG=$PIECE(FBY,"^",2)
+10 SET FBRX=$PIECE(FBY,"^")
+11 SET FBSTR=$PIECE(FBY,"^",12)
+12 SET FBQTY=$PIECE(FBY,"^",13)
+13 SET FBAC=$PIECE(FBY,"^",4)
+14 WRITE !!,"Patient: ",FBPATN," Patient ID: ",FBPID
+15 WRITE !,"Drug Name",?32," RX # "," Strength "," Qty"," Amt Claimed ",!,$$REPEAT^XLFSTR("-",78)
+16 WRITE !,FBDRUG,?34,FBRX,?43,FBSTR,?54,FBQTY,?63,FBAC
+17 QUIT
+18 ;
+19 ;FBAAEPI