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

ACRFEA1.m

Go to the documentation of this file.
ACRFEA1 ;IHS/OIRM/DSD/THL,AEF - ACRFEA CON'T;  [ 04/25/2007  10:23 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;**16,22**;NOV 05, 2001
 ;;CONTINUATION OF ACRFEA
DICOBL K ACRH,ACRBPA
 I $D(ACRNEWOB) D CANCHK Q:$D(ACRQUIT)!$D(ACROUT)  D  I $D(ACRTXTP)!$D(ACRQUIT)!$D(ACROUT) S ACRQUIT="" Q
 .S $P(ACRDOC0,U,6)=ACRZDA
 .D ASUM^ACRFEA42
 .S DIR(0)="YO"
 .S DIR("A",1)="After reviewing the ACCOUNT SUMMARY above, are you"
 .S DIR("A")="certain this is the ACCOUNT you want to use."
 .S DIR("B")="YES"
 .W !
 .D DIR^ACRFDIC
 .I +Y'=1 S ACRQUIT="" Q
 .D AMEND^ACRFNEWD
 .Q:$D(ACRQUIT)
 .I $D(ACRAMEND) D A1 S (ACROUT,ACRQUIT)="" Q
 .D:'$D(ACRAMEND) ^ACRFTXTP
 .I ACRTXDA=31 D CHOOSE^ACRFBPA I $D(ACRQUIT)!'$D(ACRBPA) S ACRQUIT="" Q
 .I $D(ACRXACT),ACRTXDA'=32,$P(^ACRSYS(1,0),U,98) D  Q:$D(ACRQUIT)!$D(ACROUT)
 ..K ACRXDOC
 ..I '$D(^ACROBL("D",ACRFDNO)) D NOTIE Q
 ..S X=0
 ..S X=$O(^ACROBL("D",ACRFDNO,0)) I $P(^ACRDOC(X,0),U,4)=32 S ACRXDOC=X Q
 ..I '$D(ACRXDOC) D NOTIE
 S DIC=$S(ACRENTRY'["OBLAMT":ACRDIC,1:"^ACRDOC(")
 S DIC(0)=$S($D(ACRNEWOB):"AELQZ",1:"AENQZ")
 S DIC("A")=$S($D(ACRNEWOB):ACRDIC("A"),1:"ID NO.: ")
 S DIC("DR")=""
 S:ACRENTRY["OBLAMT" D="B^C^G^J"
 I '$D(ACRNEWOB) D:'$D(ACRQUIT)
 .K ACRDOCDA
 .D DIC^ACRFDIC:ACRENTRY'["OBLAMT"
 .D MIX^ACRFDIC:ACRENTRY["OBLAMT"&'$D(ACRPRT)#2
 .I $D(ACRPRT)#2 D ^ACRFPALL Q
 .S:U[$E(X)!(X="")!(+Y<1) ACRQUIT=""
 .I +Y>0 D
 ..S (ACRDOCDA,ACRZDA)=+Y
 ..D SETDOC
 ..S ACRREFX=ACRREF
 ..S ACROBL=+ACROBL0
 I $D(ACRNEWOB) D  Q
 .S ACRALWDA=$P(^ACRLOCB(ACRFDNDA,0),U,3)
 .S ACRALWNO=$P(^ACRLOCB(ACRFDNDA,"DT"),U,5)
 .D BEGIN^ACRFNEWD
 .I $D(ACRXACT),ACRTXDA=32 S ACRXDOC=ACRDOCDA
 Q:$D(ACRQUIT)!$D(ACROUT)!$D(ACRPRT)
 I $D(ACRCSI) D  Q
 .S D0=ACRDOCDA
 .D SETDOC
 .S ACRREFX=ACRREF
 .D ^ACRFPAPV
 I $D(ACRPTX) D ^ACRFTRX Q
 S ACRLBDA=$P(ACROBL0,U,3)
 S ACRREFDA=$P(ACRDOC0,U,13)
 S ACRREF=$P(^AUTTDOCR(ACRREFDA,0),U)
 I $D(ACRDEL) D  Q
 .S ACRDOC=$S($P(ACRDOC0,U,2)]""&'$D(ACRREQST):$P(ACRDOC0,U,2),1:$P(ACRDOC0,U))
 .S ACRID=$P(ACRDOC0,U,14)
 .D ^ACRFDEL
 .S ACRQUIT=""
 Q
SETDOC ;EP;TO SET DOCUMENT VARIABLES
 I '$D(^ACRDOC(ACRDOCDA,0))!'$D(^ACRDOC(ACRDOCDA,"DT"))!($E($G(^ACRDOC(ACRDOCDA,0)),1,5)="^^^^^")!'$D(^ACROBL(ACRDOCDA,0)) D  Q
 .;F DIK="^ACROBL(","^ACRDOC(" S DA=ACRDOCDA D DIK^ACRFDIC ;ACR*2.1*16.14 IM14779
 .W !!!,"***** Problems with FMS Document and/or FMS Request files" ;ACR*2.1*16.14 IM14779
 .W !,"******* please notify the ARMS Manager immediately!!!!" ;ACR*2.1*16.14 IM14779
 .W !,"********* and give them the document ID Number ",ACRDOCDA     ;ACR*2.1*22.09  IM24355
 .D PAUSE^ACRFWARN                               ;ACR*2.1*16.14 IM14779
 .S ACRQUIT=""
 S ACRDOC0=^ACRDOC(ACRDOCDA,0)
 S ACRDOCDT=^ACRDOC(ACRDOCDA,"DT")
 S ACRDOCPO=$G(^ACRDOC(ACRDOCDA,"PO"))
 S ACROBL0=$G(^ACROBL(ACRDOCDA,0))
 S ACROBLDT=$G(^ACROBL(ACRDOCDA,"DT"))
 S ACROBLAP=$G(^ACROBL(ACRDOCDA,"APV"))
 S ACRID=$P(ACRDOC0,U,14)
 S ACRREFDA=$P(ACRDOC0,U,13)
 S ACRREF=$P(^AUTTDOCR(ACRREFDA,0),U)
 S ACRDOC=$S(ACRREF'=103&(ACRREF'=349)&(ACRREF'=326)&(ACRREF'=210):$P(ACRDOC0,U),1:$P(ACRDOC0,U,2))
 S ACRLBDA=$P(ACRDOC0,U,6)
 S ACRPODA=$P(ACRDOC0,U,8)
 S ACRTXDA=$P(ACRDOC0,U,4)
 S ACRACPT=$P($G(^ACRPO(+ACRPODA,0)),U,4)
 S ACRACPT=$P($G(^AUTTACPT(+ACRACPT,0)),U)
 I 'ACRPODA D
 .N DIE,DR,DA
 .S ACRPODA=1
 .S DA=ACRDOCDA
 .S DIE="^ACRDOC("
 .S DR=".08////1"
 .D DIE^ACRFDIC
 S ACRADA=$P(^ACRPO(ACRPODA,0),U,19)
 S:'ACRADA ACRADA=1
 Q
CANCHK ;EP;TO CHECK FOR REQUIRED CAN DEFAULT DATA
 K ACRQUIT
 N ACRI,ACR,ACRX
 F ACRI=0,"DFLT","DFLT1" I '$D(^ACRCAN(ACRCANDA,ACRI)) S ACR="" D BADMES Q
 Q:$D(ACRQUIT)!$D(ACROUT)
 F ACRI=1:1:6,8,10:1:22,24,25 I $P($G(^ACRCAN(ACRCANDA,"DFLT")),U,ACRI)="" S ACRX="D"_ACRI D BADCAN
 Q:$D(ACRQUIT)!$D(ACROUT)
 F ACRI=3,8,10,11,13:1:15,17,20 I $P($G(^ACRCAN(ACRCANDA,"DFLT1")),U,ACRI)="" S ACRX="DD"_ACRI D BADCAN
 D BADMES:$D(ACR)
 Q
BADCAN S ACRX=$T(@ACRX),ACR($P(ACRX,";;",2))=""
 Q
BADMES W *7,*7
 W !!,"CAN ",@ACRON,ACRFDNCA,@ACROF," has missing default data."
 W !,"Notify your systems administrator immediately."
 W !
 S ACRX=0
 F  S ACRX=$O(ACR(ACRX)) Q:'ACRX  D
 .W !?10,$P(^DD(9002186.5,ACRX,0),U)
 D PAUSE^ACRFWARN
 ;K ACRQUIT                                      ;ACR*2.1*16.02 IM14652
 S:$D(ACROUT) ACRQUIT=""                         ;ACR*2.1*16.02 IM14652
 Q
NOTIE W *7,*7
 W !!,"No TIE UP document has been created for this account.  You must create"
 W !,"the TIE UP document before obligating any funds for this account."
 D PAUSE^ACRFWARN
 S ACRQUIT=""
 Q
A1 ;EP;TO PROCESS MODIFICATION
 S ACRDOCDA=ACRAMEND
 K ACRNOT
 D EN1^ACRFAUTO
 S (DA,ACRDOCDA)=ACROBL2
 S DIE="^ACROBL("
 S DR="903///@;905///@;906///@;909///@;912///@;911///@"
 D DIE^ACRFDIC
 S DA=ACROBL2
 S DIE="^ACRDOC("
 S DR=".15////"_ACRAMEND
 D DIE^ACRFDIC
 K ACROBL2
 D SETDOC
 D ^ACRFEA41
 Q
D1 ;;1000
D2 ;;1010
D3 ;;1020
D4 ;;1030
D5 ;;1040
D6 ;;1050
D8 ;;1070
D10 ;;1090
D11 ;;1100
D12 ;;1110
D13 ;;1120
D14 ;;1130
D15 ;;1140
D16 ;;1150
D17 ;;1160
D18 ;;1170
D19 ;;1180
D20 ;;1190
D21 ;;1200
D22 ;;1210
D24 ;;1230
D25 ;;1240
DD3 ;;1250
DD8 ;;1032
DD10 ;;1300
DD11 ;;1310
DD13 ;;1330
DD14 ;;1340
DD15 ;;1350
DD17 ;;1370
DD20 ;;1400