ACGSVGL ;IHS/OIRM/DSD/THL,AEF - CHECK FOR REQUIRED VENDOR AND GEOGRAPHICAL LOCATION DATA; [ 03/27/2000 2:22 PM ]
;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
;;CHECK FOR REQUIRED VENDOR AND GEOGRAPHICAL LOCATION DATA
EN K ACG,^TMP("ACGV",$J),^TMP("ACGGL",$J),ACGQUIT
D EN1
EXIT K ACG,ACG0,ACG11,ACG13,ACGV,ACGGL,ACGI,ACGF,ACGFL,^TMP("ACGV",$J),^TMP("ACGGL",$J),ACGION,ACGQUIT
Q
EN1 W !!,"The following procedure will check contractors and locations for missing data."
K ACGMISS
S ACG=0
F S ACG=$O(^ACGS("H",ACG)) Q:'ACG I '$D(ACGMISS),$D(^AUTTVNDR(ACG,0)),$D(^(11)) S ACG11=^(11) D
.K ACGSP,ACGCIS
.S ACGX=0 F S ACGX=$O(^ACGS("H",ACG,ACGX)) Q:'ACGX I $D(^ACGS(ACGX,"DT")) S:"^15^17^"[(U_+^("DT")_U) ACGSP="" S:"^15^17^"'[(U_+^("DT")_U) ACGCIS=""
.I $D(ACGCIS) F ACGI=13,15:1:17,19:1:22,25,26 D Q:$D(ACGMISS)
..I $P(ACG11,U,ACGI)="" S ACGMISS="" Q
..I ACGI=13,$E(ACG11)=1,$P(ACG11,U,2)="" S ACGMISS="" Q
..I ACGI=22,$P(ACG11,U,22)=1,$P(ACG11,U,18)="" S ACGMISS=""
.Q:$D(ACGMISS)
.I $D(ACGSP) F ACGI=13,27,28 I $P(^AUTTVNDR(ACG,11),U,ACGI)="" S ACGMISS="" Q
I '$D(ACGMISS) D
.S ACG=0
.F S ACG=$O(^AUTTGL(ACG)) Q:'ACG I $D(^AUTTGL(ACG,0)) S ACG0=^(0) F ACGI=2:1:7 I $P(ACG0,U,ACGI)="" S ACGMISS="" Q
I '$D(ACGMISS) W !!,"NO MISSING CONTRACTOR OR GEOGRAPHICAL LOCATION DATA FOUND." H 3 Q
E K ACGMISS W !!,"MISSING CONTRACTOR OR GEOGRAPHICAL LOCATION DATA FOUND.",!,"INDICATE WHERE TO PRINT THE MISSING DATA REPORT."
S ZTRTN="E^ACGSVGL",ZTDESC="CIS CONTRACTOR/LOCATION MISSING DATA"
D ^ACGSZIS
I $D(ACGQUIT) K ACGQUIT Q
I $D(IO("Q")) D DONE^ACGSZIS Q
U IO
D E,DONE^ACGSZIS
Q
E D:'$D(ZTQUEUED) WAIT^DICD
F X="ACGGL","ACGV" K ^TMP(X,$J)
D CHK
D:$D(^TMP("ACGGL",$J)) GL
D:$D(^TMP("ACGV",$J)) V
D EXIT
Q
GL D GLHD
S ACG=""
F S ACG=$O(^TMP("ACGGL",$J,ACG)) Q:ACG=""!$D(ACGQUIT) D
.W !!,ACG," is missing:"
.S ACGF=0
.F S ACGF=$O(^TMP("ACGGL",$J,ACG,ACGF)) Q:'ACGF!$D(ACGQUIT) S ACGFL=$P($T(@("GL"_ACGF)),";;",2) W !?10,ACGFL D
..I $Y>(IOSL-5) D:IOST["C-"&'$D(ACGQUIT) HOLD^ACGSMENU Q:$D(ACGQUIT) D GLHD W:$O(^TMP("ACGGL",$J,ACG,ACGF)) !!,ACG," is missing:"
D:IOST["C-"&'$D(ACGQUIT) HOLD^ACGSMENU
Q
GLHD W:$D(IOF) @IOF
W !!,"The following GEOGRAPHICAL LOCATION(S) are missing essential data.",!,"This data must be completed before you continue."
Q
V D VHD
S ACG=""
F S ACG=$O(^TMP("ACGV",$J,ACG)) Q:ACG=""!$D(ACGQUIT) D
.W !!,ACG," is missing:"
.S ACGF=0
.F S ACGF=$O(^TMP("ACGV",$J,ACG,ACGF)) Q:'ACGF!$D(ACGQUIT) S ACGFL=$P($T(@("V"_ACGF)),";;",2) W !?10,ACGFL D
..I $Y>(IOSL-5) D:IOST["C-"&'$D(ACGQUIT) HOLD^ACGSMENU Q:$D(ACGQUIT) D VHD W:$O(^TMP("ACGV",$J,ACG,ACGF)) !!,ACG," is missing:"
D:IOST["C-"&'$D(ACGQUIT) HOLD^ACGSMENU
Q
VHD W:$D(IOF) @IOF
W !!,"The following CONTRACTOR(S) are missing essential data.",!,"This data must be completed before you continue."
Q
CHK S ACG=0
F S ACG=$O(^ACGS("H",ACG)) Q:'ACG I $D(^AUTTVNDR(ACG,0)),$D(^(11)) S ACG0=$P(^(0),U),ACG11=^(11),ACG13=$S($D(^(13)):^(13),1:"") D
.K ACGSP,ACGCIS
.S ACGX=0 F S ACGX=$O(^ACGS("H",ACG,ACGX)) Q:'ACGX I $D(^ACGS(ACGX,"DT")) S:"^15^17^"[(U_+^("DT")_U) ACGSP="" S:"^15^17^"'[(U_+^("DT")_U) ACGCIS=""
.I $D(ACGCIS) D
..F ACGI=13,15:1:17,19:1:22,25,26 S:$P(ACG11,U,ACGI)="" ^TMP("ACGV",$J,ACG0,ACGI)="" D
...I ACGI=13,$E(ACG11)=1,$P(ACG11,U,2)="" S ^TMP("ACGV",$J,ACG0,2)=""
...I ACGI=22,$P(ACG11,U,22)=1,$P(ACG11,U,18)="" S ^TMP("ACGV",$J,ACG0,18)=""
.I $D(ACGSP) F ACGI=13,27,28 S:$P(ACG11,U,ACGI)="" ^TMP("ACGV",$J,ACG0,ACGI)="" I ACGI=13,$E(ACG11)=1,$P(ACG11,U,2)="" S ^TMP("ACGV",$J,ACG0,2)=""
.F ACGI=1:1:4 S:$P(ACG13,U,ACGI)="" ^TMP("ACGV",$J,ACG0,30+ACGI)=""
.K ACGSP,ACGCIS
S ACG=0
F S ACG=$O(^AUTTGL(ACG)) Q:'ACG F ACGI=2:1:7 S:$P(^AUTTGL(ACG,0),U,ACGI)="" ^TMP("ACGGL",$J,$P(^AUTTGL(ACG,0),U),ACGI)=""
Q
DIR D ^DIR S:$D(DIRUT) ACGQUIT="" K DIR,DIRUT,DUOUT,DTOUT Q
;;
GL2 ;;COUNTY CODE
GL3 ;;CITY CODE
GL4 ;;CONGRESSIONAL DISTRICT
GL5 ;;COUNTY
GL6 ;;STATE
GL7 ;;LABOR SURPLUS AREA
V1 ;;EIN NUMBER
V2 ;;EIN SUFFIX
V13 ;;EIN & SUFFIX
V15 ;;WOMEN OWNED BUSINESS
V16 ;;CONGRESSIONAL DISTRICT
V17 ;;LABOR SURPLUS AREA
V18 ;;SIZE OF BUSINESS
V19 ;;ORGANIZATION/INDIVIDUAL
V20 ;;MINORITY BUSINESS (FOR PROFIT)
V21 ;;MINORITY NON-PROFIT BUSSINESS
V22 ;;SMALL BUSINESS STATUS
V25 ;;GEOGRAPHICAL LOCATION
V26 ;;TYPE OF BUSINESS
V27 ;;SMALL PURCHASE VENDOR TYPE OF BUSINESS
V28 ;;SMALL PURCHASE VENDOR TYPE OF VENDOR
V31 ;;STREET ADDRESS
V32 ;;CITY ADDRESS
V33 ;;STATE
V34 ;;ZIPCODE
ACGSVGL ;IHS/OIRM/DSD/THL,AEF - CHECK FOR REQUIRED VENDOR AND GEOGRAPHICAL LOCATION DATA; [ 03/27/2000 2:22 PM ]
+1 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
+2 ;;CHECK FOR REQUIRED VENDOR AND GEOGRAPHICAL LOCATION DATA
EN KILL ACG,^TMP("ACGV",$JOB),^TMP("ACGGL",$JOB),ACGQUIT
+1 DO EN1
EXIT KILL ACG,ACG0,ACG11,ACG13,ACGV,ACGGL,ACGI,ACGF,ACGFL,^TMP("ACGV",$JOB),^TMP("ACGGL",$JOB),ACGION,ACGQUIT
+1 QUIT
EN1 WRITE !!,"The following procedure will check contractors and locations for missing data."
+1 KILL ACGMISS
+2 SET ACG=0
+3 FOR
SET ACG=$ORDER(^ACGS("H",ACG))
IF 'ACG
QUIT
IF '$DATA(ACGMISS)
IF $DATA(^AUTTVNDR(ACG,0))
IF $DATA(^(11))
SET ACG11=^(11)
Begin DoDot:1
+4 KILL ACGSP,ACGCIS
+5 SET ACGX=0
FOR
SET ACGX=$ORDER(^ACGS("H",ACG,ACGX))
IF 'ACGX
QUIT
IF $DATA(^ACGS(ACGX,"DT"))
IF "^15^17^"[(U_+^("DT")_U)
SET ACGSP=""
IF "^15^17^"'[(U_+^("DT")_U)
SET ACGCIS=""
+6 IF $DATA(ACGCIS)
FOR ACGI=13,15:1:17,19:1:22,25,26
Begin DoDot:2
+7 IF $PIECE(ACG11,U,ACGI)=""
SET ACGMISS=""
QUIT
+8 IF ACGI=13
IF $EXTRACT(ACG11)=1
IF $PIECE(ACG11,U,2)=""
SET ACGMISS=""
QUIT
+9 IF ACGI=22
IF $PIECE(ACG11,U,22)=1
IF $PIECE(ACG11,U,18)=""
SET ACGMISS=""
End DoDot:2
IF $DATA(ACGMISS)
QUIT
+10 IF $DATA(ACGMISS)
QUIT
+11 IF $DATA(ACGSP)
FOR ACGI=13,27,28
IF $PIECE(^AUTTVNDR(ACG,11),U,ACGI)=""
SET ACGMISS=""
QUIT
End DoDot:1
+12 IF '$DATA(ACGMISS)
Begin DoDot:1
+13 SET ACG=0
+14 FOR
SET ACG=$ORDER(^AUTTGL(ACG))
IF 'ACG
QUIT
IF $DATA(^AUTTGL(ACG,0))
SET ACG0=^(0)
FOR ACGI=2:1:7
IF $PIECE(ACG0,U,ACGI)=""
SET ACGMISS=""
QUIT
End DoDot:1
+15 IF '$DATA(ACGMISS)
WRITE !!,"NO MISSING CONTRACTOR OR GEOGRAPHICAL LOCATION DATA FOUND."
HANG 3
QUIT
+16 IF '$TEST
KILL ACGMISS
WRITE !!,"MISSING CONTRACTOR OR GEOGRAPHICAL LOCATION DATA FOUND.",!,"INDICATE WHERE TO PRINT THE MISSING DATA REPORT."
+17 SET ZTRTN="E^ACGSVGL"
SET ZTDESC="CIS CONTRACTOR/LOCATION MISSING DATA"
+18 DO ^ACGSZIS
+19 IF $DATA(ACGQUIT)
KILL ACGQUIT
QUIT
+20 IF $DATA(IO("Q"))
DO DONE^ACGSZIS
QUIT
+21 USE IO
+22 DO E
DO DONE^ACGSZIS
+23 QUIT
E IF '$DATA(ZTQUEUED)
DO WAIT^DICD
+1 FOR X="ACGGL","ACGV"
KILL ^TMP(X,$JOB)
+2 DO CHK
+3 IF $DATA(^TMP("ACGGL",$JOB))
DO GL
+4 IF $DATA(^TMP("ACGV",$JOB))
DO V
+5 DO EXIT
+6 QUIT
GL DO GLHD
+1 SET ACG=""
+2 FOR
SET ACG=$ORDER(^TMP("ACGGL",$JOB,ACG))
IF ACG=""!$DATA(ACGQUIT)
QUIT
Begin DoDot:1
+3 WRITE !!,ACG," is missing:"
+4 SET ACGF=0
+5 FOR
SET ACGF=$ORDER(^TMP("ACGGL",$JOB,ACG,ACGF))
IF 'ACGF!$DATA(ACGQUIT)
QUIT
SET ACGFL=$PIECE($TEXT(@("GL"_ACGF)),";;",2)
WRITE !?10,ACGFL
Begin DoDot:2
+6 IF $Y>(IOSL-5)
IF IOST["C-"&'$DATA(ACGQUIT)
DO HOLD^ACGSMENU
IF $DATA(ACGQUIT)
QUIT
DO GLHD
IF $ORDER(^TMP("ACGGL",$JOB,ACG,ACGF))
WRITE !!,ACG," is missing:"
End DoDot:2
End DoDot:1
+7 IF IOST["C-"&'$DATA(ACGQUIT)
DO HOLD^ACGSMENU
+8 QUIT
GLHD IF $DATA(IOF)
WRITE @IOF
+1 WRITE !!,"The following GEOGRAPHICAL LOCATION(S) are missing essential data.",!,"This data must be completed before you continue."
+2 QUIT
V DO VHD
+1 SET ACG=""
+2 FOR
SET ACG=$ORDER(^TMP("ACGV",$JOB,ACG))
IF ACG=""!$DATA(ACGQUIT)
QUIT
Begin DoDot:1
+3 WRITE !!,ACG," is missing:"
+4 SET ACGF=0
+5 FOR
SET ACGF=$ORDER(^TMP("ACGV",$JOB,ACG,ACGF))
IF 'ACGF!$DATA(ACGQUIT)
QUIT
SET ACGFL=$PIECE($TEXT(@("V"_ACGF)),";;",2)
WRITE !?10,ACGFL
Begin DoDot:2
+6 IF $Y>(IOSL-5)
IF IOST["C-"&'$DATA(ACGQUIT)
DO HOLD^ACGSMENU
IF $DATA(ACGQUIT)
QUIT
DO VHD
IF $ORDER(^TMP("ACGV",$JOB,ACG,ACGF))
WRITE !!,ACG," is missing:"
End DoDot:2
End DoDot:1
+7 IF IOST["C-"&'$DATA(ACGQUIT)
DO HOLD^ACGSMENU
+8 QUIT
VHD IF $DATA(IOF)
WRITE @IOF
+1 WRITE !!,"The following CONTRACTOR(S) are missing essential data.",!,"This data must be completed before you continue."
+2 QUIT
CHK SET ACG=0
+1 FOR
SET ACG=$ORDER(^ACGS("H",ACG))
IF 'ACG
QUIT
IF $DATA(^AUTTVNDR(ACG,0))
IF $DATA(^(11))
SET ACG0=$PIECE(^(0),U)
SET ACG11=^(11)
SET ACG13=$SELECT($DATA(^(13)):^(13),1:"")
Begin DoDot:1
+2 KILL ACGSP,ACGCIS
+3 SET ACGX=0
FOR
SET ACGX=$ORDER(^ACGS("H",ACG,ACGX))
IF 'ACGX
QUIT
IF $DATA(^ACGS(ACGX,"DT"))
IF "^15^17^"[(U_+^("DT")_U)
SET ACGSP=""
IF "^15^17^"'[(U_+^("DT")_U)
SET ACGCIS=""
+4 IF $DATA(ACGCIS)
Begin DoDot:2
+5 FOR ACGI=13,15:1:17,19:1:22,25,26
IF $PIECE(ACG11,U,ACGI)=""
SET ^TMP("ACGV",$JOB,ACG0,ACGI)=""
Begin DoDot:3
+6 IF ACGI=13
IF $EXTRACT(ACG11)=1
IF $PIECE(ACG11,U,2)=""
SET ^TMP("ACGV",$JOB,ACG0,2)=""
+7 IF ACGI=22
IF $PIECE(ACG11,U,22)=1
IF $PIECE(ACG11,U,18)=""
SET ^TMP("ACGV",$JOB,ACG0,18)=""
End DoDot:3
End DoDot:2
+8 IF $DATA(ACGSP)
FOR ACGI=13,27,28
IF $PIECE(ACG11,U,ACGI)=""
SET ^TMP("ACGV",$JOB,ACG0,ACGI)=""
IF ACGI=13
IF $EXTRACT(ACG11)=1
IF $PIECE(ACG11,U,2)=""
SET ^TMP("ACGV",$JOB,ACG0,2)=""
+9 FOR ACGI=1:1:4
IF $PIECE(ACG13,U,ACGI)=""
SET ^TMP("ACGV",$JOB,ACG0,30+ACGI)=""
+10 KILL ACGSP,ACGCIS
End DoDot:1
+11 SET ACG=0
+12 FOR
SET ACG=$ORDER(^AUTTGL(ACG))
IF 'ACG
QUIT
FOR ACGI=2:1:7
IF $PIECE(^AUTTGL(ACG,0),U,ACGI)=""
SET ^TMP("ACGGL",$JOB,$PIECE(^AUTTGL(ACG,0),U),ACGI)=""
+13 QUIT
DIR DO ^DIR
IF $DATA(DIRUT)
SET ACGQUIT=""
KILL DIR,DIRUT,DUOUT,DTOUT
QUIT
+1 ;;
GL2 ;;COUNTY CODE
GL3 ;;CITY CODE
GL4 ;;CONGRESSIONAL DISTRICT
GL5 ;;COUNTY
GL6 ;;STATE
GL7 ;;LABOR SURPLUS AREA
V1 ;;EIN NUMBER
V2 ;;EIN SUFFIX
V13 ;;EIN & SUFFIX
V15 ;;WOMEN OWNED BUSINESS
V16 ;;CONGRESSIONAL DISTRICT
V17 ;;LABOR SURPLUS AREA
V18 ;;SIZE OF BUSINESS
V19 ;;ORGANIZATION/INDIVIDUAL
V20 ;;MINORITY BUSINESS (FOR PROFIT)
V21 ;;MINORITY NON-PROFIT BUSSINESS
V22 ;;SMALL BUSINESS STATUS
V25 ;;GEOGRAPHICAL LOCATION
V26 ;;TYPE OF BUSINESS
V27 ;;SMALL PURCHASE VENDOR TYPE OF BUSINESS
V28 ;;SMALL PURCHASE VENDOR TYPE OF VENDOR
V31 ;;STREET ADDRESS
V32 ;;CITY ADDRESS
V33 ;;STATE
V34 ;;ZIPCODE