AMHEXERR ; IHS/CMI/LAB - LOG ERROR IN EXPORT ;
;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
;
START ;
S AMHE("ERR DFN")=$O(^AMHERR("B",AMHE,"")) I AMHE("ERR DFN")="" S AMHE("MSG")=AMHE_"-ERROR INFORMATION NOT IN ERROR FILE" G ERR
S AMHE("MSG")=AMHE_"-"_$P(^AMHERR(AMHE("ERR DFN"),0),U,2) S:$L(AMHE("MSG"))=5 AMHE("MSG")=AMHE("MSG")_"- ERROR INFORMATION NOT IN ERROR FILE" S AMHE("MSG")=$E(AMHE("MSG"),1,45)
ERR ;
K DIE,DR S DA=AMH("RUN LOG"),DR="5101///""`"_AMHR_"""",DR(2,9002014.05101)=".02///"_AMHE("MSG"),DIE="^AMHXLOG("
D CALLDIE^AMHLEIN
I $D(Y) S AMH("QFLG")=25 W:'$D(ZTQUEUED) !!,"Error encountered in ^AMHERR. Notify programmer!",! I $D(ZTQUEUED) D ERRBULL^AMHEXDI3
Q
AMHEXERR ; IHS/CMI/LAB - LOG ERROR IN EXPORT ;
+1 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
+2 ;
START ;
+1 SET AMHE("ERR DFN")=$ORDER(^AMHERR("B",AMHE,""))
IF AMHE("ERR DFN")=""
SET AMHE("MSG")=AMHE_"-ERROR INFORMATION NOT IN ERROR FILE"
GOTO ERR
+2 SET AMHE("MSG")=AMHE_"-"_$PIECE(^AMHERR(AMHE("ERR DFN"),0),U,2)
IF $LENGTH(AMHE("MSG"))=5
SET AMHE("MSG")=AMHE("MSG")_"- ERROR INFORMATION NOT IN ERROR FILE"
SET AMHE("MSG")=$EXTRACT(AMHE("MSG"),1,45)
ERR ;
+1 KILL DIE,DR
SET DA=AMH("RUN LOG")
SET DR="5101///""`"_AMHR_""""
SET DR(2,9002014.05101)=".02///"_AMHE("MSG")
SET DIE="^AMHXLOG("
+2 DO CALLDIE^AMHLEIN
+3 IF $DATA(Y)
SET AMH("QFLG")=25
IF '$DATA(ZTQUEUED)
WRITE !!,"Error encountered in ^AMHERR. Notify programmer!",!
IF $DATA(ZTQUEUED)
DO ERRBULL^AMHEXDI3
+4 QUIT