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

BMCOSUT.m

Go to the documentation of this file.
BMCOSUT ; IHS/PHXAO/TMJ - PRINTING UTILITIES ;  
 ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
 ;IHS/ITSC/FCJ ADDED NUMERIC DATE FORMAT FOR PRINTING
 ;
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,",")
 Q
DONE ;ENTRY POINT - END OF REPORT TIME DISPLAY
 I $D(BMCET) S BMCTS=(86400*($P(BMCET,",")-$P(BMCBT,",")))+($P(BMCET,",",2)-$P(BMCBT,",",2)),BMCH=$P(BMCTS/3600,".") S:BMCH="" BMCH=0 D
 .S BMCTS=BMCTS-(BMCH*3600),BMCM=$P(BMCTS/60,".")
 .S:BMCM="" BMCM=0 S BMCTS=BMCTS-(BMCM*60),BMCS=BMCTS
 .W !!,"RUN TIME (H.M.S): ",BMCH,".",BMCM,".",BMCS
 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 BMCTS,BMCS,BMCH,BMCM,BMCET
 Q
SET ;ENTRY POINT
 S BMC1="AMBPOVC",BMC3="AMBPOV" D SET1
 S BMC1="AMBAPCC",BMC3="AMBAPC" D SET1
 S BMC1="AMBINJCAUSEC",BMC3="AMBINJCAUSE" D SET1
 S BMC1="DENTPOVC",BMC3="DENTPOV" D SET1
 S BMC1="AMBPROVC",BMC3="AMBPROV" D SET1
 S BMC1="AMBTYPEC",BMC3="AMBTYPE" D SET1
 S BMC1="AMBCATC",BMC3="AMBCAT" D SET1
 S BMC1="AMBCLINC",BMC3="AMBCLIN" D SET1
 S BMC1="AMBLOCC",BMC3="AMBLOC" D SET1
 Q
SET1 S BMC2="^XTMP("""_BMCOS_""",BMCJOB,BMCBTH,"""_BMC3_""",X)"
 S X="" F  S X=$O(@BMC2) Q:X=""  S %=^(X) S ^XTMP(BMCOS,BMCJOB,BMCBTH,BMC1,9999999-%,X)=%
 Q
EOJ ;ENTRY POINT
 K %DT,DFN,Y,X,C,DIRUT,DIR,J,H,X1,X2,X3
 K BMCFYEY,BMCFYE,BMCFYBE,BMCFYB,BMCDTP,BMCMFY,BMCMON,BMCSU,BMCSUF,BMCLOCT,BMCTYPE,BMC,BMCFYBY,BMCRPT,BMCJ,BMCOS,BMCPYB,BMCPYE,BMCQUIT,BMCSQ,BMCP,BMCDIC,BMCDICB,BMCLOC,BMCFY,BMCNBC,BMCNBCD,BMCNBDY
 K BMCBT,BMCJOB,BMCERR,BMCACED,BMCRD
 Q
DT ;EP; NUMERIC DATE FORMAT FOR PRINTING 4 DIGIT YEAR
 S Y=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$S($E(Y,1,3)>299:20_$E(Y,2,3),1:(19_$E(Y,2,3)))
 Q
DT1 ;EP; NUMERIC DATE FORMAT FOR PRINTING 2 DIGIT YEAR
 S Y=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3)