source: WorldVistAEHR/trunk/r/FEE_BASIS-FB/FBNHEP1.m@ 1226

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1FBNHEP1 ;AISC/GRR-PAYMENT PROCESS CONTINUED ;7/8/2003
2 ;;3.5;FEE BASIS;**12,61**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 N FBADJ,FBRRMK,FBX,FBFPPSC,FBFPPSL
5 K FBAAID,FBAAVID D GETNXI^FBAAUTL W !!,"Invoice # ",FBAAIN," assigned to this invoice"
6 S DIC="^FBAAI(",X=FBAAIN,DIC(0)="L",DLAYGO=162.5 D ^DIC S DA=+Y K DLAYGO
7RID D GETINDT^FBAACO1 G DEL:$G(FBAAOUT)
8 S DIE=DIC,FBNL=""
9 S FBI7078=FB7078_";FB7078("
10 S DR="1////^S X=FBAAID;46////^S X=FBAAVID;47////^S X=1;2////^S X=IFN;3////^S X=DFN;20////^S X=FBBAT;55"
11 S DR(1,162.5,1)="S FBFPPSC=$$FPPSC^FBUTL5();S:FBFPPSC=-1 Y=0;S:FBFPPSC="""" Y=""@20"";56///^S X=FBFPPSC;S FBFPPSL=$$FPPSL^FBUTL5(,1);S:FBFPPSL=-1 Y=0;57///^S X=FBFPPSL;@20;54//^S X=$G(FBTRDYS)"
12 S DR(1,162.5,2)="7;S FBNHAC=X;5////^S X=$S(FBPAYDT>FBAABDT:(FBPAYDT+1),1:FBAABDT);6////^S X=FBENDDT;8//^S X=$S(FBNHAC>FBDEFP:FBDEFP,1:FBNHAC);S FBAMTP=X"
13 S DR(1,162.5,3)="S FBX=$$ADJ^FBUTL2(FBNHAC-FBAMTP,.FBADJ,1);S:FBX=0 Y=0"
14 S DR(1,162.5,4)="S FBX=$$RR^FBUTL4(.FBRRMK,2);S:FBX=0 Y=0"
15 S DR(1,162.5,5)="11////^S X=7;12////^S X=FBAAPTC;23////^S X=FBPSA;4////^S X=FBI7078;21////^S X=FBPOV;22////^S X=FBPT;S FBTST=1"
16 D ^DIE I '$G(FBTST) W !,*7,"Entering an '^' will delete this payment" S DIR(0)="Y",DIR("A")="Shall I delete",DIR("B")="No" D ^DIR G DEL:$D(DIRUT)!(Y),RID
17 ; file adjustment reasons
18 D FILEADJ^FBCHFA(DA_",",.FBADJ)
19 ; file remittance remarks
20 D FILERR^FBCHFR(DA_",",.FBRRMK)
21 K FBTST G GETVET^FBNHEP
22DEL S DIK="^FBAAI(" W !!,"Deleting Invoice !" D ^DIK K DIK G GETVET^FBNHEP
23 Q
24PROB W !,*7,"The patient was not in this vendor's facility for the month and year selected!",!,"Use the Display Episode of Care option to review this veteran's activity!" S FBERR=1
25 Q
26 ;
27TRUB W !!,*7,"Check Contract data for Community Nursing Home: ",$P(^FBAAV(IFN,0),"^",1),!,"It is not complete",!! S FBERR=1 Q
28 ;
29DAYS(X) ;CALCULATES THE NUMBER OF DAYS IN MONTH
30 N X1
31 S X1=X,X=+$E(X,4,5),X=$S("^1^3^5^7^8^10^12^"[("^"_X_"^"):31,X=2:28,1:30)
32 I X=28 D
33 . N YEAR
34 . S YEAR=$E(X1,1,3)+1700
35 . I $S(YEAR#400=0:1,YEAR#4=0&'(YEAR#100=0):1,1:0) S X=29
36 Q X
Note: See TracBrowser for help on using the repository browser.