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

ACGSPUTL.m

Go to the documentation of this file.
ACGSPUTL ;IHS/OIRM/DSD/THL,AEF - PRINT UTILITY FOR VENDOR AND GEOGRAPHICAL LOCATION LISTINGS; [ 03/27/2000   2:22 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;PRINT UTILITY FOR VENDOR AND GEOGRAPHICAL LOCATION LISTINGS
EXIT K ACGQUIT,ACGION,ACGIOPAR,ACG,ACGI,ACGDATA,ACGDIC,ACGTYPE,ACGX,ACGY,BY,FR,TO,DIC,DA,DR
 Q
VENDOR ;EP;TO PRINT VENDOR LISTINGS
 S ACGTYPE="V"
 I ACG4=236 G ZIS1
 S ACGDIC="^AUTTVNDR(",ACGFLDS="[ACG CONTRACTOR LIST]",ACGX="CONTRACTOR LISTING",DIS(0)="I $D(^AUTTVNDR(D0,11)),$L($P(^(11),U,13)),$D(^ACGS(""M"",$P(^AUTTVNDR(D0,11),U,13)))"
 S DIR(0)="SO^1:Print CIS Vendors Only;2:Print ALL Vendors",DIR("A")="Which one",DIR("B")=1
 W !
 D DIR^ACGSDIC
 Q:$D(ACGQUIT)
 I Y=1 S DIS(0)="I $D(^ACGS(""H"",D0))"
 D HEAD,CHOICE,EXIT
 Q
GL ;EP;TO PRINT GEOGRAPHICAL LOCATION LISTINGS
 S ACGTYPE="G",ACGDIC="^AUTTGL(",ACGFLDS="[ACG GEOGRAPHICAL LOCATION]",ACGX="GEOGRAPHICAL LOCATION LISTING"
 D HEAD,CHOICE,EXIT
 Q
CHOICE D DISPLAY
 S DIR(0)="LOA^1:"_(ACGI-1),DIR("A")="Which ONE(S): ",DIR("B")=1
 W !
 D DIR^ACGSDIC
 I X=""!($E(X)=U) S ACGQUIT="" Q
 S ACGSORT=Y
 G:ACGTYPE="V1" LOOP
 I ACGDIC["AUTTVNDR" D  Q:$D(ACGQUIT)
 .S DIR(0)="SO^1:CONTRACTOR SUMMARY;2:COMPLETE CONTRACTOR DATA",DIR("A")="Which REPORT",DIR("B")="1"
 .D DIR^ACGSDIC
 .Q:$D(ACGQUIT)
 .S ACGFLDS=$S(+Y=1:ACGFLDS,1:"[ACG VENDOR DATA-VENDOR-2]")
LOOP S (BY,FR,TO)=""
 F ACGI=1:1 S ACGX=$P(ACGSORT,",",ACGI) Q:'ACGX  I $D(ACGDATA(ACGX)) S ACGDATA=ACGDATA(ACGX),BY=BY_$P(ACGDATA,U,3)_",",FR=FR_$S($P(ACGDATA,U,4)'="":$P(ACGDATA,U,4),1:","),TO=TO_$S($P(ACGDATA,U,5)'="":$P(ACGDATA,U,5),1:",")
 F ACGX="BY","FR","TO" S:$E(@ACGX,$L(@ACGX))="," @ACGX=$E(@ACGX,1,($L(@ACGX)-1))
 D ZIS
 Q
DISPLAY W !!,"     Choose one or more sort criterion:",!
 F ACGI=1:1 S ACGDATA=$T(@ACGTYPE+ACGI) Q:$P(ACGDATA,";;",2)=""  S ACGDATA(ACGI)=$P(ACGDATA,";;",2) W !?10,$P(ACGDATA(ACGI),U),?20,$P(ACGDATA(ACGI),U,2)
 Q
ZIS S DIC=ACGDIC,FLDS=ACGFLDS,DIOEND="D:$E(IOST,1,2)=""C-"" HOLD^ACGSMENU W:$D(IOF) @IOF",ZTRTN="PRINT^ACGSPUTL",ZTDESC="CIS "_$S(ACGTYPE="V":"VENDOR",1:"GEOGRAPHICAL LOCATION")_" REPORT"
ZIS1 I ACG4=236 S ZTRTN="V1^ACGSPUTL"
 D ^ACGSZIS
 Q:$D(ACGQUIT)
PRINT I ION["HOST",$D(ACGIOPAR) S %ZIS("IOPAR")=ACGIOPAR S:$D(ACGIO("HFSIO")) IO("HFSIO")=ACGIO("HFSIO")
 S IOP=ACGION
 I ACG4=236 D V1 Q
 D EN1^DIP
 K IOP
 Q
V ;;
 ;;1^VENDOR NAME^.01;S2^^
 ;;2^EIN^1101;S2^^
 ;;3^WOMEN OWNED^1115,.01;S2^1,^1,
 ;;4^638 CONTRACTORS^1126,.01;S2^D4,^D4,
V1 ;
 I '$D(ZTQUEUED) S (ACGIOP,IOP)=ION D ^%ZIS I POP S ACGQUIT="" Q
 U IO
 D V11
 S ACG=""
 F  S ACG=$O(^ACGS("O",ACG)) Q:ACG=""!$D(ACGQUIT)  S ACGDA=0 F  S ACGDA=$O(^ACGS("O",ACG,ACGDA)) Q:'ACGDA  I $D(^ACGS(ACGDA,0)),$P(^(0),U)=0,$D(^("DT")) D
 .S ACGDT=^ACGS(ACGDA,"DT")
 .I $D(^ACGS(ACGDA,"IHS1")) S ACGIHS1=^("IHS1"),ACGCC=+ACGIHS1,ACGSC=$P(ACGIHS1,U,2) S ACGCC=$S(ACGCC:$P(^ACGCC(ACGCC,0),U),1:"--"),ACGSC=$S(ACGSC:$P(^ACGSC(ACGSC,0),U),1:"--"),ACGENT=ACGCC_ACGSC
 .E  S ACGENT="----"
 .W !,$P(ACGDT,U,11),?14,$P(ACGDT,U,5),?50,$P(ACGDT,U,10),?$X+1,ACGENT,?$X+1,$E($P(ACGDT,U,2),1,9),!?14,$P(ACGDT,U,6),?50,$E($P(ACGDT,U,7),1,15)
 .I $P(ACGDT,U,8) W ?69,$P(^DIC(5,$P(ACGDT,U,8),0),U,2),?$X+1,$P(ACGDT,U,9),?$X+1,$P(^DIC(5,$P(ACGDT,U,8),0),U,3)
 .I $Y>(IOSL-4) D:$E(IOST,1,2)="C-" HOLD^ACGSMENU D V11
 Q
V11 W:$D(IOF) @IOF W !?20,"IHS CIS CONTRACTOR LISTING",!,"===============================================================================",!
 Q
 ;
G ;;
 ;;1^LOCATION NAME^.01^^
 ;;2^COUNTY^#.05^^
 ;;3^STATE^#.06^^
 ;;4^LABOR SUPLUS AREA^.07^2^2
 ;;
 W !!?80-$L(ACGX)\2,ACGX K ACGX
 Q
DIR D ^DIR S:$D(DIRUT) ACGQUIT="" K DIR,DIRUT,DUOUT,DTOUT Q