source: WorldVistAEHR/trunk/r/BENEFICIARY_TRAVEL-DGBT/DGBTE.m@ 1661

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

initial load of WorldVistAEHR

File size: 3.4 KB
Line 
1DGBTE ;ALB/SCK-BENEFICIARY TRAVEL SETUP/MAIN ENTRY CALL UP; 11/20/92@1000; 11/25/92
2 ;;1.0;Beneficiary Travel;**2**;September 25, 2001
3START ;
4 D QUIT^DGBTEND ; kill all variables
5 S PRCABN=1,IOP="HOME" D ^%ZIS K IOP
6 S DGBTIME=300 S:'$D(DTIME) DTIME=DGBTIME S:'$D(U) U="^"
7 ; if date/time is undefined, set DT value
8 I '$D(DT)#2 S %DT="",S="T" D ^%DT S DT=Y
9DIVISN ; if MED CTR DIV file set up (first record) and record does not exist, write warning, kill variables, and exit
10 S X=$G(^DG(40.8,0)) I X="" W !,"WARNING...MEDICAL CENTER DIVISION FILE IS NOT SET UP",!,"USE THE ADT PARAMETER OPTION FILE TO SET UP DIVISION" G EXIT
11 ; check if multi-divisional center (GL node exists and 2nd piece=1). Do lookup, if it exists-set local variables
12 I $D(^DG(43,1,"GL")),$P(^("GL"),U,2) D G:Y'>0 EXIT G PATIENT
13 . S DIC="^DG(40.8,",DIC(0)="AEQMNZ",DIC("A")="Select DIVISION: " W !!
14 . D ^DIC K DIC Q:Y'>0
15 . S DGBTDIVI=+Y,DGBTDIV=$P(Y,U,2)
16 . D INSTIT S DGBTMD=1
17 ; if not a multi-divisional center, default to institution name
18 S DGBTDIVI=$O(^DG(40.8,0)),DGBTDIV=$P(^DG(40.8,DGBTDIVI,0),U) D INSTIT
19 ;
20PATIENT ; patient lookup, quit if patient doesn't exist
21 D QUIT1^DGBTEND ; kill local variables except med division vars
22 S DGBTTOUT="",DIC="^DPT(",DIC(0)="AEQMZ",DIC("A")="Select PATIENT: "
23 W !! D ^DIC K DIC G:Y'>0 EXIT
24 ; get patient information#, call return patient return variables routine and set wether new claim or not
25 S DFN=+Y D 6^VADPT,KVAR^DGBTEND,PID^VADPT
26 S DGBTNEW=$S($D(^DGBT(392,"C",DFN)):0,1:1)
27 ;
28OLDCLAIM ; find any past claims through DGBTE1 call
29 D ^DGBTE1 Q:'$D(DGBTA) ; set to call test routine, call old claims
30 I '$D(^DG(43,1,"BT"))!('$D(^DG(43.1,$O(^DG(43.1,(9999999.9999999-DGBTDT))),"BT"))) D G EXIT2
31 . ; check for certifying official and that current (or past) FY deductable is set up
32 . W !!,"***WARNING...BENE TRAVEL PARAMETERS HAVE NOT BEEN SET UP",!,"USE THE BENEFICIARY TRAVEL PARAMETER RATES ENTER/EDIT OPTION TO PROPERLY INITIALIZE"
33 ;
34COREFLS ; coreFLS vendor interface active/inactive
35 S DGBTCORE=$P($G(^DG(43,1,"BT")),U,4)
36 ;
37SCREEN ; display B/T claim information through screen1
38 D SCREEN^DGBT1
39 I '+VAEL(1) W !!,"Eligibility is missing from registration and is required to continue." G EXIT2
40 S DIR("A")="Continue processing claim",DIR("?")="Sorry, enter 'Y'es or RETURN to continue procesing claim, 'N'o to exit",DIR(0)="Y",DIR("B")="YES"
41 D ^DIR S ANS=Y K DIR G:'ANS!($D(DTOUT))!($D(DUOUT)) EXIT3
42SCREEN2 ;
43 D SCREEN^DGBT2
44COMPLT ; complete claims processing
45 ;
46 I '$D(^DGBT(392,DGBTDT,"A")) S DA=DGBTDT,DIE="^DGBT(392,",DR="11///"_DGBTDIVI_";12////"_DUZ_";13///"_DT D ^DIE S %=1 W !!,"Complete claim for ",DGBTDTE D YN^DICN G:%=2 EXIT3 G:%=-1 EXIT2 D:%<1 HELP1 G:%<1 COMPLT D SCREEN^DGBTEE
47 G:DGBTTOUT=-1 EXIT2
48 G ^DGBTEND
49HELP1 ;
50 W !!?10,$S(%=-1:"SORRY, '^' NOT ALLOWED",1:"ENTER 'Y'ES OR 'N'O")
51 Q
52INSTIT ; check for pointer to institution file and for address information on institution
53 S DGBTDIVN=$P(^DG(40.8,DGBTDIVI,0),"^",7)
54 I 'DGBTDIVN W !!,"INSTITUTION HAS NOT BEEN DEFINED FOR ",$P(^(0),"^"),!,"USE THE ADT PARAMETER OPTION TO UPDATE",! Q
55 I $D(^DIC(4,DGBTDIVN,0)),$S($D(^(1))#10=0:1,$P(^(1),"^",3)']"":1,1:0) W !!,"INSTITUTION ADDRESS NOT ENTERED. PLEASE UPDATE USING THE INSTITUTION FILE ENTER/EDIT",! Q
56 Q
57EXIT ; kills off all variables before quitting
58 G QUIT^DGBTEND
59 Q
60EXIT2 ; delete claim through DIK call, return to patient label
61 G DELETE1^DGBTEND
62 Q
63EXIT3 ;
64 G DELETE^DGBTEND
65 Q
Note: See TracBrowser for help on using the repository browser.