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
BDMOSUT ; IHS/CMI/LAB - PRINTING UTILITIES ; [ 01/07/2009 12:23 PM ]
+1 ;;2.0;DIABETES MANAGEMENT SYSTEM;**2**;JUN 14, 2007
+2 ;
XTMP(N,D) ;EP - set xtmp 0 node
+1 IF $GET(N)=""
QUIT
+2 SET ^XTMP(N,0)=$$FMADD^XLFDT(DT,14)_"^"_DT_"^"_$GET(D)
+3 QUIT
CALC ;ENTRY POINT
+1 ;IHS/CMI/LAB - fixed per ANMC
IF (+Y=0)!(+X=0)
SET Z="**"
GOTO COMMA
+2 SET Z=(((X/Y)-1)*100)
SET Z=$FNUMBER(Z,"+,",1)
COMMA ;
+1 SET X=$FNUMBER(X,",")
+2 ;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))
+3 QUIT
DONE ;ENTRY POINT - END OF REPORT TIME DISPLAY
+1 IF $DATA(BDMET)
SET BDMTS=(86400*($PIECE(BDMET,",")-$PIECE(BDMBT,",")))+($PIECE(BDMET,",",2)-$PIECE(BDMBT,",",2))
SET BDMH=$PIECE(BDMTS/3600,".")
IF BDMH=""
SET BDMH=0
Begin DoDot:1
+2 SET BDMTS=BDMTS-(BDMH*3600)
SET BDMM=$PIECE(BDMTS/60,".")
IF BDMM=""
SET BDMM=0
SET BDMTS=BDMTS-(BDMM*60)
SET BDMS=BDMTS
WRITE !!,"RUN TIME (H.M.S): ",BDMH,".",BDMM,".",BDMS
End DoDot:1
+3 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
SET DIR(0)="EO"
SET DIR("A")="End of report. HIT RETURN"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+4 ;W:$D(IOF) @IOF
+5 KILL BDMTS,BDMS,BDMH,BDMM,BDMET
+6 QUIT