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

LAMIAUT5.m

Go to the documentation of this file.
LAMIAUT5 ; IHS/DIR/FJE - DELETE MICRO AUTOMATED DATA UTILITY ;
 ;;5.2;LA;;NOV 01, 1997
 ;;5.2;AUTOMATED LAB INSTRUMENTS;;Sep 27, 1994
DEL ;Delete tranfered data
 W $C(7),!?10,"Removing Transfered Patient Data ",!
 F I=0:0 S I=$O(^LAH(LRLL,1,LRIFN,3,I)) Q:I=""  I $D(^(I,0))#2 S LRORGD=+^(0) I $D(LRMOVE(I)) K:LRMOVE(I)="A" LRMOVE(I),^LR(LRDFN,"MI",LRIDT,3,I) I $D(LRMOVE(I)) D DEL1
 Q
DEL1 Q:$S('$D(^LR(LRDFN,"MI",LRIDT,3,I,0))#2:1,+^(0)'=LRORGD:1,1:0)  S $P(^(0),U,2)="" D DEL2 F LRD=2:0 S LRD=$O(^LAH(LRLL,1,LRIFN,3,I,LRD)) Q:LRD=""  K ^LR(LRDFN,"MI",LRIDT,3,I,LRD)
 Q
DEL2 Q:'$O(^LAH(LRLL,1,LRIFN,3,I,1,0))  F A=0:0 S A=$O(^LAH(LRLL,1,LRIFN,3,I,1,A)) Q:A<1  K ^LR(LRDFN,"MI",LRIDT,3,II,1,A) S $P(^LR(LRDFN,"MI",LRIDT,3,II,1,0),U,4)=$P(^(0),U,4)-1,$P(^(0),U,3)=$P(^(0),U,4)
 Q
TST ;
 K DIC,LREND S DIC("A")="Verify Test ",DIC("S")="I $P(^(0),U,2)<50"
 S DA=LRAN,DA(1)=LRAD,DA(2)=LRAA,DIC="^LRO(68,"_LRAA_",1,"_LRAD_",1,"_LRAN_",4,",DIC(0)="AQEN" D ^DIC S:Y<1 LREND=1
 S LRTS=+Y
 Q