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

ACGSNC.m

Go to the documentation of this file.
ACGSNC ;IHS/OIRM/DSD/THL,AEF - ENTRY POINT FOR NEW CONTRACTS; [ 03/27/2000  5:49 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;ENTRY POINT TO CREATE ALL NEW CONTRACTS
 N Y
NC S DIR(0)="SO^D:Definitive Contract;I:Indefinite Delivery Contract;G:Delivery Order > $100,000;N:Other Federal Source;L:Letter Contract;P:Small Purchase",DIR("A")="Type Procurement Action..",ACGNEW=""
 W @IOF
 D DIR^ACGSDIC
 Q:$D(ACGQUIT)
 S (ACG1,ACGNC,ACGFLDS,ACGFLDSS)=Y,ACG1DA=$S(Y="D":1,Y="I":2,Y="G":14,Y="N":16,Y="L":4,Y="P":15)
 F  D VND Q:$D(ACGQUIT)!$D(ACRDOCDA)
 K ACGQUIT
 Q
VND D VND^ACGSTAR1:'$D(ACGVDA),VND1^ACGSTAR1:$D(ACGVDA)
 Q:+Y<1!$D(ACGQUIT)
 S DIR(0)="YO",DIR("A")="Create a new "_$S(ACG1DA<14:"contract",ACG1DA=15:"small purchase",1:"delivery order")_" (Y/N)"
 W !
 D DIR^ACGSDIC
 I $D(ACGQUIT)!(Y'=1) K ACGNEW Q
 W ! D WAIT^DICD
NC1 ;PEP;TO CREATE NEW CIS ENTRY FROM ARMS
 ;;THIS POINT IS CALLED BY ARMS DURING INTERFACE BETWEEN ARMS AND CIS
 S ACGPARA=^ACGPARA(1,0)
 S (ACGCNO,ACGNEW)="",(ACG2,ACG3)="",ACG4=$P(ACGPARA,U,3),X=0,DIC="^ACGS(",DIC(0)="L"
DINUM ;
 S DINUM=$S($P(^ACGS(0),U,3)>(ACG4_"00000"):$P(^(0),U,3),1:(ACG4_"00000")) F  S DINUM=DINUM+1 Q:'$D(^ACGS(DINUM,0))
 D FILE^ACGSDIC
 D NOW^%DTC
 S DIE="^ACGS(",(DA,ACGRDA,ACGCNO)=+Y,DR=".02////0;.03////"_+Y_";.07////"_%_";.08////"_DUZ_";1////"_ACG1DA_";4////"_ACG4_";16////2;1005////"_ACG5DA_";103////"_ACGFY_";121////1;1099////"_DT
 S X=$E($P(^VA(200,DUZ,0),U,2),1,3)
 I X]"" D
 .I $L(X)<3 F I=1:1:3-$L(X) S X=X_" "
 .S DR=DR_";115////"_X
 S:ACG1DA'=15 DR=DR_";14////99;29////2;31////E;32////0;45////3;51////2;52////2;56////2;57////2;58////2;60////2;104////1;107////2;108////2;109////1;110////2;111////1;113////2;114////1"
 I ACG1DA=15!(ACG1DA=17) D
 .S ACGTOB=^AUTTVNDR(ACG5DA,11),ACGTOV=$P(ACGTOB,U,28),ACGTOB=$P(ACGTOB,U,27)
 .S DR=DR_";304////"_ACGTOB_";305////"_ACGTOV
 .S:$D(ACRDOCDA) DR=DR_";301////"_$P(^ACRDOC(ACRDOCDA,0),U,2)
 S:$D(ACRDOCDA) DR=DR_";2////"_$P(^ACRDOC(ACRDOCDA,0),U,2)_";.06////"_ACRDOCDA_";26////"_($P(^ACROBL(ACRDOCDA,0),".")+$S($E($P(^(0),".",2))>4:1,1:0))_";23////"_ACG23_";24////"_ACG24_";25////"_ACG25_";302////"_ACG302
 D DIE^ACGSDIC
 F ACG="DT2","DT3" S:'$D(^ACGS(ACGRDA,ACG)) ^ACGS(ACGRDA,ACG)=""
 D:'$D(ACRDOCDA) PF^ACGSTART
 Q
SEQ I '$P(^ACGPARA(1,0),U,4) S $P(^ACGPARA(1,0),U,4)=0
 L +^ACGPARA(1,0):4 I '$T G SEQ
 S ACGSEQ=$P(^ACGPARA(1,0),U,4)+1,$P(^(0),U,4)=ACGSEQ
 L -^ACGPARA(1,0):0
 I $L(ACGSEQ)<4 F ACGLENG=1:1:(4-$L(ACGSEQ)) S ACGSEQ="0"_ACGSEQ
 Q