Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ACGSRQP

ACGSRQP.m

Go to the documentation of this file.
ACGSRQP ;IHS/OIRM/DSD/THL,AEF - PRINT DATA INTEGRITY REPORT; [ 03/27/2000   2:22 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;PRINT DATA INTEGRITY REPORT
EN S ZTRTN="EN1^ACGSRQP",ZTDESC="CIS DATA INTEGRITY REPORT"
 D ^ACGSZIS
 D:'$D(ACGQUIT) EN1
EXIT K ACGX,^TMP("ACG")
 Q
EN1 ;EP;FOR QUEUED ROUTINE TO PRINT REPORT
 I '$D(ZTQUEUED) S (ACGIOP,IOP)=ACGION D ^%ZIS I POP S ACGQUIT="" Q
 U IO
 D ^XBKVAR,^ACGSRQ
EN4 D DATE,PAGE,EN2
 W:$D(^TMP("ACG",$J,"T")) !!,^("T")," RECORDS FOUND WITH ERRORS."
 I $D(IOST),$E(IOST,1,2)="C-" D HOLD^ACGSMENU
 W @IOF
 D DONE^ACGSZIS
 Q
EN2 ;EP;TO DISPLAY ERRORS IN CIS ACTION
 D DATE,PAGE
 Q:'$D(^TMP("ACG",$J))
 S ACGJ=$O(^TMP("ACG",$J,""))
 Q:ACGJ=""
 S ACGJ=""
 F  S ACGJ=$O(^TMP("ACG",$J,ACGJ)) Q:ACGJ=""!$D(ACGQUIT)  D EN21
 Q
EN21 S ACG2=0
 F  S ACG2=$O(^TMP("ACG",$J,ACGJ,ACG2)) Q:'ACG2!$D(ACGQUIT)  D
 .I $D(^TMP("ACG",$J,ACGJ,ACG2))=1 S ACGX=^(ACG2) D P Q
 .S ACGA=0
 .F  S ACGA=$O(^TMP("ACG",$J,ACGJ,ACG2,ACGA)) Q:'ACGA!$D(ACGQUIT)  D
 ..I $D(^TMP("ACG",$J,ACGJ,ACG2,ACGA))=1 S ACGX=^(ACGA) D P Q
 ..I $D(^TMP("ACG",$J,ACGJ,ACG2,ACGA))=10 S ACGB=0 F  S ACGB=$O(^TMP("ACG",$J,ACGJ,ACG2,ACGA,ACGB)) Q:'ACGB  D
 ...I $D(^TMP("ACG",$J,ACGJ,ACG2,ACGA,ACGB))=1 S ACGX=^(ACGB) D P
 ...I $D(^TMP("ACG",$J,ACGJ,ACG2,ACGA,ACGB))=10 S ACGC=0 F  S ACGC=$O(^TMP("ACG",$J,ACGJ,ACG2,ACGA,ACGB,ACGC)) Q:'ACGC  S ACGX=^(ACGC) D P
 Q
PAGE I $D(ACGQUIT) W @IOF Q
 S ACGPAGE=ACGPAGE+1
 W @IOF,!,"CIS ERROR REPORT, PRINTED ON: ",ACGDT,?60,"PAGE: ",ACGPAGE,!,"--------------------------------------------------------------------------------",!
 Q
DATE D NOW^%DTC S Y=%,ACGPAGE=0 X ^DD("DD") S ACGDT=Y
 Q
P W !,"CONTRACT NUMBER:  ",ACGJ
 W !,"Item ",ACG2," errors:  "
 S ACGI=$P(ACGX,U),ACGX=$P(ACGX,U,2,999)
 F Y=1:1:3 S ACG(Y)=$P(ACGI,";",Y)
 W ?15,"Item ",+ACG(1)," = ",$S($P(ACG(1),"++",2)'="":$P(ACG(1),"++",2),1:"Null")
 W:ACG(2)'="" " and Item ",+ACG(2)," = ",$S($P(ACG(2),"++",2)'="":$P(ACG(2),"++",2),1:"Null")
 W:ACG(3)'="" " and Item ",+ACG(3)," = ",$S($P(ACG(3),"++",2)'="":$P(ACG(3),"++",2),1:"Null")
 X ACGX W ! I $Y>(IOSL-5) D:$E(IOST,1,2)="C-" HOLD^ACGSMENU D PAGE
 F X=1:1:3 S:ACG(X)'="" ACGXX(+ACG(X))=""
 Q