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

BGPAP.m

Go to the documentation of this file.
BGPAP ; IHS/CMI/LAB - IHS gpra print ;
 ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
 ;
 ;
PRINT ;
 S BGPGPG=0
 S BGPQUIT=""
 D PRINT1
 Q:BGPQUIT
 Q
 ;
PRINT1 ;
 I $D(BGPIND(1)) D I1^BGPAP1 Q:BGPQUIT
 I $D(BGPIND(2)) D I1B^BGPAP1B Q:BGPQUIT
 I $D(BGPIND(3)) D I2A^BGPAP2 Q:BGPQUIT
 I $D(BGPIND(4)) D I2B^BGPAP2 Q:BGPQUIT
 I $D(BGPIND(5)) D I2C^BGPAP2 Q:BGPQUIT
 I $D(BGPIND(6)) D I3A^BGPAP3 Q:BGPQUIT
 I $D(BGPIND(7)) D I3B^BGPAP3 Q:BGPQUIT
 I $D(BGPIND(8)) D I3C^BGPAP3 Q:BGPQUIT
 I $D(BGPIND(9)) D I4A^BGPAP4 Q:BGPQUIT
 I $D(BGPIND(10)) D I4B^BGPAP4 Q:BGPQUIT
 I $D(BGPIND(11)) D I4C^BGPAP4 Q:BGPQUIT
 I $D(BGPIND(12)) D I5A^BGPAP5 Q:BGPQUIT
 I $D(BGPIND(13)) D I5B^BGPAP5 Q:BGPQUIT
 I $D(BGPIND(14)) D I5C^BGPAP5 Q:BGPQUIT
 I $D(BGPIND(15)) D I6^BGPAP6 Q:BGPQUIT
 I $D(BGPIND(16)) D I6A^BGPAP6 Q:BGPQUIT
 I $D(BGPIND(17)) D I7^BGPAP7 Q:BGPQUIT
 I $D(BGPIND(18)) D I8^BGPAP8 Q:BGPQUIT
 I $D(BGPIND(19)) D I12^BGPAP12 Q:BGPQUIT
 I $D(BGPIND(20)) D I13^BGPAP13 Q:BGPQUIT
 I $D(BGPIND(21)) D I14^BGPAP14 Q:BGPQUIT
 I $D(BGPIND(22)) D I22^BGPAP22 Q:BGPQUIT
 I $D(BGPIND(23)) D I23^BGPAP23 Q:BGPQUIT
 I $D(BGPIND(24)) D I24^BGPAP24 Q:BGPQUIT
 ;I $D(BGPIND(25)) D I29^BGPAP29 Q:BGPQUIT
 ;I $D(BGPIND(26)) D I30^BGPAP30 Q:BGPQUIT
 I $D(BGPIND(27)) D IA^BGPAPA Q:BGPQUIT
 I $D(BGPIND(26)) D IB^BGPAPB Q:BGPQUIT
 I $D(BGPIND(29)) D IC^BGPAPC Q:BGPQUIT
 I $D(BGPIND(30)) D ID^BGPAPD Q:BGPQUIT
 D EXIT
 Q
EXIT ;
 I '$G(BGPAREAA) K ^XTMP("BGPD",BGPJ,BGPH)
 K ^TMP($J)
 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