BDWRERR ; IHS/CMI/LAB - LOG ERROR ;
;;1.0;IHS DATA WAREHOUSE;;JAN 23, 2006
;
START ;
S BDW("SKIP")=BDW("SKIP")+1
S BDWE("ERR DFN")=$O(^BDWERRC("B",BDWE("ERROR"),"")) I BDWE("ERR DFN")="" S BDWE("MSG")=BDWE("ERROR")_"-ERROR INFORMATION NOT IN ERROR FILE" G ERR
S BDWE("MSG")=BDWE("ERROR")_"-"_$P(^BDWERRC(BDWE("ERR DFN"),0),U,2) S:$L(BDWE("MSG"))=5 BDWE("MSG")=BDWE("MSG")_"- ERROR INFORMATION NOT IN ERROR FILE" S BDWE("MSG")=$E(BDWE("MSG"),1,45)
ERR ;
S:'$D(^BDWXLOG(BDW("RUN LOG"),51,0)) ^BDWXLOG(BDW("RUN LOG"),51,0)="^90213.05101PA^^"
S ^BDWXLOG(BDW("RUN LOG"),51,BDW("V DFN"),0)=BDW("V DFN")_"^^"_BDWE("MSG")
S $P(^BDWXLOG(BDW("RUN LOG"),51,0),U,3)=BDW("V DFN"),$P(^(0),U,4)=$P(^(0),U,4)+1
Q
BDWRERR ; IHS/CMI/LAB - LOG ERROR ;
+1 ;;1.0;IHS DATA WAREHOUSE;;JAN 23, 2006
+2 ;
START ;
+1 SET BDW("SKIP")=BDW("SKIP")+1
+2 SET BDWE("ERR DFN")=$ORDER(^BDWERRC("B",BDWE("ERROR"),""))
IF BDWE("ERR DFN")=""
SET BDWE("MSG")=BDWE("ERROR")_"-ERROR INFORMATION NOT IN ERROR FILE"
GOTO ERR
+3 SET BDWE("MSG")=BDWE("ERROR")_"-"_$PIECE(^BDWERRC(BDWE("ERR DFN"),0),U,2)
IF $LENGTH(BDWE("MSG"))=5
SET BDWE("MSG")=BDWE("MSG")_"- ERROR INFORMATION NOT IN ERROR FILE"
SET BDWE("MSG")=$EXTRACT(BDWE("MSG"),1,45)
ERR ;
+1 IF '$DATA(^BDWXLOG(BDW("RUN LOG"),51,0))
SET ^BDWXLOG(BDW("RUN LOG"),51,0)="^90213.05101PA^^"
+2 SET ^BDWXLOG(BDW("RUN LOG"),51,BDW("V DFN"),0)=BDW("V DFN")_"^^"_BDWE("MSG")
+3 SET $PIECE(^BDWXLOG(BDW("RUN LOG"),51,0),U,3)=BDW("V DFN")
SET $PIECE(^(0),U,4)=$PIECE(^(0),U,4)+1
+4 QUIT