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

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1IBCNSMR6 ;ALB/TJK - MRA EXTRACT ; 02-SEPT-97
2 ;;2.0;INTEGRATED BILLING;**146**;21-MAR-94
3 ; -Queue task to create MRA Extract file
4 N IBABEG,IBAEND,DIR,SITE,EXDATE,FILENM,PATH,DTOUT,DUOUT
5 I '$D(DT) D DT^DICRW
6 W !!,"Build MRA Extract"
7 I '$G(DUZ) D G END
8 .W !!,"Your user number (DUZ) must be defined before proceeding!"
9 W !!
10 W !,"This program extracts data from the AR and IB packages and"
11 W !,"sends it to the VA CFO office for analysis. A background job"
12 W !,"called 'IB-Compile MRA statistics' will be queued to run at a time"
13 W !,"you choose. A file will be created with the extracted info"
14 W !,"will have to be FTPed to a designated IP address. The file will"
15 W !,"have a format: MRA_SITE #_MMDDYYYY.DAT."
16 W !!,"This extract must be run on the Legacy sites as well as "
17 W !,"the Primary site if you are an integrated database facility."
18 W !!
19 ; - specify the default file directory
20DIR S DIR(0)="FO"
21 S DIR("A")="Volume/Directory (or return to accept the default directory)"
22 S DIR("?")="Enter using format VA3$:[ANONYMOUS.PUB]"
23 W !
24 D ^DIR
25 K DIR
26 G END:$D(DUOUT)!($D(DTOUT))
27 K PATH
28 I Y]"" S PATH=Y
29 I '$D(PATH) S PATH=$$PWD^%ZISH I PATH="" W !,*7,"Unable to determine default directory. Please enter one." G DIR
30 ;
31 ; - be sure file can be opened
32 S SITE=$P($$SITE^VASITE,"^",3)
33 S EXDATE=$E(DT,4,5)_$E(DT,6,7)_($E(DT,1,3)+1700)
34 S FILENM="MRA"_SITE_EXDATE_".DAT"
35 D OPEN^%ZISH("MRAEXTRACT",PATH,FILENM,"W")
36 I POP W !,*7,"Unable to create file in specified volume/directory" G DIR
37 D CLOSE^%ZISH("MRAEXTRACT")
38 I '$O(^IBE(350.9,1,99,0)) W !!,"You must enter the list of Insurance Companies to be included in this extract first",!! D BLD1^IBCNSMRE
39 I '$O(^IBE(350.9,1,99,0)) G END
40 W ! S DIR(0)="DA",DIR("A")="Enter Start Date for MRA Extract: ",DIR("B")="Jan. 1,1995",DIR("?")="Enter the earliest date for which Means test charges will be extracted"
41 D ^DIR G END:'Y S IBABEG=Y
42 W ! S DIR(0)="DA",DIR("A")="Enter End Date for MRA Extract: ",DIR("B")="Dec. 31, 1996",DIR("?")="Enter the latest date for which Means test charges will be extracted"
43 D ^DIR G END:'Y S IBAEND=Y
44 ;
45QUE ; -- que compilation to run
46 W !!,"This will automatically be tasked to run. Upon completion of the extract A mail message will be sent to you.",!
47 S ZTIO="",IO("Q")=1
48 S ZTDESC="IB-Compile MRA statistics",ZTRTN="DQ^IBCNSMR7",(ZTSAVE("DUZ"),ZTSAVE("IBABEG"),ZTSAVE("IBAEND"),ZTSAVE("FILENM"),ZTSAVE("SITE"),ZTSAVE("PATH"))=""
49 D ^%ZTLOAD
50 W $S($G(ZTSK):"Job queued ("_ZTSK_")",1:"Task not queued!")
51 K ZTSK,ZTIO,ZTDESC,ZTRTN,ZTSAVE,IO("Q")
52 ;
53END ; -- end of program
54 K C,I,J,POP,X,Y,ZTSK,ZTSAVE,ZTDESC,ZTRTN,IBPRNT,IBSNDRPT,IBQUIT
55 D ^%ZISC
56 Q
57 ;
58POSTINIT ;Purges old data in 350.9, node 99
59 ;Resets '0' node of subfile
60 K ^IBE(350.9,1,99)
61 S ^IBE(350.9,1,99,0)="^350.999PA"
62 Q
Note: See TracBrowser for help on using the repository browser.