Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AMHRBV11

AMHRBV11.m

Go to the documentation of this file.
AMHRBV11 ; IHS/CMI/LAB - continuation of AMHV1 ;
 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
5 ;ENTRY POINT
 I $Y>(IOSL-7) D HEAD^AMHRBV1 Q:$D(AMHQUIT)
 D HD^AMHRBV1
 S AMHMDFN=0 F  S AMHMDFN=$O(^AUPNPRVT(DFN,11,AMHMDFN)) Q:AMHMDFN'=+AMHMDFN!($D(AMHQUIT))  I $D(^AUPNPRVT(DFN,11,AMHMDFN,0)) S AMHREC=^AUPNPRVT(DFN,11,AMHMDFN,0) D 52
 Q:$D(AMHQUIT)
 D VISIT^AMHRBV1
 Q
52 ;
 Q:$P(AMHREC,U,6)=""
 Q:$P(AMHREC,U,6)>AMHED
 I $P(AMHREC,U,7)]"",$P(AMHREC,U,7)<AMHSD Q
53 ;
 I $Y>(IOSL-9) D HEAD^AMHRBV1 Q:$D(AMHQUIT)
 W !?8,"INSURER:  ",$P(^AUTNINS($P(AMHREC,U),0),U)
 W !?8,"POLICY #: ",$P(AMHREC,U,2),?47,"COVERAGE TYPE: ",$P(AMHREC,U,3)
 W !?8,"INSURED:  ",$P(AMHREC,U,4),?47,"REL:  ",$S($P(AMHREC,U,5)]"":$P(^AUTTRLSH($P(AMHREC,U,5),0),U),1:"")
 W !?8,"ELIG BEG DATE:  " S Y=$P(AMHREC,U,6) D:Y]"" DD^%DT W Y,?47,"ELIG END DATE:  " S Y=$P(AMHREC,U,7) D:Y]"" DD^%DT W Y
 W !
 Q
4 ;ENTRY POINT
 I $Y>(IOSL-7) D HEAD^AMHRBV1 Q:$D(AMHQUIT)
 D HD^AMHRBV1
 S AMHMDFN=0 F  S AMHMDFN=$O(^AUPNMCD("B",DFN,AMHMDFN)) Q:AMHMDFN'=+AMHMDFN!($D(AMHQUIT))  S AMHREC=^AUPNMCD(AMHMDFN,0) D 42
 Q:$D(AMHQUIT)
 W !
 D VISIT^AMHRBV1
 Q
42 ;
 Q:'$D(^AUPNMCD(AMHMDFN,11))
 S (AMHNDFN,AMHGOT)=0 F  S AMHNDFN=$O(^AUPNMCD(AMHMDFN,11,AMHNDFN)) Q:AMHNDFN'=+AMHNDFN!($D(AMHQUIT))  S AMHNREC=^AUPNMCD(AMHMDFN,11,AMHNDFN,0) D 43
 Q
 ;
43 ;
 Q:AMHNDFN>AMHED
 I $P(AMHNREC,U,2)]"",$P(AMHNREC,U,2)<AMHSD Q
 S AMHGOT=AMHGOT+1
 G:AMHGOT>1 431
 I $Y>(IOSL-9) D HEAD^AMHRBV1 Q:$D(AMHQUIT)
 S AMHMN=$S($D(^AUPNMCD(AMHMDFN,21)):$P(^AUPNMCD(AMHMDFN,21),U),1:"")
 S AMHMDOB=$S($D(^AUPNMCD(AMHMDFN,21)):$P(^AUPNMCD(AMHMDFN,21),U,2),1:"")
 W !?8,"(MCD)  ",AMHMN,?61,AMHMDOB
 W !?8,"Medicaid #: ",$P(AMHREC,U,3),?50,"State: ",$S($P(AMHREC,U,4)="":"",1:$P(^DIC(5,$P(AMHREC,U,4),0),U))
 W !?8,"Name/Insured: ",$P(AMHREC,U,5),?50,"Sex of Insured: ",$P(AMHREC,U,7)
431 I $Y>(IOSL-6) D HEAD^AMHRBV1 Q:$D(AMHQUIT)
 W !?8,"Elig Beg Date: " S Y=$P(AMHNREC,U) D:Y]"" DD^%DT W ?20,Y,?35,"Coverage: ",$P(AMHNREC,U,3),?50,"Elig End Date: " S Y=$P(AMHNREC,U,2) D:Y]"" DD^%DT W Y
 Q
6 ;ENTRY POINT
 I $Y>(IOSL-9) D HEAD^AMHRBV1 Q:$D(AMHQUIT)
 D HD^AMHRBV1
 Q:$D(AMHQUIT)
 W !
 D VISIT^AMHRBV1
 Q