FBGMT2 ;WOIFO/SS-FEE BASIS PORTION OF GMT2 ;2/27/03
;;3.5;FEE BASIS;**54**;JAN 30, 1995
;
Q
;Check for Fee basis encounters
;
;function returns 0 or the date in File Man format.
;"0" return value indicates that there is no any authorization
;for this patient in Fee Basis. Otherwise the return value is
;the TO DATE of Fee Basis authorization for the patient. If
;the patient has more than one authorization then return value
;will contain the TO DATE of the authorization with the latest
;TO DATE for the patient.
AUTH(FBDFN) ;
N FBDATE,FBNODE,FBTDATE
S (FBDATE,FBNODE)=0
F S FBNODE=$O(^FBAAA(FBDFN,1,FBNODE)) Q:+FBNODE=0 D
. S FBTDATE=$P($G(^FBAAA(FBDFN,1,FBNODE,0)),"^",2)
. I FBTDATE>FBDATE S FBDATE=FBTDATE
Q FBDATE
;
;called from crossref of field #.02 of #161.01 to notify
;Enrollment about change of TODATE of patient's authorization
;sends patient's IEN and TODATE of the authorization with the
;latest TODATE (see IA #3989)
ENRLLMNT(FBDFN) ;
N FBTODT S FBTODT=$$AUTH(FBDFN)
D:FBTODT>0 FBAUTH^EASUER(FBDFN,FBTODT)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBGMT2 1093 printed Dec 13, 2024@01:58:31 Page 2
FBGMT2 ;WOIFO/SS-FEE BASIS PORTION OF GMT2 ;2/27/03
+1 ;;3.5;FEE BASIS;**54**;JAN 30, 1995
+2 ;
+3 QUIT
+4 ;Check for Fee basis encounters
+5 ;
+6 ;function returns 0 or the date in File Man format.
+7 ;"0" return value indicates that there is no any authorization
+8 ;for this patient in Fee Basis. Otherwise the return value is
+9 ;the TO DATE of Fee Basis authorization for the patient. If
+10 ;the patient has more than one authorization then return value
+11 ;will contain the TO DATE of the authorization with the latest
+12 ;TO DATE for the patient.
AUTH(FBDFN) ;
+1 NEW FBDATE,FBNODE,FBTDATE
+2 SET (FBDATE,FBNODE)=0
+3 FOR
SET FBNODE=$ORDER(^FBAAA(FBDFN,1,FBNODE))
if +FBNODE=0
QUIT
Begin DoDot:1
+4 SET FBTDATE=$PIECE($GET(^FBAAA(FBDFN,1,FBNODE,0)),"^",2)
+5 IF FBTDATE>FBDATE
SET FBDATE=FBTDATE
End DoDot:1
+6 QUIT FBDATE
+7 ;
+8 ;called from crossref of field #.02 of #161.01 to notify
+9 ;Enrollment about change of TODATE of patient's authorization
+10 ;sends patient's IEN and TODATE of the authorization with the
+11 ;latest TODATE (see IA #3989)
ENRLLMNT(FBDFN) ;
+1 NEW FBTODT
SET FBTODT=$$AUTH(FBDFN)
+2 if FBTODT>0
DO FBAUTH^EASUER(FBDFN,FBTODT)
+3 QUIT
+4 ;