LRVRMI0 ;DALOI/FHS - MI SUB Lab Routine Data Verification ;02/28/12 19:32
;;5.2;LAB SERVICE;**350,486**;Sep 27, 1994;Build 16
;
; HL7 MI Auto-instrument verification
Q
;
LEDIERR(LRLL,ISQN,QUIET,KILLAH) ;
; Check if this LAH entry has any errors that should prevent
; the user from processing the results.
; Inputs
; LRLL : LL of ^LAH
; ISQN : ISQN of ^LAH
; QUIET <opt> : dflt=0 0=display info 1=dont display info
; KILLAH <opt> : dflt=0 1=delete LAH entry 0=dont delete LAH entry
;
N X,Y,DIR,ERR,LSTERR,CNT
S LRLL=$G(LRLL),ISQN=$G(ISQN),QUIET=+$G(QUIET),KILLAH=+$G(KILLAH)
S X=$$LAHSTAT^LA7VHLU1(LRLL,ISQN,.5)
I X'=2 Q 0
;
S X=$$LAHSTAT^LA7VHLU1(LRLL,ISQN,1,.ERR)
S (X,LSTERR)=$O(ERR(""),-1)
;
S CNT=1
I $D(ERR) F S X=$O(ERR(X),-1) Q:$P(X,".",1)'=$P(LSTERR,".",1) Q:X="" S CNT=CNT+1
;
I $D(ERR),'QUIET D
. D ;
. . N %ZIS,X
. . S X="IORVON;IORVOFF"
. . D ENDR^%ZISS
. W $C(7),!!
. I $G(IORVON)'="",$G(IORVOFF)'="" W IORVON
. W "HL7 message processing error for this accession -- Processing aborted."
. I $G(IORVOFF)'="" W IORVOFF
. W !!,"Total errors: ",CNT," Last error: ",$$FMTE^XLFDT(LSTERR)
. W !,ERR(LSTERR),!
. I KILLAH W !," Entry deleted from ^LAH global."
. S DIR(0)="E"
. D ^DIR,KILL^%ZISS
;
S LRNOP=1,LREND=1
I KILLAH D ZAP^LRVR0
Q 1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRVRMI0 1347 printed Dec 13, 2024@02:22:47 Page 2
LRVRMI0 ;DALOI/FHS - MI SUB Lab Routine Data Verification ;02/28/12 19:32
+1 ;;5.2;LAB SERVICE;**350,486**;Sep 27, 1994;Build 16
+2 ;
+3 ; HL7 MI Auto-instrument verification
+4 QUIT
+5 ;
LEDIERR(LRLL,ISQN,QUIET,KILLAH) ;
+1 ; Check if this LAH entry has any errors that should prevent
+2 ; the user from processing the results.
+3 ; Inputs
+4 ; LRLL : LL of ^LAH
+5 ; ISQN : ISQN of ^LAH
+6 ; QUIET <opt> : dflt=0 0=display info 1=dont display info
+7 ; KILLAH <opt> : dflt=0 1=delete LAH entry 0=dont delete LAH entry
+8 ;
+9 NEW X,Y,DIR,ERR,LSTERR,CNT
+10 SET LRLL=$GET(LRLL)
SET ISQN=$GET(ISQN)
SET QUIET=+$GET(QUIET)
SET KILLAH=+$GET(KILLAH)
+11 SET X=$$LAHSTAT^LA7VHLU1(LRLL,ISQN,.5)
+12 IF X'=2
QUIT 0
+13 ;
+14 SET X=$$LAHSTAT^LA7VHLU1(LRLL,ISQN,1,.ERR)
+15 SET (X,LSTERR)=$ORDER(ERR(""),-1)
+16 ;
+17 SET CNT=1
+18 IF $DATA(ERR)
FOR
SET X=$ORDER(ERR(X),-1)
if $PIECE(X,".",1)'=$PIECE(LSTERR,".",1)
QUIT
if X=""
QUIT
SET CNT=CNT+1
+19 ;
+20 IF $DATA(ERR)
IF 'QUIET
Begin DoDot:1
+21 ;
Begin DoDot:2
+22 NEW %ZIS,X
+23 SET X="IORVON;IORVOFF"
+24 DO ENDR^%ZISS
End DoDot:2
+25 WRITE $CHAR(7),!!
+26 IF $GET(IORVON)'=""
IF $GET(IORVOFF)'=""
WRITE IORVON
+27 WRITE "HL7 message processing error for this accession -- Processing aborted."
+28 IF $GET(IORVOFF)'=""
WRITE IORVOFF
+29 WRITE !!,"Total errors: ",CNT," Last error: ",$$FMTE^XLFDT(LSTERR)
+30 WRITE !,ERR(LSTERR),!
+31 IF KILLAH
WRITE !," Entry deleted from ^LAH global."
+32 SET DIR(0)="E"
+33 DO ^DIR
DO KILL^%ZISS
End DoDot:1
+34 ;
+35 SET LRNOP=1
SET LREND=1
+36 IF KILLAH
DO ZAP^LRVR0
+37 QUIT 1