source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBECUS.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1IBECUS ;RLM/DVAMC - TRICARE PHARMACY ENGINE OPTIONS ; 14-AUG-96
2 ;;2.0;INTEGRATED BILLING;**52,240**;21-MAR-94
3 ;
4START ; Start the TRICARE Transaction and AWP Update engines.
5 K IBERR D PAR
6 ;
7 ; - parameters are not set up completely
8 I $O(IBERR(0)) D G STARTQ
9 .W !!,"The TRICARE Billing engines cannot be started!",*7
10 .W ! S I=0 F S I=$O(IBERR(I)) Q:'I W !,IBERR(I)
11 .I IBAPORT="" W !!," *** Note that the AWP Update port has also not been defined."
12 ;
13 ; - AWP and billing ports must be unique
14 I IBBPORT=IBAPORT W !!,"The Billing Transaction and AWP Update ports cannot be the same!" G STARTQ
15 ;
16 ; - only start the billing job if the AWP port is not defined
17 I IBAPORT="" W !!,"The AWP Update port has not been defined. The AWP Update task will not start."
18 ;
19 I IBVOL]"" W !!,"Note that these jobs will be queued to run on ",IBVOL,"."
20 ;
21 ; - okay to queue these jobs?
22 S DIR(0)="Y",DIR("A")="Is it okay to queue these jobs to run"
23 S DIR("?",1)="Enter: 'Y' if you wish to task off this job, or"
24 S DIR("?")=" 'N' or '^' to quit this option."
25 W ! D ^DIR
26 I 'Y W !!,"The jobs have not been queued to run." G STARTQ
27 ;
28 ; - turn off the 'shutdown filer' flag
29 S $P(^IBE(350.9,1,9),"^",10)=0
30 ;
31 ; - queue the primary billing task
32 S ZTRTN="BILLP^IBECUS1",ZTDTH=$H,ZTIO=""
33 S ZTDESC="IB - TRICARE Primary Billing Task"
34 I IBVOL]"" S ZTCPU=IBVOL
35 F I="IBBPORT","IBCHAN","IBCHSET","IBPRESCR","IBVOL" S ZTSAVE(I)=""
36 D ^%ZTLOAD
37 I '$D(ZTSK) W !!,"Unable to queue the billing task!" G STARTQ
38 ;
39 W !!,"The TRICARE billing engine has been queued as task# ",ZTSK,"."
40 S DA=1,DIE="^IBE(350.9,",DR="9.04////"_ZTSK_";9.05////@" D ^DIE
41 ;
42 ; - the AWP port must be defined to start that job
43 I IBAPORT="" G STARTQ
44 ;
45 ; - queue the primary AWP update task
46 K ZTSAVE,ZTCPU,ZTSK
47 S ZTRTN="AWPP^IBECUS1",ZTDTH=$H,ZTIO=""
48 S ZTDESC="IB - TRICARE Primary AWP Update Task"
49 I IBVOL]"" S ZTCPU=IBVOL
50 F I="IBAPORT","IBCHAN","IBCHSET","IBVOL" S ZTSAVE(I)=""
51 D ^%ZTLOAD S IBATASK=$G(ZTSK)
52 I '$D(ZTSK) W !!,"Unable to queue the AWP Update task!" G STARTQ
53 ;
54 W !!,"The AWP Update engine has been queued as task# ",ZTSK,"."
55 S DA=1,DIE="^IBE(350.9,",DR="9.06////"_ZTSK_";9.07////@" D ^DIE
56 ;
57STARTQ K DIROUT,DTOUT,DUOUT,IBERR,IBAPORT,IBBPORT,IBCHAN,IBVOL,ZTSK
58 Q
59 ;
60 ;
61STOP ; Shut down the TRICARE Transaction and AWP Update engines.
62 I '$P($G(^IBE(350.9,1,9)),"^",4) W !!,"The primary billing task does not appear to be running."
63 ;
64 ; - okay to shut down these jobs?
65 S DIR(0)="Y",DIR("A")="Are you sure you wish to shut down these jobs"
66 S DIR("?",1)="Enter: 'Y' if you wish to shut down these jobs, or"
67 S DIR("?")=" 'N' or '^' to quit this option."
68 W ! D ^DIR
69 I 'Y W !!,"The jobs will not be shut down." G STOPQ
70 ;
71 ; - set the 'shutdown filer' flag
72 S $P(^IBE(350.9,1,9),"^",10)=1
73 ;
74 W !!,"The TRICARE Billing and AWP Update engines will be shut down."
75 ;
76STOPQ K DIR,DUOUT,DTOUT,DIROUT,X,Y
77 Q
78 ;
79 ;
80PAR ; Retrieve the required engine parameters.
81 N X,Y,ZTSK
82 S X=$G(^IBE(350.9,1,9))
83 S IBBPORT=$P(X,"^")
84 I IBBPORT="" S IBERR(1)="The Billing transaction port has not been defined."
85 S IBAPORT=$P(X,"^",2)
86 S IBCHAN=$P(X,"^",3)
87 I IBCHAN="" S IBERR(2)="The TCP/IP address has not been defined."
88 S ZTSK=$P(X,"^",4)
89 I ZTSK D
90 .D STAT^%ZTLOAD
91 .I ZTSK(1)=2 S IBERR(3)="This job appears to be running! Check task #"_ZTSK_"." Q
92 .S $P(^IBE(350.9,1,9),"^",4)=""
93 S IBCHSET=+$P(X,"^",12)
94 I $G(^IBE(363.1,IBCHSET,0))="" S IBERR(4)="You must define a Charge Set in the Charge Master so the drug AWP can be found."
95 S IBPRESCR=$P(X,"^",13)
96 I IBPRESCR="" S IBERR(5)="You must enter your Prescriber ID before this task can be started."
97 S IBVOL=$P(X,"^",11)
98 Q
Note: See TracBrowser for help on using the repository browser.