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

BDMOSUT.m

Go to the documentation of this file.
BDMOSUT ; IHS/CMI/LAB - PRINTING UTILITIES ; [ 01/07/2009 12:23 PM ]
 ;;2.0;DIABETES MANAGEMENT SYSTEM;**2**;JUN 14, 2007
 ;
XTMP(N,D) ;EP - set xtmp 0 node
 Q:$G(N)=""
 S ^XTMP(N,0)=$$FMADD^XLFDT(DT,14)_"^"_DT_"^"_$G(D)
 Q
CALC ;ENTRY POINT
 I (+Y=0)!(+X=0) S Z="**" G COMMA ;IHS/CMI/LAB - fixed per ANMC
 S Z=(((X/Y)-1)*100),Z=$FN(Z,"+,",1)
COMMA ;
 S X=$FN(X,",")
 ;S X2=0,X3=$S($L(X)>3:($L(X)+($L(X)\3)),1:$L(X)) D COMMA^%DTC S X=$E(X,1,($L(X)-1))
 Q
DONE ;ENTRY POINT - END OF REPORT TIME DISPLAY
 I $D(BDMET) S BDMTS=(86400*($P(BDMET,",")-$P(BDMBT,",")))+($P(BDMET,",",2)-$P(BDMBT,",",2)),BDMH=$P(BDMTS/3600,".") S:BDMH="" BDMH=0 D
 .S BDMTS=BDMTS-(BDMH*3600),BDMM=$P(BDMTS/60,".") S:BDMM="" BDMM=0 S BDMTS=BDMTS-(BDMM*60),BDMS=BDMTS W !!,"RUN TIME (H.M.S): ",BDMH,".",BDMM,".",BDMS
 I $E(IOST)="C",IO=IO(0) S DIR(0)="EO",DIR("A")="End of report.  HIT RETURN" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 ;W:$D(IOF) @IOF
 K BDMTS,BDMS,BDMH,BDMM,BDMET
 Q