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

ACRFNY3.m

Go to the documentation of this file.
ACRFNY3 ;IHS/OIRM/DSD/THL,AEF - CONVERT TO NEW FINANCE INFO FOR M&M; [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;ROUTINE TO CREATE FINANCIAL ACCOUNTS FOR THE NEW FISCAL YEAR
EN D EN1
EXIT K ACRPROC,ACRMMAPP,ACRMMALW
 Q
EN1 K ACRMM
 D HEAD
 S DIR(0)="YO"
 S DIR("A")="Convert to the new ACCOUNTING data"
 S DIR("B")="NO"
 W !
 D DIR^ACRFDIC
 Q:+Y'=1
 S DIC="^AUTTPRO("
 S DIC(0)="AEMQZ"
 S DIC("A")="Which appropriation...: "
 W !
 D DIC^ACRFDIC
 I +Y<1 S ACRQUIT="" Q
 S ACRAPPDA=+Y
 S ACRAPP=$P(^AUTTPRO(+Y,0),U)
 S ACRMMAPP=X_U_ACRAPP
 S DIC="^AUTTALLW("
 S DIC(0)="AEMQZ"
 S DIC("A")="Which ALLOWANCE.......: "
 W !
 D DIC^ACRFDIC
 I +Y<1 K ACRMM S ACRQUIT="" Q
 S ACRALWDA=+Y
 S ACRALW=$P(Y(0),U)
 S DIC="^AUTTSSA("
 S DIC(0)="AEMQZ"
 S DIC("A")="Which SUB-SUB-ACTIVITY: "
 W !
 D DIC^ACRFDIC
 I +Y<1 K ACRMM S ACRQUIT="" Q
 S ACRSSADA=+Y
 S ACRSSA=$P(Y(0),U)
 S ACRMM=+$G(ACRAPPDA)_U_+$G(ACRALWDA)_U_+Y
 W @IOF
 W !?10,"APPROPRIATION...: ",ACRAPP
 W !?10,"ALLOWANCE.......: ",ACRALW
 W !?10,"SUB-SUB-ACTIVITY: ",ACRSSA
 S DIR(0)="YO"
 S DIR("A",1)="Are you CERTAIN you want to CONVERT EXISTING"
 S DIR("A")="accounts to the new Finance information listed above"
 S DIR("B")="NO"
 W !
 D DIR^ACRFDIC
 I +Y'=1 S ACRQUIT="" Q
 D PROC
 I ACRPROC=2 S ACRQUIT=""
 Q
 W @IOF
 W !?10,"Are you CREATING or CONVERTING Medicaid or Medicare accounts which"
 W !?10,"require the new finance information?  If so, please indicate 'YES'"
 W !?10,"below then provide the correct information for the conversion."
 W !
 Q
UP ;EP;TO UPDATE FINANCE INFO
 S DIE=ACRDIK
 S DA=ACRNEWDA
 S DR="40////"_+ACRMM_";50////"_$P(ACRMM,U,2)_";80////"_$P(ACRMM,U,3)
 D DIE^ACRFDIC
 Q
PROC ;UP DATE EXISTING ACCOUNTS
 S DA=ACRACTDA
 S DIE="^ACRAPP("
 D UP
 S ACRALWDA=0
 F  S ACRALWDA=$O(^ACRALW("M",ACRACTDA,ACRALWDA)) Q:'ACRALWDA  D
 .S ACRDIK="^ACRALW("
 .S ACRNEWDA=ACRALWDA
 .D UP
 .S ACRALCDA=0
 .F  S ACRALCDA=$O(^ACRALC("M",ACRALWDA,ACRALCDA)) Q:'ACRALCDA  D
 ..S ACRDIK="^ACRALC("
 ..S ACRNEWDA=ACRALCDA
 ..D UP
 ..S ACRLBDA=0
 ..F  S ACRLBDA=$O(^ACRLOCB("M",ACRALCDA,ACRLBDA)) Q:'ACRLBDA  D
 ...S ACRDIK="^ACRLOCB("
 ...S ACRNEWDA=ACRLBDA
 ...D UP
 Q