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

LRARVER.m

Go to the documentation of this file.
LRARVER ;DALISC/CKA - LAB ARCHIVING VERIFY;8/25/95 ;10/2/95  09:12
 ;;5.2;LAB SERVICE;**59**;July 31, 1995
VER ;VERIFY FILES 64.1, 67.9, OR 65
 S DIR(0)="S^1:WKLD DATA;2:LAB MONTHLY WORKLOADS"
 S DIR("A")="FILE"
 D ^DIR K DIR
 I $D(DIRUT)!('Y) G EXIT
 S LRART=$S(Y=1:64.1,Y=2:67.9,1:0)
 I 'LRART G EXIT
 S DIR(0)="S^1:WHOLE FILE;2:Selected entries for archiving"
 S DIR("A")="NUMBER"
 D ^DIR K DIR
 I $D(DIRUT)!('Y) G EXIT
 S LRARX=Y
 I $D(DIRUT) G EXIT
 I LRARX=1 D ALL G CLOSE
 I LRARX=2 D SELECT G CLOSE
 G EXIT
ALL D VER^DIV(LRART)
 Q
SELECT ;Verify only selected entries for archiving
 S LRARC=0,LRARC=$O(^LAB(95.11,"O",1,LRART,LRARC))
 I 'LRARC W !!,$C(7),"No archival activity for this file in SELECT status" Q
VBI ;Verify Blood Inventory selected entries
 I LRART=65 D  Q
 . S LRARF="[LR ARCHIVE 65]"
 . D VER^DIV(LRART,LRARF)
 ;Set up selection criteria for either 64.1 or 67.9
 S LRSEL=^LAB(95.11,LRARC,1)
 I LRART=64.1 S LRED=$P(LRSEL,U,2)+.99,LRBD=$P(LRSEL,U)-.0001
 I LRART=67.9 S LRED=$P(LRSEL,U,2)+.99,LRBD=$P(LRSEL,U)-100
 S LRSCR="I $P(^(0),U)<"_LRED_",$P(^(0),U)>"_LRBD
 I LRART=64.1 D VWD
 I LRART=67.9 D VLMW
CLOSE I $E(IOST)'="C" W @IOF
 D ^%ZISC
EXIT K DIR,DIRUT,LRARC,LRARDA,LRARDA1,LRARDA2,LRARDATE,LRARDIV,LRARF,LRARI,LRARI1,LRARI2,LRARIENS,LRARIN,LRARNUM
 K LRARNUM1,LRARNUM2,LRART,LRARX,LRBD,LRED,LRIENS1,LRIENS2,LRSCR,LRSEL,LRWIN,Y
 D CLN^LRARU1
 Q
VWD ;Verify WKLD DATA selected entries
 D  I $D(LRWIN) D VER^DIV(64.11,.LRWIN)
 . D LIST^DIC(64.1,"","","","","","","","","","LRARIN","LRAROUT")
 . S LRARNUM=$P(LRARIN("DILIST",0),U)
 . F LRARI=1:1:LRARNUM S LRARDA=LRARIN("DILIST",2,LRARI),LRARIENS=$$IENS^DILF(.LRARDA),LRARIENS=","_LRARIENS D
 .. D LIST^DIC(64.11,LRARIENS,"","","","","","",.LRSCR,"","LRARDATE","LRAROUT")
 .. S LRARNUM1=$P(LRARDATE("DILIST",0),U)
 .. Q:'LRARNUM1
 .. F LRARI1=1:1:LRARNUM1 S LRARDA1=LRARDATE("DILIST",2,LRARI1),LRARDA1(1)=LRARDA,LRIENS1=$$IENS^DILF(.LRARDA1),LRWIN(LRIENS1)=""
 I '$D(LRWIN) W !!!,$C(7),"NO records to verify.",!!
 Q
VLMW ;Verify LAB MONTHLY WORKLOADS selected entries
 D  I $D(LRWIN) D VER^DIV(67.911,.LRWIN)
 . D LIST^DIC(67.9,"","","","","","","","","","LRARIN","LRAROUT")
 . S LRARNUM=$P(LRARIN("DILIST",0),U)
 . F LRARI=1:1:LRARNUM S LRARDA=LRARIN("DILIST",2,LRARI),LRARIENS=$$IENS^DILF(.LRARDA),LRARIENS=","_LRARIENS D
 .. D LIST^DIC(67.901,LRARIENS,"","","","","","","","","LRARDIV","LRAROUT")
 .. S LRARNUM1=$P(LRARDIV("DILIST",0),U)
 .. Q:'LRARNUM1
 .. F LRARI1=1:1:LRARNUM1 S LRARDA1=LRARDIV("DILIST",2,LRARI1),LRARDA1(1)=LRARDA,LRIENS1=","_$$IENS^DILF(.LRARDA1) D
 ... D LIST^DIC(67.911,LRIENS1,"","","","","","",.LRSCR,"","LRARDATE","LRAROUT")
 ... S LRARNUM2=$P(LRARDATE("DILIST",0),U)
 ... Q:'LRARNUM2
 ... F LRARI2=1:1:LRARNUM2 S LRARDA2=LRARDATE("DILIST",2,LRARI2),LRARDA2(2)=LRARDA,LRARDA2(1)=LRARDA1,LRIENS2=$$IENS^DILF(.LRARDA2),LRWIN(LRIENS2)=""
 I '$D(LRWIN) W !!!,$C(7),"NO records to verify.",!!
 Q