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

DGBTE.m

Go to the documentation of this file.
  1. DGBTE ;ALB/SCK-BENEFICIARY TRAVEL SETUP/MAIN ENTRY CALL UP; 11/20/92@1000; 11/25/92
  1. ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
  1. START ;
  1. D QUIT^DGBTEND ; kill all variables
  1. S PRCABN=1,IOP="HOME" D ^%ZIS K IOP
  1. S DGBTIME=300 S:'$D(DTIME) DTIME=DGBTIME S:'$D(U) U="^"
  1. ; if date/time is undefined, set DT value
  1. I '$D(DT)#2 S %DT="",S="T" D ^%DT S DT=Y
  1. DIVISN ; if MED CTR DIV file set up (first record) and record does not exist, write warning, kill variables, and exit
  1. 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
  1. ; check if multi-divisional center (GL node exists and 2nd piece=1). Do lookup, if it exists-set local variables
  1. I $D(^DG(43,1,"GL")),$P(^("GL"),U,2) D G:Y'>0 EXIT G PATIENT
  1. . S DIC="^DG(40.8,",DIC(0)="AEQMNZ",DIC("A")="Select DIVISION: " W !!
  1. . D ^DIC K DIC Q:Y'>0
  1. . S DGBTDIVI=+Y,DGBTDIV=$P(Y,U,2)
  1. . D INSTIT S DGBTMD=1
  1. ; if not a multi-divisional center, default to institution name
  1. S DGBTDIVI=$O(^DG(40.8,0)),DGBTDIV=$P(^DG(40.8,DGBTDIVI,0),U) D INSTIT
  1. ;
  1. PATIENT ; patient lookup, quit if patient doesn't exist
  1. D QUIT1^DGBTEND ; kill local variables except med division vars
  1. S DGBTTOUT="",DIC="^DPT(",DIC(0)="AEQMZ",DIC("A")="Select PATIENT: "
  1. W !! D ^DIC K DIC G:Y'>0 EXIT
  1. ; get patient information#, call return patient return variables routine and set wether new claim or not
  1. S DFN=+Y D 6^VADPT,KVAR^DGBTEND,PID^VADPT
  1. S DGBTNEW=$S($D(^DGBT(392,"C",DFN)):0,1:1)
  1. ;
  1. OLDCLAIM ; find any past claims through DGBTE1 call
  1. D ^DGBTE1 Q:'$D(DGBTA) ; set to call test routine, call old claims
  1. I '$D(^DG(43,1,"BT"))!('$D(^DG(43.1,$O(^DG(43.1,(9999999.9999999-DGBTDT))),"BT"))) D G EXIT2
  1. . ; check for certifying official and that current (or past) FY deductable is set up
  1. . W !!,"***WARNING...BENE TRAVEL PARAMETERS HAVE NOT BEEN SET UP",!,"USE THE BENEFICIARY TRAVEL PARAMETER RATES ENTER/EDIT OPTION TO PROPERLY INITIALIZE"
  1. ;
  1. SCREEN ; display B/T claim information through screen1
  1. D SCREEN^DGBT1
  1. I '+VAEL(1) W !!,"Eligibility is missing from registration and is required to continue." G EXIT2
  1. 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"
  1. D ^DIR S ANS=Y K DIR G:'ANS!($D(DTOUT))!($D(DUOUT)) EXIT3
  1. SCREEN2 ;
  1. D SCREEN^DGBT2
  1. COMPLT ; complete claims processing
  1. ;
  1. 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
  1. G:DGBTTOUT=-1 EXIT2
  1. G ^DGBTEND
  1. HELP1 ;
  1. W !!?10,$S(%=-1:"SORRY, '^' NOT ALLOWED",1:"ENTER 'Y'ES OR 'N'O")
  1. Q
  1. INSTIT ; check for pointer to institution file and for address information on institution
  1. S DGBTDIVN=$P(^DG(40.8,DGBTDIVI,0),"^",7)
  1. I 'DGBTDIVN W !!,"INSTITUTION HAS NOT BEEN DEFINED FOR ",$P(^(0),"^"),!,"USE THE ADT PARAMETER OPTION TO UPDATE",! Q
  1. 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
  1. Q
  1. EXIT ; kills off all variables before quitting
  1. G QUIT^DGBTEND
  1. Q
  1. EXIT2 ; delete claim through DIK call, return to patient label
  1. G DELETE1^DGBTEND
  1. Q
  1. EXIT3 ;
  1. G DELETE^DGBTEND
  1. Q