source: WorldVistAEHR/trunk/r/FEE_BASIS-FB/FBAAOB.m@ 1639

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

initial load of WorldVistAEHR

File size: 3.3 KB
Line 
1FBAAOB ;AISC/GRR-OPEN BATCHES ;29JUL86
2 ;;3.5;FEE BASIS;;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 D:'$D(DT) DT^DICRW D:'$D(FBSITE(1)) SITEP^FBAAUTL G:+$G(FBPOP) KILL
5 I '$D(^FBAA(161.4,1,0)) W !!,*7,"Site Parameters have not been entered. Must be entered",!,"before using this option",! Q
6 S DIC="^FBAA(161.7,",DIC(0)="LQ",DLAYGO=161.7
7RMED S DIR(0)="Y",DIR("A")="Want to create a Medical batch",DIR("B")="YES" D ^DIR K DIR G:$D(DIRUT) KILL I Y D MED,KILL Q
8RPHARM S DIR(0)="Y",DIR("A")="Want to create a Pharmacy Batch",DIR("B")="YES" D ^DIR K DIR G:$D(DIRUT) KILL I Y D PHARM,KILL Q
9 Q:$D(FBPHOPT)
10RTRAV S DIR(0)="Y",DIR("A")="Want to create a Travel Batch",DIR("B")="YES" D ^DIR K DIR G:$D(DIRUT) KILL I Y D TRAV,KILL Q
11 D KILL Q
12TRAV D GETNXB^FBAAUTL W !!,"Travel Batch number assigned is: ",FBBN
13 W !! S X=FBBN,DIC(0)="LEQ",(DIE,DIC)="^FBAA(161.7,",DIC("DR")="",DLAYGO=161.7 D ^DIC K DLAYGO G:Y<0 UHOH S FBDA=+Y
14 D GETOB Q:'$D(FBSTN) S DA=FBDA,DR="[FBAA TRAV IFCAP]" D ^DIE,KILL
15 Q
16MED D GETNXB^FBAAUTL W !!,"Medical Batch number assigned is: ",FBBN
17 W !! S X=FBBN,DIC(0)="LEQ",(DIE,DIC)="^FBAA(161.7,",DIC("DR")="",DLAYGO=161.7 D ^DIC K DLAYGO G:Y<0 UHOH S FBDA=+Y,FBY=Y K DR
18 D GETOB Q:'$D(FBSTN) S DA=FBDA,DR="[FBAA MED IFCAP]" D ^DIE,KILL
19 Q
20PHARM D GETNXB^FBAAUTL W !!,"Pharmacy Batch number assigned is: ",FBBN
21 W !! S X=FBBN,DLAYGO=161.7,DIC(0)="LEQ",(DIE,DIC)="^FBAA(161.7,",DIC("DR")="" D ^DIC G:Y<0 UHOH S FBDA=+Y,FBY=Y K DR,DLAYGO
22 D GETOB Q:'$D(FBSTN) S DA=FBDA,DR="[FBAA PHARM IFCAP]" D ^DIE,KILL
23 Q
24RCHNH I '$D(FBSITE(1)) D SITEP^FBAAUTL G:FBPOP KILL
25 S DIR(0)="Y",DIR("A")="Want to create a Community Nursing Home batch",DIR("B")="YES" D ^DIR K DIR G:$D(DIRUT) KILL I Y D CHNH,KILL
26 D KILL Q
27CHNH D GETNXB^FBAAUTL W !!,"Batch number assigned is: ",FBBN
28 W !! S X=FBBN,DLAYGO=161.7,DIC(0)="LQ",(DIE,DIC)="^FBAA(161.7,",DIC("DR")="" D ^DIC G:Y<0 UHOH S FBDA=+Y K DR,DLAYGO
29 D GETOB Q:'$D(FBSTN) S DA=FBDA,DR="[FB CHNH OPEN BATCH]" D ^DIE,KILL
30 Q
31GETOB S PRCS("A")="Select Obligation Number: " K PRCS("X"),DR S PRCS("TYPE")="FB" D EN1^PRCS58 G:Y=-1 BACKOUT S FBSTN=$E($P(Y,"^",2),1,3),FBOBN=$P($P(Y,"^",2),"-",2) K PRCS D:$S($G(FBSTN)']"":1,$G(FBOBN)']"":1,1:0) BACKOUT Q
32 ;
33BACKOUT S DIK="^FBAA(161.7,",DA=FBDA D ^DIK W !,*7,"Batch # ",FBBN," deleted because Obligation number was not selected!",!,"You must be an authorized user in IFCAP package to select an obligation." K FBSTN Q
34 ;
35RCHOP I '$D(FBSITE(1)) D SITEP^FBAAUTL G:FBPOP KILL
36 S DIR(0)="Y",DIR("A")="Want to create a Contract Hospital Batch",DIR("B")="YES" D ^DIR K DIR G:$D(DIRUT)!('Y) KILL I Y D CH
37 ;FBAABE is set from FBCHEP to ask user to open a new batch
38 I $D(FBAABE) S FBAABE=FBDA
39 D KILL Q
40CH D GETNXB^FBAAUTL W !!,"Batch number assigned is: ",FBBN
41 S DLAYGO=161.7
42 W !! S X=FBBN,DIC(0)="LQ",(DIE,DIC)="^FBAA(161.7,",DIC("DR")="",DLAYGO=161.7 D ^DIC G:Y<0 UHOH S FBDA=+Y K DR,DLAYGO
43 D GETOB Q:'$D(FBSTN) S DA=FBDA,DR="[FB CH OPEN BATCH]" D ^DIE
44 Q
45ANCOB I '$D(FBSITE(1)) D SITEP^FBAAUTL G:FBPOP KILL
46 S DLAYGO=161.7
47 S DIR(0)="Y",DIR("A")="Want to create an Ancillary Payment Medical Batch",DIR("B")="YES" D ^DIR K DIR G:$D(DIRUT) KILL I Y D MED,KILL
48 D KILL Q
49UHOH W !!,*7,"Batch was not created!" Q
50KILL K DA,D,DR,DIC,DIE,DIK,FBDA,FBOBN,FBPOP,FBSTN,FBSITE,Y,FBY,PRC,X,FBBN,Z,DLAYGO,D0,DQ,DIRUT,PRCSCPAN
51 Q
Note: See TracBrowser for help on using the repository browser.