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

BGPMUPP.m

Go to the documentation of this file.
  1. BGPMUPP ; IHS/MSC/MGH - Meaningful Use Print Jul 2009 6:26 AM ;31-Jan-2011 16:06;MGH
  1. ;;14.1;IHS CLINICAL REPORTING;**1**;MAY 29, 2014;Build 2
  1. ;
  1. ;
  1. PRINT ;
  1. K ^TMP($J)
  1. K BGPDELIM
  1. S BGPIOSL=$S($G(BGPGUI):55,1:$G(IOSL))
  1. S BGPQUIT=""
  1. S ^TMP($J,"BGPDEL",0)=0
  1. I $G(BGPAREAA) D SETEXCEL
  1. S BGPIFTR=""
  1. I BGPROT="X" D XML Q
  1. I BGPROT="D" D DEL Q
  1. S BGPPTYPE="P"
  1. S BGPQHDR=0
  1. ;I BGPQHDR D EXIT Q
  1. S BGPGPG=0
  1. S BGPQUIT=""
  1. D PRINT1
  1. K ^TMP($J)
  1. D EXIT
  1. Q
  1. ;
  1. DEL ;create delimited output file
  1. I '$D(BGPGUI) D ^%ZISC ;close printer device
  1. I BGPDELT="F" D
  1. .S Y="A delimited output file called "_BGPDELF_".txt has been placed in" D W(Y,0,2,"P")
  1. .S Y="the public directory for your use in Excel or some other software package. See" D W(Y,0,1,"P")
  1. .S Y="your site manager to access this file." D W(Y,0,1,"P")
  1. K ^TMP($J)
  1. S ^TMP($J,"BGPDEL",0)=0
  1. S BGPQHDR=0
  1. S BGPPTYPE="D"
  1. S BGPGPG=0
  1. S BGPQUIT=""
  1. D PRINT1^BGPMUDEL
  1. D SAVEDEL^BGPMUDEL
  1. S BGPIFTR=1
  1. K ^TMP($J)
  1. Q
  1. XML ;create XML output files
  1. I '$D(BGPGUI) D ^%ZISC ;close printer device
  1. K ^TMP($J)
  1. S ^TMP($J,"BGPXML",0)=0
  1. S BGPQHDR=0
  1. S BGPPTYPE="X"
  1. S BGPQUIT=""
  1. D PRINT1^BGPMUXML
  1. D SAVEXML^BGPMUXML
  1. S BGPIFTR=1
  1. K ^TMP($J)
  1. Q
  1. ;V=text, C=centered, F=#of CR/LF before, M="P"(print),"D"(delim), P=tmp global piece, T=tab pos
  1. W(V,C,F,M,P,T) ;EP
  1. I $G(F)="" S F=1
  1. I $G(C)="" S C=0
  1. I $G(P)="" S P=1
  1. I $G(T)="" S T=0
  1. I M="P" D Q
  1. .;I $Y>(BGPIOSL-4) D HEADER^BGPMUPH
  1. .NEW X
  1. .F X=1:1:F W !
  1. .I C W $$CJ^XLFSTR(V,80)
  1. .I 'C W ?T,V
  1. ;set up array
  1. I '$G(F) S F=0
  1. NEW %,Z
  1. S Z=""
  1. S %=$P($G(^TMP($J,"BGPDEL",0)),U)
  1. F Z=1:1:F S %=%+1 S ^TMP($J,"BGPDEL",%)=""
  1. S $P(^TMP($J,"BGPDEL",0),U)=%
  1. I '$D(^TMP($J,"BGPDEL",%)) S ^TMP($J,"BGPDEL",%)=""
  1. S $P(^TMP($J,"BGPDEL",%),U,P)=V
  1. Q
  1. ;
  1. WTITLE(I) ;EP - write title line
  1. NEW T,X,Y,S
  1. S T=$P(^BGPMUIND(BGPMUYF,I,0),U,3)
  1. I BGPPTYPE="P",$L(T)<81 D W(T,0,1,BGPPTYPE) Q
  1. I BGPPTYPE="D" D W(T,0,1,BGPPTYPE),W("",0,1,BGPPTYPE) Q
  1. S X=$E(T,1,80)
  1. S S=""
  1. F Y=80:-1:1 Q:S S I=$E(X,Y) I I=" " S S=Y
  1. D W^BGPMUPP($E(T,1,S),0,1,BGPPTYPE) ;W !,$E(T,1,S)
  1. D W^BGPMUPP($E(T,(S+1),$L(T)),0,1,BGPPTYPE)
  1. Q
  1. ANYDEV() ;
  1. NEW X,G,Y
  1. S G=0
  1. S X=0 F S X=$O(BGPINDL(X)) Q:X'=+X S Y=0 F S Y=$O(BGPINDL(X,Y)) Q:Y'=+Y I $P(^BGPNPLT(Y,0),U,7)=9 S G=1
  1. Q G
  1. ALLDEV() ;
  1. NEW X,G,Y
  1. S G=1
  1. S X=0 F S X=$O(BGPINDL(X)) Q:X'=+X S Y=0 F S Y=$O(BGPINDL(X,Y)) Q:Y'=+Y I $P(^BGPNPLT(Y,0),U,7)=1 S G=0
  1. Q G
  1. PRINT1 ;EP
  1. N BGPDEVOR,BGPIC,BGPGDEV
  1. D COVERPG
  1. S BGPGDEV=1
  1. S BGPDEVOR=0 F S BGPDEVOR=$O(^BGPMUIND(BGPMUYF,"ADO",BGPDEVOR)) Q:BGPDEVOR'=+BGPDEVOR!(BGPQUIT) D
  1. .S BGPIC=$O(^BGPMUIND(BGPMUYF,"ADO",BGPDEVOR,0)) Q:BGPIC=""
  1. .I $D(BGPIND(BGPIC)) D PRINT2
  1. .Q:BGPQUIT
  1. K BGPGDEV
  1. Q:BGPQUIT
  1. PRINTSUM ; Print summary page of all measure calculations
  1. N BGPPSUM
  1. S BGPPSUM=1
  1. D ^BGPMUPPS
  1. Q
  1. COVERPG ;
  1. S Y="Cover Page" D W(Y,1,0,BGPPTYPE)
  1. S Y="*** IHS Stage 1 Meaningful Use ***" D W(Y,1,2,BGPPTYPE)
  1. S Y="*** "_$S($G(BGPMUT)'="H":"Eligible Professional (EP)",1:"Hospital")_" Clinical Quality Measures Report ***" D W(Y,1,1,BGPPTYPE)
  1. S Y="CRS 2014, Version 14.1" D W(Y,1,2,BGPPTYPE)
  1. S Y="Date Report Run: "_$$FMTE^XLFDT(DT) D W(Y,1,1,BGPPTYPE)
  1. S Y="Site where Run: "_$P(^DIC(4,DUZ(2),0),U) D W(Y,1,1,BGPPTYPE)
  1. S Y="Report Generated by: "_$P($G(^VA(200,DUZ,0)),U,1) D W(Y,1,1,BGPPTYPE)
  1. S Y="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) D W(Y,1,1,BGPPTYPE)
  1. S Y="Previous Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) D W(Y,1,1,BGPPTYPE)
  1. S Y="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) D W(Y,1,1,BGPPTYPE)
  1. I $G(BGPMUT)'="H" S Y="Measures: Stage 1 Meaningful Use Eligible Professional (EP) "_$S(BGPINDT="C":"Core Measures",BGPINDT="A":"Alternate Core",BGPINDT="M":"Menu Set Measures",1:"Selected Measures") D W(Y,0,2,BGPPTYPE)
  1. I $G(BGPMUT)="H" D
  1. .S Y="Measures: Stage 1 Meaningful Use Eligible Hospital (EH) and" D W(Y,0,2,BGPPTYPE)
  1. .S Y="Critical Access Hospital (CAH) Clinical Quality Measures" D W(Y,0,1,BGPPTYPE)
  1. ;I $G(BGPMUT)="H" S Y="Measures: Stage 1 Meaningful Use Eligible Hospital "_$S(BGPINDT="S":"Selected Measures",1:"Measures") D W(Y,0,2,BGPPTYPE)
  1. ;I BGPINDT="A" S Y="Measures" D W(Y,0,1,BGPPTYPE)
  1. I $G(BGPMUT)="P" S Y="Population: "_$S(BGPBEN=1:"Indian/Alaskan Native (Classification 01)",BGPBEN=2:"Not Indian Alaskan/Native (Not Classification 01)",1:"All patients") D W(Y,0,2,BGPPTYPE)
  1. I $G(BGPMUT)'="H" D
  1. .S Y="Eligible Professional (EP): "_$P(^VA(200,BGPPROV,0),U) D W(Y,0,2,BGPPTYPE)
  1. I $G(BGPMUT)="H" D
  1. .S Y="Population: "_$S(BGPBEN=1:"AI/AN Only",BGPBEN=2:"Non-AI/AN",BGPBEN=3:"All Patients",1:"")
  1. .D W(Y,0,2,BGPPTYPE)
  1. .S Y="Eligible Hospital: "_$$LOC^BGPMUEH()_", "_$$GET1^DIQ(4,DUZ(2)_",",1.03)_", "_$$GET1^DIQ(4,DUZ(2)_",",.02)
  1. .D W(Y,0,2,BGPPTYPE)
  1. D ENDTIME
  1. ;
  1. I $G(BGPMUT)'="H" D Q:BGPQUIT
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-4) D HEADER^BGPMUPH Q:BGPQUIT
  1. .S Y="Warning: The Meaningful Use reports do not verify that the EP selected for" D W(Y,0,2,BGPPTYPE)
  1. .S Y="the reports meets the CMS EHR Incentive Program eligibility criteria. The" D W(Y,0,1,BGPPTYPE)
  1. .S Y="EP must make that determination." D W(Y,0,1,BGPPTYPE)
  1. ;
  1. I $G(BGPMUT)'="H" D Q:BGPQUIT
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER^BGPMUPH Q:BGPQUIT
  1. .S Y="This report includes the EP "_$S(BGPINDT="C":"core",BGPINDT="A":"alternate",BGPINDT="M":"menu set",1:"selected")_" clinical quality measures for" D W(Y,0,2,BGPPTYPE)
  1. .S Y="Stage 1 Meaningful Use." D W(Y,0,1,BGPPTYPE)
  1. I $G(BGPMUT)="H" D Q:BGPQUIT
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER^BGPMUPH Q:BGPQUIT
  1. .S Y="This report includes the eligible hospital and critical access hospital" D W(Y,0,2,BGPPTYPE)
  1. .S Y="clinical quality measures for Stage 1 Meaningful Use." D W(Y,0,1,BGPPTYPE)
  1. ;
  1. I $G(BGPMUT)'="H" D Q:BGPQUIT
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-4) D HEADER^BGPMUPH Q:BGPQUIT
  1. .S Y="For the first Meaningful Use payment year, the reporting period is any" D W(Y,0,2,BGPPTYPE)
  1. .S Y="consecutive 90-days during a calendar year (Jan 1 - Dec 31). For all" D W(Y,0,1,BGPPTYPE)
  1. .S Y="subsequent years, the reporting period is the entire calendar year." D W(Y,0,1,BGPPTYPE)
  1. I $G(BGPMUT)="H" D Q:BGPQUIT
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-4) D HEADER^BGPMUPH Q:BGPQUIT
  1. .S Y="For the first Meaningful Use payment year, the reporting period is any" D W(Y,0,2,BGPPTYPE)
  1. .S Y="consecutive 90-days during a federal fiscal year (Oct 1 - Sep 30). For all" D W(Y,0,1,BGPPTYPE)
  1. .S Y="subsequent years, the reporting period is the entire federal fiscal year." D W(Y,0,1,BGPPTYPE)
  1. ;
  1. I BGPPTYPE="P",$Y>(BGPIOSL-7) D HEADER^BGPMUPH Q:BGPQUIT
  1. S Y="The report will provide a description of the measure, and explanations for" D W(Y,0,2,BGPPTYPE)
  1. S Y="the denominator(s), numerator(s) and exclusions (if applicable)" D W(Y,0,1,BGPPTYPE)
  1. S Y="and the measure logic." D W(Y,0,1,BGPPTYPE)
  1. S Y="The measure results are contained in tabular form with the following column" D W(Y,0,2,BGPPTYPE)
  1. S Y="headings:" D W(Y,0,1,BGPPTYPE)
  1. S Y="REPORT % PREV YR % CHG FROM BASE % CHG" D W(Y,0,2,BGPPTYPE,,30)
  1. S Y="PERIOD PERIOD PREV YR YR BASE %" D W(Y,0,1,BGPPTYPE,,30)
  1. I $G(BGPMUT)'="H" D Q:BGPQUIT
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-7) D HEADER^BGPMUPH Q:BGPQUIT
  1. .S Y="When a report is run for a 90-day period, the PREV YR PERIOD is the same 90-day" D W(Y,0,2,BGPPTYPE)
  1. .S Y="period for the previous calendar year and the BASE YR is the same 90-day period" D W(Y,0,1,BGPPTYPE)
  1. .S Y="for the base calendar year selected. For example, a report run with Apr 1, 2010" D W(Y,0,1,BGPPTYPE)
  1. .S Y="through Jun 30, 2010 as the REPORT PERIOD and a base year of 2008 will include" D W(Y,0,1,BGPPTYPE)
  1. .S Y="data from Apr 1, 2009 through Jun 30, 2009 in the PREV YR PERIOD and Apr 1, 2008" D W(Y,0,1,BGPPTYPE)
  1. .S Y="through Jun 30, 2008 in the BASE YR." D W(Y,0,1,BGPPTYPE)
  1. I $G(BGPMUT)="H" D Q:BGPQUIT
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-7) D HEADER^BGPMUPH Q:BGPQUIT
  1. .S Y="When a report is run for a 90-day period, the PREV YR PERIOD is the same 90-day" D W(Y,0,2,BGPPTYPE)
  1. .S Y="period for the previous fiscal year and the BASE YR is the same 90-day" D W(Y,0,1,BGPPTYPE)
  1. .S Y="period for the base fiscal year selected. For example, a report run" D W(Y,0,1,BGPPTYPE)
  1. .S Y="with Apr 1, 2010 through Jun 30, 2010 as the REPORT PERIOD and a base year of" D W(Y,0,1,BGPPTYPE)
  1. .S Y="2008 will include data from Apr 1, 2009 through Jun 30, 2009 in the PREV YR" D W(Y,0,1,BGPPTYPE)
  1. .S Y="PERIOD and Apr 1, 2008 through Jun 30, 2008 in the BASE YR." D W(Y,0,1,BGPPTYPE)
  1. I BGPDELT="F" D Q:BGPQUIT
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-4) D HEADER^BGPMUPH Q:BGPQUIT
  1. .S Y="A delimited output file called "_BGPDELF_".txt has been placed in" D W(Y,0,2,BGPPTYPE)
  1. .S Y="the public directory for your use in Excel or some other software package. See" D W(Y,0,1,BGPPTYPE)
  1. .S Y="your site manager to access this file." D W(Y,0,1,BGPPTYPE)
  1. Q
  1. ENDTIME ;
  1. I $D(BGPET) S BGPTS=(86400*($P(BGPET,",")-$P(BGPBT,",")))+($P(BGPET,",",2)-$P(BGPBT,",",2)),BGPHR=$P(BGPTS/3600,".") S:BGPHR="" BGPHR=0 D
  1. .S BGPTS=BGPTS-(BGPHR*3600),BGPM=$P(BGPTS/60,".") S:BGPM="" BGPM=0 S BGPTS=BGPTS-(BGPM*60),BGPS=BGPTS S X="RUN TIME (H.M.S): "_BGPHR_"."_BGPM_"."_BGPS D W(X,0,2,BGPPTYPE)
  1. Q
  1. WP ;
  1. K ^UTILITY($J,"W")
  1. S BGPZ=0,BGPLCNT=0
  1. S DIWL=1,DIWR=80,DIWF="",BGPZ=0 F S BGPZ=$O(^BGPMUIND(BGPMUYF,BGPIC,BGPNODE,BGPY,1,BGPZ)) Q:BGPZ'=+BGPZ D
  1. .S BGPLCNT=BGPLCNT+1
  1. .S X=^BGPMUIND(BGPMUYF,BGPIC,BGPNODE,BGPY,1,BGPZ,0) S:BGPLCNT=1 X=" - "_X D ^DIWP
  1. .Q
  1. WPS ;
  1. S Z=0 F S Z=$O(^UTILITY($J,"W",DIWL,Z)) Q:Z'=+Z D
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER^BGPMUPH Q:BGPQUIT
  1. .D W^BGPMUPP(^UTILITY($J,"W",DIWL,Z,0),0,1,BGPPTYPE)
  1. K DIWL,DIWR,DIWF,Z
  1. K ^UTILITY($J,"W"),X
  1. Q
  1. PRINT2 ;
  1. ;K DIR I $E(IOST)="C",IO=IO(0),'$D(ZTQUEUED) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BGPQUIT=1
  1. D HEADER1^BGPMUPH ;header for all measures
  1. ;I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER^BGPMUPH Q:BGPQUIT
  1. D WTITLE(BGPIC)
  1. ;W !,$P(^BGPMUIND(BGPMUYF,BGPIC,0),U,3),!
  1. ;I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER^BGPMUPH Q:BGPQUIT
  1. ;Print out the description node if there is data in it
  1. S BGPNODE=12 D PRINTN(BGPNODE,"Measure Summary:")
  1. ;Print out the population node if there is data in it
  1. S BGPNODE=13 D PRINTN(BGPNODE,"Population:")
  1. W !!
  1. W "Logic:"
  1. ;Print out the denominator node if there is data in it
  1. S BGPNODE=14 D PRINTN(BGPNODE,"Denominator Logic:",,1)
  1. ;The order for the next two sections is different between EP and Hosp
  1. I $G(BGPMUT)'="H" D
  1. .;Print out the numerator node if there is data in it
  1. .S BGPNODE=15 D PRINTN(BGPNODE,"Numerator Logic:",,1)
  1. .;Print ou the logic node if there is data in it
  1. .S BGPNODE=16 D PRINTN(BGPNODE,"Exclusion Logic:",,1)
  1. I $G(BGPMUT)="H" D
  1. .;Print ou the logic node if there is data in it
  1. .S BGPNODE=16 D PRINTN(BGPNODE,"Denominator Exclusion Logic:",,1)
  1. .;Print out the numerator node if there is data in it
  1. .S BGPNODE=15 D PRINTN(BGPNODE,"Numerator Logic:",,1)
  1. ;Print out the Performance node if there is data in it
  1. S BGPNODE=17 D PRINTN(BGPNODE,"Performance:")
  1. ;Print out the source node if there is data in it
  1. S BGPNODE=18 D PRINTN(BGPNODE,"Measure Source: ",1)
  1. CALC I BGPPTYPE="P" X ^BGPMUIND(BGPMUYF,BGPIC,3) D W^BGPMUPP("",0,1,BGPPTYPE)
  1. I BGPPTYPE="D" X ^BGPMUIND(BGPMUYF,BGPIC,4) D W^BGPMUPP("",0,1,BGPPTYPE)
  1. Q
  1. PRINTN(BGPNODE,TXT,SLF,XLF) ;Print out a node - SLF = print on same line as header, XLF = Xtra line feed after header
  1. I $O(^BGPMUIND(BGPMUYF,BGPIC,BGPNODE,0)) D
  1. .D W^BGPMUPP(TXT,0,2,BGPPTYPE)
  1. .I $G(XLF) S X="" D W^BGPMUPP(X,0,1,BGPPTYPE)
  1. .S BGPY=0 F S BGPY=$O(^BGPMUIND(BGPMUYF,BGPIC,BGPNODE,BGPY)) Q:BGPY'=+BGPY!(BGPQUIT) D
  1. ..I BGPPTYPE="P",$Y>(BGPIOSL-4),'$G(SLF) D HEADER^BGPMUPH Q:BGPQUIT
  1. ..D W^BGPMUPP(^BGPMUIND(BGPMUYF,BGPIC,BGPNODE,BGPY,0),0,$S($G(SLF):0,1:1),BGPPTYPE)
  1. Q
  1. SETEXCEL ;EP
  1. I $G(BGPAREAA) D Q
  1. .S X=0 F S X=$O(BGPSUL(X)) Q:X'=+X D
  1. ..S N=^BGPGPDCT(X,0)
  1. ..S (D,L)=""
  1. ..S L=$P(N,U,9) I L S L=$O(^AUTTLOC("C",L,0)) I L S D=$P($G(^AUTTLOC(L,1)),U,3),L=$S(L:$P(^DIC(4,L,0),U),1:"?????")
  1. ..S BGPEI(X)=L_U_$P(N,U,9)_U_D_U_$$DATE^BGP0UTL($P(N,U,13)) S P=5 F Y=1:1:6 S $P(BGPEI(X),U,P)=$$DATE^BGP0UTL($P(N,U,Y)),P=P+1
  1. ..S BGPEI2(X)=L_U_$P(N,U,9)_U_D_U_$$DATE^BGP0UTL($P(N,U,13)) S P=5 F Y=1:1:6 S $P(BGPEI2(X),U,P)=$$DATE^BGP0UTL($P(N,U,Y)),P=P+1
  1. ..S BGPEIDV1(X)=L_U_$P(N,U,9)_U_D_U_$$DATE^BGP0UTL($P(N,U,13)) S P=5 F Y=1:1:6 S $P(BGPEIDV1(X),U,P)=$$DATE^BGP0UTL($P(N,U,Y)),P=P+1
  1. ..S BGPEIDV2(X)=L_U_$P(N,U,9)_U_D_U_$$DATE^BGP0UTL($P(N,U,13)) S P=5 F Y=1:1:6 S $P(BGPEIDV2(X),U,P)=$$DATE^BGP0UTL($P(N,U,Y)),P=P+1
  1. ..S BGPONN1(X)=L_U_$P(N,U,9)_U_D_U_$$DATE^BGP0UTL($P(N,U,13)) S P=5 F Y=1:1:6 S $P(BGPONN1(X),U,P)=$$DATE^BGP0UTL($P(N,U,Y)),P=P+1
  1. ..S BGPONN2(X)=L_U_$P(N,U,9)_U_D_U_$$DATE^BGP0UTL($P(N,U,13)) S P=5 F Y=1:1:6 S $P(BGPONN2(X),U,P)=$$DATE^BGP0UTL($P(N,U,Y)),P=P+1
  1. ..;S BGPONN3(X)=L_U_$P(N,U,9)_U_D_U_$$DATE^BGP0UTL($P(N,U,13)) S P=5 F Y=1:1:6 S $P(BGPONN3(X),U,P)=$$DATE^BGP0UTL($P(N,U,Y)),P=P+1
  1. ..Q
  1. .Q
  1. ;S X=BGPRPT
  1. ;S N=^BGPGPDCT(X,0)
  1. ;S L=$P(N,U,9),L=$O(^AUTTLOC("C",L,0)) S D=$P($G(^AUTTLOC(L,1)),U,3),L=$S(L:$P(^DIC(4,L,0),U),1:"?????")
  1. ;S BGPEI(X)=L_U_$P(N,U,9)_U_D_U_$$DATE^BGP0UTL($P(N,U,13)) S P=5 F Y=1:1:6 S $P(BGPEI(X),U,P)=$$DATE^BGP0UTL($P(N,U,Y)),P=P+1
  1. Q
  1. EXIT ;
  1. Q:BGPPTYPE'="P"
  1. 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
  1. Q
  1. ISED(BGPMUYF,BGPIC) ; Determine if measure is an ED measure (for special headings)
  1. N BGPTITLE
  1. S BGPTITLE=$P(^BGPMUIND(BGPMUYF,BGPIC,0),U,3)
  1. Q ($E(BGPTITLE,1,2)="ED")
  1. Q
  1. C(X,X2,X3) ;
  1. D COMMA^%DTC
  1. Q X