source: FOIAVistA/trunk/r/FEE_BASIS-FB/FBCHFED.m@ 1726

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1FBCHFED ;WOIFO/SAB-FPPS DATA EDIT INPATIENT INVOICE ;8/12/2003
2 ;;3.5;FEE BASIS;**61**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 I '$D(^XUSEC("FBAASUPERVISOR",DUZ)) D Q
6 . W $C(7),!,"You must hold the FBAASUPERVISOR security key to use this option!"
7 ;
8 S FBAAOUT=0
9 F D INVED Q:FBAAOUT
10 D CLEAN
11 Q
12 ;
13INVED ; Invoice Edit
14 ;
15ASKINV ; Select Invoice to Edit
16 W ! S DIC="^FBAAI(",DIC(0)="AEQZ"
17 S DIC("S")="I $P($G(^(3)),U)]""""" ; screen on EDI claim
18 D ^DIC K DIC I Y'>0 S FBAAOUT=1 Q
19 S FBDA=+Y
20 ;
21 I $$CKFPPS^FBFHLL(FBDA)'=1 D G ASKINV
22 . W !?5,"Invoice ",FBDA," has not been transmitted to FPPS."
23 ;
24 ; save FPPS Claim ID and Line Item data prior to edit session
25 S (FBFPPSC,FBFPPSC(0))=$P($G(^FBAAI(FBDA,3)),U)
26 S (FBFPPSL,FBFPPSL(0))=$P($G(^FBAAI(FBDA,3)),U,2)
27 S FBINVCHG=0 ; initialize invoice changed flag
28 ;
29EDITFC ; edit FPPS CLAIM ID
30 S FBX=$$FPPSC^FBUTL5(1,FBFPPSC)
31 I FBX=-1 S FBAAOUT=1 G INVEDX
32 ; need to verify if following restriction is appropriate
33 I FBX="" D G EDITFC
34 . W !,$C(7),"Can not change EDI from YES to NO on invoice that has been sent to FPPS!"
35 S FBFPPSC=FBX
36 ;
37 ; if FPPS CLAIM ID changed, then update file and audit log
38 I FBFPPSC'=FBFPPSC(0) D
39 . ; set invoice changed flag
40 . S FBINVCHG=1
41 . ;
42 . ; file data in 162.5
43 . K FBFDA
44 . S FBFDA(162.5,FBDA_",",56)=$S(FBFPPSC="":"@",1:FBFPPSC)
45 . I $D(FBFDA) D FILE^DIE("","FBFDA") D MSG^DIALOG()
46 . ;
47 . ; add record to audit log
48 . K FBFDA
49 . S FBFDA(163.7,"+1,",.01)=FBDA ; invoice number
50 . S FBFDA(163.7,"+1,",1)=$$NOW^XLFDT() ; date/time changed
51 . S FBFDA(163.7,"+1,",2)=162.5 ; file #
52 . S FBFDA(163.7,"+1,",3)=FBDA_"," ; iens
53 . S FBFDA(163.7,"+1,",4)=56 ; field #
54 . S FBFDA(163.7,"+1,",5)=FBFPPSC(0) ; old value
55 . S FBFDA(163.7,"+1,",6)=FBFPPSC ; new value
56 . S FBFDA(163.7,"+1,",7)=DUZ ; user
57 . I $D(FBFDA) D UPDATE^DIE("","FBFDA") D MSG^DIALOG()
58 ;
59 ;
60EDITFL ; edit FPPS Line Item
61 W !
62 S FBX=$$FPPSL^FBUTL5(FBFPPSL,1)
63 I FBX=-1 S FBAAOUT=1 G INVEDX
64 S FBFPPSL=FBX
65 ;
66 ; if FPPS LINE ITEM changed, then update file and audit log
67 I FBFPPSL'=FBFPPSL(0) D
68 . ; set invoice changed flag
69 . S FBINVCHG=1
70 . ;
71 . ; file data in 162.5
72 . K FBFDA
73 . S FBFDA(162.5,FBDA_",",57)=FBFPPSL
74 . I $D(FBFDA) D FILE^DIE("","FBFDA") D MSG^DIALOG()
75 . ;
76 . ; add record to audit log
77 . K FBFDA
78 . S FBFDA(163.7,"+1,",.01)=FBDA ; invoice number
79 . S FBFDA(163.7,"+1,",1)=$$NOW^XLFDT() ; date/time changed
80 . S FBFDA(163.7,"+1,",2)=162.5 ; file #
81 . S FBFDA(163.7,"+1,",3)=FBDA_"," ; iens
82 . S FBFDA(163.7,"+1,",4)=57 ; field #
83 . S FBFDA(163.7,"+1,",5)=FBFPPSL(0) ; old value
84 . S FBFDA(163.7,"+1,",6)=FBFPPSL ; new value
85 . S FBFDA(163.7,"+1,",7)=DUZ ; user
86 . I $D(FBFDA) D UPDATE^DIE("","FBFDA") D MSG^DIALOG()
87 ;
88INVEDX ; Invoice Edit Exit
89 ; if invoice changed then queue for retransmit to FPPS
90 I FBINVCHG D FILEQUE^FBFHLL(FBDA,9)
91 Q
92 ;
93CLEAN K DIC,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
94 K FBAAOUT,FBDA,FBFDA,FBFPPSC,FBFPPSL,FBINVCHG,FBX
95 Q
96 ;FBCHFED
Note: See TracBrowser for help on using the repository browser.