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

ACRFCHK.m

Go to the documentation of this file.
ACRFCHK ;IHS/OIRM/DSD/THL,AEF - CHECK FOR REQUIRED DATA DURING DOCUMENT DATA ENTRY; [ 09/23/2005  10:55 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**17,19**;NOV 05, 2001
 ;;ROUTINE CHECKS EACH REQUEST FOR INCLUSION OF REQUIRED DATA
FCHK ;EP;TO CHECK FOR REQUIRED DATA
 ;ACRREF MUST BE SET AS THE REFERENCE CODE FOR THE DOCUMENT
 N ACRX,ACRI,ACRJ
 D @ACRREF
EXIT D:$D(ACRI) FWARN
 K ACRCHK,ACRJ,ACRI
 Q
116 ;DATA CHECK FOR REQUISITIONS (393)
 F ACRJ="FA","REQ","REQ1","DT","PO" S:'$D(^ACRDOC(ACRDOCDA,ACRJ)) ^ACRDOC(ACRDOCDA,ACRJ)=""
 S:$P(^ACRDOC(ACRDOCDA,"FA"),U)="" ACRI(13)=""
 F ACRJ=1:1:5,7,8,11 S:$P(^ACRDOC(ACRDOCDA,"REQ"),U,ACRJ)="" ACRI=$S(ACRJ=1:1,ACRJ=2:2,ACRJ=3:3,ACRJ=4:4,ACRJ=5:5,ACRJ=7:8,ACRJ=8:9,ACRJ=11:6),ACRI(ACRI)=""
 S:$P(^ACRDOC(ACRDOCDA,"REQ1"),U)="" ACRI(10)="" S:$P(^ACRDOC(ACRDOCDA,0),U,14)="" ACRI(11)="" S:$P(^ACRDOC(ACRDOCDA,"DT"),U,4)="" ACRI(7)="" S:$P(^ACRDOC(ACRDOCDA,"REQ2"),U,8)="" ACRI(13)=""
 Q
326 ;EP;DATA CHECK FOR TRIBAL CONTRACTS
349 ;EP;DATA CHECK FOR CONTRACTS
103 ;EP;DATA CHECK FOR PURCHASE ORDERS
204 ;EP;DATA CHECK FOR NOTICE MISC OBLIGATION  ;ACR*2.1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=18:9,ACRJ=26:23),ACRI(ACRI)=""
 F ACRJ=1,3,4 S:$P(^ACRDOC(ACRDOCDA,"TRNG4"),U,ACRJ)="" ACRI=$S(ACRJ=1:24,ACRJ=2:25,ACRJ=3:26,ACRJ=4:27),ACRI(ACRI)=""
 Q
600 ;
 Q
23 ;DATA CHECK FOR PAYROLL ENTRIES
 S:'$D(^ACRDOC(ACRDOCDA,"PR")) ^ACRDOC(ACRDOCDA,"PR")=""
 S:$P(^ACRDOC(ACRDOCDA,"PR"),U)="" ACRI(1)=""
 Q
FWARN ;ENTRY POINT CALLED WHEN MISSING DATA FOUND TO FORCE ENTRY
 W *7,*7
 W !
 S ACRX="",ACRY=0
 F  S ACRY=$O(ACRI(ACRY)) Q:'ACRY  S ACRX=ACRX_","_ACRY
 S ACRX=$E(ACRX,2,99)
 K ACRQUIT
 D EN1^ACRFEA3
 I ACRREF=130,$P(^ACRDOC(ACRDOCDA,"TO"),U,9),$P(^("TO"),U,22)<1 D
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR="130157////"_+$P($G(^ACRAU(+$P(^ACRDOC(ACRDOCDA,"TO"),U,9),1)),U,6)
 .D DIE^ACRFDIC
 D:ACRREF=130!(ACRREF=148) IDEN
 Q
IDEN ;EP;TO CREATE IDENTIFIER FOR REQUEST
 Q:'$G(ACRDOCDA)
 Q:$P($G(^ACRDOC(+ACRDOCDA,0)),U,14)]""
 N ACRTO,ACRTRNG,ACRIDEN
 S ACRTO=$G(^ACRDOC(ACRDOCDA,"TO")),ACRTRNG=$G(^ACRDOC(ACRDOCDA,"TRNG"))
 S ACRIDEN=$S(ACRREF=130:$P(ACRTO,U,9),1:$P(ACRTRNG,U,2))
 ;S:$D(^VA(200,+ACRIDEN,0)) ACRIDEN=$S($P(^(0),U,2)]"":$P(^(0),U,2),1:$P(^(0),U))  ;ACR*2.1*19.02 IM16848
 S:$D(^VA(200,+ACRIDEN,0)) ACRIDEN=$S($P(^(0),U,2)]"":$P(^(0),U,2),1:$$NAME2^ACRFUTL1(+ACRIDEN))  ;ACR*2.1*19.02 IM16848
 S:$L(ACRIDEN)>4 ACRIDEN=$E(ACRIDEN)_$E($P(ACRIDEN,",",2))
 S ACRIDEN=ACRIDEN_"/"_$E($S(ACRREF=130:$P(ACRTO,U,14),1:$P(ACRTRNG,U,11)),4,7)_$S(ACRREF=148:"/"_$E($P(ACRTRNG,U,18),1,6),1:"")
 S DIE="^ACRDOC(",DR=".14////"_ACRIDEN,DA=ACRDOCDA
 D DIE^ACRFDIC
 Q