ACHSWDR ;IHS/OIT/FCJ - DCIS ERROR REPORT
;;3.1;CONTRACT HEALTH MGMT SYSTEM;**15**;JUN 11,2001
;ACHS*3.1*15 New routine to print DCIS error reports
CHK ;
S ACHSFLG=0
F I=1:1:9 I ACHSERR(I)>0 D
.S ACHSFLG=1
.S $P(^TMP($J,"ACHSWERR",ACHSDOC),U,I)=1
S:'$D(^TMP($J,"ACHSWERR",0)) ^TMP($J,"ACHSWERR",0)=0
I ACHSFLG S ^TMP($J,"ACHSWERR",0)=^TMP($J,"ACHSWERR",0)+1,ACHSREC="^^^^^^^^^^^^^^^^^^^"
Q
RPT ;
X:$D(IO("S")) ACHSPPO
S ACHSFLG=0,ACHSQ=""
D BRPT^ACHSFU
D HDR
I ^TMP($J,"ACHSWERR",0)=0 S ACHSFLG=1 D END Q
S ACHS=0 F S ACHS=$O(^TMP($J,"ACHSWERR",ACHS)) Q:ACHS="" D Q:ACHSQ=1
.S ACHSLN=^TMP($J,"ACHSWERR",ACHS)
.D:$Y>(IOSL-4) HDR
.W !,ACHS
.F I=1:1:9 I $P(^TMP($J,"ACHSWERR",ACHS),U,I)=1 S X=$P($T(ERR+I),";",5) W ?X,"ERR"
.I $Y>(IOSL-4),IOST["C-" K DIR S DIR(0)="E" D ^DIR I Y=0 S ACHSQ=1 K DIR
D END
Q
;
HDR ;
U IO W @IOF
W $$C^ACHS("CHS DCIS ERROR REPORT")
W !,ACHSLOC,!,ACHSTIME
W !!,"DOCUMENT",?12,"DATE",?18,"EFFECTIVE",?30,"CURRENT",?40,"ULTIMATE",?51,"DUNS",?57,"CITY-ST",?66,"ZIP",?71,"BUSINESS"
W !,?11,"SIGNED",?20,"DATE",?28,"COMPLETION",?39,"COMPLETION",?50,"NUMBER",?57,"LOCATION",?67,"+4",?73,"SIZE"
W !,?31,"DATE",?42,"DATE"
W !,ACHS("-")
Q
END ;
W !!,"TOTAL RECORDS IN ERROR =",^TMP($J,"ACHSWERR",0)
Q
ERR ;ERROR#;FIELD;DESCRIPTION;TAB
;1;2A;DATE SIGNED;12
;2;2B;EFFECTIVE DATE;20
;3;2C;CURRENT COMPLETION DATE;31
;4;2D;ULTIMATE COMPLETION DATE;42
;5;6A;TYPE OF CONTRACT;
;6;9A;DUNS NUMBER;51
;7;9C;PLACE OF PERFORMANCE-CITY STATE COUNTRY;59
;8;9K;ZIP+4;66
;9;11A;BUSINESS SIZE;73
ACHSWDR ;IHS/OIT/FCJ - DCIS ERROR REPORT
+1 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**15**;JUN 11,2001
+2 ;ACHS*3.1*15 New routine to print DCIS error reports
CHK ;
+1 SET ACHSFLG=0
+2 FOR I=1:1:9
IF ACHSERR(I)>0
Begin DoDot:1
+3 SET ACHSFLG=1
+4 SET $PIECE(^TMP($JOB,"ACHSWERR",ACHSDOC),U,I)=1
End DoDot:1
+5 IF '$DATA(^TMP($JOB,"ACHSWERR",0))
SET ^TMP($JOB,"ACHSWERR",0)=0
+6 IF ACHSFLG
SET ^TMP($JOB,"ACHSWERR",0)=^TMP($JOB,"ACHSWERR",0)+1
SET ACHSREC="^^^^^^^^^^^^^^^^^^^"
+7 QUIT
RPT ;
+1 IF $DATA(IO("S"))
XECUTE ACHSPPO
+2 SET ACHSFLG=0
SET ACHSQ=""
+3 DO BRPT^ACHSFU
+4 DO HDR
+5 IF ^TMP($JOB,"ACHSWERR",0)=0
SET ACHSFLG=1
DO END
QUIT
+6 SET ACHS=0
FOR
SET ACHS=$ORDER(^TMP($JOB,"ACHSWERR",ACHS))
IF ACHS=""
QUIT
Begin DoDot:1
+7 SET ACHSLN=^TMP($JOB,"ACHSWERR",ACHS)
+8 IF $Y>(IOSL-4)
DO HDR
+9 WRITE !,ACHS
+10 FOR I=1:1:9
IF $PIECE(^TMP($JOB,"ACHSWERR",ACHS),U,I)=1
SET X=$PIECE($TEXT(ERR+I),";",5)
WRITE ?X,"ERR"
+11 IF $Y>(IOSL-4)
IF IOST["C-"
KILL DIR
SET DIR(0)="E"
DO ^DIR
IF Y=0
SET ACHSQ=1
KILL DIR
End DoDot:1
IF ACHSQ=1
QUIT
+12 DO END
+13 QUIT
+14 ;
HDR ;
+1 USE IO
WRITE @IOF
+2 WRITE $$C^ACHS("CHS DCIS ERROR REPORT")
+3 WRITE !,ACHSLOC,!,ACHSTIME
+4 WRITE !!,"DOCUMENT",?12,"DATE",?18,"EFFECTIVE",?30,"CURRENT",?40,"ULTIMATE",?51,"DUNS",?57,"CITY-ST",?66,"ZIP",?71,"BUSINESS"
+5 WRITE !,?11,"SIGNED",?20,"DATE",?28,"COMPLETION",?39,"COMPLETION",?50,"NUMBER",?57,"LOCATION",?67,"+4",?73,"SIZE"
+6 WRITE !,?31,"DATE",?42,"DATE"
+7 WRITE !,ACHS("-")
+8 QUIT
END ;
+1 WRITE !!,"TOTAL RECORDS IN ERROR =",^TMP($JOB,"ACHSWERR",0)
+2 QUIT
ERR ;ERROR#;FIELD;DESCRIPTION;TAB
+1 ;1;2A;DATE SIGNED;12
+2 ;2;2B;EFFECTIVE DATE;20
+3 ;3;2C;CURRENT COMPLETION DATE;31
+4 ;4;2D;ULTIMATE COMPLETION DATE;42
+5 ;5;6A;TYPE OF CONTRACT;
+6 ;6;9A;DUNS NUMBER;51
+7 ;7;9C;PLACE OF PERFORMANCE-CITY STATE COUNTRY;59
+8 ;8;9K;ZIP+4;66
+9 ;9;11A;BUSINESS SIZE;73