DGBTSP1 ;ALB/BLD-BENEFICIARY TRAVEL SPECIAL MODE OF TRANSPORTATION; 12/18/2011@1000; 12/23/2012
;;1.0;Beneficiary Travel;**20,22,33**;December 27, 2011;Build 2
;
ACCT ; allowed to select only valid active accounts
S DGBTOACT=$S('$D(^DGBT(392.3,+$P(DGBTVAR(0),"^",6),0)):0,1:+$P(^DGBT(392.3,$P(DGBTVAR(0),"^",6),0),"^",5))
K X S (DIC("B"),X)=$S(+$P(DGBTVAR(0),"^",6):$P(^DGBT(392.3,$P(DGBTVAR(0),"^",6),0),"^"),1:$$DEFLT1^DGBTEE1) S DIC("A")="Select ACCOUNT: "
S DIC="^DGBT(392.3,",DIC(0)="AEQMZ",DIC("S")="I $P(^(0),U,3)'>DGBTDT&('$P(^(0),U,4)!($P(^(0),U,4)'<DGBTDT))"
D ^DIC K DIC I $D(DTOUT) S DGBTTOUT=-1 K DTOUT Q
I Y'>0 W !,"ACCOUNT IS REQUIRED!!" G ACCT
S DGBTACTN=$P(Y,"^"),DGBTACCT=$P($G(Y(0)),"^",5)
; if account is ALL OTHER - stuff in mileage info
I $D(DGBTVAR("M")) S DGBTML=$P(DGBTVAR("M"),"^",2),DGBTOWRT=$P(DGBTVAR("M"),"^"),DGBTMLT=$J((DGBTML*DGBTOWRT*DGBTMR),0,2)
Q
;
DGBTDC(DGBTDT,DFN) ;this will process denies the claim and issue a denial letter
;
W !!,"CLAIM HAS BEEN DENIED AND DENIAL OF BENEFITS LETTER WILL BE ISSUED"
I '$G(DGBTAPPTYP) D DGBTDR^DGBTDLT
W !!,"PLEASE COMPLETE THE INVOICE INFORMATION." H 1
Q
;
DELSP(DGBTDT) ;this will delete the special mode data when editing a claim and the claim changes from a Special Mode to a Mileage Claim
;
N ACCT,ACTNBR,NULL,DGBTDL
S (ACTNBR,ACCT,NULL)=""
F S ACCT=$O(^DGBT(392.3,"D","ALL OTHER",ACCT)) Q:ACCT="" D Q:ACTNBR
.I $P(^DGBT(392.3,ACCT,0),"^",4)="" S ACTNBR=ACCT
S ACTNBR=$$GET1^DIQ(392.3,ACCT,.01)
K ^DGBT(392,DGBTDT,"SP"),^DGBT(392,DGBTDT,"SPAD")
;
S DGBTDL("ISSUED")=""
S DGBTDL("ISSUED DATE")=""
S DGBTDL("CLAIM DENIED")="NO"
S DGBTDL("DT DENIED")=""
S DGBTDL("DENIED REASON")=""
S DGBTDL("ACCT NBR")=ACTNBR
S DGBTDL("CLAIM TYPE")=""
;
S DGBTFDA(392,DGBTDTI_",",45)=$G(DGBTDL("ISSUED"))
S DGBTFDA(392,DGBTDTI_",",45.1)=$G(DGBTDL("ISSUED DATE"))
S DGBTFDA(392,DGBTDTI_",",45.2)=$G(DGBTDL("CLAIM DENIED"))
S DGBTFDA(392,DGBTDTI_",",45.3)=$G(DGBTDL("DT DENIED"))
S DGBTFDA(392,DGBTDTI_",",45.4)=$G(DGBTDL("DENIED REASON"))
S DGBTFDA(392,DGBTDTI_",",6)=$G(DGBTDL("ACCT NBR"))
S DGBTFDA(392,DGBTDTI_",",56)=$G(DGBTCMTY)
D FILE^DIE("EKTS","DGBTFDA","ERRMSG") K DGBTFDA
Q
;
FILE(DGBTDT) ;this will file the special mode into file 392 (Beneficiary Travel Claim File).
;
N DGBTDTI,DGBTFDA
W !!,"FILING....."
;
S DGBTDTI=DGBTA
D CLEANUP^DGBTSP
S DGBTFDA(392,DGBTDTI_",",3)=$P(VAEL(1),"^",2) ;primary eligibility
S DGBTFDA(392,DGBTDTI_",",4)=$P(VAEL(3),"^",3) ;% of disability
S DGBTFDA(392,DGBTDTI_",",6)=$G(DGBTSP("ACCOUNT"))
S DGBTFDA(392,DGBTDTI_",",11)=DGBTDIVI ;division
;S DGBTFDA(392,DGBTDTI_",",12)=$P(^VA(200,DUZ,0),"^",1) ;person who entered claim
S DGBTFDA(392,DGBTDTI_",",13)=DT ;date claim was entered
S DGBTFDA(392,DGBTDTI_",",56)=$G(DGBTSP("CLAIM TYPE"))
S DGBTFDA(392,DGBTDTI_",",57)=$G(DGBTSP("MODE OF TRANS"))
S DGBTFDA(392,DGBTDTI_",",58)=$G(DGBTSP("INVOICE NUMBER"))
S DGBTFDA(392,DGBTDTI_",",59)=$G(DGBTSP("DT INVOICE REC"))
S DGBTFDA(392,DGBTDTI_",",60)=$G(DGBTSP("TOTAL INVOICE"))
S DGBTFDA(392,DGBTDTI_",",61)=$G(DGBTSP("BASE RATE FEE"))
S DGBTFDA(392,DGBTDTI_",",62)=$G(DGBTSP("MILEAGE FEE"))
S DGBTFDA(392,DGBTDTI_",",63)=$G(DGBTSP("NO SHOW"))
S DGBTFDA(392,DGBTDTI_",",64)=$G(DGBTSP("WAIT TIME"))
S DGBTFDA(392,DGBTDTI_",",65)=$G(DGBTSP("EXTRA CREW"))
S DGBTFDA(392,DGBTDTI_",",66)=$G(DGBTSP("SP EQUIP"))
S DGBTFDA(392,DGBTDTI_",",67)=$G(DGBTSP("RT/ONE WAY"))
S DGBTFDA(392,DGBTDTI_",",68)=$G(DGBTSP("TOTAL MILES"))
S DGBTFDA(392,DGBTDTI_",",69)=$G(DGBTSP("OTHER TRANS REMARKS"))
S DGBTFDA(392,DGBTDTI_",",70)=$G(DGBTSP("PRE-AUTHORIZED"))
;S DGBTFDA(392,DGBTDTI_",",71)=$G(DGBTSP("VENDOR"))
S DGBTFDA(392,DGBTDTI_",",72)=$G(DGBTSP("SP MODE OTHER REMARKS"))
S DGBTFDA(392,DGBTDTI_",",73)=$G(DGBTSP("PLACE OF DEPARTURE "))
S DGBTFDA(392,DGBTDTI_",",85)=$G(DGBTSP("AUTHORIZED"))
I $G(DGBTSP("AUTHORIZED"))="Y" D
.S DGBTFDA(392,DGBTDTI_",",84)=$$GET1^DIQ(200,$G(DUZ),.01)
.S DGBTFDA(392,DGBTDI_",",86)=$$FMTE^XLFDT(DT) ;$G(DGBTDT)
;
S DGBTFDA(392,DGBTDTI_",",73)=$G(DGBTSP("PLACE OF DEPARTURE"))
S DGBTFDA(392,DGBTDTI_",",74)=$G(DGBTSP("PLACE OF DEPARTURE 2"))
S DGBTFDA(392,DGBTDTI_",",75)=$G(DGBTSP("CITY OF DEPARTURE"))
S DGBTFDA(392,DGBTDTI_",",76)=$G(DGBTSP("STATE OF DEPARTURE"))
S DGBTFDA(392,DGBTDTI_",",77)=$G(DGBTSP("ZIP CODE/DEPARTURE"))
;
S DGBTFDA(392,DGBTDTI_",",78)=$G(DGBTINST("DIVISION"))
S DGBTFDA(392,DGBTDTI_",",79)=$G(DGBTINST("INST NAME"))
S DGBTFDA(392,DGBTDTI_",",80)=$G(DGBTINST("ADDRESS1"))
S DGBTFDA(392,DGBTDTI_",",81)=$G(DGBTINST("CITY"))
S DGBTFDA(392,DGBTDTI_",",82)=$G(DGBTINST("STATE"))
S DGBTFDA(392,DGBTDTI_",",83)=$G(DGBTINST("ZIP CODE"))
S DGBTFDA(392,DGBTDTI_",",42)=VADM(1)
;
D FILE^DIE("EKTS","DGBTFDA","ERRMSG")
I '$D(ERRMSG) W " COMPLETED..." D
.S DGBTFDA1(392,DGBTDTI_",",71)=$G(DGBTSP("VENDOR")) ;dbe patch DGBT*1*22 - modified to use vendor ien
.S DGBTFDA1(392,DGBTDTI_",",12)=DUZ D FILE^DIE(,"DGBTFDA1","ERRMSG") ;person who entered claim
.W $$PAUSE^DGBTUTL(0) S (DGBTSP,SPCOMPLETE)=1
I $D(ERRMSG) W !!,"DATA DID NOT FILE DUE TO ERROR(S):" D Q ;dbe patch DGBT*1*22 - added code to display error messages
.N DGBTERR,DGBTERR2
.S DGBTERR="" F S DGBTERR=$O(ERRMSG("DIERR",DGBTERR)) Q:'DGBTERR D
..S DGBTERR2="" F S DGBTERR2=$O(ERRMSG("DIERR",DGBTERR,"TEXT",DGBTERR2)) Q:'DGBTERR2 D
...W !!?3,DGBTERR,") ",ERRMSG("DIERR",DGBTERR,"TEXT",DGBTERR2)
.M ^TMP("DGBTE",$J,DGBTDTI)=ERRMSG
.W !! S PROMPT="Press the return key or '^' to exit" N DIR S DIR("A")=PROMPT,DIR(0)="E" D ^DIR W !
.;W $$PAUSE^DGBTUTL(PROMPT)
.S DGBTTOUT=-1,DGBTOLD=0,DGBTDT=DGBTDTI
.K ^DGBT(392,DGBTDTI,"A")
.D EXIT2^DGBTE S DGBTSP=0
S DGBTSP=1,CHZFLG=1
Q
;
INVAMT ;this will ask the dollar amount of any extra fees
;
S DGBTINTO=0
W !
S BASERATE=$$GET1^DIQ(392,DGBTDT,61,"E")
S DIR("A")="BASE RATE FEE: "
S DIR("?")="Enter the Vendor's Base Rate. Type a Dollar Amount between 0 and 100,000, 2 Decimal Digits"
S DIR(0)="NA^0:100000:2"
S BASERATE=$S($G(BASERATE)'="":BASERATE,$G(DGBTSP("BASE RATE FEE"))'="":$G(DGBTSP("BASE RATE FEE")),1:"")
I BASERATE'="" S DIR("B")=$S($G(BASERATE)'="":BASERATE,$G(DGBTSP("BASE RATE FEE"))'="":$G(DGBTSP("BASE RATE FEE")),1:0)
D ^DIR K DIR S:$D(^DGBT(392,DGBTDTI,"SP")) SPCOMPLETE=1 I Y=""!($D(DTOUT))!($D(DUOUT)) S DGBTSP=0 Q
S DGBTSP("BASE RATE FEE")=Y
S DGBTINTO=$G(DGBTINTO)+Y
;
W !
S MILEAGEFEE=$$GET1^DIQ(392,DGBTDT,62,"E")
S DIR("A")="MILEAGE FEE: "
S DIR("?")="Enter the Vendor's Mileage fee. Type a Dollar Amount between 0 and 500,000, 2 Decimal Digits."
S DIR(0)="NA^0:500000:2"
S MILEAGEFEE=$S($G(MILEAGEFEE)'="":MILEAGEFEE,$G(DGBTSP("MILEAGE FEE"))'="":$G(DGBTSP("MILEAGE FEE")),1:"")
I MILEAGEFEE'="" S DIR("B")=$S($G(MILEAGEFEE)'="":MILEAGEFEE,$G(DGBTSP("MILEAGE FEE"))'="":$G(DGBTSP("MILEAGE FEE")),1:0)
D ^DIR K DIR S:$D(^DGBT(392,DGBTDTI,"SP")) SPCOMPLETE=1 I ($D(DTOUT))!($D(DUOUT)) K DGBTSP S DGBTSP=0 Q
S DGBTSP("MILEAGE FEE")=Y
S DGBTINTO=$G(DGBTINTO)+Y
;
W !
S NOSHOW=$$GET1^DIQ(392,DGBTDT,63,"E")
S DIR("A")="NO-SHOW/NO-LOAD FEE: "
S DIR("?")="Type a Dollar Amount between 0 and 1,000, 2 Decimal Digits."
S DIR(0)="NOA^0:1000:2"
S NOSHOW=$S($G(NOSHOW)'="":NOSHOW,$G(DGBTSP("NO SHOW"))'="":$G(DGBTSP("NO SHOW")),1:"")
I NOSHOW'="" S DIR("B")=$S($G(NOSHOW)'="":NOSHOW,$G(DGBTSP("NO SHOW"))'="":$G(DGBTSP("NO SHOW")),1:0)
D ^DIR K DIR S:$D(^DGBT(392,DGBTDTI,"SP")) SPCOMPLETE=1 I ($D(DTOUT))!($D(DUOUT)) K DGBTSP S DGBTSP=0 Q
S DGBTSP("NO SHOW")=Y
S DGBTINTO=$G(DGBTINTO)+Y
;
W !
S WAITTIME=$$GET1^DIQ(392,DGBTDT,64,"E")
S DIR("A")="WAIT TIME FEE: "
S DIR("?")="Enter the Vendor's fee for waiting. Type a Dollar Amount between 0 and 1,000, 2 Decimal Digits."
S DIR(0)="NOA^0:1000:2"
S WAITTIME=$S($G(WAITTIME)'="":WAITTIME,$G(DGBTSP("WAIT TIME"))'="":$G(DGBTSP("WAIT TIME")),1:"")
I WAITTIME'="" S DIR("B")=$S($G(WAITTIME)'="":WAITTIME,$G(DGBTSP("WAIT TIME"))'="":$G(DGBTSP("WAIT TIME")),1:0)
D ^DIR K DIR S:$D(^DGBT(392,DGBTDTI,"SP")) SPCOMPLETE=1 I ($D(DTOUT))!($D(DUOUT)) K DGBTSP S DGBTSP=0 Q
S DGBTSP("WAIT TIME")=Y
S DGBTINTO=$G(DGBTINTO)+Y
;
W !
S EXTRACREW=$$GET1^DIQ(392,DGBTDT,65,"E")
S DIR("A")="EXTRA CREW FEE: "
S DIR("?")="Enter the Vendor's extra crew fee. Type a Dollar Amount between 0 and 10,000, 2 Decimal Digits."
S DIR(0)="NOA^0:10000:2"
S EXTRACREW=$S($G(EXTRACREW)'="":EXTRACREW,$G(DGBTSP("EXTRA CREW"))'="":$G(DGBTSP("EXTRA CREW")),1:"")
I EXTRACREW'="" S DIR("B")=$S($G(EXTRACREW)'="":EXTRACREW,$G(DGBTSP("EXTRA CREW"))'="":$G(DGBTSP("EXTRA CREW")),1:0)
D ^DIR K DIR S:$D(^DGBT(392,DGBTDTI,"SP")) SPCOMPLETE=1 I ($D(DTOUT))!($D(DUOUT)) K DGBTSP S DGBTSP=0 Q
S DGBTSP("EXTRA CREW")=Y
S DGBTINTO=$G(DGBTINTO)+Y
;
W !
S SPEQUIP=$$GET1^DIQ(392,DGBTDT,66,"E")
S DIR("A")="SPECIAL EQUIPMENT FEE: "
S DIR("?")="Enter the Vendor's fee for additional equipment needed. Type a Dollar Amount between 0 and 5,000, 2 Decimal Digits."
S DIR(0)="NOA^0:5000:2"
S SPEQUIP=$S($G(SPEQUIP)'="":SPEQUIP,$G(DGBTSP("SP EQUIP"))'="":$G(DGBTSP("SP EQUIP")),1:"")
I SPEQUIP'="" S DIR("B")=$S($G(SPEQUIP)'="":SPEQUIP,$G(DGBTSP("SP EQUIP"))'="":$G(DGBTSP("SP EQUIP")),1:0)
D ^DIR K DIR S:$D(^DGBT(392,DGBTDTI,"SP")) SPCOMPLETE=1 I ($D(DTOUT))!($D(DUOUT)) K DGBTSP S DGBTSP=0 Q
S DGBTSP("SP EQUIP")=Y
S DGBTINTO=$G(DGBTINTO)+Y
;
W !
S TOTINVOICE=$$GET1^DIQ(392,DGBTDT,60,"I")
S DIR("A")="TOTAL INVOICE: "
S DIR("?")="Type a Dollar Amount between 1 and 999,999, 2 Decimal Digits."
S DIR(0)="NA^1:999999:2"
I TOTINVOICE'="" S DIR("B")=$S($G(TOTINVOICE)'="":TOTINVOICE,1:$G(DGBTSP("TOTAL INVOICE")))
D ^DIR K DIR S:$D(^DGBT(392,DGBTDTI,"SP")) SPCOMPLETE=1 I Y=""!($D(DTOUT))!($D(DUOUT)) S DGBTSP=0 Q
S DGBTSP("TOTAL INVOICE")=Y
;
Q
;
DENREA(DGBTCMTY) ;denial reasons
;
;S DGBTOACT=$S('$D(^DGBT(392.5,+$P(DGBTVAR(0),"^",6),0)):0,1:+$P(^DGBT(392.3,$P(DGBTVAR(0),"^",6),0),"^",5))
K X S (DIC("B"),X)="" S DIC("A")="Select Denial Reason:"
S DIC="^DGBT(392.5,",DIC(0)="AEQMZ" ;,DIC("S")="I $P(^(0),U,3)'>DGBTDT&('$P(^(0),U,4)!($P(^(0),U,4)'<DGBTDT))"
D ^DIC K DIC I $D(DTOUT) S DGBTTOUT=-1 K DTOUT Q
S DGBTACTN=$P(Y,"^"),DGBTACCT=$P($G(Y(0)),"^",5)
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGBTSP1 10439 printed Dec 13, 2024@01:41:07 Page 2
DGBTSP1 ;ALB/BLD-BENEFICIARY TRAVEL SPECIAL MODE OF TRANSPORTATION; 12/18/2011@1000; 12/23/2012
+1 ;;1.0;Beneficiary Travel;**20,22,33**;December 27, 2011;Build 2
+2 ;
ACCT ; allowed to select only valid active accounts
+1 SET DGBTOACT=$SELECT('$DATA(^DGBT(392.3,+$PIECE(DGBTVAR(0),"^",6),0)):0,1:+$PIECE(^DGBT(392.3,$PIECE(DGBTVAR(0),"^",6),0),"^",5))
+2 KILL X
SET (DIC("B"),X)=$SELECT(+$PIECE(DGBTVAR(0),"^",6):$PIECE(^DGBT(392.3,$PIECE(DGBTVAR(0),"^",6),0),"^"),1:$$DEFLT1^DGBTEE1)
SET DIC("A")="Select ACCOUNT: "
+3 SET DIC="^DGBT(392.3,"
SET DIC(0)="AEQMZ"
SET DIC("S")="I $P(^(0),U,3)'>DGBTDT&('$P(^(0),U,4)!($P(^(0),U,4)'<DGBTDT))"
+4 DO ^DIC
KILL DIC
IF $DATA(DTOUT)
SET DGBTTOUT=-1
KILL DTOUT
QUIT
+5 IF Y'>0
WRITE !,"ACCOUNT IS REQUIRED!!"
GOTO ACCT
+6 SET DGBTACTN=$PIECE(Y,"^")
SET DGBTACCT=$PIECE($GET(Y(0)),"^",5)
+7 ; if account is ALL OTHER - stuff in mileage info
+8 IF $DATA(DGBTVAR("M"))
SET DGBTML=$PIECE(DGBTVAR("M"),"^",2)
SET DGBTOWRT=$PIECE(DGBTVAR("M"),"^")
SET DGBTMLT=$JUSTIFY((DGBTML*DGBTOWRT*DGBTMR),0,2)
+9 QUIT
+10 ;
DGBTDC(DGBTDT,DFN) ;this will process denies the claim and issue a denial letter
+1 ;
+2 WRITE !!,"CLAIM HAS BEEN DENIED AND DENIAL OF BENEFITS LETTER WILL BE ISSUED"
+3 IF '$GET(DGBTAPPTYP)
DO DGBTDR^DGBTDLT
+4 WRITE !!,"PLEASE COMPLETE THE INVOICE INFORMATION."
HANG 1
+5 QUIT
+6 ;
DELSP(DGBTDT) ;this will delete the special mode data when editing a claim and the claim changes from a Special Mode to a Mileage Claim
+1 ;
+2 NEW ACCT,ACTNBR,NULL,DGBTDL
+3 SET (ACTNBR,ACCT,NULL)=""
+4 FOR
SET ACCT=$ORDER(^DGBT(392.3,"D","ALL OTHER",ACCT))
if ACCT=""
QUIT
Begin DoDot:1
+5 IF $PIECE(^DGBT(392.3,ACCT,0),"^",4)=""
SET ACTNBR=ACCT
End DoDot:1
if ACTNBR
QUIT
+6 SET ACTNBR=$$GET1^DIQ(392.3,ACCT,.01)
+7 KILL ^DGBT(392,DGBTDT,"SP"),^DGBT(392,DGBTDT,"SPAD")
+8 ;
+9 SET DGBTDL("ISSUED")=""
+10 SET DGBTDL("ISSUED DATE")=""
+11 SET DGBTDL("CLAIM DENIED")="NO"
+12 SET DGBTDL("DT DENIED")=""
+13 SET DGBTDL("DENIED REASON")=""
+14 SET DGBTDL("ACCT NBR")=ACTNBR
+15 SET DGBTDL("CLAIM TYPE")=""
+16 ;
+17 SET DGBTFDA(392,DGBTDTI_",",45)=$GET(DGBTDL("ISSUED"))
+18 SET DGBTFDA(392,DGBTDTI_",",45.1)=$GET(DGBTDL("ISSUED DATE"))
+19 SET DGBTFDA(392,DGBTDTI_",",45.2)=$GET(DGBTDL("CLAIM DENIED"))
+20 SET DGBTFDA(392,DGBTDTI_",",45.3)=$GET(DGBTDL("DT DENIED"))
+21 SET DGBTFDA(392,DGBTDTI_",",45.4)=$GET(DGBTDL("DENIED REASON"))
+22 SET DGBTFDA(392,DGBTDTI_",",6)=$GET(DGBTDL("ACCT NBR"))
+23 SET DGBTFDA(392,DGBTDTI_",",56)=$GET(DGBTCMTY)
+24 DO FILE^DIE("EKTS","DGBTFDA","ERRMSG")
KILL DGBTFDA
+25 QUIT
+26 ;
FILE(DGBTDT) ;this will file the special mode into file 392 (Beneficiary Travel Claim File).
+1 ;
+2 NEW DGBTDTI,DGBTFDA
+3 WRITE !!,"FILING....."
+4 ;
+5 SET DGBTDTI=DGBTA
+6 DO CLEANUP^DGBTSP
+7 ;primary eligibility
SET DGBTFDA(392,DGBTDTI_",",3)=$PIECE(VAEL(1),"^",2)
+8 ;% of disability
SET DGBTFDA(392,DGBTDTI_",",4)=$PIECE(VAEL(3),"^",3)
+9 SET DGBTFDA(392,DGBTDTI_",",6)=$GET(DGBTSP("ACCOUNT"))
+10 ;division
SET DGBTFDA(392,DGBTDTI_",",11)=DGBTDIVI
+11 ;S DGBTFDA(392,DGBTDTI_",",12)=$P(^VA(200,DUZ,0),"^",1) ;person who entered claim
+12 ;date claim was entered
SET DGBTFDA(392,DGBTDTI_",",13)=DT
+13 SET DGBTFDA(392,DGBTDTI_",",56)=$GET(DGBTSP("CLAIM TYPE"))
+14 SET DGBTFDA(392,DGBTDTI_",",57)=$GET(DGBTSP("MODE OF TRANS"))
+15 SET DGBTFDA(392,DGBTDTI_",",58)=$GET(DGBTSP("INVOICE NUMBER"))
+16 SET DGBTFDA(392,DGBTDTI_",",59)=$GET(DGBTSP("DT INVOICE REC"))
+17 SET DGBTFDA(392,DGBTDTI_",",60)=$GET(DGBTSP("TOTAL INVOICE"))
+18 SET DGBTFDA(392,DGBTDTI_",",61)=$GET(DGBTSP("BASE RATE FEE"))
+19 SET DGBTFDA(392,DGBTDTI_",",62)=$GET(DGBTSP("MILEAGE FEE"))
+20 SET DGBTFDA(392,DGBTDTI_",",63)=$GET(DGBTSP("NO SHOW"))
+21 SET DGBTFDA(392,DGBTDTI_",",64)=$GET(DGBTSP("WAIT TIME"))
+22 SET DGBTFDA(392,DGBTDTI_",",65)=$GET(DGBTSP("EXTRA CREW"))
+23 SET DGBTFDA(392,DGBTDTI_",",66)=$GET(DGBTSP("SP EQUIP"))
+24 SET DGBTFDA(392,DGBTDTI_",",67)=$GET(DGBTSP("RT/ONE WAY"))
+25 SET DGBTFDA(392,DGBTDTI_",",68)=$GET(DGBTSP("TOTAL MILES"))
+26 SET DGBTFDA(392,DGBTDTI_",",69)=$GET(DGBTSP("OTHER TRANS REMARKS"))
+27 SET DGBTFDA(392,DGBTDTI_",",70)=$GET(DGBTSP("PRE-AUTHORIZED"))
+28 ;S DGBTFDA(392,DGBTDTI_",",71)=$G(DGBTSP("VENDOR"))
+29 SET DGBTFDA(392,DGBTDTI_",",72)=$GET(DGBTSP("SP MODE OTHER REMARKS"))
+30 SET DGBTFDA(392,DGBTDTI_",",73)=$GET(DGBTSP("PLACE OF DEPARTURE "))
+31 SET DGBTFDA(392,DGBTDTI_",",85)=$GET(DGBTSP("AUTHORIZED"))
+32 IF $GET(DGBTSP("AUTHORIZED"))="Y"
Begin DoDot:1
+33 SET DGBTFDA(392,DGBTDTI_",",84)=$$GET1^DIQ(200,$GET(DUZ),.01)
+34 ;$G(DGBTDT)
SET DGBTFDA(392,DGBTDI_",",86)=$$FMTE^XLFDT(DT)
End DoDot:1
+35 ;
+36 SET DGBTFDA(392,DGBTDTI_",",73)=$GET(DGBTSP("PLACE OF DEPARTURE"))
+37 SET DGBTFDA(392,DGBTDTI_",",74)=$GET(DGBTSP("PLACE OF DEPARTURE 2"))
+38 SET DGBTFDA(392,DGBTDTI_",",75)=$GET(DGBTSP("CITY OF DEPARTURE"))
+39 SET DGBTFDA(392,DGBTDTI_",",76)=$GET(DGBTSP("STATE OF DEPARTURE"))
+40 SET DGBTFDA(392,DGBTDTI_",",77)=$GET(DGBTSP("ZIP CODE/DEPARTURE"))
+41 ;
+42 SET DGBTFDA(392,DGBTDTI_",",78)=$GET(DGBTINST("DIVISION"))
+43 SET DGBTFDA(392,DGBTDTI_",",79)=$GET(DGBTINST("INST NAME"))
+44 SET DGBTFDA(392,DGBTDTI_",",80)=$GET(DGBTINST("ADDRESS1"))
+45 SET DGBTFDA(392,DGBTDTI_",",81)=$GET(DGBTINST("CITY"))
+46 SET DGBTFDA(392,DGBTDTI_",",82)=$GET(DGBTINST("STATE"))
+47 SET DGBTFDA(392,DGBTDTI_",",83)=$GET(DGBTINST("ZIP CODE"))
+48 SET DGBTFDA(392,DGBTDTI_",",42)=VADM(1)
+49 ;
+50 DO FILE^DIE("EKTS","DGBTFDA","ERRMSG")
+51 IF '$DATA(ERRMSG)
WRITE " COMPLETED..."
Begin DoDot:1
+52 ;dbe patch DGBT*1*22 - modified to use vendor ien
SET DGBTFDA1(392,DGBTDTI_",",71)=$GET(DGBTSP("VENDOR"))
+53 ;person who entered claim
SET DGBTFDA1(392,DGBTDTI_",",12)=DUZ
DO FILE^DIE(,"DGBTFDA1","ERRMSG")
+54 WRITE $$PAUSE^DGBTUTL(0)
SET (DGBTSP,SPCOMPLETE)=1
End DoDot:1
+55 ;dbe patch DGBT*1*22 - added code to display error messages
IF $DATA(ERRMSG)
WRITE !!,"DATA DID NOT FILE DUE TO ERROR(S):"
Begin DoDot:1
+56 NEW DGBTERR,DGBTERR2
+57 SET DGBTERR=""
FOR
SET DGBTERR=$ORDER(ERRMSG("DIERR",DGBTERR))
if 'DGBTERR
QUIT
Begin DoDot:2
+58 SET DGBTERR2=""
FOR
SET DGBTERR2=$ORDER(ERRMSG("DIERR",DGBTERR,"TEXT",DGBTERR2))
if 'DGBTERR2
QUIT
Begin DoDot:3
+59 WRITE !!?3,DGBTERR,") ",ERRMSG("DIERR",DGBTERR,"TEXT",DGBTERR2)
End DoDot:3
End DoDot:2
+60 MERGE ^TMP("DGBTE",$JOB,DGBTDTI)=ERRMSG
+61 WRITE !!
SET PROMPT="Press the return key or '^' to exit"
NEW DIR
SET DIR("A")=PROMPT
SET DIR(0)="E"
DO ^DIR
WRITE !
+62 ;W $$PAUSE^DGBTUTL(PROMPT)
+63 SET DGBTTOUT=-1
SET DGBTOLD=0
SET DGBTDT=DGBTDTI
+64 KILL ^DGBT(392,DGBTDTI,"A")
+65 DO EXIT2^DGBTE
SET DGBTSP=0
End DoDot:1
QUIT
+66 SET DGBTSP=1
SET CHZFLG=1
+67 QUIT
+68 ;
INVAMT ;this will ask the dollar amount of any extra fees
+1 ;
+2 SET DGBTINTO=0
+3 WRITE !
+4 SET BASERATE=$$GET1^DIQ(392,DGBTDT,61,"E")
+5 SET DIR("A")="BASE RATE FEE: "
+6 SET DIR("?")="Enter the Vendor's Base Rate. Type a Dollar Amount between 0 and 100,000, 2 Decimal Digits"
+7 SET DIR(0)="NA^0:100000:2"
+8 SET BASERATE=$SELECT($GET(BASERATE)'="":BASERATE,$GET(DGBTSP("BASE RATE FEE"))'="":$GET(DGBTSP("BASE RATE FEE")),1:"")
+9 IF BASERATE'=""
SET DIR("B")=$SELECT($GET(BASERATE)'="":BASERATE,$GET(DGBTSP("BASE RATE FEE"))'="":$GET(DGBTSP("BASE RATE FEE")),1:0)
+10 DO ^DIR
KILL DIR
if $DATA(^DGBT(392,DGBTDTI,"SP"))
SET SPCOMPLETE=1
IF Y=""!($DATA(DTOUT))!($DATA(DUOUT))
SET DGBTSP=0
QUIT
+11 SET DGBTSP("BASE RATE FEE")=Y
+12 SET DGBTINTO=$GET(DGBTINTO)+Y
+13 ;
+14 WRITE !
+15 SET MILEAGEFEE=$$GET1^DIQ(392,DGBTDT,62,"E")
+16 SET DIR("A")="MILEAGE FEE: "
+17 SET DIR("?")="Enter the Vendor's Mileage fee. Type a Dollar Amount between 0 and 500,000, 2 Decimal Digits."
+18 SET DIR(0)="NA^0:500000:2"
+19 SET MILEAGEFEE=$SELECT($GET(MILEAGEFEE)'="":MILEAGEFEE,$GET(DGBTSP("MILEAGE FEE"))'="":$GET(DGBTSP("MILEAGE FEE")),1:"")
+20 IF MILEAGEFEE'=""
SET DIR("B")=$SELECT($GET(MILEAGEFEE)'="":MILEAGEFEE,$GET(DGBTSP("MILEAGE FEE"))'="":$GET(DGBTSP("MILEAGE FEE")),1:0)
+21 DO ^DIR
KILL DIR
if $DATA(^DGBT(392,DGBTDTI,"SP"))
SET SPCOMPLETE=1
IF ($DATA(DTOUT))!($DATA(DUOUT))
KILL DGBTSP
SET DGBTSP=0
QUIT
+22 SET DGBTSP("MILEAGE FEE")=Y
+23 SET DGBTINTO=$GET(DGBTINTO)+Y
+24 ;
+25 WRITE !
+26 SET NOSHOW=$$GET1^DIQ(392,DGBTDT,63,"E")
+27 SET DIR("A")="NO-SHOW/NO-LOAD FEE: "
+28 SET DIR("?")="Type a Dollar Amount between 0 and 1,000, 2 Decimal Digits."
+29 SET DIR(0)="NOA^0:1000:2"
+30 SET NOSHOW=$SELECT($GET(NOSHOW)'="":NOSHOW,$GET(DGBTSP("NO SHOW"))'="":$GET(DGBTSP("NO SHOW")),1:"")
+31 IF NOSHOW'=""
SET DIR("B")=$SELECT($GET(NOSHOW)'="":NOSHOW,$GET(DGBTSP("NO SHOW"))'="":$GET(DGBTSP("NO SHOW")),1:0)
+32 DO ^DIR
KILL DIR
if $DATA(^DGBT(392,DGBTDTI,"SP"))
SET SPCOMPLETE=1
IF ($DATA(DTOUT))!($DATA(DUOUT))
KILL DGBTSP
SET DGBTSP=0
QUIT
+33 SET DGBTSP("NO SHOW")=Y
+34 SET DGBTINTO=$GET(DGBTINTO)+Y
+35 ;
+36 WRITE !
+37 SET WAITTIME=$$GET1^DIQ(392,DGBTDT,64,"E")
+38 SET DIR("A")="WAIT TIME FEE: "
+39 SET DIR("?")="Enter the Vendor's fee for waiting. Type a Dollar Amount between 0 and 1,000, 2 Decimal Digits."
+40 SET DIR(0)="NOA^0:1000:2"
+41 SET WAITTIME=$SELECT($GET(WAITTIME)'="":WAITTIME,$GET(DGBTSP("WAIT TIME"))'="":$GET(DGBTSP("WAIT TIME")),1:"")
+42 IF WAITTIME'=""
SET DIR("B")=$SELECT($GET(WAITTIME)'="":WAITTIME,$GET(DGBTSP("WAIT TIME"))'="":$GET(DGBTSP("WAIT TIME")),1:0)
+43 DO ^DIR
KILL DIR
if $DATA(^DGBT(392,DGBTDTI,"SP"))
SET SPCOMPLETE=1
IF ($DATA(DTOUT))!($DATA(DUOUT))
KILL DGBTSP
SET DGBTSP=0
QUIT
+44 SET DGBTSP("WAIT TIME")=Y
+45 SET DGBTINTO=$GET(DGBTINTO)+Y
+46 ;
+47 WRITE !
+48 SET EXTRACREW=$$GET1^DIQ(392,DGBTDT,65,"E")
+49 SET DIR("A")="EXTRA CREW FEE: "
+50 SET DIR("?")="Enter the Vendor's extra crew fee. Type a Dollar Amount between 0 and 10,000, 2 Decimal Digits."
+51 SET DIR(0)="NOA^0:10000:2"
+52 SET EXTRACREW=$SELECT($GET(EXTRACREW)'="":EXTRACREW,$GET(DGBTSP("EXTRA CREW"))'="":$GET(DGBTSP("EXTRA CREW")),1:"")
+53 IF EXTRACREW'=""
SET DIR("B")=$SELECT($GET(EXTRACREW)'="":EXTRACREW,$GET(DGBTSP("EXTRA CREW"))'="":$GET(DGBTSP("EXTRA CREW")),1:0)
+54 DO ^DIR
KILL DIR
if $DATA(^DGBT(392,DGBTDTI,"SP"))
SET SPCOMPLETE=1
IF ($DATA(DTOUT))!($DATA(DUOUT))
KILL DGBTSP
SET DGBTSP=0
QUIT
+55 SET DGBTSP("EXTRA CREW")=Y
+56 SET DGBTINTO=$GET(DGBTINTO)+Y
+57 ;
+58 WRITE !
+59 SET SPEQUIP=$$GET1^DIQ(392,DGBTDT,66,"E")
+60 SET DIR("A")="SPECIAL EQUIPMENT FEE: "
+61 SET DIR("?")="Enter the Vendor's fee for additional equipment needed. Type a Dollar Amount between 0 and 5,000, 2 Decimal Digits."
+62 SET DIR(0)="NOA^0:5000:2"
+63 SET SPEQUIP=$SELECT($GET(SPEQUIP)'="":SPEQUIP,$GET(DGBTSP("SP EQUIP"))'="":$GET(DGBTSP("SP EQUIP")),1:"")
+64 IF SPEQUIP'=""
SET DIR("B")=$SELECT($GET(SPEQUIP)'="":SPEQUIP,$GET(DGBTSP("SP EQUIP"))'="":$GET(DGBTSP("SP EQUIP")),1:0)
+65 DO ^DIR
KILL DIR
if $DATA(^DGBT(392,DGBTDTI,"SP"))
SET SPCOMPLETE=1
IF ($DATA(DTOUT))!($DATA(DUOUT))
KILL DGBTSP
SET DGBTSP=0
QUIT
+66 SET DGBTSP("SP EQUIP")=Y
+67 SET DGBTINTO=$GET(DGBTINTO)+Y
+68 ;
+69 WRITE !
+70 SET TOTINVOICE=$$GET1^DIQ(392,DGBTDT,60,"I")
+71 SET DIR("A")="TOTAL INVOICE: "
+72 SET DIR("?")="Type a Dollar Amount between 1 and 999,999, 2 Decimal Digits."
+73 SET DIR(0)="NA^1:999999:2"
+74 IF TOTINVOICE'=""
SET DIR("B")=$SELECT($GET(TOTINVOICE)'="":TOTINVOICE,1:$GET(DGBTSP("TOTAL INVOICE")))
+75 DO ^DIR
KILL DIR
if $DATA(^DGBT(392,DGBTDTI,"SP"))
SET SPCOMPLETE=1
IF Y=""!($DATA(DTOUT))!($DATA(DUOUT))
SET DGBTSP=0
QUIT
+76 SET DGBTSP("TOTAL INVOICE")=Y
+77 ;
+78 QUIT
+79 ;
DENREA(DGBTCMTY) ;denial reasons
+1 ;
+2 ;S DGBTOACT=$S('$D(^DGBT(392.5,+$P(DGBTVAR(0),"^",6),0)):0,1:+$P(^DGBT(392.3,$P(DGBTVAR(0),"^",6),0),"^",5))
+3 KILL X
SET (DIC("B"),X)=""
SET DIC("A")="Select Denial Reason:"
+4 ;,DIC("S")="I $P(^(0),U,3)'>DGBTDT&('$P(^(0),U,4)!($P(^(0),U,4)'<DGBTDT))"
SET DIC="^DGBT(392.5,"
SET DIC(0)="AEQMZ"
+5 DO ^DIC
KILL DIC
IF $DATA(DTOUT)
SET DGBTTOUT=-1
KILL DTOUT
QUIT
+6 SET DGBTACTN=$PIECE(Y,"^")
SET DGBTACCT=$PIECE($GET(Y(0)),"^",5)
+7 ;
+8 QUIT