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

BGP4DHEP.m

Go to the documentation of this file.
BGP4DHEP ; IHS/CMI/LAB - IHS HEDIS print ;
 ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
 ;
 ;
PRINT ;
 K ^TMP($J)
 I BGPROT="D" G DEL
 D ^BGP4HEH
 S BGPGPG=0
 S BGPQUIT=""
 D PRINT1
 K ^TMP($J)
 Q:BGPROT="P"
 ;
DEL ;create delimited output file
 D ^%ZISC ;close printer device
 K ^TMP($J)
 D ^BGP4HEL ;create ^tmp of delimited report
 K ^XTMP("BGP4D",BGPJ,BGPH)
 K ^TMP($J)
 Q
 ;
PRINT1 ;EP
 S BGPIC=0 F  S BGPIC=$O(BGPIND(BGPIC)) Q:BGPIC=""!(BGPQUIT)  D
 .D HEADER^BGP4DPH ;header for all indicators
 .I $Y>(IOSL-3) D HEADER^BGP4DPH Q:BGPQUIT
 .W !,$P(^BGPHEIF(BGPIC,0),U,3),!
 .I $Y>(IOSL-3) D HEADER^BGP4DPH Q:BGPQUIT
 .W !,"Denominator(s):"
 .S BGPX=0 F  S BGPX=$O(^BGPHEIF(BGPIC,61,"B",BGPX)) Q:BGPX'=+BGPX!(BGPQUIT)  D
 ..S BGPY=0 F  S BGPY=$O(^BGPHEIF(BGPIC,61,"B",BGPX,BGPY)) Q:BGPY'=+BGPY!(BGPQUIT)  D
 ...I $P(^BGPHEIF(BGPIC,61,BGPY,0),U,2)'[BGPRTYPE Q  ;not a denom def for this report
 ...S BGPZ=0 F  S BGPZ=$O(^BGPHEIF(BGPIC,61,BGPY,1,BGPZ)) Q:BGPZ'=+BGPZ!(BGPQUIT)  D
 ....I $Y>(IOSL-3) D HEADER^BGP4DPH Q:BGPQUIT
 ....W !,^BGPHEIF(BGPIC,61,BGPY,1,BGPZ,0)
 ....Q
 ...;W !
 ...Q
 ..Q
 .I $Y>(IOSL-3) D HEADER^BGP4DPH Q:BGPQUIT
 .W !!,"Numerator(s):"
 .S BGPX=0 F  S BGPX=$O(^BGPHEIF(BGPIC,62,"B",BGPX)) Q:BGPX'=+BGPX!(BGPQUIT)  D
 ..S BGPY=0 F  S BGPY=$O(^BGPHEIF(BGPIC,62,"B",BGPX,BGPY)) Q:BGPY'=+BGPY!(BGPQUIT)  D
 ...I $P(^BGPHEIF(BGPIC,62,BGPY,0),U,2)'[BGPRTYPE Q  ;not a denom def for this report
 ...S BGPZ=0 F  S BGPZ=$O(^BGPHEIF(BGPIC,62,BGPY,1,BGPZ)) Q:BGPZ'=+BGPZ!(BGPQUIT)  D
 ....I $Y>(IOSL-3) D HEADER^BGP4DPH Q:BGPQUIT
 ....W !,^BGPHEIF(BGPIC,62,BGPY,1,BGPZ,0)
 ....Q
 ...;W !
 ...Q
 ..Q
 .W ! S BGPX=0 F  S BGPX=$O(^BGPHEIF(BGPIC,11,BGPX)) Q:BGPX'=+BGPX  D
 ..I $Y>(IOSL-3) D HEADER^BGP4DPH Q:BGPQUIT
 ..W !,^BGPHEIF(BGPIC,11,BGPX,0)
 .W ! S BGPX=0 F  S BGPX=$O(^BGPHEIF(BGPIC,51,BGPX)) Q:BGPX'=+BGPX  D
 ..I $Y>(IOSL-3) D HEADER^BGP4DPH Q:BGPQUIT
 ..W !,^BGPHEIF(BGPIC,51,BGPX,0)
 .W ! S BGPX=0 F  S BGPX=$O(^BGPHEIF(BGPIC,52,BGPX)) Q:BGPX'=+BGPX  D
 ..I $Y>(IOSL-3) D HEADER^BGP4DPH Q:BGPQUIT
 ..W !,^BGPHEIF(BGPIC,52,BGPX,0)
 .X ^BGPHEIF(BGPIC,3)
 ;
 ;D ^BGP4DSP
 D ^BGP4HES
 D EXIT
 Q
EXIT ;
 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
C(X,X2,X3) ;
 D COMMA^%DTC
 Q X