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

ACGSVGL.m

Go to the documentation of this file.
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