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

LRARLMW.m

Go to the documentation of this file.
  1. LRARLMW ; IHS/DIR/AAB - ARCHIVE LAB MONTHLY WORKLOADS (67.9) ; [ 07/22/2002 1:06 PM ]
  1. ;;5.2;LR;**1002,1013**;JUL 15, 2002
  1. ;;5.2;LAB SERVICE;**59**;July 31, 1995
  1. S LRART=67.9,LRARFL="" D CHECK^LRARU G:LRARFL=1 EXIT
  1. S LRAR=1 D NEW^LRARU
  1. DATE ;Called from LR ARCHIVE 67.9 option
  1. ;Message
  1. W !!,"First enter a date range selection to archive the"
  1. W !,"LAB MONTHLY WORKLOADS file (67.9)."
  1. ;Prompt for a range of dates
  1. D DT^DICRW
  1. BEGDT W !!,"**** Date Range Selection ****",! S %DT="AE",%DT(0)="-T",%DT("A")="Beginning DATE: " D ^%DT
  1. I Y<0 D DELETE G:LRARFL BEGDT G EXIT
  1. S LRPBD=Y,LRBD=LRPBD-100
  1. ENDDT W ! S %DT="AE",%DT("A")="Ending DATE: " D ^%DT
  1. I Y<0 D DELETE G:LRARFL ENDDT G EXIT
  1. G:Y<LRBD HELP W ! S LRPED=Y,LRED=LRPED+.99
  1. ;SAVE SELECTION CRITERIA IN LAB ARCHIVAL ACTIVITY FILE
  1. D SAVESEL^LRARU1
  1. ;OPTIONAL PRINT SELECTED ENTRIES
  1. ASKPRT S DIR(0)="Y",DIR("A")="WOULD YOU LIKE TO PRINT SELECTED ENTRIES",DIR("B")="YES" D ^DIR K DIR
  1. I $D(DIRUT)!('Y) G COMP
  1. PRT ;EN1^DIP CALL
  1. S L=0,DIC="^LRO(67.9,",BY=".01,1,1,.01",FR=","_LRBD,TO=","_LRED
  1. D EN1^DIP
  1. COMP ;ARCHIVING ACTION COMPLETED
  1. D COMP^LRARU1
  1. EXIT K BY,DA,DIC,DIK,DIR,DIRUT,DTOUT,DUOUT,FR,L,LRARF,LRAI,LRAINST,LRANUM,LRAR,LRARC,LRARFL,LRARI,LRARP,LRARST,LRART,LRARU,LRARX,LRBD,LRED,LRPBD,LRPED,TO,Y
  1. D CLN^LRARU1
  1. Q
  1. DELETE K DIR S LRARFL=0,DIR(0)="Y",DIR("A")="Do you want to delete this archival activity and forget this for now",DIR("B")="YES"
  1. D ^DIR
  1. I $D(DIRUT)!('Y) W !,"You must enter a beginning and ending date." S LRARFL=1 Q
  1. W !!,"Now deleting this archival activity..."
  1. S DIK="^LAB(95.11,",DA=LRARC D ^DIK W !!,">>> DONE <<<"
  1. Q
  1. HELP W "??",!?5,"Ending date must not be on or before beginning date" G DATE
  1. CLEAR ;REMOVE DATA FROM ARCHIVED LAB MONTHLY WORKLOADS FILE
  1. ;CHECK LAB ARCHIVAL ACTIVITY FILE
  1. W !!,"This will clear the data from the Archived Lab Monthly Workloads file."
  1. ASKCLR K DIR S DIR(0)="Y",DIR("A")="ARE YOU SURE YOU WANT TO DO THIS",DIR("B")="YES" D ^DIR K DIR
  1. I $D(DIRUT)!('Y) G EXIT
  1. S LRAR=3,LRART=67.9,LRARC=0 S LRARC=$O(^LAB(95.11,"O",2,LRART,LRARC)) G:LRARC="" ERROR D FILE^LRARU G:'$D(LRARC) EXIT
  1. ;CLEARING IN PROGRESS
  1. D MRK^LRARU1
  1. W !!,"I will now CLEAR out the global."
  1. S LRARX="" F LRARI=0:0 S LRARX=$O(^LAR(67.99999,LRARX)) Q:LRARX="" K ^LAR(67.99999,LRARX)
  1. S ^LAR(67.99999,0)="ARCHIVED LAB MONTHLY WORKLOADS^67.99999"
  1. ;UPDATE ENTRY IN LAB ARCHIVAL ACTIVITY FILE
  1. S LRAR=3 D UPDATE^LRARU1
  1. D COMP^LRARU1
  1. W !!,">>> DONE <<<"
  1. G EXIT
  1. Q
  1. ERROR W !!,$C(7),"I cannot find an archival activity for file 67.9 that has the correct archival status."
  1. G EXIT
  1. Q
  1. ;LRARC=LAB ARCHIVAL ACTIVITY INTERNAL FILE #
  1. ;LRARFL= OUTSTANDING ARCHIVAL ACTIVITY FLAG
  1. Q