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

ACRFPUTL.m

Go to the documentation of this file.
ACRFPUTL ;IHS/OIRM/DSD/THL,AEF - PRINT VENDOR DATA; [ 09/06/2006   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**20**;NOV 05, 2001
 ;;ROUTINE TO PRINT VENDOR DATA
EXIT K ACRQUIT,ACR,ACRI,ACRDATA,ACRDIC,ACRTYPE,ACRX,ACRY,BY,FR,TO,DIC,DA,DR,FLDS,ACRBY,ACRFR,ACRTO
 Q
VENDOR ;EP;TO PRINT VENDOR LISTINGS
 S ACRTYPE="V"
 S ACRDIC="^AUTTVNDR("
 S ACRFLDS="[ACR CONTRACTOR LIST]"
 S ACRX="CONTRACTOR LISTING"
 S DIR(0)="SO^1:Print ARMS Vendors Only;2:Print ALL Vendors"
 S DIR("A")="Which one"
 S DIR("B")=1
 W !
 D DIR^ACRFDIC
 Q:$D(ACRQUIT)!$D(ACROUT)
 I Y=1 S DIS(0)="I $D(^ACRDOC(""I"",D0))"
 D CHOICE,EXIT
 Q
CHOICE D DISPLAY
 S DIR(0)="LOA^1:"_(ACRI-1)
 S DIR("A")="Which ONE(S): "
 S DIR("B")=1
 W !
 D DIR^ACRFDIC
 I X=""!($E(X)=U) S ACRQUIT="" Q
 S ACRX=$E(Y,1,($L(Y)-1))
 G:ACRTYPE="V1" LOOP
 S DIR(0)="SO^1:CONTRACTOR SUMMARY;2:COMPLETE CONTRACTOR DATA"
 S DIR("A")="Which REPORT"
 S DIR("B")="1"
 D DIR^ACRFDIC
 Q:$D(ACRQUIT)!$D(ACROUT)
 S ACRFLDS=$S(+Y=1:ACRFLDS,1:"[ACR VENDOR DATA-VENDOR-2]")
LOOP S (BY,FR,TO)=""
 F ACRI=1:1:$L(ACRX,",") D
 .S ACRDATA=ACRDATA($P(ACRX,",",ACRI))
 .S BY=BY_$P(ACRDATA,U,3)_","
 .S FR=FR_$S($P(ACRDATA,U,4)]"":$P(ACRDATA,U,4),1:",")
 .S TO=TO_$S($P(ACRDATA,U,5)]"":$P(ACRDATA,U,5),1:",")
 F ACRX="BY","FR","TO" D
 .S:$E(@ACRX,$L(@ACRX))="," @ACRX=$E(@ACRX,1,($L(@ACRX)-1))
 S ACRBY=BY
 S ACRFR=FR
 S ACRTO=TO
 D ZIS
 Q
DISPLAY W !!,"     Choose one or more sort criterion:"
 W !
 F ACRI=1:1 Q:$D(ACRQUIT)  D
 .S ACRDATA=$T(@ACRTYPE+ACRI)
 .I $P(ACRDATA,";;",2)="" S ACRQUIT="" Q
 .S ACRDATA(ACRI)=$P(ACRDATA,";;",2)
 .W !?10,$P(ACRDATA(ACRI),U)
 .W ?20,$P(ACRDATA(ACRI),U,2)
 K ACRQUIT
 Q
ZIS S ACRRTN="PRINT^ACRFPUTL"
 S ZTDESC="ARMS VENDOR"
ZIS1 D ^ACRFZIS
 Q
PRINT S IOP=ION
 S DIC=ACRDIC
 S FLDS=ACRFLDS
 S DIOEND="D:$E(IOST,1,2)=""C-"" PAUSE^ACRFWARN W @IOF"
 S BY=ACRBY
 S FR=ACRFR
 S TO=ACRTO
 S DIS(0)="I $P($G(^AUTTVNDR(D0,0)),U,5)="""""  ;ACR*2.1*20.14
 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,
 ;;5^BUY INDIAN^1128,.01;S2^6,^6,
V1 ;
 D V11
 S ACR=""
 F  S ACR=$O(^ACRF("O",ACR)) Q:ACR=""!$D(ACRQUIT)!$D(ACROUT)  D
 .S ACRDA=0
 .F  S ACRDA=$O(^ACRF("O",ACR,ACRDA)) Q:'ACRDA  D
 ..Q:'$D(^ACRF(ACRDA,0))!($P($G(^(0)),U)=0)!'$D(^ACRF(ACRDA,"DT"))
 ..S ACRDT=^ACRF(ACRDA,"DT")
 ..I $D(^ACRF(ACRDA,"IHS1")) D  I 1
 ...S ACRIHS1=^ACRF(ACRDA,"IHS1")
 ...S ACRCC=+ACRIHS1
 ...S ACRFC=$P(ACRIHS1,U,2)
 ...S ACRCC=$S(ACRCC:$P(^ACRCC(ACRCC,0),U),1:"--")
 ...S ACRFC=$S(ACRFC:$P(^ACRFC(ACRFC,0),U),1:"--")
 ...S ACRENT=ACRCC_ACRFC
 ..E  S ACRENT="----"
 ..W !,$P(ACRDT,U,11)
 ..W ?14,$P(ACRDT,U,5)
 ..W ?50,$P(ACRDT,U,10)
 ..W ?$X+1,ACRENT
 ..W ?$X+1,$E($P(ACRDT,U,2),1,9)
 ..W !?14,$P(ACRDT,U,6)
 ..W ?50,$E($P(ACRDT,U,7),1,15)
 ..I $P(ACRDT,U,8) D
 ...W ?69,$P(^DIC(5,$P(ACRDT,U,8),0),U,2)
 ...W ?$X+1,$P(ACRDT,U,9)
 ...W ?$X+1,$P(^DIC(5,$P(ACRDT,U,8),0),U,3)
 ..I $Y>(IOSL-4) D
 ...D PAUSE^ACRFWARN:$E(IOST,1,2)="C-"
 ...D V11
 Q
V11 W @IOF W !?20,"IHS ARMS CONTRACTOR LISTING"
 W !,"==============================================================================="
 W !
 Q
 ;
G ;;
 ;;1^LOCATION NAME^.01^^
 ;;2^COUNTY^#.05^^
 ;;3^STATE^#.06^^
 ;;4^LABOR SUPLUS AREA^.07^2^2
 ;;