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

LRIPRE2.m

Go to the documentation of this file.
  1. LRIPRE2 ;DALISC/J0 - PURGE OBSOLETE WORKLOAD DATA
  1. ;;5.2;LR;;NOV 01, 1997
  1. ;
  1. ;;5.2;LAB SERVICE;;Sep 27, 1994
  1. ;
  1. EN ;
  1. Q:'$D(DIFQ)
  1. N LREND
  1. D INIT
  1. D:'LREND PURGE
  1. D WRAPUP
  1. Q
  1. INIT ;
  1. S LREND=0
  1. W !!,"This task is optional. It is intended for test sites who have workload ",!
  1. W "code entries in a format which is now obsolete. If you select this task, ",!
  1. W "files 64.03, 64.1, 64.2 and 67.9 will be erased. In addition the workload ",!
  1. W "code entries for the following files will also be erased: Execute Code ",!
  1. W "(62.07), Etiology (61.2) & Collection Sample (62).",!
  1. W !!
  1. K DIR,X,Y S DIR(0)="S^Y:YES;N:NO",DIR("B")="NO"
  1. S DIR("A")="Are you sure you want to do this??"
  1. S DIR("?")="Enter 'NO' or '^' or RETURN to skip this optional task."
  1. S DIR("?",1)="Enter 'YES' to purge existing workload code entries."
  1. S DIR("?",2)=""
  1. D ^DIR
  1. I (Y="N")!($D(DTOUT))!($D(DUOUT)) S LREND=1 Q
  1. W !!,"I think I heard you wrong, wouldn't you rather skip this and go for a",!
  1. W "soda or something?",!
  1. K DIR,X,Y S DIR(0)="S^Y:YES;N:NO",DIR("B")="YES"
  1. S DIR("A")="Skip task?"
  1. S DIR("?")="Enter 'YES' or '^' or RETURN to skip this optional task."
  1. S DIR("?",1)="Enter 'No' to proceed with purge."
  1. S DIR("?",2)=""
  1. D ^DIR
  1. I (Y="Y")!($D(DTOUT))!($D(DUOUT)) S LREND=1 Q
  1. W !!,"OK, OK, but remember, you asked for this...(twice even)",!
  1. Q
  1. PURGE ;
  1. W !,"Deleting file 67.9, LAB Monthly Workloads.....",!
  1. K ^LRO(67.9) S ^LRO(67.9,0)="LAB MONTHLY WORKLOADS^67.9P^^"
  1. ;
  1. W !,"Deleting file 64.1, Workload [WKLD] Data.....",!
  1. K ^LRO(64.1) S ^LRO(64.1,0)="WORKLOAD [WKLD] DATA^64.1P^^"
  1. ;
  1. W !,"Deleting file 64.2, WKLD Suffix Codes.....",!
  1. K ^LAB(64.2) S ^LAB(64.2,0)="WKLD SUFFIX CODES^64.2I^^"
  1. ;
  1. W !,"Deleting file 64.03, WKLD LOG FILE.....",!
  1. K ^LRO(64.03) S ^LRO(64.03,0)="WKLD LOG FILE^64.03^"
  1. ;
  1. W !,"Cleaning file 62.07, Execute Code.....",!
  1. D CLNEX
  1. W !,"Cleaning file 61.2, Etiology.....",!
  1. D CLNET
  1. W !,"Cleaning file 62, Collection Sample.....",!
  1. D CLNCS
  1. W !,"Workload data cleaning task completed.",!
  1. ;
  1. Q
  1. CLNEX ;
  1. N J
  1. F J=0:0 S J=$O(^LAB(62.07,J)) Q:'J K ^LAB(62.07,J,9) W:'J#100 "."
  1. W !
  1. Q
  1. CLNET ;
  1. N J
  1. F J=0:0 S J=$O(^LAB(61.2,J)) Q:'J K ^LAB(61.2,J,9) W:'J#100 "."
  1. W !
  1. Q
  1. CLNCS ;
  1. N J,K
  1. F J=0:0 S J=$O(^LAB(62,J)) Q:'J W:'J#100 "." D
  1. . F K=0:0 S K=$O(^LAB(62,J,1,K)) Q:'K D
  1. . . F L=0:0 S L=$O(^LAB(62,J,1,K,1,L)) Q:'L K ^LAB(62,J,1,K,1,L,1)
  1. W !
  1. Q
  1. WRAPUP ;
  1. K DIR,X,Y