DIAXP ;SFISC/DCM-EXCEPTION REPORT ;5/16/96 10:56
;;22.2;VA FileMan;;Jan 05, 2016;Build 42
;;Per VA Directive 6402, this routine should not be modified.
;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
;;Licensed under the terms of the Apache License, Version 2.0.
;
EN ;
N PAGE,LINE,DIAXX,FILE,FNAME,Y,DATE,DIRUT,Z
S PAGE=0,LINE="",DIAXX=^DIAR(1.11,DIARC,0),FILE=$P(DIAXX,U,2),FNAME=$P($G(^DIC(FILE,0)),U)
S Y=DT X ^DD("DD") S DATE=Y
D HDR,BODY,END
Q
;
C I IOST["C-" N DIR S DIR(0)="E" D ^DIR Q:$D(DIRUT)
;
HDR W:$Y @IOF W !,"EXTRACT ACTIVITY EXCEPTION REPORT",?IOM-24,DATE,?IOM-10,"PAGE: ",PAGE+1
S PAGE=PAGE+1,$P(LINE,"-",IOM)="" W !,LINE
Q
;
BODY W !!,"EXTRACT ACTIVITY: ",DIARC,?31,"ARCHIVER: ",$P($G(^VA(200,$P(DIAXX,U,6),0)),U)
W !!,"THE FOLLOWING RECORDS IN THE '"_FNAME_"' FILE WERE NOT PROCESSED BY THE",!,"EXTRACT TOOL"
N REC,LINE,ERR S REC=0 D REC Q:$D(DIRUT)
W !!,"*** PLEASE KEEP THIS FOR FUTURE REFERENCE ***"
Q
REC S LINE="Entry # "
S REC=$O(^TMP("DIAXU",$J,"RESULT","ERR",FILE,REC)) Q:'REC S ERR=^(REC)
S LINE=LINE_+REC_" was NOT processed because:"
D C:($Y+3>IOSL) Q:$D(DIRUT)
W !!,LINE N A,B S A=1 D ERR
G REC
ERR S B=$P(ERR,";",A) Q:B="" S A=A+1
N Z S Z=0
F S Z=$O(^TMP("DIERR",$J,+B,"TEXT",Z)) Q:'Z D C:($Y+1>IOSL) Q:$D(DIRUT) W !?2,$G(^(Z))
G ERR
;
END I $E(IOST)'="C",$Y W @IOF
D ^%ZISC
K ^TMP("DIAXU",$J),^TMP("DIERR",$J)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDIAXP 1506 printed Dec 13, 2024@02:45:09 Page 2
DIAXP ;SFISC/DCM-EXCEPTION REPORT ;5/16/96 10:56
+1 ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
+4 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
+5 ;;Licensed under the terms of the Apache License, Version 2.0.
+6 ;
EN ;
+1 NEW PAGE,LINE,DIAXX,FILE,FNAME,Y,DATE,DIRUT,Z
+2 SET PAGE=0
SET LINE=""
SET DIAXX=^DIAR(1.11,DIARC,0)
SET FILE=$PIECE(DIAXX,U,2)
SET FNAME=$PIECE($GET(^DIC(FILE,0)),U)
+3 SET Y=DT
XECUTE ^DD("DD")
SET DATE=Y
+4 DO HDR
DO BODY
DO END
+5 QUIT
+6 ;
C IF IOST["C-"
NEW DIR
SET DIR(0)="E"
DO ^DIR
if $DATA(DIRUT)
QUIT
+1 ;
HDR if $Y
WRITE @IOF
WRITE !,"EXTRACT ACTIVITY EXCEPTION REPORT",?IOM-24,DATE,?IOM-10,"PAGE: ",PAGE+1
+1 SET PAGE=PAGE+1
SET $PIECE(LINE,"-",IOM)=""
WRITE !,LINE
+2 QUIT
+3 ;
BODY WRITE !!,"EXTRACT ACTIVITY: ",DIARC,?31,"ARCHIVER: ",$PIECE($GET(^VA(200,$PIECE(DIAXX,U,6),0)),U)
+1 WRITE !!,"THE FOLLOWING RECORDS IN THE '"_FNAME_"' FILE WERE NOT PROCESSED BY THE",!,"EXTRACT TOOL"
+2 NEW REC,LINE,ERR
SET REC=0
DO REC
if $DATA(DIRUT)
QUIT
+3 WRITE !!,"*** PLEASE KEEP THIS FOR FUTURE REFERENCE ***"
+4 QUIT
REC SET LINE="Entry # "
+1 SET REC=$ORDER(^TMP("DIAXU",$JOB,"RESULT","ERR",FILE,REC))
if 'REC
QUIT
SET ERR=^(REC)
+2 SET LINE=LINE_+REC_" was NOT processed because:"
+3 if ($Y+3>IOSL)
DO C
if $DATA(DIRUT)
QUIT
+4 WRITE !!,LINE
NEW A,B
SET A=1
DO ERR
+5 GOTO REC
ERR SET B=$PIECE(ERR,";",A)
if B=""
QUIT
SET A=A+1
+1 NEW Z
SET Z=0
+2 FOR
SET Z=$ORDER(^TMP("DIERR",$JOB,+B,"TEXT",Z))
if 'Z
QUIT
if ($Y+1>IOSL)
DO C
if $DATA(DIRUT)
QUIT
WRITE !?2,$GET(^(Z))
+3 GOTO ERR
+4 ;
END IF $EXTRACT(IOST)'="C"
IF $Y
WRITE @IOF
+1 DO ^%ZISC
+2 KILL ^TMP("DIAXU",$JOB),^TMP("DIERR",$JOB)
+3 QUIT