source: WorldVistAEHR/trunk/r/BENEFICIARY_TRAVEL-DGBT/DGBTEF1.m@ 619

Last change on this file since 619 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1DGBTEF1 ;ALB/SCK - BENEFICIARY TRAVEL UPDATE PARAMETERS INTO FILES ;12/14/92 3/12/93
2 ;;1.0;Beneficiary Travel;**2,14**;September 25, 2001;Build 7
3RATES ;enter/edit bene travel parameters;option DGBT BENE TRAVEL RATES
4 S DA=1,DR="720;723;721",DIE="^DG(43," D ^DIE G QUIT:X="^"!($D(DTOUT))!($D(Y)) K DA,DE,DQ,DR,DIE
5 Q ;This Q was added under direction of CBO to remove site's ability to edit rates
6 W !!,"New travel rates are determined each fiscal year. The rates should be",!,"entered each year with the effective date of Oct 1.",!
7 W !,"Changing values for the current or past fiscal years could result in changes",!,"to the claims already entered.",!
8DATE ; change deductible rates for FY
9 Q ;This Q was added under direction of CBO to remove site's ability to edit rates
10 S DIR("A")="Select EFFECTIVE DATE",DIR(0)="DO^^E",DIR("?")="^D HELP1^DGBTEF1"
11 D ^DIR K DIR G QUIT:$D(DIRUT) G HELP:$E(Y,4,7)'="1001" S X=+Y
12 S DIC="^DG(43.1,",DIC(0)="ELQMZ"
13 D ^DIC G QUIT:Y'>0 S DA=+Y
14 S DGBTN=$S('$D(^DG(43.1,DA,"BT")):"",1:^DG(43.1,DA,"BT"))
15 S:$D(DGBTN)&($P(DGBTN,"^")]"") DIR("B")=$P(DGBTN,"^")
16 S DGBTDEDV=$$DEDUCT(6,"VISIT") G:DGBTDEDV<0 QUIT1
17 S DIE="^DG(43.1,",DR="30.01///^S X=DGBTDEDV"
18 D ^DIE
19 S:$D(DGBTN)&($P(DGBTN,"^",2)]"") DIR("B")=$P(DGBTN,"^",2)
20 S DGBTDEDM=$$DEDUCT(18,"MONTH") G:DGBTDEDM<0 QUIT1
21 S DIE="^DG(43.1,",DR="30.02///^S X=DGBTDEDM"
22 D ^DIE
23 S DR="30.03;30.05;30.04",DIE="^DG(43.1,"
24 D ^DIE G QUIT1
25ACCT ; change activation/inactivation dates for accounts
26 W !!,"ACCOUNT TYPES are determined by Fiscal Service and have a direct impact",!,"on the type of questions asked in the Beneficiary Travel CLAIM ENTER/EDIT",!,"option."
27 W !,"DO NOT add to this file unless so instructed by Fiscal Service.",!
28TYPE ; select account to edit
29 S DIR("A")="Select ACCOUNT",DIR("?")="^D HELP2^DGBTEF1",DIR(0)="FO"
30 D ^DIR K DIR G QUIT:$D(DIRUT) S X=Y
31 S DIC="^DGBT(392.3,",DIC(0)="ELQMZ"
32 D ^DIC G TYPE:Y'>0
33 S DA=+Y,DR="2:4",DIE="^DGBT(392.3," D ^DIE G TYPE
34NWACT ;enter/edit account file (392.3);option DGBT BENE TRAVEL ACCOUNT
35 W !!?3,"You are about to enter/edit Bene Travel account types. Although",!?3,"this process is now decentralized, changes and additions should be",!?3,"made with extreme care.",!
36 S DIR(0)="Y",DIR("A")="Are you sure you wish to continue",DIR("B")="No" D ^DIR K DIR I $D(DTOUT)!($D(DUOUT))!('Y) G QUIT1
37ED ; edit data for new account
38 W ! K X,DA
39 S (DIE,DIC)="^DGBT(392.3,",DIC(0)="AEQLMZ",DLAYGO=392.3,DIC("DR")=""
40 D ^DIC K DIC G:$D(DTOUT)!$D(DUOUT)!(X="") QUIT1 G:Y'>0 ED
41 S DR="2///"_$P(Y(0)," ",1)_";3;4;5" ; account number now stuffed, not asked
42 S DA=+Y L ^DGBT(392.3,DA):2 E W !?5,"Another user is editing this entry.",*7 G ED
43 S DIE("NO^")=1
44 D ^DIE L K DR,DIE,DIE("NO^")
45 W ! S DIR(0)="Y",DIR("A")="Would you like to Enter/Edit another ACCOUNT",DIR("B")="Yes"
46 D ^DIR K DIR G:$D(DTOUT)!($D(DUOUT))!(Y=0) QUIT1 G ED
47QUIT1 ;
48 K DIR,DTOUT,DI,D0,DUOUT,DIRUT,DGBTN,DGBTDEDV,DGBTDEDM
49QUIT ;
50 K %DT,DA,DIC,DIE,DIE("NO^"),DR,X,Y Q
51DEDUCT(LIMIT,TYPE) ; enter new deductble value
52DEDCT1 S DIR(0)="FAO",DIR("A")="ENTER DEDUCTIBLE AMOUNT/"_TYPE_": "
53 S DIR("?")="Type a dollar amount between 0 and "_LIMIT_" with up to 2 decimal places."
54 D ^DIR K DIR I $D(DUOUT)!($D(DTOUT))!(Y']"") S Y=-1 G DEDUCTQ
55 S:Y["$" Y=$P(Y,"$",2)
56 I Y'?.N,Y'?.N1".".N K X,Y,DIR G DEDCT1
57 I Y>(LIMIT+.001) W " -- Deductible exceeds limit." K X,Y,DIR G DEDCT1
58DEDUCTQ Q (+Y)
59 ;
60HELP W !!,"The effective date must start on the fiscal year, Oct 1.",! G DATE
61HELP1 S DIC="^DG(43.1,",DIC(0)="QMZ",X="?" D ^DIC K DIC Q
62HELP2 S DIC="^DGBT(392.3,",DIC(0)="QMZ",X="?" D ^DIC K DIC Q
Note: See TracBrowser for help on using the repository browser.