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

BGPDP.m

Go to the documentation of this file.
BGPDP ; IHS/CMI/LAB - IHS gpra print ;
 ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
 ;
 ;
PRINT ;
 D ^BGPDH
 S BGPGPG=0
 S BGPQUIT=""
 D PRINT1
 Q:BGPQUIT
 Q
 ;
PRINT1 ;EP
 I $D(BGPIND(1)) D I1^BGPDP1 Q:BGPQUIT
 I $D(BGPIND(2)) D I1B^BGPDP1B Q:BGPQUIT
 I $D(BGPIND(3)) D I2A^BGPDP2 Q:BGPQUIT
 I $D(BGPIND(4)) D I2B^BGPDP2 Q:BGPQUIT
 I $D(BGPIND(5)) D I2C^BGPDP2 Q:BGPQUIT
 I $D(BGPIND(6)) D I3A^BGPDP3 Q:BGPQUIT
 I $D(BGPIND(7)) D I3B^BGPDP3 Q:BGPQUIT
 I $D(BGPIND(8)) D I3C^BGPDP3 Q:BGPQUIT
 I $D(BGPIND(9)) D I4A^BGPDP4 Q:BGPQUIT
 I $D(BGPIND(10)) D I4B^BGPDP4 Q:BGPQUIT
 I $D(BGPIND(11)) D I4C^BGPDP4 Q:BGPQUIT
 I $D(BGPIND(12)) D I5A^BGPDP5 Q:BGPQUIT
 I $D(BGPIND(13)) D I5B^BGPDP5 Q:BGPQUIT
 I $D(BGPIND(14)) D I5C^BGPDP5 Q:BGPQUIT
 I $D(BGPIND(15)) D I6^BGPDP6 Q:BGPQUIT
 I $D(BGPIND(16)) D I6A^BGPDP6 Q:BGPQUIT
 I $D(BGPIND(17)) D I7^BGPDP7 Q:BGPQUIT
 I $D(BGPIND(18)) D I8^BGPDP8 Q:BGPQUIT
 I $D(BGPIND(19)) D I12^BGPDP12 Q:BGPQUIT
 I $D(BGPIND(20)) D I13^BGPDP13 Q:BGPQUIT
 I $D(BGPIND(21)) D I14^BGPDP14 Q:BGPQUIT
 I $D(BGPIND(22)) D I22^BGPDP22 Q:BGPQUIT
 I $D(BGPIND(23)) D I23^BGPDP23 Q:BGPQUIT
 I $D(BGPIND(24)) D I24^BGPDP24 Q:BGPQUIT
 I $D(BGPIND(25)) D I29^BGPDP29 Q:BGPQUIT
 I $D(BGPIND(26)) D I30^BGPDP30 Q:BGPQUIT
 I $D(BGPIND(27)) D IA^BGPDPA Q:BGPQUIT
 I $D(BGPIND(28)) D IB^BGPDPB Q:BGPQUIT
 I $D(BGPIND(29)) D IC^BGPDPC Q:BGPQUIT
 I $D(BGPIND(30)) D ID^BGPDPD Q:BGPQUIT
 D ^BGPDS
 D EXIT
 Q
EXIT ;
 I '$G(BGPAREAA) K ^XTMP("BGPD",BGPJ,BGPH)
 I $E(IOST)="C",IO=IO(0),'$D(ZTQUEUED) W ! S DIR(0)="EO",DIR("A")="End of report.  Press ENTER" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 Q
V(R,N,P) ;
 NEW Y
 I $G(BGPAREAA),'$G(BGPSUMR) G VA
 Q $P($G(^BGPD(R,N)),U,P)
VA ;
 NEW X,C,V,MT,FT,M,F,B S X=0,C="" F  S X=$O(BGPSUL(X)) Q:X'=+X  D
 .S V=$P($G(^BGPD(X,N)),U,P)
 .I C="" S C=V Q
 .S MT=$P(C,"!"),FT=$P(C,"!",2),M=$P(V,"!"),F=$P(V,"!",2)
 .F B=1:1:6 S $P(MT,"~",B)=$P(MT,"~",B)+$P(M,"~",B)
 .F B=1:1:6 S $P(FT,"~",B)=$P(FT,"~",B)+$P(F,"~",B)
 .S C=MT_"!"_FT
 .Q
 Q C
C(X,X2,X3) ;
 D COMMA^%DTC
 Q X