Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBCNSMR6

IBCNSMR6.m

Go to the documentation of this file.
  1. IBCNSMR6 ;ALB/TJK - MRA EXTRACT ; 02-SEPT-97
  1. ;;2.0;INTEGRATED BILLING;**146**;21-MAR-94
  1. ; -Queue task to create MRA Extract file
  1. N IBABEG,IBAEND,DIR,SITE,EXDATE,FILENM,PATH,DTOUT,DUOUT
  1. I '$D(DT) D DT^DICRW
  1. W !!,"Build MRA Extract"
  1. I '$G(DUZ) D G END
  1. .W !!,"Your user number (DUZ) must be defined before proceeding!"
  1. W !!
  1. W !,"This program extracts data from the AR and IB packages and"
  1. W !,"sends it to the VA CFO office for analysis. A background job"
  1. W !,"called 'IB-Compile MRA statistics' will be queued to run at a time"
  1. W !,"you choose. A file will be created with the extracted info"
  1. W !,"will have to be FTPed to a designated IP address. The file will"
  1. W !,"have a format: MRA_SITE #_MMDDYYYY.DAT."
  1. W !!,"This extract must be run on the Legacy sites as well as "
  1. W !,"the Primary site if you are an integrated database facility."
  1. W !!
  1. ; - specify the default file directory
  1. DIR S DIR(0)="FO"
  1. S DIR("A")="Volume/Directory (or return to accept the default directory)"
  1. S DIR("?")="Enter using format VA3$:[ANONYMOUS.PUB]"
  1. W !
  1. D ^DIR
  1. K DIR
  1. G END:$D(DUOUT)!($D(DTOUT))
  1. K PATH
  1. I Y]"" S PATH=Y
  1. I '$D(PATH) S PATH=$$PWD^%ZISH I PATH="" W !,*7,"Unable to determine default directory. Please enter one." G DIR
  1. ;
  1. ; - be sure file can be opened
  1. S SITE=$P($$SITE^VASITE,"^",3)
  1. S EXDATE=$E(DT,4,5)_$E(DT,6,7)_($E(DT,1,3)+1700)
  1. S FILENM="MRA"_SITE_EXDATE_".DAT"
  1. D OPEN^%ZISH("MRAEXTRACT",PATH,FILENM,"W")
  1. I POP W !,*7,"Unable to create file in specified volume/directory" G DIR
  1. D CLOSE^%ZISH("MRAEXTRACT")
  1. 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
  1. I '$O(^IBE(350.9,1,99,0)) G END
  1. 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"
  1. D ^DIR G END:'Y S IBABEG=Y
  1. 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"
  1. D ^DIR G END:'Y S IBAEND=Y
  1. ;
  1. QUE ; -- que compilation to run
  1. W !!,"This will automatically be tasked to run. Upon completion of the extract A mail message will be sent to you.",!
  1. S ZTIO="",IO("Q")=1
  1. S ZTDESC="IB-Compile MRA statistics",ZTRTN="DQ^IBCNSMR7",(ZTSAVE("DUZ"),ZTSAVE("IBABEG"),ZTSAVE("IBAEND"),ZTSAVE("FILENM"),ZTSAVE("SITE"),ZTSAVE("PATH"))=""
  1. D ^%ZTLOAD
  1. W $S($G(ZTSK):"Job queued ("_ZTSK_")",1:"Task not queued!")
  1. K ZTSK,ZTIO,ZTDESC,ZTRTN,ZTSAVE,IO("Q")
  1. ;
  1. END ; -- end of program
  1. K C,I,J,POP,X,Y,ZTSK,ZTSAVE,ZTDESC,ZTRTN,IBPRNT,IBSNDRPT,IBQUIT
  1. D ^%ZISC
  1. Q
  1. ;
  1. POSTINIT ;Purges old data in 350.9, node 99
  1. ;Resets '0' node of subfile
  1. K ^IBE(350.9,1,99)
  1. S ^IBE(350.9,1,99,0)="^350.999PA"
  1. Q