source: WorldVistAEHR/trunk/r/FEE_BASIS-FB/FBCHEP1.m@ 1556

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

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1FBCHEP1 ;AISC/DMK-EDIT PAYMENT FOR CONTRACT HOSPITAL ;7/8/2003
2 ;;3.5;FEE BASIS;**38,61**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4EDIT ;ENTRY POINT TO EDIT PAYMENT
5 S IOP=$S($D(ION):ION,1:"HOME") D ^%ZIS K IOP
6BT W ! S DIC="^FBAA(161.7,",DIC(0)="AEQMZ",DIC("S")="I $P(^(0),U,3)=""B9""&($P(^(0),U,15)=""Y"")",DIC("S")=$S($D(^XUSEC("FBAASUPERVISOR",DUZ)):DIC("S"),1:DIC("S")_"&($P(^(0),U,5)=DUZ)") D ^DIC
7 G END:X=""!(X="^"),BT:Y<0 S FBN=+Y,FBN(0)=Y(0)
8 S FBEXMPT=$P(FBN(0),"^",18)
9 S FBSTAT=^FBAA(161.7,FBN,"ST"),FBBAMT=$S($P(FBN(0),"^",9)="":0,1:$P(FBN(0),"^",9))
10 I FBSTAT="C"&('$D(^XUSEC("FBAASUPERVISOR",DUZ))) W !!,*7,?3,"You must Reopen the batch prior to editting the invoice.",! G END
11 I FBSTAT="S"!(FBSTAT="P")!(FBSTAT="R")&('$D(^XUSEC("FBAASUPERVISOR",DUZ))) W !!,*7,?3,"You must be a holder of the 'FBAASUPERVISOR' security key",!,?3,"to edit this invoice.",! G END
12 I FBSTAT="T"!(FBSTAT="V") W !!,?3,"Batch has already been sent to Austin for payment.",! G END
13INV W ! S DIC="^FBAAI(",DIC(0)="AEQZ",DIC("S")="I $P(^(0),U,17)=FBN" D ^DIC K DIC("S") G BT:X=""!(X="^"),INV:Y<0 S FBI=+Y
14 S FBK=$S($P(^FBAAI(FBI,0),"^",9)="":0,1:$P(^(0),"^",9))
15 S FBLISTC="",FBAAI=FBI W @IOF D START^FBCHDI2 S FBI=FBAAI I $P(^FBAAI(FBI,0),"^",9)="" S FBPRICE=""
16 ; set FB1725 flag = true if payment for a 38 U.S.C. 1725 claim
17 D
18 . N FBY
19 . S FBY=$G(^FBAAI(FBI,0))
20 . S FB1725=$S($P(FBY,U,5)["FB583":+$P($G(^FB583(+$P(FBY,U,5),0)),U,28),1:0)
21 ; get values of FPPS Claim ID and Line Item
22 S FBFPPSC=$P($G(^FBAAI(FBI,3)),U)
23 S FBFPPSL=$P($G(^FBAAI(FBI,3)),U,2)
24 ; load current adjustment data
25 D LOADADJ^FBCHFA(FBI_",",.FBADJ)
26 ; save adjustment data prior to edit session in sorted list
27 S FBADJL(0)=$$ADJL^FBUTL2(.FBADJ) ; sorted list of original adjustments
28 ; load current remittance remark data
29 D LOADRR^FBCHFR(FBI_",",.FBRRMK)
30 ; save remittance remarks prior to edit session in sorted list
31 S FBRRMKL(0)=$$RRL^FBUTL4(.FBRRMK)
32 S (DIE,DIC)="^FBAAI(",DIC(0)="AEQM",DA=FBI,DR="[FBCH EDIT PAYMENT]" W ! D ^DIE
33 ; if adjustment data changed then file
34 I $$ADJL^FBUTL2(.FBADJ)'=FBADJL(0) D FILEADJ^FBCHFA(FBI_",",.FBADJ)
35 ; if remit remark data changed then file
36 I $$RRL^FBUTL4(.FBRRMK)'=FBRRMKL(0) D FILERR^FBCHFR(FBI_",",.FBRRMK)
37 K FBAAMM,FBAAMM1
38 S FBNK=$P(^FBAAI(FBI,0),"^",9)
39 I FBNK-FBK S $P(^FBAA(161.7,FBN,0),"^",9)=FBBAMT+(FBNK-FBK)
40END K DA,DFN,DIC,DIE,DR,FBAAOUT,FBDX,FBI,FBIN,FBLISTC,FBN,FBPROC,FBSTAT,FBVEN,FBVID,J,K,L,POP,Q,VA,VADM,X,FBIFN,Y,FBPRICE,FBK,FBNK,FB583,FBAAPN,FBASSOC,FBDEL,FBLOC,DAT
41 K CNT,D0,FB7078,FBAABDT,FBAAEDT,FBASSOC,FBAUT,FBLOC,FBPROG,FBPSA,FBPT,FBRR,FBTT,FBTYPE,FBXX,FTP,PI,PTYPE,T,Z,ZZ,F,FBPOV,I,TA,VAL,DUOUT,FBVET,FBBAMT,FBAAI,FBEXMPT,FB1725,FBPAMT
42 K FBFPPSC,FBFPPSL,FBADJ,FBADJD,FBRRMK,FBRRMKD
43 D END^FBCHDI
44 Q
Note: See TracBrowser for help on using the repository browser.