16 lines
952 B
Mathematica
16 lines
952 B
Mathematica
LAMIAUT5 ;DAL/FHS - DELETE MICRO AUTOMATED DATA UTILITY
|
|
;;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
|