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

AMHFC1.m

Go to the documentation of this file.
AMHFC1 ; IHS/CMI/LAB - FORMS COUNT (FILE) report process ;
 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
P ; Run by posting date
 D XTMP^AMHUTIL("AMHFC","BH FORMS COUNT REPORT")
 S AMHODAT=AMHSD_".9999" F  S AMHODAT=$O(^AMHREC("AD",AMHODAT)) Q:AMHODAT=""!((AMHODAT\1)>AMHED)  D V1
 Q
V1 ;
 S AMHVSIT="" F  S AMHVSIT=$O(^AMHREC("AD",AMHODAT,AMHVSIT)) Q:AMHVSIT'=+AMHVSIT  I $D(^AMHREC(AMHVSIT,0)) D PROC
 Q
PROC ;
 I AMHDEC'="ALL",AMHDEC'=$P(^AMHREC(AMHVSIT,0),U,19) Q
 Q:$P(^AMHREC(AMHVSIT,0),U,19)=""
 Q:'$D(^VA(200,$P(^AMHREC(AMHVSIT,0),U,19),0))
 S AMHAP=$P(^VA(200,$P(^AMHREC(AMHVSIT,0),U,19),0),U)
 S AMHVREC=^AMHREC(AMHVSIT,0)
 S D=$P(AMHVREC,U,8) I D,$$DEMO^AMHUTIL1(D,$G(AMHDEMO))
 S AMHDATE=$P(AMHODAT,".")
SET S ^(AMHDATE)=$S($D(^XTMP("AMHFC",$J,AMHAP,AMHDATE)):^(AMHDATE)+1,1:1)
 Q
EOJ ; clean up and exit
 K AMHVREC,AMHCLIN,AMHSKIP,AMH1,AMH2,AMHAP,AMHX,AMHY,AMHVDES,AMHDATE,AMHPROV,AMHSEC,AMHZ
 Q
 ;
 ;