AGGMCTRG ;VNGT/HS/KDC-Medicare Triggers ; 26 May 2010 11:06 AM
;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
;
ECCOV(DATA,DFN,AGGMCCOV,AGGMCNME,AGGMCNUM,AGGMCDOB) ; EP -- AGG MEDICARE PART D TRIGGER
; Input
; AGGMCCOV - Type of Medicare coverage
; AGGMCNME - Medicare Name - From Parent Form
; AGGMCNUM - Medicare Number - From Parent Form
; AGGMCDOB - Medicare DOB - From Parent Form
;
NEW UID,II,VALUE,SOURCE,IEN,HELP,TYPE,ABLE,ECREL,REQ,VISIBLE
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("AGGMCTRG",UID))
K @DATA
S II=0
S AGGMCCOV=$G(AGGMCCOV)
S AGGMCNME=$G(AGGMCNME)
S AGGMCNUM=$G(AGGMCNUM)
S AGGMCDOB=$G(AGGMCDOB) S:AGGMCDOB]"" AGGMCDOB=$$DATE^AGGUL1(AGGMCDOB)
;
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^AGGMCTRG D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
D HDR
S @DATA@(II)=HDR_$C(30)
;
;Type of Coverage is Blank
I AGGMCCOV="" D G XECCOV
. S SOURCE="AGGMCESD",VALUE="",ABLE="N",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCEED",VALUE="",ABLE="N",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCPN",VALUE="",ABLE="N",TYPE="T",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCMN",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCIDN",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCPC",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCG",VALUE="",ABLE="N",TYPE="C",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMRDOB",VALUE="",ABLE="N",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCGN",VALUE="",ABLE="N",TYPE="T",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
;
;Type of coverage is not Part D
I AGGMCCOV'="D" D G XECCOV
. S SOURCE="AGGMCESD",VALUE="",ABLE="Y",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCEED",VALUE="",ABLE="Y",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCPN",VALUE="",ABLE="N",TYPE="T",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCMN",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCIDN",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCPC",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCG",VALUE="",ABLE="N",TYPE="C",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMRDOB",VALUE="",ABLE="N",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCGN",VALUE="",ABLE="N",TYPE="T",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
;
;Type of coverage is Part D
I AGGMCCOV="D" D
. S SOURCE="AGGMCESD",ABLE="Y",TYPE="D",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCEED",ABLE="Y",TYPE="D",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCPN",ABLE="Y",TYPE="T",CLEAR="",HELP="",VALUE="",REQ="R",VISIBLE="Y" D UP
. S SOURCE="AGGMCMN",ABLE="Y",TYPE="X",CLEAR="",HELP="",VALUE=$$MCNM(DFN,AGGMCNME),REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCIDN",ABLE="Y",TYPE="X",CLEAR="",HELP="",VALUE=AGGMCNUM,REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCPC",ABLE="Y",TYPE="X",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCG",ABLE="Y",TYPE="C",CLEAR="",HELP="",VALUE=$$MGND(DFN),REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMRDOB",ABLE="Y",TYPE="D",CLEAR="",HELP="",VALUE=$$MCDOB(DFN,AGGMCDOB),REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCGN",ABLE="Y",TYPE="T",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
;
XECCOV S II=II+1,@DATA@(II)=$C(31)
Q
;
MGND(DFN) ;EP - Return Gender
Q $$GET1^DIQ(2,DFN_",",.02,"I")
;
MCNM(DFN,AGGMCNME) ;EP - Medicare Name - Plug in parent form value and if blank - Patient File name
I AGGMCNME]"" Q AGGMCNME
E Q $$GET1^DIQ(2,DFN_",",.01,"E")
;
MCDOB(DFN,AGGMCDOB) ;EP - Date of Birth - Plug in parent value and if blank - Patient File value
I AGGMCDOB]"" Q $$FMTE^AGGUL1(AGGMCDOB)
E Q $$FMTE^AGGUL1($P($G(^DPT(DFN,0)),U,3))
;
ELG(DATA,AGGMCCOV) ; EP -- AGG MEDICARE ELIG TRIGGER
; Input
; AGGMCCOV - Coverage Type
;
NEW UID,II,VALUE,SOURCE,IEN,HELP,TYPE,ABLE,ECREL,REQ,VISIBLE
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("AGGMCTRG",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^AGGMCTRG D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
D HDR
S @DATA@(II)=HDR_$C(30)
;
;Type of Coverage is Blank
S AGGMCCOV=$G(AGGMCCOV)
I AGGMCCOV="" D G XECCOV
. S SOURCE="AGGMCESD",VALUE="",ABLE="N",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCEED",VALUE="",ABLE="N",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCPN",VALUE="",ABLE="N",TYPE="T",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCMN",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCIDN",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCPC",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCG",VALUE="",ABLE="N",TYPE="C",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMRDOB",VALUE="",ABLE="N",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCGN",VALUE="",ABLE="N",TYPE="T",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
;
;Type of coverage is not Part D
I AGGMCCOV'="D" D G XECCOV
. S SOURCE="AGGMCESD",VALUE="",ABLE="Y",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="" D UP
. S SOURCE="AGGMCEED",VALUE="",ABLE="Y",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="" D UP
. S SOURCE="AGGMCPN",VALUE="",ABLE="N",TYPE="T",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCMN",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCIDN",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCPC",VALUE="",ABLE="N",TYPE="X",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCG",VALUE="",ABLE="N",TYPE="C",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMRDOB",VALUE="",ABLE="N",TYPE="D",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
. S SOURCE="AGGMCGN",VALUE="",ABLE="N",TYPE="T",CLEAR="",HELP="",REQ="",VISIBLE="N" D UP
;
;Type of coverage is Part D
I AGGMCCOV="D" D
. S SOURCE="AGGMCESD",ABLE="Y",TYPE="D",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCEED",ABLE="Y",TYPE="D",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCPN",ABLE="Y",TYPE="T",CLEAR="",HELP="",VALUE="",REQ="R",VISIBLE="Y" D UP
. S SOURCE="AGGMCMN",ABLE="Y",TYPE="X",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCIDN",ABLE="Y",TYPE="X",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCPC",ABLE="Y",TYPE="X",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCG",ABLE="Y",TYPE="C",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMRDOB",ABLE="Y",TYPE="D",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
. S SOURCE="AGGMCGN",ABLE="Y",TYPE="T",CLEAR="",HELP="",VALUE="",REQ="",VISIBLE="Y" D UP
;
XELG S II=II+1,@DATA@(II)=$C(31)
Q
;
ERR ;
D ^%ZTER
NEW Y,ERRDTM
S Y=$$NOW^XLFDT() X ^DD("DD") S ERRDTM=Y
S BMXSEC="Recording that an error occurred at "_ERRDTM
I $D(II),$D(DATA) S II=II+1,@DATA@(II)=$C(31)
Q
;
UP ;
S II=II+1,@DATA@(II)=SOURCE_U_TYPE_U_VALUE_U_ABLE_U_$G(REQ)_U_$G(CLEAR)_U_HELP_U_$G(VISIBLE)_$C(30)
Q
;
HDR ;
S HDR="T00008SOURCE^T00001CODE_TYPE^T01024PARMS^T00001ABLE_FLAG^T00001REQ_OPT^T00100CLEAR_FIELDS^T00200HELP_TEXT^T00001VISIBLE"
Q
AGGMCTRG ;VNGT/HS/KDC-Medicare Triggers ; 26 May 2010 11:06 AM
+1 ;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
+2 ;
ECCOV(DATA,DFN,AGGMCCOV,AGGMCNME,AGGMCNUM,AGGMCDOB) ; EP -- AGG MEDICARE PART D TRIGGER
+1 ; Input
+2 ; AGGMCCOV - Type of Medicare coverage
+3 ; AGGMCNME - Medicare Name - From Parent Form
+4 ; AGGMCNUM - Medicare Number - From Parent Form
+5 ; AGGMCDOB - Medicare DOB - From Parent Form
+6 ;
+7 NEW UID,II,VALUE,SOURCE,IEN,HELP,TYPE,ABLE,ECREL,REQ,VISIBLE
+8 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+9 SET DATA=$NAME(^TMP("AGGMCTRG",UID))
+10 KILL @DATA
+11 SET II=0
+12 SET AGGMCCOV=$GET(AGGMCCOV)
+13 SET AGGMCNME=$GET(AGGMCNME)
+14 SET AGGMCNUM=$GET(AGGMCNUM)
+15 SET AGGMCDOB=$GET(AGGMCDOB)
IF AGGMCDOB]""
SET AGGMCDOB=$$DATE^AGGUL1(AGGMCDOB)
+16 ;
+17 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^AGGMCTRG D UNWIND^%ZTER"
+18 DO HDR
+19 SET @DATA@(II)=HDR_$CHAR(30)
+20 ;
+21 ;Type of Coverage is Blank
+22 IF AGGMCCOV=""
Begin DoDot:1
+23 SET SOURCE="AGGMCESD"
SET VALUE=""
SET ABLE="N"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+24 SET SOURCE="AGGMCEED"
SET VALUE=""
SET ABLE="N"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+25 SET SOURCE="AGGMCPN"
SET VALUE=""
SET ABLE="N"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+26 SET SOURCE="AGGMCMN"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+27 SET SOURCE="AGGMCIDN"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+28 SET SOURCE="AGGMCPC"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+29 SET SOURCE="AGGMCG"
SET VALUE=""
SET ABLE="N"
SET TYPE="C"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+30 SET SOURCE="AGGMRDOB"
SET VALUE=""
SET ABLE="N"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+31 SET SOURCE="AGGMCGN"
SET VALUE=""
SET ABLE="N"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
End DoDot:1
GOTO XECCOV
+32 ;
+33 ;Type of coverage is not Part D
+34 IF AGGMCCOV'="D"
Begin DoDot:1
+35 SET SOURCE="AGGMCESD"
SET VALUE=""
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+36 SET SOURCE="AGGMCEED"
SET VALUE=""
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+37 SET SOURCE="AGGMCPN"
SET VALUE=""
SET ABLE="N"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+38 SET SOURCE="AGGMCMN"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+39 SET SOURCE="AGGMCIDN"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+40 SET SOURCE="AGGMCPC"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+41 SET SOURCE="AGGMCG"
SET VALUE=""
SET ABLE="N"
SET TYPE="C"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+42 SET SOURCE="AGGMRDOB"
SET VALUE=""
SET ABLE="N"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+43 SET SOURCE="AGGMCGN"
SET VALUE=""
SET ABLE="N"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
End DoDot:1
GOTO XECCOV
+44 ;
+45 ;Type of coverage is Part D
+46 IF AGGMCCOV="D"
Begin DoDot:1
+47 SET SOURCE="AGGMCESD"
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+48 SET SOURCE="AGGMCEED"
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+49 SET SOURCE="AGGMCPN"
SET ABLE="Y"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ="R"
SET VISIBLE="Y"
DO UP
+50 SET SOURCE="AGGMCMN"
SET ABLE="Y"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET VALUE=$$MCNM(DFN,AGGMCNME)
SET REQ=""
SET VISIBLE="Y"
DO UP
+51 SET SOURCE="AGGMCIDN"
SET ABLE="Y"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET VALUE=AGGMCNUM
SET REQ=""
SET VISIBLE="Y"
DO UP
+52 SET SOURCE="AGGMCPC"
SET ABLE="Y"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+53 SET SOURCE="AGGMCG"
SET ABLE="Y"
SET TYPE="C"
SET CLEAR=""
SET HELP=""
SET VALUE=$$MGND(DFN)
SET REQ=""
SET VISIBLE="Y"
DO UP
+54 SET SOURCE="AGGMRDOB"
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET VALUE=$$MCDOB(DFN,AGGMCDOB)
SET REQ=""
SET VISIBLE="Y"
DO UP
+55 SET SOURCE="AGGMCGN"
SET ABLE="Y"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
End DoDot:1
+56 ;
XECCOV SET II=II+1
SET @DATA@(II)=$CHAR(31)
+1 QUIT
+2 ;
MGND(DFN) ;EP - Return Gender
+1 QUIT $$GET1^DIQ(2,DFN_",",.02,"I")
+2 ;
MCNM(DFN,AGGMCNME) ;EP - Medicare Name - Plug in parent form value and if blank - Patient File name
+1 IF AGGMCNME]""
QUIT AGGMCNME
+2 IF '$TEST
QUIT $$GET1^DIQ(2,DFN_",",.01,"E")
+3 ;
MCDOB(DFN,AGGMCDOB) ;EP - Date of Birth - Plug in parent value and if blank - Patient File value
+1 IF AGGMCDOB]""
QUIT $$FMTE^AGGUL1(AGGMCDOB)
+2 IF '$TEST
QUIT $$FMTE^AGGUL1($PIECE($GET(^DPT(DFN,0)),U,3))
+3 ;
ELG(DATA,AGGMCCOV) ; EP -- AGG MEDICARE ELIG TRIGGER
+1 ; Input
+2 ; AGGMCCOV - Coverage Type
+3 ;
+4 NEW UID,II,VALUE,SOURCE,IEN,HELP,TYPE,ABLE,ECREL,REQ,VISIBLE
+5 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+6 SET DATA=$NAME(^TMP("AGGMCTRG",UID))
+7 KILL @DATA
+8 SET II=0
+9 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^AGGMCTRG D UNWIND^%ZTER"
+10 DO HDR
+11 SET @DATA@(II)=HDR_$CHAR(30)
+12 ;
+13 ;Type of Coverage is Blank
+14 SET AGGMCCOV=$GET(AGGMCCOV)
+15 IF AGGMCCOV=""
Begin DoDot:1
+16 SET SOURCE="AGGMCESD"
SET VALUE=""
SET ABLE="N"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+17 SET SOURCE="AGGMCEED"
SET VALUE=""
SET ABLE="N"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+18 SET SOURCE="AGGMCPN"
SET VALUE=""
SET ABLE="N"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+19 SET SOURCE="AGGMCMN"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+20 SET SOURCE="AGGMCIDN"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+21 SET SOURCE="AGGMCPC"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+22 SET SOURCE="AGGMCG"
SET VALUE=""
SET ABLE="N"
SET TYPE="C"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+23 SET SOURCE="AGGMRDOB"
SET VALUE=""
SET ABLE="N"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+24 SET SOURCE="AGGMCGN"
SET VALUE=""
SET ABLE="N"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
End DoDot:1
GOTO XECCOV
+25 ;
+26 ;Type of coverage is not Part D
+27 IF AGGMCCOV'="D"
Begin DoDot:1
+28 SET SOURCE="AGGMCESD"
SET VALUE=""
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE=""
DO UP
+29 SET SOURCE="AGGMCEED"
SET VALUE=""
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE=""
DO UP
+30 SET SOURCE="AGGMCPN"
SET VALUE=""
SET ABLE="N"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+31 SET SOURCE="AGGMCMN"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+32 SET SOURCE="AGGMCIDN"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+33 SET SOURCE="AGGMCPC"
SET VALUE=""
SET ABLE="N"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+34 SET SOURCE="AGGMCG"
SET VALUE=""
SET ABLE="N"
SET TYPE="C"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+35 SET SOURCE="AGGMRDOB"
SET VALUE=""
SET ABLE="N"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
+36 SET SOURCE="AGGMCGN"
SET VALUE=""
SET ABLE="N"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET REQ=""
SET VISIBLE="N"
DO UP
End DoDot:1
GOTO XECCOV
+37 ;
+38 ;Type of coverage is Part D
+39 IF AGGMCCOV="D"
Begin DoDot:1
+40 SET SOURCE="AGGMCESD"
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+41 SET SOURCE="AGGMCEED"
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+42 SET SOURCE="AGGMCPN"
SET ABLE="Y"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ="R"
SET VISIBLE="Y"
DO UP
+43 SET SOURCE="AGGMCMN"
SET ABLE="Y"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+44 SET SOURCE="AGGMCIDN"
SET ABLE="Y"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+45 SET SOURCE="AGGMCPC"
SET ABLE="Y"
SET TYPE="X"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+46 SET SOURCE="AGGMCG"
SET ABLE="Y"
SET TYPE="C"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+47 SET SOURCE="AGGMRDOB"
SET ABLE="Y"
SET TYPE="D"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
+48 SET SOURCE="AGGMCGN"
SET ABLE="Y"
SET TYPE="T"
SET CLEAR=""
SET HELP=""
SET VALUE=""
SET REQ=""
SET VISIBLE="Y"
DO UP
End DoDot:1
+49 ;
XELG SET II=II+1
SET @DATA@(II)=$CHAR(31)
+1 QUIT
+2 ;
ERR ;
+1 DO ^%ZTER
+2 NEW Y,ERRDTM
+3 SET Y=$$NOW^XLFDT()
XECUTE ^DD("DD")
SET ERRDTM=Y
+4 SET BMXSEC="Recording that an error occurred at "_ERRDTM
+5 IF $DATA(II)
IF $DATA(DATA)
SET II=II+1
SET @DATA@(II)=$CHAR(31)
+6 QUIT
+7 ;
UP ;
+1 SET II=II+1
SET @DATA@(II)=SOURCE_U_TYPE_U_VALUE_U_ABLE_U_$GET(REQ)_U_$GET(CLEAR)_U_HELP_U_$GET(VISIBLE)_$CHAR(30)
+2 QUIT
+3 ;
HDR ;
+1 SET HDR="T00008SOURCE^T00001CODE_TYPE^T01024PARMS^T00001ABLE_FLAG^T00001REQ_OPT^T00100CLEAR_FIELDS^T00200HELP_TEXT^T00001VISIBLE"
+2 QUIT