BDWRED1 ; IHS/CMI/LAB - REDO CONT ;
;;1.0;IHS DATA WAREHOUSE;**4**;JAN 23, 2006;Build 24
;IHS/CMI/LAB - no longer process APC,INPT,CHA
;
INIT ;EP
D CHKOLD^BDWRDRI2
Q:BDW("QFLG")
S DIC="^BDWXLOG(",DIC(0)="AEQ",DIC("S")="I $D(^(21)),$P(^(0),U,9)=DUZ(2),$P(^(0),U,15)=""C""" D ^DIC K DIC
I Y<0 S BDW("QFLG")=99 Q
S BDW("RUN LOG")=+Y
;
S X=^BDWXLOG(BDW("RUN LOG"),0),BDW("RUN BEGIN")=$P(X,U),BDW("RUN END")=$P(X,U,2),BDW("COUNT")=$P(X,U,6),BDW("ORIG TX DATE")=$P($P(X,U,3),".")
S Y=BDW("RUN BEGIN") X ^DD("DD") S BDW("PRINT BEGIN")=Y
S Y=BDW("RUN END") X ^DD("DD") S BDW("PRINT END")=Y
S BDW("OLD VISITS")=$P(^BDWXLOG(BDW("RUN LOG"),21,0),U,4)
W !!,"Log entry ",BDW("RUN LOG")," was for date range ",BDW("PRINT BEGIN")," through",!,BDW("PRINT END")," and generated ",BDW("COUNT")," transactions from ",BDW("OLD VISITS")," visits."
;
W !!,"This routine will re-generate the Data Warehouse Records."
RDD ;
S DIR(0)="Y",DIR("A")="Do you want to regenerate the transactions for this run",DIR("B")="N" K DA D ^DIR K DIR
I $D(DIRUT)!'Y S BDW("QFLG")=99 Q
K ^BDWXLOG(BDW("RUN LOG"),51)
S BDW("COUNT")=0
Q
BDWRED1 ; IHS/CMI/LAB - REDO CONT ;
+1 ;;1.0;IHS DATA WAREHOUSE;**4**;JAN 23, 2006;Build 24
+2 ;IHS/CMI/LAB - no longer process APC,INPT,CHA
+3 ;
INIT ;EP
+1 DO CHKOLD^BDWRDRI2
+2 IF BDW("QFLG")
QUIT
+3 SET DIC="^BDWXLOG("
SET DIC(0)="AEQ"
SET DIC("S")="I $D(^(21)),$P(^(0),U,9)=DUZ(2),$P(^(0),U,15)=""C"""
DO ^DIC
KILL DIC
+4 IF Y<0
SET BDW("QFLG")=99
QUIT
+5 SET BDW("RUN LOG")=+Y
+6 ;
+7 SET X=^BDWXLOG(BDW("RUN LOG"),0)
SET BDW("RUN BEGIN")=$PIECE(X,U)
SET BDW("RUN END")=$PIECE(X,U,2)
SET BDW("COUNT")=$PIECE(X,U,6)
SET BDW("ORIG TX DATE")=$PIECE($PIECE(X,U,3),".")
+8 SET Y=BDW("RUN BEGIN")
XECUTE ^DD("DD")
SET BDW("PRINT BEGIN")=Y
+9 SET Y=BDW("RUN END")
XECUTE ^DD("DD")
SET BDW("PRINT END")=Y
+10 SET BDW("OLD VISITS")=$PIECE(^BDWXLOG(BDW("RUN LOG"),21,0),U,4)
+11 WRITE !!,"Log entry ",BDW("RUN LOG")," was for date range ",BDW("PRINT BEGIN")," through",!,BDW("PRINT END")," and generated ",BDW("COUNT")," transactions from ",BDW("OLD VISITS")," visits."
+12 ;
+13 WRITE !!,"This routine will re-generate the Data Warehouse Records."
RDD ;
+1 SET DIR(0)="Y"
SET DIR("A")="Do you want to regenerate the transactions for this run"
SET DIR("B")="N"
KILL DA
DO ^DIR
KILL DIR
+2 IF $DATA(DIRUT)!'Y
SET BDW("QFLG")=99
QUIT
+3 KILL ^BDWXLOG(BDW("RUN LOG"),51)
+4 SET BDW("COUNT")=0
+5 QUIT