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

IBP.m

Go to the documentation of this file.
  1. IBP ;ALB/CPM - ARCHIVE/PURGING OPERATIONS ; 17-APR-92
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. FIND ; Entry point to Find Billing Data to Archive
  1. S IBOP=1 G START
  1. ;
  1. ARCHIVE ; Entry point to Archive Billing Data
  1. S IBOP=2 G START
  1. ;
  1. PURGE ; Entry point to Purge Billing Data
  1. S IBOP=3
  1. ;
  1. ;
  1. START ; Begin search/archive/purge operations.
  1. I $$NODUZ^IBPU1 G END ; no DUZ code
  1. I IBOP>1,$$NOESIG^IBPU1(DUZ) G END ; no Electronic Signature Code
  1. S IBLINE="",$P(IBLINE,"-",80)=""
  1. ;
  1. ; - write header
  1. D HOME^%ZIS
  1. S IBHDR="*** "_$P("Find^Archive^Purge","^",IBOP)_" Billing Data"_$S(IBOP=1:" to Archive",1:"")_" ***"
  1. W @IOF,!?80-$L(IBHDR)\2,IBHDR,!
  1. W !,"This option is used to ",$P("begin the archive process for^archive data from^purge data from","^",IBOP)," the following files:",!
  1. W !?8,"#350 INTEGRATED BILLING ACTION",!?8,"#351 CATEGORY C BILLING CLOCK",!?8,"#399 BILL/CLAIMS",!!
  1. I IBOP=1 W "Specify your search criteria for each file. "
  1. W "The ",$P("search^archiving process^purge process","^",IBOP)," will be queued.",!
  1. ;
  1. ; - issue all operational prompts
  1. K IBD
  1. F I=350,351,399 W !,IBLINE S J=$$ASK^IBPU(I,IBOP) G:J<0 END I J S IBD(I)="" I IBOP=1 S K=$$DAT^IBPU G:K<0 END S IBD(I)=K_"^"_+$P(J,"^",2)
  1. I '$D(IBD) X "F I=$Y:1:(IOSL-3) W !" S DIR(0)="E" D ^DIR K DIR G END
  1. ;
  1. ; - select device if archiving
  1. I IBOP=2 S %ZIS="N",%ZIS("B")="",%ZIS("A")="Archive entries to what device: " D ^%ZIS G:POP END
  1. ;
  1. ; - must enter Electronic Signature to archive or purge
  1. I IBOP>1,'$$ESIG^IBPU1(DUZ) G END
  1. ;
  1. ; - if ok to continue, task off job
  1. I $$OKAY^IBPU1(IBOP) D TASK^IBPU1
  1. ;
  1. END ; - clean up and quit
  1. D HOME^%ZIS
  1. K I,IBD,IBHDR,IBLINE,IBOP,J,K,Y
  1. Q
  1. ;
  1. ;
  1. ;
  1. QUE ; Tasked Entry point to begin search/archive/purge operations.
  1. ;
  1. ; Input: IBD(file number) -- piece 1: date through which to archive
  1. ; piece 2: log entry if restarting
  1. ; IBOP -- 1 (Search), 2 (Archive), 3 (Purge)
  1. ; DUZ -- user ID; retained by Taskman
  1. ;
  1. ; - perform operation on each requested file
  1. S IBF="" F S IBF=$O(IBD(IBF)) Q:'IBF D @("^IBP"_$P("F^A^P","^",IBOP))
  1. ;
  1. ; - send confirmation message to user
  1. D ^IBPUBUL
  1. ;
  1. ; - clean up and quit
  1. K DFN,DATE,IBBDT,IBCNT,IBD,IBDATA,IBEDT,IBF,IBFNAME,IBHDT,IBLINE,IBLOG,IBN,IBOFF,IBOP,IBPAGE,IBROOT,IBSTAT,IBTMDA,IBTMPL,IBRCNO
  1. Q