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

ACRFCIS.m

Go to the documentation of this file.
ACRFCIS ;IHS/OIRM/DSD/THL,AEF - ARMS TO CIS INTERFACE; [ 01/03/2003  8:01 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**3,5**;NOV 05, 2001
 ;;ROUTINE USED TO MANAGE INTERFACE BETWEEN ARMS AND THE CONTRACT
 ;;INFORMATION SYSTEM (CIS)
EN D EN1
EXIT K ACR,ACRQUIT
 D EXIT^ACGSEXIT
 Q
EN1 D HOME^ACGSMENU
 S (ACGRDA,ACRCISDA)=$P(^ACRDOC(ACRDOCDA,0),U,16)
 S ACRPO=$P(^ACRDOC(ACRDOCDA,0),U,2)
 S (ACRVDA,ACG5DA)=$P(^ACRDOC(ACRDOCDA,"PO"),U,5)
 S ACGPARA=^ACGPARA(1,0)
 S ACG4=$P(ACGPARA,U,3)
 D VCHK
 I $D(ACRQUIT) K ACRQUIT Q
 D EINCHK
 I $D(ACRQUIT) K ACRQUIT Q
 I 'ACRCISDA D  Q
 .D ADD
 .D EN1:$P(^ACRDOC(ACRDOCDA,0),U,16)
 I ACRCISDA D EDIT
 Q
ADD ;EP;
 S ACG23=$P(^ACRDOC(ACRDOCDA,"PO"),U)
 S ACG5DA=$P(^ACRDOC(ACRDOCDA,"PO"),U,5)
 S ACG25=$P(^ACRDOC(ACRDOCDA,"PO"),U,12)
 S ACGPARA=^ACGPARA(1,0)  ; *** ACR*2.1*5.09
 S ACG24=ACG23
 S ACG302=$O(^ACRSS("C",ACRDOCDA,0))
 D VCHK
 I $D(ACRQUIT) K ACRQUIT Q
 D EINCHK
 I $D(ACRQUIT) K ACRQUIT Q
 I ACG302,$D(^ACRSS(ACG302,0)) S ACG302=$P(^(0),U,4)
 S DIR(0)="SO^1:New Contract (Definitive or Indefinite Delivery);2:Contract Modification;3:Small Purchase Action"
 S DIR("A")="Which one"
 D DIR^ACRFDIC
 Q:+Y<1
 I Y=1 D ^ACGSNC
 I Y=3 D  G ADD1
 .D FY^ACGSEXP
 .S (ACG1,ACGNC,ACGFLDS,ACGFLDSS)="P"
 .S ACG1DA=15
 .D NC1^ACGSNC
ADD1 I $D(ACGRDA),ACGRDA,$D(^ACGS(ACGRDA,0)) D
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR=".16////"_ACGRDA
 .D DIE^ACRFDIC
 .N ACROBL0
 .S (ACRSSDA,ACROBL0)=0
 .F  S ACRSSDA=$O(^ACRSS("J",ACRDOCDA,ACRSSDA)) Q:'ACRSSDA  D
 ..S:$D(^ACRSS(ACRSSDA,"DT")) ACROBL0=ACROBL0+$P(^("DT"),U,4)
 .S DA=ACGRDA
 .S DIE="^ACGS("
 .S DR="26////"_+ACROBL0
 .D DIE^ACRFDIC
 .S DA=ACGRDA
 .S DIE="^ACGS("
 .S DR="307T;303T;306T;27 22 PROC PURPOSE CODE........"
 .W !
 .D DIE^ACRFDIC
 Q
BPAADD ;EP;TO ADD SMALL PURCHASE DATA FOR A BPA
 S ACG0=^ACGS(ACRBPASP,0)
 S ACG10=^ACGS(ACRBPASP,10)
 S ACGDT=^ACGS(ACRBPASP,"DT")
 S ACGDT1=^ACGS(ACRBPASP,"DT1")
 S ACGIHS=^ACGS(ACRBPASP,"IHS")
 S ACGSP=^ACGS(ACRBPASP,"SP")
 S ACGPARA=^ACGPARA(1,0)
 S ACG1DA=+ACGDT
 S (ACG1,ACGNC,ACGFLDS,ACGFLDSS)=$P(^ACGTPA(ACG1DA,0),U)
 S ACG5DA=$P(ACRDOCPO,U,5)
 S ACGFY=$P(ACGIHS,U,4)
 S ACG23=$P(^ACRDOC(ACRDOCDA,"PO"),U)
 S ACG25=$P(^ACRDOC(ACRDOCDA,"PO"),U,12)
 S ACG24=ACG23
 S ACG302=$O(^ACRSS("C",ACRDOCDA,0))
 I ACG302,$D(^ACRSS(ACG302,0)) S ACG302=$P(^(0),U,4)
 D NC1^ACGSNC
 W "..."
 S X=ACGSP
 S DA=ACGRDA
 S DIE="^ACGS("
 S DR="4////"_$P(ACGDT,U,4)                   ;ACR*2.1*3.27
 S DR=DR_";23////"_DT                         ;ACR*2.1*3.27
 S DR=DR_";24////"_$G(ACROD)       ;BEGIN DATE ACR*2.1*3.27
 S DR=DR_";25////"_$G(ACRRQDD)     ;END DATE   ACR*2.1*3.27
 S DR=DR_";27////"_$P(ACGDT1,U,6)             ;ACR*2.1*3.27
 S DR=DR_";301////"_$P(^ACRDOC(ACRDOCDA,0),U) ;ACR*2.1*3.27
 S DR=DR_";302////"_$P(X,U,2) ;ACR*2.1*3.27
 S DR=DR_";303////"_$P(X,U,3) ;ACR*2.1*3.27
 S DR=DR_";304////"_$P(X,U,4) ;ACR*2.1*3.27
 S DR=DR_";305////"_$P(X,U,5) ;ACR*2.1*3.27
 S DR=DR_";306////"_$P(X,U,6) ;ACR*2.1*3.27
 S DR=DR_";307////"_$P(X,U,7) ;ACR*2.1*3.27
 S DR=DR_";115////"_$P(ACGIHS,U,116)          ;ACR*2.1*3.27
 D DIE^ACRFDIC
 S DA=ACRDOCDA
 S DIE="^ACRDOC("
 S DR=".16////"_ACGRDA
 D DIE^ACRFDIC
 D KILL^ACGSKILL
 K ACG0,ACG10,ACGDT,ACGDT1,ACGIHS,ACGSP,ACGPARA,ACG23,ACG24,ACG25,ACG302,ACG4
 Q
EDIT S DA=ACRCISDA
 S DIE="^ACGS("
 S DR="[ACR SMALL PURCHASE DATA]"
 D DDS^ACRFDIC
 Q:'$D(ACRSCREN)
 K ACRSCREN
 S ACGRDA=ACRCISDA
 S ACG5DA=ACRVDA
 S ACGCNO=$P(^ACGS(ACGRDA,0),U,3)
 D CS^ACGSCS
 Q
SYNC ;EP;TO ENSURE THAT CIS INFO STAYS IN SYNC WITH ARMS INFO
 Q:'$P(^ACRDOC(ACRDOCDA,0),U,16)
 S ACRCISDA=$P(^ACRDOC(ACRDOCDA,0),U,16)
 Q:'$D(^ACGS(ACRCISDA,0))
 S ACRVDA(1)=+$G(^ACGS(ACRCISDA,10))
 S ACRPOTOT(1)=$P($G(^ACGS(ACRCISDA,"DT1")),U,5)
 D ^ACRFSSPO
 S ACRVDA=$P(^ACRDOC(ACRDOCDA,"PO"),U,5)
 Q:ACRVDA=ACRVDA(1)&(ACRPOTOT=ACRPOTOT(1))
 S DA=ACRCISDA
 S DIE="^ACGS("
 S DR="1005////"_ACRVDA_";26////"_ACRPOTOT_";1099////"_DT
 D DIE^ACRFDIC
 I $P(^ACRDOC(ACRDOCDA,0),U,2)'=$P(^ACGS(ACRCISDA,"DT"),U,2) D
 .N ACRX,ACRY
 .S ACRX=$P(^ACRDOC(ACRDOCDA,0),U,2)
 .S ACRY=$P(^ACGS(ACRCISDA,"DT"),U,2)
 .I ACRX'=ACRY D
 ..S DA=ACRDOCDA
 ..S DIE="^ACRDOC("
 ..S DR="103020////"_ACRY
 ..D DIE^ACRFDIC
 .I +^ACGS(ACRCISDA,"DT")=15!(+^("DT")=17) D
 ..S DA=ACRCISDA
 ..S DIE="^ACGS("
 ..S DR="2////"_ACRX
 ..D DIE^ACRFDIC
 Q
EINCHK ;CHECK FOR REQUIRED VENDOR DATA
 K ACRQUIT
 I '$D(^AUTTVNDR(ACG5DA))!($P($G(^AUTTVNDR(ACG5DA,11)),U,13)="") D
 .W !!,*7,*7,"Required VENDOR data is missing!!"
 .W !,"Use 11 - Add/Edit Vendor Data to enter REQUIRED Vendor data."
 .D PAUSE^ACRFWARN
 .S ACRQUIT=""
 Q
VCHK ;CHECK TO ENSURE THAT VENDOR HAS BEEN SPECIFIED
 K ACRQUIT
 I 'ACG5DA D
 .W !!,*7,*7,"No VENDOR has been specified for this procurement."
 .W !,"Contract/Small Purchase data cannot be completed until a VENDOR is specifiec."
 .W !,"Complete BASIC DATA before proceeding."
 .D PAUSE^ACRFWARN
 .S ACRQUIT=""
 Q
TPA ;SELECT TYPE OF PROCURMENT ACTION FOR CONTRACTS
 W !!,"Select the Type of Contract Action"
 S:'$P(^ACRDOC(ACRDOCDA,0),U,15) DIR(0)="SO^D:Definitive Contract;I:Indefinite Delivery Contract;L:Letter Contract",DIR("A")="Type Procurement Action..",ACGNEW=""
 S:$P(^ACRDOC(ACRDOCDA,0),U,15) DIR(0)="SO^R:Contract mod (additional funds/performance);C:Contract mod (negotiated funds/performance);M:Contract mod (other than R, or C);PM:Small Purchase Modification;Q:Quarterly Report of Delivery Orders"
 S DIR(0)=DIR(0)_";T:Termination for default;U:Termination for convenienc" ;G:Delivery Order against Agency Contract"
 D DIR^ACRFDIC
 Q:$D(ACRQUIT)!($G(Y)="")
 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)
 Q