- BGP7HEHH ; IHS/CMI/LAB - cover page for HEDIS ;
- ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
- ;
- ;
- S X="Cover Page" D S(X,1,1)
- S X=" " D S(X,1,1)
- I $G(BGPAREAA) G AREACP
- S X="*** IHS 2007 HEDIS Clinical Performance Measures ***" D S(X,1,1)
- S X="CRS 2007, Version 7.0" D S(X,1,1)
- S X="Date Report Run: "_$$FMTE^XLFDT(DT) D S(X,1,1)
- S X="Site where Run: "_$P(^DIC(4,DUZ(2),0),U) D S(X,1,1)
- S X="Report Generated by: "_$$USR D S(X,1,1)
- S X="Reporting Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) S X=X D S(X,1,1)
- S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) S X=X D S(X,1,1)
- S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) S X=X D S(X,1,1)
- S X=" " D S(X,1,1)
- S X="Measures: HEDIS Measures" D S(X,1,1)
- S X="Population: "_$S(BGPBEN=1:"AI/AN Only (Classification 01)",BGPBEN=2:"non AI/AN Only (Classification NOT 01)",BGPBEN=3:"All (Both AI/AN and non AI/AN)",1:"") D S(X,1,1)
- S X=" " D S(X,1,1)
- D ENDTIME
- D HEDISHDR
- S X=" " D S(X,1,1)
- I $G(BGPEXPT) D
- .S X="A file will be created called BG07"_$P(^AUTTLOC(DUZ(2),0),U,10)_".HE"_BGPRPT_"." D S(X,1,1) S X="It will reside in the public/export directory. This file should be sent to your Area Office." D S(X,1,1)
- I '$D(BGPGUI),BGPROT'="P" D
- .S X="A delimited output file called "_BGPDELF D S(X,1,1) S X="has been placed in the public directory for your use in Excel or some other software package." D S(X,1,1) S X="See your site manager to access this file." D S(X,1,1)
- S X=" " D S(X,1,1)
- S X="Community Taxonomy Name: "_$P(^ATXAX(BGPTAXI,0),U) D S(X,1,1)
- S X="The following communities are included in this report:" D S(X,1,1) D
- .S BGPZZ="",N=0,Y="" F S BGPZZ=$O(BGPTAX(BGPZZ)) Q:BGPZZ="" S N=N+1,Y=Y_$S(N=1:"",1:";")_BGPZZ
- .S BGPZZ=0,C=0 F BGPZZ=1:3:N D
- ..S X=$E($P(Y,";",BGPZZ),1,20),$P(X,U,2)=$E($P(Y,";",(BGPZZ+1)),1,20),$P(X,U,3)=$E($P(Y,";",(BGPZZ+2)),1,20) D S(X,1,1)
- ..Q
- S X=" " D S(X,1,1)
- I $G(BGPMFITI) S X="MFI Locations Taxonomy Name: "_$P(^ATXAX(BGPMFITI,0),U) D S(X,1,1)
- I $G(BGPMFITI) D
- .S X="The following locations are used for patient visits in this report:" D S(X,1,1) D
- ..S BGPZZ="",N=0,Y="" F S BGPZZ=$O(^ATXAX(BGPMFITI,21,"B",BGPZZ)) Q:BGPZZ="" S N=N+1,Y=Y_$S(N=1:"",1:";")_$P($G(^DIC(4,BGPZZ,0)),U)
- ..S BGPZZ=0,C=0 F BGPZZ=1:3:N D
- ...S X=$E($P(Y,";",BGPZZ),1,20),$P(X,U,2)=$E($P(Y,";",(BGPZZ+1)),1,20),$P(X,U,3)=$E($P(Y,";",(BGPZZ+2)),1,20) D S(X,1,1)
- ...Q
- S X=" " D S(X,1,1)
- K BGPX,BGPQUIT
- Q
- HEDISHDR ;
- S X=" " D S(X,1,1)
- Q:$G(BGPSEAT)
- I $G(BGPAREAA) S BGPNODEP=$S(BGPCHSO&('BGPCHSN):27,(BGPCHSO+BGPCHSN)=2:32,1:16)
- I '$G(BGPAREAA) S BGPNODEP=$S(BGPCHSO:27,1:16)
- S BGPX=$O(^BGPCTRL("B",2007,0))
- S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY D
- .S X=^BGPCTRL(BGPX,BGPNODEP,BGPY,0) D S(X,1,1)
- .Q
- Q
- ENDTIME ;
- 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
- .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 S(X,1,1)
- Q
- AREACP ;EP - area cover page
- S X="*** IHS 2007 HEDIS Clinical Performance Measures ***" D S(X,1,1)
- S X=$S(BGPSUCNT=1:BGPSUNM,1:"AREA AGGREGATE") D S(X,1,1)
- S X="CRS 2007, Version 7.0" D S(X,1,1)
- S X="Date Report Run: "_$$FMTE^XLFDT(DT) D S(X,1,1)
- S X="Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04) D S(X,1,1)
- S X="Report Generated by: "_$$USR D S(X,1,1)
- S X="Reporting Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) D S(X,1,1)
- S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) D S(X,1,1)
- S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) D S(X,1,1)
- S X=" " D S(X,1,1)
- S X="Measures: HEDIS Measures" D S(X,1,1)
- I BGPRTYPE'=1 S X="Population: "_$S(BGPBEN=1:"AI/AN Only (Classification 01)",BGPBEN=2:"non AI/AN Only (Classification NOT 01)",BGPBEN=3:"All (Both AI/AN and non AI/AN)",1:"") D S(X,1,1)
- S X=" " D S(X,1,1)
- D ENDTIME
- S X=" " D S(X,1,1)
- S BGPCHSO="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I $P(^BGPHEDCA(X,0),U,17) S BGPCHSO=1
- S BGPCHSN="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I '$P(^BGPHEDCA(X,0),U,17) S BGPCHSN=1
- BGP D HEDISHDR
- S X=" " D S(X,1,1)
- I $G(BGPEXPT) D
- .S X="A file will be created called BG07"_$P(^AUTTLOC(DUZ(2),0),U,10)_".HE"_BGPRPT_"." D S(X,1,1) S X="It will reside in the public/export directory." D S(X,1,1) S X="This file should be sent to your Area Office." D S(X,1,1)
- I '$D(BGPGUI),BGPROT'="P" D
- .S X="A delimited output file called "_BGPDELF D S(X,1,1) S X="has been placed in the public directory for your use in Excel or some" D S(X,1,1) S X="other software package. See your site manager to access this file." D S(X,1,1)
- S X=" " D S(X,1,1)
- S X="Report includes data from the following facilities:" D S(X,1,1)
- NEW BGPX
- S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
- .S X=$P(^BGPHEDCA(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
- .S BGPC=BGPC+1,X=BGPC_". "_$S($P(^BGPHEDCA(BGPX,0),U,17):"*",1:"")_X D S(X,1,1)
- .Q
- S X=" " D S(X,1,1)
- S X="The following communities are included in this report:" D S(X,1,1)
- S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
- .S X=$P(^BGPHEDCA(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
- .S BGPC=BGPC+1,X=BGPC_". "_$S($P(^BGPHEDCA(BGPX,0),U,17):"*",1:"")_X D S(X,1,1)
- .S X="Communities: " D S(X,1,1) S X=0,N=0,Y="",Z="" F S X=$O(^BGPHEDCA(BGPX,9999,X)) Q:X'=+X S N=N+1,Y=Y_$S(N=1:"",1:";")_$P(^BGPHEDCA(BGPX,9999,X,0),U)
- .S X=0,C=0 F X=1:3:N S Z=$E($P(Y,";",X),1,20),$P(Z,U,2)=$E($P(Y,";",(X+1)),1,20),$P(Z,U,3)=$E($P(Y,";",(X+2)),1,20) D S(Z,1,1)
- .I $O(^BGPHEDCA(BGPX,1111,0)) D
- ..S X=" " D S(X,1,1)
- ..S X="MFI Site: Locations for visits: " D S(X,1,1) S X=0,N=0,Y="",Z="" F S X=$O(^BGPHEDCA(BGPX,1111,X)) Q:X'=+X S N=N+1,Y=Y_$S(N=1:"",1:";")_$P(^BGPHEDCA(BGPX,1111,X,0),U)
- ..S X=0,C=0 F X=1:3:N S Z=$E($P(Y,";",X),1,20),$P(Z,U,2)=$E($P(Y,";",(X+1)),1,20),$P(Z,U,3)=$E($P(Y,";",(X+2)),1,20) D S(Z,1,1)
- ..Q
- .S X=" " D S(X,1,1)
- .Q
- S X=" " D S(X,1,1)
- I BGPCHSO D
- .S X=" " D S(X,1,1) S X="* CHS-only site. Uses Active Clinical CHS Population definition vs. Active Clinical." D S(X,1,1)
- K BGPX,BGPQUIT
- S X=" " D S(X,1,1)
- Q
- S(Y,F,P) ;set up array
- I '$G(F) S F=0
- S %=$P(^TMP($J,"BGPDEL",0),U)+F,$P(^TMP($J,"BGPDEL",0),U)=%
- I '$D(^TMP($J,"BGPDEL",%)) S ^TMP($J,"BGPDEL",%)=""
- S $P(^TMP($J,"BGPDEL",%),U,P)=Y
- Q
- CTR(X,Y) ;EP - Center X in a field Y wide.
- Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
- ;----------
- EOP ;EP - End of page.
- Q:$E(IOST)'="C"
- Q:$D(ZTQUEUED)!'(IOT="TRM")!$D(IO("S"))
- NEW DIR
- K DIRUT,DFOUT,DLOUT,DTOUT,DUOUT
- S DIR(0)="E" D ^DIR
- Q
- ;----------
- USR() ;EP - Return name of current user from ^VA(200.
- Q $S($G(DUZ):$S($D(^VA(200,DUZ,0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
- ;----------
- ;;
- BGP7HEHH ; IHS/CMI/LAB - cover page for HEDIS ;
- +1 ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
- +2 ;
- +3 ;
- +4 SET X="Cover Page"
- DO S(X,1,1)
- +5 SET X=" "
- DO S(X,1,1)
- +6 IF $GET(BGPAREAA)
- GOTO AREACP
- +7 SET X="*** IHS 2007 HEDIS Clinical Performance Measures ***"
- DO S(X,1,1)
- +8 SET X="CRS 2007, Version 7.0"
- DO S(X,1,1)
- +9 SET X="Date Report Run: "_$$FMTE^XLFDT(DT)
- DO S(X,1,1)
- +10 SET X="Site where Run: "_$PIECE(^DIC(4,DUZ(2),0),U)
- DO S(X,1,1)
- +11 SET X="Report Generated by: "_$$USR
- DO S(X,1,1)
- +12 SET X="Reporting Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
- SET X=X
- DO S(X,1,1)
- +13 SET X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED)
- SET X=X
- DO S(X,1,1)
- +14 SET X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED)
- SET X=X
- DO S(X,1,1)
- +15 SET X=" "
- DO S(X,1,1)
- +16 SET X="Measures: HEDIS Measures"
- DO S(X,1,1)
- +17 SET X="Population: "_$SELECT(BGPBEN=1:"AI/AN Only (Classification 01)",BGPBEN=2:"non AI/AN Only (Classification NOT 01)",BGPBEN=3:"All (Both AI/AN and non AI/AN)",1:"")
- DO S(X,1,1)
- +18 SET X=" "
- DO S(X,1,1)
- +19 DO ENDTIME
- +20 DO HEDISHDR
- +21 SET X=" "
- DO S(X,1,1)
- +22 IF $GET(BGPEXPT)
- Begin DoDot:1
- +23 SET X="A file will be created called BG07"_$PIECE(^AUTTLOC(DUZ(2),0),U,10)_".HE"_BGPRPT_"."
- DO S(X,1,1)
- SET X="It will reside in the public/export directory. This file should be sent to your Area Office."
- DO S(X,1,1)
- End DoDot:1
- +24 IF '$DATA(BGPGUI)
- IF BGPROT'="P"
- Begin DoDot:1
- +25 SET X="A delimited output file called "_BGPDELF
- DO S(X,1,1)
- SET X="has been placed in the public directory for your use in Excel or some other software package."
- DO S(X,1,1)
- SET X="See your site manager to access this file."
- DO S(X,1,1)
- End DoDot:1
- +26 SET X=" "
- DO S(X,1,1)
- +27 SET X="Community Taxonomy Name: "_$PIECE(^ATXAX(BGPTAXI,0),U)
- DO S(X,1,1)
- +28 SET X="The following communities are included in this report:"
- DO S(X,1,1)
- Begin DoDot:1
- +29 SET BGPZZ=""
- SET N=0
- SET Y=""
- FOR
- SET BGPZZ=$ORDER(BGPTAX(BGPZZ))
- IF BGPZZ=""
- QUIT
- SET N=N+1
- SET Y=Y_$SELECT(N=1:"",1:";")_BGPZZ
- +30 SET BGPZZ=0
- SET C=0
- FOR BGPZZ=1:3:N
- Begin DoDot:2
- +31 SET X=$EXTRACT($PIECE(Y,";",BGPZZ),1,20)
- SET $PIECE(X,U,2)=$EXTRACT($PIECE(Y,";",(BGPZZ+1)),1,20)
- SET $PIECE(X,U,3)=$EXTRACT($PIECE(Y,";",(BGPZZ+2)),1,20)
- DO S(X,1,1)
- +32 QUIT
- End DoDot:2
- End DoDot:1
- +33 SET X=" "
- DO S(X,1,1)
- +34 IF $GET(BGPMFITI)
- SET X="MFI Locations Taxonomy Name: "_$PIECE(^ATXAX(BGPMFITI,0),U)
- DO S(X,1,1)
- +35 IF $GET(BGPMFITI)
- Begin DoDot:1
- +36 SET X="The following locations are used for patient visits in this report:"
- DO S(X,1,1)
- Begin DoDot:2
- +37 SET BGPZZ=""
- SET N=0
- SET Y=""
- FOR
- SET BGPZZ=$ORDER(^ATXAX(BGPMFITI,21,"B",BGPZZ))
- IF BGPZZ=""
- QUIT
- SET N=N+1
- SET Y=Y_$SELECT(N=1:"",1:";")_$PIECE($GET(^DIC(4,BGPZZ,0)),U)
- +38 SET BGPZZ=0
- SET C=0
- FOR BGPZZ=1:3:N
- Begin DoDot:3
- +39 SET X=$EXTRACT($PIECE(Y,";",BGPZZ),1,20)
- SET $PIECE(X,U,2)=$EXTRACT($PIECE(Y,";",(BGPZZ+1)),1,20)
- SET $PIECE(X,U,3)=$EXTRACT($PIECE(Y,";",(BGPZZ+2)),1,20)
- DO S(X,1,1)
- +40 QUIT
- End DoDot:3
- End DoDot:2
- End DoDot:1
- +41 SET X=" "
- DO S(X,1,1)
- +42 KILL BGPX,BGPQUIT
- +43 QUIT
- HEDISHDR ;
- +1 SET X=" "
- DO S(X,1,1)
- +2 IF $GET(BGPSEAT)
- QUIT
- +3 IF $GET(BGPAREAA)
- SET BGPNODEP=$SELECT(BGPCHSO&('BGPCHSN):27,(BGPCHSO+BGPCHSN)=2:32,1:16)
- +4 IF '$GET(BGPAREAA)
- SET BGPNODEP=$SELECT(BGPCHSO:27,1:16)
- +5 SET BGPX=$ORDER(^BGPCTRL("B",2007,0))
- +6 SET BGPY=0
- FOR
- SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
- IF BGPY'=+BGPY
- QUIT
- Begin DoDot:1
- +7 SET X=^BGPCTRL(BGPX,BGPNODEP,BGPY,0)
- DO S(X,1,1)
- +8 QUIT
- End DoDot:1
- +9 QUIT
- ENDTIME ;
- +1 IF $DATA(BGPET)
- SET BGPTS=(86400*($PIECE(BGPET,",")-$PIECE(BGPBT,",")))+($PIECE(BGPET,",",2)-$PIECE(BGPBT,",",2))
- SET BGPHR=$PIECE(BGPTS/3600,".")
- IF BGPHR=""
- SET BGPHR=0
- Begin DoDot:1
- +2 SET BGPTS=BGPTS-(BGPHR*3600)
- SET BGPM=$PIECE(BGPTS/60,".")
- IF BGPM=""
- SET BGPM=0
- SET BGPTS=BGPTS-(BGPM*60)
- SET BGPS=BGPTS
- SET X="RUN TIME (H.M.S): "_BGPHR_"."_BGPM_"."_BGPS
- DO S(X,1,1)
- End DoDot:1
- +3 QUIT
- AREACP ;EP - area cover page
- +1 SET X="*** IHS 2007 HEDIS Clinical Performance Measures ***"
- DO S(X,1,1)
- +2 SET X=$SELECT(BGPSUCNT=1:BGPSUNM,1:"AREA AGGREGATE")
- DO S(X,1,1)
- +3 SET X="CRS 2007, Version 7.0"
- DO S(X,1,1)
- +4 SET X="Date Report Run: "_$$FMTE^XLFDT(DT)
- DO S(X,1,1)
- +5 SET X="Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04)
- DO S(X,1,1)
- +6 SET X="Report Generated by: "_$$USR
- DO S(X,1,1)
- +7 SET X="Reporting Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
- DO S(X,1,1)
- +8 SET X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED)
- DO S(X,1,1)
- +9 SET X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED)
- DO S(X,1,1)
- +10 SET X=" "
- DO S(X,1,1)
- +11 SET X="Measures: HEDIS Measures"
- DO S(X,1,1)
- +12 IF BGPRTYPE'=1
- SET X="Population: "_$SELECT(BGPBEN=1:"AI/AN Only (Classification 01)",BGPBEN=2:"non AI/AN Only (Classification NOT 01)",BGPBEN=3:"All (Both AI/AN and non AI/AN)",1:"")
- DO S(X,1,1)
- +13 SET X=" "
- DO S(X,1,1)
- +14 DO ENDTIME
- +15 SET X=" "
- DO S(X,1,1)
- +16 SET BGPCHSO=""
- SET X=0
- FOR
- SET X=$ORDER(BGPSUL(X))
- IF X'=+X
- QUIT
- IF $PIECE(^BGPHEDCA(X,0),U,17)
- SET BGPCHSO=1
- +17 SET BGPCHSN=""
- SET X=0
- FOR
- SET X=$ORDER(BGPSUL(X))
- IF X'=+X
- QUIT
- IF '$PIECE(^BGPHEDCA(X,0),U,17)
- SET BGPCHSN=1
- BGP DO HEDISHDR
- +1 SET X=" "
- DO S(X,1,1)
- +2 IF $GET(BGPEXPT)
- Begin DoDot:1
- +3 SET X="A file will be created called BG07"_$PIECE(^AUTTLOC(DUZ(2),0),U,10)_".HE"_BGPRPT_"."
- DO S(X,1,1)
- SET X="It will reside in the public/export directory."
- DO S(X,1,1)
- SET X="This file should be sent to your Area Office."
- DO S(X,1,1)
- End DoDot:1
- +4 IF '$DATA(BGPGUI)
- IF BGPROT'="P"
- Begin DoDot:1
- +5 SET X="A delimited output file called "_BGPDELF
- DO S(X,1,1)
- SET X="has been placed in the public directory for your use in Excel or some"
- DO S(X,1,1)
- SET X="other software package. See your site manager to access this file."
- DO S(X,1,1)
- End DoDot:1
- +6 SET X=" "
- DO S(X,1,1)
- +7 SET X="Report includes data from the following facilities:"
- DO S(X,1,1)
- +8 NEW BGPX
- +9 SET BGPX=""
- SET BGPC=0
- FOR
- SET BGPX=$ORDER(BGPSUL(BGPX))
- IF BGPX=""
- QUIT
- Begin DoDot:1
- +10 SET X=$PIECE(^BGPHEDCA(BGPX,0),U,9)
- SET X=$ORDER(^AUTTLOC("C",X,0))
- SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
- +11 SET BGPC=BGPC+1
- SET X=BGPC_". "_$SELECT($PIECE(^BGPHEDCA(BGPX,0),U,17):"*",1:"")_X
- DO S(X,1,1)
- +12 QUIT
- End DoDot:1
- +13 SET X=" "
- DO S(X,1,1)
- +14 SET X="The following communities are included in this report:"
- DO S(X,1,1)
- +15 SET BGPX=""
- SET BGPC=0
- FOR
- SET BGPX=$ORDER(BGPSUL(BGPX))
- IF BGPX=""
- QUIT
- Begin DoDot:1
- +16 SET X=$PIECE(^BGPHEDCA(BGPX,0),U,9)
- SET X=$ORDER(^AUTTLOC("C",X,0))
- SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
- +17 SET BGPC=BGPC+1
- SET X=BGPC_". "_$SELECT($PIECE(^BGPHEDCA(BGPX,0),U,17):"*",1:"")_X
- DO S(X,1,1)
- +18 SET X="Communities: "
- DO S(X,1,1)
- SET X=0
- SET N=0
- SET Y=""
- SET Z=""
- FOR
- SET X=$ORDER(^BGPHEDCA(BGPX,9999,X))
- IF X'=+X
- QUIT
- SET N=N+1
- SET Y=Y_$SELECT(N=1:"",1:";")_$PIECE(^BGPHEDCA(BGPX,9999,X,0),U)
- +19 SET X=0
- SET C=0
- FOR X=1:3:N
- SET Z=$EXTRACT($PIECE(Y,";",X),1,20)
- SET $PIECE(Z,U,2)=$EXTRACT($PIECE(Y,";",(X+1)),1,20)
- SET $PIECE(Z,U,3)=$EXTRACT($PIECE(Y,";",(X+2)),1,20)
- DO S(Z,1,1)
- +20 IF $ORDER(^BGPHEDCA(BGPX,1111,0))
- Begin DoDot:2
- +21 SET X=" "
- DO S(X,1,1)
- +22 SET X="MFI Site: Locations for visits: "
- DO S(X,1,1)
- SET X=0
- SET N=0
- SET Y=""
- SET Z=""
- FOR
- SET X=$ORDER(^BGPHEDCA(BGPX,1111,X))
- IF X'=+X
- QUIT
- SET N=N+1
- SET Y=Y_$SELECT(N=1:"",1:";")_$PIECE(^BGPHEDCA(BGPX,1111,X,0),U)
- +23 SET X=0
- SET C=0
- FOR X=1:3:N
- SET Z=$EXTRACT($PIECE(Y,";",X),1,20)
- SET $PIECE(Z,U,2)=$EXTRACT($PIECE(Y,";",(X+1)),1,20)
- SET $PIECE(Z,U,3)=$EXTRACT($PIECE(Y,";",(X+2)),1,20)
- DO S(Z,1,1)
- +24 QUIT
- End DoDot:2
- +25 SET X=" "
- DO S(X,1,1)
- +26 QUIT
- End DoDot:1
- +27 SET X=" "
- DO S(X,1,1)
- +28 IF BGPCHSO
- Begin DoDot:1
- +29 SET X=" "
- DO S(X,1,1)
- SET X="* CHS-only site. Uses Active Clinical CHS Population definition vs. Active Clinical."
- DO S(X,1,1)
- End DoDot:1
- +30 KILL BGPX,BGPQUIT
- +31 SET X=" "
- DO S(X,1,1)
- +32 QUIT
- S(Y,F,P) ;set up array
- +1 IF '$GET(F)
- SET F=0
- +2 SET %=$PIECE(^TMP($JOB,"BGPDEL",0),U)+F
- SET $PIECE(^TMP($JOB,"BGPDEL",0),U)=%
- +3 IF '$DATA(^TMP($JOB,"BGPDEL",%))
- SET ^TMP($JOB,"BGPDEL",%)=""
- +4 SET $PIECE(^TMP($JOB,"BGPDEL",%),U,P)=Y
- +5 QUIT
- CTR(X,Y) ;EP - Center X in a field Y wide.
- +1 QUIT $JUSTIFY("",$SELECT($DATA(Y):Y,1:IOM)-$LENGTH(X)\2)_X
- +2 ;----------
- EOP ;EP - End of page.
- +1 IF $EXTRACT(IOST)'="C"
- QUIT
- +2 IF $DATA(ZTQUEUED)!'(IOT="TRM")!$DATA(IO("S"))
- QUIT
- +3 NEW DIR
- +4 KILL DIRUT,DFOUT,DLOUT,DTOUT,DUOUT
- +5 SET DIR(0)="E"
- DO ^DIR
- +6 QUIT
- +7 ;----------
- USR() ;EP - Return name of current user from ^VA(200.
- +1 QUIT $SELECT($GET(DUZ):$SELECT($DATA(^VA(200,DUZ,0)):$PIECE(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
- +2 ;----------
- +3 ;;