source: FOIAVistA/trunk/r/FEE_BASIS-FB/FBCHDIN.m@ 1288

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1FBCHDIN ;AISC/DMK-DELETE INPATIENT INVOICE ;1/12/93 08:10
2 ;;3.5;FEE BASIS;;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5BAT ;ask batch Number
6 ;cannot delete an invoice from a batch that has a status of
7 ;supervisor closed, reviewed after pricer, transmitted or vouchered.
8 ;A clerk may delete an invoice in a batch
9 ;they own if the status is open, closed, forwarded to pricer or
10 ;assigned price.
11 ;
12 D HOME^%ZIS
13 W ! S DIC="^FBAA(161.7,",DIC(0)="AEQMZ"
14 S DIC("S")=$S($D(^XUSEC("FBAASUPERVISOR",DUZ)):"I ""TV""'[$G(^(""ST""))",1:"I $P(^(0),U,5)=DUZ&(""TVRS""'[($G(^(""ST""))))")_"&($P(^(0),U,3)=""B9"")"
15 D ^DIC K DIC G END:X=""!(X="^")
16 L +^FBAA(161.7,+Y)
17 S FBBAT=+Y,FBBAT(0)=Y(0)
18 ;
19INV ;get invoice user wants to delete in batch selected
20 W ! S DIC="^FBAAI(",DIC(0)="AEQZ",DIC("S")="I $D(^FBAAI(""AC"",FBBAT,X))"
21 S DIC("A")="Select Invoice to delete: " D ^DIC K DIC I X=""!(X="^") L -^FBAA(161.7,FBBAT) G BAT
22 S FBDINV=Y,FBDINV(0)=Y(0),FBI=+Y,FBLISTC=0 D START^FBCHDI
23 W ! S DIR(0)="Y",DIR("B")="No",DIR("A")="Sure you want to delete this invoice" D ^DIR K DIR G END:$D(DIRUT) I 'Y L -^FBAA(161.7,FBBAT) G BAT
24 ;
25 S DA=+FBDINV,DIK="^FBAAI(" W !?5,".... deleting!",!
26 D ^DIK K DIK
27 ;
28 ;reset batch dollar amount, total payment items and invoice count
29 D CNTTOT^FBAARB(FBBAT)
30 S $P(FBBAT(0),"^",9)=+FBTOTAL
31 S $P(FBBAT(0),"^",10)=+FBLCNT
32 S $P(FBBAT(0),"^",11)=+FBLCNT
33 S:$P(FBBAT(0),"^",10)'>0 $P(FBBAT(0),"^",18)=""
34 S $P(^FBAA(161.7,FBBAT,0),"^",9,11)=$P(FBBAT(0),"^",9,11),$P(^FBAA(161.7,FBBAT,0),"^",18)=$P(FBBAT(0),"^",18)
35END I $G(FBBAT) L -^FBAA(161.7,FBBAT)
36 K DA,FBBAT,FBLISTC,FBDINV,FBAAOUT,FBDX,FBDX1,FBPAT,FBPROC,FBVEN,X,Y,Q
37 D END^FBCHDI Q
Note: See TracBrowser for help on using the repository browser.