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

AMHEYLOG.m

Go to the documentation of this file.
AMHEYLOG ; IHS/CMI/LAB - UPDATE LOG ;
 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
 ;
 ;
 ;
 ;
LOG ; UPDATE LOG
 W:'$D(ZTQUEUED) !!,AMH("COUNT")," transactions were generated."
 W:'$D(ZTQUEUED) !,"Updating log entry."
 D NOW^%DTC S AMH("RUN STOP")=%
 S DA=AMH("RUN LOG"),DIE="^AMHXLOG(",DR=".04////"_AMH("RUN STOP")_";.05////"_AMH("ERROR COUNT")_";.06////"_AMH("COUNT")_";.08///"_AMHTOTV_";.17////"_AMH("ENC")_";.18////"_AMHSFC D CALLDIE^AMHLEIN
 I $D(Y) S AMH("QFLG")=26 Q
 S DA=AMH("RUN LOG"),DIE="^AMHXLOG(",DR=".15///P" D CALLDIE^AMHLEIN
 I $D(Y) S AMH("QFLG")=26 Q
 K DR,DIE,DA,DIV,DIU
 S AMHRIEN=$O(^AMHRECD("B","BH0",0))
 I 'AMHRIEN Q ""
 S AMHLOG=AMH("RUN LOG")
 S AMHY=0,AMHT="" F  S AMHY=$O(^AMHRECD(AMHRIEN,11,"B",AMHY)) Q:AMHY'=+AMHY  D
 .S X=""
 .S AMHZ=$O(^AMHRECD(AMHRIEN,11,"B",AMHY,0))
 .Q:'$D(^AMHRECD(AMHRIEN,11,AMHZ,1))
 .X ^AMHRECD(AMHRIEN,11,AMHZ,1)
 .S $P(AMHT,U,AMHY)=X
 S ^BHSXDATA(0)=AMHT
 ;
 Q