DGMTCOST ;ALB/CAW - Copay Status change from IB ; 12/23/92
;;5.3;Registration;**100,1015**;Aug 13, 1993;Build 21
;
EN ; Does the prior match the after?
;
G:$P(IBEVTP,U,4)=$P(IBEVTA,U,4)!($P(IBEVTA,U,4)']"") ENQ
G:$D(DGMTA)!($D(DGMTP)) ENQ
D STATUS
;
ENQ ;
K DGMTSTA,DGCOSTA,DGMT,DA,DR,DIE
Q
;
STATUS ; Check if status change
;
S DGMTI=+$$LST^DGMTU($P(IBEVTA,U,2),+IBEVTA,2)
Q:'DGMTI
;
; if copay test is no longer applicable, continue processing
; will change status to exempt (from 10 to 7) in the ANNUAL MEANS
; TEST file (#408.31)
Q:$P($G(^DGMT(408.31,DGMTI,0)),U,17)]""
;
S DGCOSTA=$P($G(^DGMT(408.31,DGMTI,0)),U,3) Q:$S(DGCOSTA=7&($P(IBEVTA,U,4)=1):1,DGCOSTA=8&($P(IBEVTA,U,4)=0):1,1:0)
S DGMTYPT=2,DGMTACT="STA" D PRIOR^DGMTEVT S DFN=$P(DGMTP,U,2)
S DIE="^DGMT(408.31,",DA=+DGMTI,DR=".03////"_$S($P(IBEVTA,U,4)=1:7,1:8) D ^DIE
D AFTER^DGMTEVT
S DGMTINF=1 D EN^DGMTAUD
Q
DGMTCOST ;ALB/CAW - Copay Status change from IB ; 12/23/92
+1 ;;5.3;Registration;**100,1015**;Aug 13, 1993;Build 21
+2 ;
EN ; Does the prior match the after?
+1 ;
+2 IF $PIECE(IBEVTP,U,4)=$PIECE(IBEVTA,U,4)!($PIECE(IBEVTA,U,4)']"")
GOTO ENQ
+3 IF $DATA(DGMTA)!($DATA(DGMTP))
GOTO ENQ
+4 DO STATUS
+5 ;
ENQ ;
+1 KILL DGMTSTA,DGCOSTA,DGMT,DA,DR,DIE
+2 QUIT
+3 ;
STATUS ; Check if status change
+1 ;
+2 SET DGMTI=+$$LST^DGMTU($PIECE(IBEVTA,U,2),+IBEVTA,2)
+3 IF 'DGMTI
QUIT
+4 ;
+5 ; if copay test is no longer applicable, continue processing
+6 ; will change status to exempt (from 10 to 7) in the ANNUAL MEANS
+7 ; TEST file (#408.31)
+8 IF $PIECE($GET(^DGMT(408.31,DGMTI,0)),U,17)]""
QUIT
+9 ;
+10 SET DGCOSTA=$PIECE($GET(^DGMT(408.31,DGMTI,0)),U,3)
IF $SELECT(DGCOSTA=7&($PIECE(IBEVTA,U,4)=1)
QUIT
+11 SET DGMTYPT=2
SET DGMTACT="STA"
DO PRIOR^DGMTEVT
SET DFN=$PIECE(DGMTP,U,2)
+12 SET DIE="^DGMT(408.31,"
SET DA=+DGMTI
SET DR=".03////"_$SELECT($PIECE(IBEVTA,U,4)=1:7,1:8)
DO ^DIE
+13 DO AFTER^DGMTEVT
+14 SET DGMTINF=1
DO EN^DGMTAUD
+15 QUIT