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

BGP0DH1.m

Go to the documentation of this file.
  1. BGP0DH1 ; IHS/CMI/LAB - cover page for gpra 28 Apr 2009 11:30 AM 02 Jul 2009 8:28 AM ;
  1. ;;10.0;IHS CLINICAL REPORTING;**1**;JUN 18, 2010
  1. ;
  1. ;
  1. ONMHDR ;EP
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. I BGPCHSO G ONMHDRC
  1. S BGPTEXT="ONH1" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
  1. .S BGPT=$P(BGPX,";;",2)
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(BGPT,0,1,BGPPTYPE)
  1. I BGPPTYPE="P" Q:BGPQHDR
  1. I BGPRTC="U" D I BGPPTYPE="P" Q:BGPQHDR
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP("3. User defines population: a) Indian/Alaska Natives Only - based on",0,1,BGPPTYPE)
  1. .D W^BGP0DP("Classification of 01; b) Non AI/AN (not 01); or c) Both.",0,1,BGPPTYPE)
  1. I BGPRTC="H" D I BGPPTYPE="P" Q:BGPQHDR
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP("3. Indian/Alaska Natives Only - based on Classification of 01.",0,1,BGPPTYPE)
  1. I BGPPTYPE="P" Q:BGPQHDR
  1. S BGPTEXT="ONH2" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
  1. .S BGPT=$P(BGPX,";;",2)
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(BGPT,0,1,BGPPTYPE)
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q
  1. ONMHDRC ;
  1. S BGPTEXT="ONH1" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
  1. .S BGPT=$P(BGPX,";;",2)
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2),BGPPTYPE="P" D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(BGPT,0,1,BGPPTYPE)
  1. I BGPPTYPE="P" I BGPPTYPE="P" Q:BGPQHDR
  1. I BGPRTC="U" D I BGPPTYPE="P" I BGPPTYPE="P" Q:BGPQHDR
  1. .I BGPPTYPE="P" I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP("3. User defines population: a) Indian/Alaska Natives Only - based on",0,1,BGPPTYPE)
  1. .D W^BGP0DP("Classification of 01; b) Non AI/AN (not 01); or c) Both.",0,1,BGPPTYPE)
  1. I BGPRTC="H" D I BGPPTYPE="P" Q:BGPQHDR
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP("3. Indian/Alaska Natives Only - based on Classification of 01.",0,1,BGPPTYPE)
  1. I BGPPTYPE="P" Q:BGPQHDR
  1. S BGPTEXT="ONH2C" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
  1. .S BGPT=$P(BGPX,";;",2)
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(BGPT,0,1,BGPPTYPE)
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q
  1. PEHDR ;EP
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. ;Q:$G(BGPSEAT)
  1. S BGPNODEP=$S($G(BGPSEAT):75,1:34)
  1. S BGPX=$O(^BGPCTRL("B",2010,0))
  1. S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
  1. .Q
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q
  1. AHDR ;EP
  1. ;
  1. I BGPPTYPE'="P" G AHDR10
  1. I BGPPTYPE="P",'BGPHPG G AHDR1
  1. I $E(IOST)="C",IO=IO(0) D W^BGP0DP("",0,1,BGPPTYPE) S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BGPQHDR=1 Q
  1. AHDR1 ;
  1. S BGPHPG=BGPHPG+1 I BGPHPG'=1 W:$D(IOF) @IOF
  1. I $G(BGPGUI),BGPPTYPE="P",BGPHPG'=1 D W^BGP0DP("ZZZZZZZ",0,0,BGPPTYPE),W^BGP0EOH("",0,1,BGPPTYPE) ;GUI
  1. AHDR10 D W^BGP0DP("Cover Page "_$S(BGPPTYPE="P":BGPHPG,1:""),1,1,BGPPTYPE)
  1. I BGPRTYPE=1,$G(BGPNGR09) D W^BGP0DP("*** IHS 2011 National GPRA & PART Report, Run Using 2010 Logic ***",1,2,BGPPTYPE) G N
  1. I BGPRTYPE=1,'$G(BGP0GPU),'$G(BGPSUMON) D W^BGP0DP("*** IHS 2010 National GPRA & PART Report ***",1,2,BGPPTYPE)
  1. I BGPRTYPE=1,'$G(BGP0GPU),$G(BGPSUMON) D W^BGP0DP("*** IHS 2010 National GPRA & PART Report Clinical Performance Summaries ***",1,2,BGPPTYPE)
  1. I BGPRTYPE=6 D W^BGP0DP("*** IHS 2010 Patient Education Report with Community Specified ***",1,2,BGPPTYPE)
  1. I BGPRTYPE=1,$G(BGP0GPU) D W^BGP0DP("*** IHS 2010 GPRA & PART Performance Report ***",1,2,BGPPTYPE)
  1. I BGPRTYPE=7 D W^BGP0DP("*** IHS 2010 Other National Measures Report ***",1,2,BGPPTYPE)
  1. N D W^BGP0DP("AREA AGGREGATE",1,1,BGPPTYPE)
  1. D W^BGP0DP($$RPTVER^BGP0BAN,1,1,BGPPTYPE)
  1. S X="Date Report Run: "_$$FMTE^XLFDT(DT) D W^BGP0DP(X,1,1,BGPPTYPE)
  1. S X="Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04) D W^BGP0DP(X,1,1,BGPPTYPE)
  1. D W^BGP0DP("Report Generated by: "_$$USR^BGP0DH,1,1,BGPPTYPE)
  1. S X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) D W^BGP0DP(X,1,1,BGPPTYPE)
  1. S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) D W^BGP0DP(X,1,1,BGPPTYPE)
  1. S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) D W^BGP0DP(X,1,1,BGPPTYPE)
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q
  1. COMHDR ;EP
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q:$G(BGPSEAT)
  1. S BGPNODEP=$S($G(BGPCHSO):24,1:17)
  1. S BGPX=$O(^BGPCTRL("B",2010,0))
  1. S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
  1. .Q
  1. I $G(BGP0GPU) D W^BGP0DP("See last pages of this report for Performance Summaries.",0,2,BGPPTYPE)
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q
  1. GPRAHDRS ;EP
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. S BGPNODEP=$S($G(BGPCHSO):77,1:76)
  1. S BGPX=$O(^BGPCTRL("B",2010,0))
  1. S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
  1. .Q
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q
  1. PPHDR ;EP
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. S BGPX=$O(^BGPCTRL("B",2010,0))
  1. S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,18,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(^BGPCTRL(BGPX,18,BGPY,0),0,1,BGPPTYPE)
  1. .Q
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q
  1. ALLHDR ;EP
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q:$G(BGPSEAT)
  1. S BGPNODEP=$S(BGPCHSO:25,1:19)
  1. S BGPX=$O(^BGPCTRL("B",2010,0))
  1. S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
  1. .I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP0DH I BGPPTYPE="P" Q:BGPQHDR
  1. .D W^BGP0DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
  1. .Q
  1. D W^BGP0DP("",0,1,BGPPTYPE)
  1. Q
  1. AREACP ;EP
  1. S BGPQHDR=0,BGPHPG=0
  1. D AHDR
  1. I BGPPTYPE="P" Q:BGPQHDR
  1. D MD^BGP0DH
  1. D PD^BGP0DH
  1. D ENDTIME^BGP0DH
  1. I BGPRTYPE=6 D PEDCP^BGP0DH Q
  1. S BGPCHSO="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I $P(^BGPGPDCT(X,0),U,17) S BGPCHSO=1
  1. S BGPCHSN="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I '$P(^BGPGPDCT(X,0),U,17) S BGPCHSN=1
  1. I BGPRTYPE=1,'$G(BGP0GPU) D GPRAHDRA^BGP0DH
  1. I BGPRTYPE=1,$G(BGP0GPU) D GPRAHDRA^BGP0DH
  1. I BGPRTYPE=7 D ONMHDR^BGP0DH
  1. I $G(BGPEXCEL),'$G(BGP0GPU),BGPRTYPE=1 D
  1. .D W^BGP0DP("GPRA Developmental filenames: ",0,2,BGPPTYPE),W^BGP0DP(BGPFDEV1,0,1,BGPPTYPE,1,15),W^BGP0DP(BGPFDEV2,0,1,BGPPTYPE,1,15)
  1. .D W^BGP0DP("National GPRA filenames: ",0,2,BGPPTYPE),W^BGP0DP(BGPFGNT1,0,1,BGPPTYPE,1,15),W^BGP0DP(BGPFGNT2,0,1,BGPPTYPE,1,15)
  1. I $G(BGPEXCEL),BGPRTYPE=7 D W^BGP0DP("Other National Measures filenames: ",0,1,BGPPTYPE),W^BGP0DP(BGPFONN1,0,1,BGPPTYPE,1,15),W^BGP0DP(BGPFONN2,0,1,BGPPTYPE,1,15),W^BGP0DP(BGPFONN3,0,1,BGPPTYPE,1,15)
  1. I BGPROT'="P",'$D(BGPGUI),BGPDELT="F" D W^BGP0DP("A delimited output file called "_BGPDELF,0,2,BGPPTYPE) D
  1. .D W^BGP0DP("has been placed in the public directory for your use in Excel or some",0,1,BGPPTYPE)
  1. .D W^BGP0DP("other software package.",0,1,BGPPTYPE)
  1. .D W^BGP0DP("See your site manager to access this file.",0,1,BGPPTYPE)
  1. .D W^BGP0DP("",0,1,BGPPTYPE)
  1. ;I BGPROT'="P",'$D(BGPGUI) W !!,"A delimited output file called ",BGPDELF,!,"has been placed in the public directory for your use in Excel or some",!,"other software package. See your site manager to access this file.",!
  1. ;W !!?1,"Report includes data from the following facilities:"
  1. D W^BGP0DP("Report includes data from the following facilities: ",0,2,BGPPTYPE)
  1. NEW BGPX
  1. S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
  1. .S X=$P(^BGPGPDCT(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
  1. .S BGPC=BGPC+1,X=BGPC_". "_$S($P(^BGPGPDCT(BGPX,0),U,17):"*",1:"")_X D W^BGP0DP(X,0,1,BGPPTYPE,1,3)
  1. .Q
  1. S X=" " D W^BGP0DP(X,0,1,BGPPTYPE)
  1. S X="The following communities are included in this report:" D W^BGP0DP(X,0,1,BGPPTYPE,1,1)
  1. S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
  1. .S X=$P(^BGPGPDCT(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
  1. .S BGPC=BGPC+1,X=BGPC_". "_$S($P(^BGPGPDCT(BGPX,0),U,17):"*",1:"")_X D W^BGP0DP(X,0,1,BGPPTYPE,1,3)
  1. .;S X="Communities: " D W^BGP0DP(X,0,1,BGPPTYPE,1,5)
  1. .S X="Community Taxonomy Name: "_$P(^BGPGPDCT(BGPX,0),U,18) D W^BGP0DP(X,0,1,BGPPTYPE,1,5)
  1. .S BGPXX=0,BGPXN=0,BGPXY="" F S BGPXX=$O(^BGPGPDCT(BGPX,9999,BGPXX)) Q:BGPXX'=+BGPXX S BGPXN=BGPXN+1,BGPXY=BGPXY_$S(BGPXN=1:"",1:";")_$P(^BGPGPDCT(BGPX,9999,BGPXX,0),U)
  1. .S BGPX1=0,C=0 F BGPX1=1:3:BGPXN D
  1. ..D W^BGP0DP($E($P(BGPXY,";",BGPX1),1,20),0,1,BGPPTYPE,1,10)
  1. ..D W^BGP0DP($E($P(BGPXY,";",(BGPX1+1)),1,20),0,0,BGPPTYPE,2,30)
  1. ..D W^BGP0DP($E($P(BGPXY,";",(BGPX1+2)),1,20),0,0,BGPPTYPE,3,60)
  1. ..Q
  1. .I $O(^BGPGPDCT(BGPX,1111,0)) D
  1. ..D W^BGP0DP("MFI Visit Locations: ",0,2,BGPPTYPE,1,5) S BGPXX=0,BGPXN=0,BGPXY="" F S BGPXX=$O(^BGPGPDCT(BGPX,1111,BGPXX)) Q:BGPXX'=+BGPXX S BGPXN=BGPXN+1,BGPXY=BGPXY_$S(BGPXN=1:"",1:";")_$P(^BGPGPDCT(BGPX,1111,BGPXX,0),U)
  1. ..S BGPX1=0,C=0 F BGPX1=1:3:BGPXN D
  1. ...D W^BGP0DP($E($P(BGPXY,";",BGPX1),1,20),0,1,BGPPTYPE,1,10)
  1. ...D W^BGP0DP($E($P(BGPXY,";",(BGPX1+1)),1,20),0,0,BGPPTYPE,2,30)
  1. ...D W^BGP0DP($E($P(BGPXY,";",(BGPX1+2)),1,20),0,0,BGPPTYPE,3,60)
  1. ..Q
  1. .Q
  1. D W^BGP0DP(" ",0,1,BGPPTYPE)
  1. I BGPCHSO D
  1. .S X=" " D W^BGP0DP(X,0,1,BGPPTYPE)
  1. .S X="* CHS-only site. Uses Active Clinical CHS Population definition vs. Active Clinical." D W^BGP0DP(X,0,1,BGPPTYPE)
  1. S X=" " D W^BGP0DP(X,0,1,BGPPTYPE)
  1. I BGPPTYPE="D" D W^BGP0DP("ENDCOVERPAGE",0,1,BGPPTYPE)
  1. K BGPX,BGPQUIT
  1. Q
  1. ONH1 ;;
  1. ;;Denominator Definitions used in this Report:
  1. ;;
  1. ;;ACTIVE CLINICAL POPULATION:
  1. ;;1. Must reside in a community specified in the community taxonomy used for
  1. ;;this report.
  1. ;;2. Must be alive on the last day of the Report period.
  1. ;;QUIT
  1. ;
  1. ONH2 ;;
  1. ;;4. Must have 2 visits to medical clinics in the 3 years prior to the end
  1. ;;of the Report period. At least one visit must include: 01 General,
  1. ;;06 Diabetic, 10 GYN, 12 Immunization, 13 Internal Med, 20 Pediatrics, 24
  1. ;;Well Child, 28 Family Practice, 57 EPSDT, 70 Women's Health, 80 Urgent, 89
  1. ;;Evening. See User Manual for complete description of medical clinics.
  1. ;;
  1. ;;USER POPULATION:
  1. ;;1. Definitions 1-3 above.
  1. ;;2. Must have been seen at least once in the 3 years prior to the end of
  1. ;;the Report period, regardless of the clinic type.
  1. ;;
  1. ;;See last pages of this report for Performance Summary.
  1. ;;QUIT
  1. ;;
  1. ONH2C ;;
  1. ;;4. Must have 2 CHS visits in the 3 years prior to the end of the Report period.
  1. ;;
  1. ;;USER POPULATION:
  1. ;;1. Definitions 1-3 above.
  1. ;;2. Must have been seen at least once in the 3 years prior to the end of
  1. ;;the Report period, regardless of the clinic type.
  1. ;;
  1. ;;See last pages of this report for Performance Summary.
  1. ;;QUIT