SDECPAT1 ;ALB/SAT - VISTA SCHEDULING RPCS ;JAN 15, 2016
;;5.3;Scheduling;**627**;Aug 13, 1993;Build 249
;
Q
;
; BEN:
; Input - DFN
; Output - 1 = Yes
; 0 = No
; -1 = No/old tribe or unable.
;
BEN(DFN) ;PEP - Return BEN/Non-BEN Status.
I '$G(DFN) Q -1
I '$D(^AUPNPAT(DFN)) Q -1
NEW AUPN,AUPNTR,Y,X
S Y=1
D ENP^SDECDIQ1(9000001,DFN,"1108;1109.9;1111","AUPN(","I")
I AUPN(1108,"I")'>0 Q -1 ;no tribe
D ENP^SDECDIQ1(9999999.03,AUPN(1108,"I"),".04;.02","AUPNTR(")
I AUPNTR(.04)="YES" Q -1 ;old tribe code
F X="000","970" I AUPNTR(.02)=X S Y=0 Q ;non-indian tribes
I 'Y Q Y
I 999=AUPNTR(.02),AUPN(1109.9)>0 Q 1 ;unspecified ,Quantum>0
Q Y
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDECPAT1 709 printed Dec 13, 2024@02:52:19 Page 2
SDECPAT1 ;ALB/SAT - VISTA SCHEDULING RPCS ;JAN 15, 2016
+1 ;;5.3;Scheduling;**627**;Aug 13, 1993;Build 249
+2 ;
+3 QUIT
+4 ;
+5 ; BEN:
+6 ; Input - DFN
+7 ; Output - 1 = Yes
+8 ; 0 = No
+9 ; -1 = No/old tribe or unable.
+10 ;
BEN(DFN) ;PEP - Return BEN/Non-BEN Status.
+1 IF '$GET(DFN)
QUIT -1
+2 IF '$DATA(^AUPNPAT(DFN))
QUIT -1
+3 NEW AUPN,AUPNTR,Y,X
+4 SET Y=1
+5 DO ENP^SDECDIQ1(9000001,DFN,"1108;1109.9;1111","AUPN(","I")
+6 ;no tribe
IF AUPN(1108,"I")'>0
QUIT -1
+7 DO ENP^SDECDIQ1(9999999.03,AUPN(1108,"I"),".04;.02","AUPNTR(")
+8 ;old tribe code
IF AUPNTR(.04)="YES"
QUIT -1
+9 ;non-indian tribes
FOR X="000","970"
IF AUPNTR(.02)=X
SET Y=0
QUIT
+10 IF 'Y
QUIT Y
+11 ;unspecified ,Quantum>0
IF 999=AUPNTR(.02)
IF AUPN(1109.9)>0
QUIT 1
+12 QUIT Y
+13 ;