DGBTDST1 ;ALB/SCK - BENEFICIARY TRAVEL DIST. ENTER/EDIT CONT. ;4/26/93
;;1.0;Beneficiary Travel;;September 25, 2001
START ;
Q
;
CHECKS() ;
N ERR
I $$CRMK W !?5,*7,">> ONE OR MORE ADDITIONAL INFORMATION FIELDS NEED TO BE COMPLETED" S ERR=1
I $$CZIP W !?5,*7,">> ONE OR MORE ZIP CODES ARE MISSING" S ERR=1
I $$CMILE W !?5,*7,">> ONE OR MORE DEFAULT MILEAGES ARE MISSING OR SET TO ZERO" S ERR=1
Q $D(ERR)>0
;
CRMK() ;
N ERR,CREC,DREC
S CREC=0 F S CREC=$O(^DGBT(392.1,CREC)) Q:'CREC!($D(ERR)) D
. S DREC=0 F S DREC=$O(^DGBT(392.1,CREC,1,DREC)) Q:'DREC!($D(ERR)) S:+$P($G(^DGBT(392.1,CREC,1,DREC,0)),U,4)=1&(($P($G(^DGBT(392.1,CREC,1,DREC,0)),U,5))']"") ERR=1
Q $D(ERR)>0
;
CZIP() ;
N ERR,CREC
S CREC=0 F S CREC=$O(^DGBT(392.1,CREC)) Q:'CREC!($D(ERR)) S:$P($G(^DGBT(392.1,CREC,0)),U,4)']"" ERR=1
Q $D(ERR)>0
;
CMILE() ;
N ERR,CREC
S CREC=0 F S CREC=$O(^DGBT(392.1,CREC)) Q:'CREC!($D(ERR)) S:$P($G(^DGBT(392.1,CREC,0)),U,3)'>0 ERR=1
Q $D(ERR)>0
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGBTDST1 996 printed Nov 22, 2024@16:50:48 Page 2
DGBTDST1 ;ALB/SCK - BENEFICIARY TRAVEL DIST. ENTER/EDIT CONT. ;4/26/93
+1 ;;1.0;Beneficiary Travel;;September 25, 2001
START ;
+1 QUIT
+2 ;
CHECKS() ;
+1 NEW ERR
+2 IF $$CRMK
WRITE !?5,*7,">> ONE OR MORE ADDITIONAL INFORMATION FIELDS NEED TO BE COMPLETED"
SET ERR=1
+3 IF $$CZIP
WRITE !?5,*7,">> ONE OR MORE ZIP CODES ARE MISSING"
SET ERR=1
+4 IF $$CMILE
WRITE !?5,*7,">> ONE OR MORE DEFAULT MILEAGES ARE MISSING OR SET TO ZERO"
SET ERR=1
+5 QUIT $DATA(ERR)>0
+6 ;
CRMK() ;
+1 NEW ERR,CREC,DREC
+2 SET CREC=0
FOR
SET CREC=$ORDER(^DGBT(392.1,CREC))
if 'CREC!($DATA(ERR))
QUIT
Begin DoDot:1
+3 SET DREC=0
FOR
SET DREC=$ORDER(^DGBT(392.1,CREC,1,DREC))
if 'DREC!($DATA(ERR))
QUIT
if +$PIECE($GET(^DGBT(392.1,CREC,1,DREC,0)),U,4)=1&(($PIECE($GET(^DGBT(392.1,CREC,1,DREC,0)),U,5))']"")
SET ERR=1
End DoDot:1
+4 QUIT $DATA(ERR)>0
+5 ;
CZIP() ;
+1 NEW ERR,CREC
+2 SET CREC=0
FOR
SET CREC=$ORDER(^DGBT(392.1,CREC))
if 'CREC!($DATA(ERR))
QUIT
if $PIECE($GET(^DGBT(392.1,CREC,0)),U,4)']""
SET ERR=1
+3 QUIT $DATA(ERR)>0
+4 ;
CMILE() ;
+1 NEW ERR,CREC
+2 SET CREC=0
FOR
SET CREC=$ORDER(^DGBT(392.1,CREC))
if 'CREC!($DATA(ERR))
QUIT
if $PIECE($GET(^DGBT(392.1,CREC,0)),U,3)'>0
SET ERR=1
+3 QUIT $DATA(ERR)>0