LRJSAUO ;ALB/JLC - CALL CPRS IF CERTAIN FIELDS EDITED;10/21/2012 12:32:47
;;5.2;LAB SERVICE;**425**;Sep 27, 1994;Build 30
;
;
; Reference to ^ORUQO supported by IA 5756
;
Q
EN ;search fiile 60 audit for entries to use for quick order search
N A1,A2,LRAIEN,LRADT,LRF,A,LRT
S A1=$G(^LAB(69.9,1,64.9103)),LRAIEN=$P(A1,"^"),LRADT=$P(A1,"^",2)
L +^LRJSAUO:$G(DILOCKTM,5) E Q
I LRAIEN="" S LRAIEN=0
I '$D(^DIA(60,LRAIEN)) S LRAIEN=0
I $D(^DIA(60,LRAIEN,0)),$P(^(0),"^",2)'=LRADT S LRAIEN=0
F S LRAIEN=$O(^DIA(60,LRAIEN)) Q:'LRAIEN D I $$REQ2STOP() S ZSTOP=1 Q
. S A=^DIA(60,LRAIEN,0),LRT=+A,LRF=$P(A,"^",3)
. I LRF'=.01,LRF'=3,LRF'=17,LRF'=18,LRF'="300,.01" Q
. D CHECKLR^ORUQO(LRT,$P($G(^LAB(60,LRT,0)),"^"))
. S ^LAB(69.9,1,64.9103)=LRAIEN_"^"_$P(A,"^",2)
L -^LRJSAUO
Q
;
REQ2STOP() ;
; Check for task stop request
; Returns 1 if stop request made.
N STATUS,X
S STATUS=0
I '$D(ZTQUEUED) Q 0
S X=$$S^%ZTLOAD()
I X D ;
. S (STATUS,ZTSTOP)=1
. S X=$$S^%ZTLOAD("Received shutdown request")
;
I $Q Q STATUS
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRJSAUO 1073 printed Nov 22, 2024@17:25:42 Page 2
LRJSAUO ;ALB/JLC - CALL CPRS IF CERTAIN FIELDS EDITED;10/21/2012 12:32:47
+1 ;;5.2;LAB SERVICE;**425**;Sep 27, 1994;Build 30
+2 ;
+3 ;
+4 ; Reference to ^ORUQO supported by IA 5756
+5 ;
+6 QUIT
EN ;search fiile 60 audit for entries to use for quick order search
+1 NEW A1,A2,LRAIEN,LRADT,LRF,A,LRT
+2 SET A1=$GET(^LAB(69.9,1,64.9103))
SET LRAIEN=$PIECE(A1,"^")
SET LRADT=$PIECE(A1,"^",2)
+3 LOCK +^LRJSAUO:$GET(DILOCKTM,5)
IF '$TEST
QUIT
+4 IF LRAIEN=""
SET LRAIEN=0
+5 IF '$DATA(^DIA(60,LRAIEN))
SET LRAIEN=0
+6 IF $DATA(^DIA(60,LRAIEN,0))
IF $PIECE(^(0),"^",2)'=LRADT
SET LRAIEN=0
+7 FOR
SET LRAIEN=$ORDER(^DIA(60,LRAIEN))
if 'LRAIEN
QUIT
Begin DoDot:1
+8 SET A=^DIA(60,LRAIEN,0)
SET LRT=+A
SET LRF=$PIECE(A,"^",3)
+9 IF LRF'=.01
IF LRF'=3
IF LRF'=17
IF LRF'=18
IF LRF'="300,.01"
QUIT
+10 DO CHECKLR^ORUQO(LRT,$PIECE($GET(^LAB(60,LRT,0)),"^"))
+11 SET ^LAB(69.9,1,64.9103)=LRAIEN_"^"_$PIECE(A,"^",2)
End DoDot:1
IF $$REQ2STOP()
SET ZSTOP=1
QUIT
+12 LOCK -^LRJSAUO
+13 QUIT
+14 ;
REQ2STOP() ;
+1 ; Check for task stop request
+2 ; Returns 1 if stop request made.
+3 NEW STATUS,X
+4 SET STATUS=0
+5 IF '$DATA(ZTQUEUED)
QUIT 0
+6 SET X=$$S^%ZTLOAD()
+7 ;
IF X
Begin DoDot:1
+8 SET (STATUS,ZTSTOP)=1
+9 SET X=$$S^%ZTLOAD("Received shutdown request")
End DoDot:1
+10 ;
+11 IF $QUIT
QUIT STATUS
+12 QUIT