BDW1VBLE ;IHS/CMI/LAB - log error during backload of visits;
;;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(^BDWBLOG(BDW("RUN LOG"),51,0)) ^BDWBLOG(BDW("RUN LOG"),51,0)="^90214.05101PA^^"
S ^BDWBLOG(BDW("RUN LOG"),51,BDW("V DFN"),0)=BDW("V DFN")_"^^"_BDWE("MSG")
S $P(^BDWBLOG(BDW("RUN LOG"),51,0),U,3)=BDW("V DFN"),$P(^(0),U,4)=$P(^(0),U,4)+1
Q
BDW1VBLE ;IHS/CMI/LAB - log error during backload of visits;
+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(^BDWBLOG(BDW("RUN LOG"),51,0))
SET ^BDWBLOG(BDW("RUN LOG"),51,0)="^90214.05101PA^^"
+2 SET ^BDWBLOG(BDW("RUN LOG"),51,BDW("V DFN"),0)=BDW("V DFN")_"^^"_BDWE("MSG")
+3 SET $PIECE(^BDWBLOG(BDW("RUN LOG"),51,0),U,3)=BDW("V DFN")
SET $PIECE(^(0),U,4)=$PIECE(^(0),U,4)+1
+4 QUIT