APCM2AE0 ;IHS/CMI/LAB - IHS MU REPORT;
;;1.0;MU PERFORMANCE REPORTS;**7,8**;MAR 26, 2012;Build 22
;
;
CALC(N,O) ;ENTRY POINT
NEW Z
S Z=N-O,Z=$FN(Z,"+,",1)
Q Z
;
SB(X) ;EP - Strip
NEW %
X ^DD("FUNC",$O(^DD("FUNC","B","STRIPBLANKS",0)),1)
Q X
;
C(X,X2,X3) ;
S X3=""
I X'?.N Q $$LBLK^APCLUTL(X,7)
D COMMA^%DTC
S X=$$STRIP^XLFSTR(X," ")
Q $$LBLK^APCLUTL(X,7)
;
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 .
Q $S($G(DUZ):$S($D(^VA(200,DUZ,0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
;
SETN ;EP - set numerator fields
S APCMCYN=$$V(1,APCMRPT,N,P,APCMPROV,$S($G(APCMTOT):"T",1:"I"),APCMRPTT) ;SPDX
Q:$P(^APCM25OB(M,0),U,6)="A" ;no % on attestation measures
S APCMCYP=$S(APCMCYD:((APCMCYN/APCMCYD)*100),1:"")
Q
;
V(T,R,N,P,PROV,K,RT) ;EP
NEW X,Y,Z,I,J
I RT=1 S I=PROV_";VA(200,"
I RT=2 S I=PROV_";AUTTLOC("
I T=1 D Q X
.S J=$O(^APCMM25C(R,11,"B",I,0))
.I 'J S X=0 Q
.S X=$P($G(^APCMM25C(R,11,J,N)),U,P)
Q ""
SETND ;
S APCMDF=$P(^APCM25OB(M,0),U,8)
S APCMNP=$P(^DD(9001304.0311,APCMDF,0),U,4),N=$P(APCMNP,";"),P=$P(APCMNP,";",2)
S APCMCYD=$$V(1,APCMRPT,N,P,APCMPROV,$S($G(APCMTOT):"T",1:"I"),APCMRPTT)
I $P(^APCM25OB(M,0),U,6)="A" S (APCMPRN,APCMCYN)="" Q
S APCMNF=$P(^APCM25OB(M,0),U,9) ;numerator field
S APCMNP=$P(^DD(9001304.0311,APCMNF,0),U,4),N=$P(APCMNP,";"),P=$P(APCMNP,";",2)
D SETN
Q
MEDREC ;EP
I APCMPTYP="P" D
.D
..S M=APCMIC
..D W^APCM2AEH(" 7. Medication Rec 2016",0,2,APCMPTYP)
..;
..S T=">50%"
..D W^APCM2AEH(T,0,0,APCMPTYP,,35)
..;
..D SETND
..D WRATE
..;
..D WNUMDEN
..;
..D WEXCL
..;
..S I=$P(^APCM25OB(APCMIC,0),U,1)
..D W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
I APCMPTYP="D" D
.D
..S M=APCMIC
..S APCMX="Medication Rec 2016"
..;
..S T=">50%"
..S $P(APCMX,U,2)=T
..;
..D SETND
..D WRATE
..;
..D WNUMDEN
..;
..D WEXCL
..;
..S I=$P(^APCM25OB(APCMIC,0),U,1)
..S $P(APCMX,U,7)="N/A"
..D W^APCM25EH(APCMX,0,2,APCMPTYP,1)
Q
PEA ;EP
I APCMPTYP="P" D
.S M=APCMIC
.D W^APCM2AEH(" 8. Patient Elec Access",0,2,APCMPTYP)
.;
.S T=">50%"
.D W^APCM2AEH(T,0,0,APCMPTYP,,35)
.;
.D SETND
.D WRATE
.;
.D WNUMDEN
.;
.D WEXCL
.;
.D W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
I APCMPTYP="D" D
.S M=APCMIC
.S APCMX="Patient Elec Access"
.;
.S T=">50%"
.S $P(APCMX,U,2)=T
.;
.D SETND
.D WRATE
.;
.D WNUMDEN
.;
.D WEXCL
.;
.S $P(APCMX,U,7)="N/A"
.D W^APCM25EH(APCMX,0,2,APCMPTYP,1)
;VDT
I APCMPTYP="P" D
.D
..S M=$O(^APCM25OB("B","S2.020.EP.1",0))
..D W^APCM2AEH(" VDT 2016",0,1,APCMPTYP)
..;
..S T=">=1"
..D W^APCM2AEH(T,0,0,APCMPTYP,,35)
..;
..D SETND
..D W^APCM2AEH($$C(APCMCYN,0,9),0,0,APCMPTYP,,40)
..;
..D WNUMDEN
..;
..D WEXCL
..;
..S I=$O(^APCM25OB("B","S2.020.EP,1",0))
..D W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
..I $G(APCMVDTE) D
...D W^APCM25EH("Note: PHR Server access failed during report generation "_$P(APCMSEME,U,2)_" which may",0,1,APCMPTYP,,0)
...D W^APCM25EH("have affected the numerator results for this measure. Contact your IT staff to",0,1,APCMPTYP,,0)
...D W^APCM25EH("resolve the error and then regenerate the report again to obtain accurate",0,1,APCMPTYP,,0)
...D W^APCM25EH("results.",0,1,APCMPTYP,,0)
I APCMPTYP="D" D
.D
..;S M=APCMIC
..S M=$O(^APCM25OB("B","S2.020.EP.1",0)) ;IHS/CMI/LAB - PATCH 8?
..S APCMX="VDT 2016"
..;
..S T=">=1"
..S $P(APCMX,U,2)=T
..;
..D SETND
..S $P(APCMX,U,3)=+APCMCYN ;IHS/CMI/LAB - PATCH 8 ADDED "+"
..;
..D WNUMDEN
..;
..D WEXCL
..;
..S I=$P(^APCM25OB(APCMIC,0),U,1)
..S $P(APCMX,U,7)="N/A"
..D W^APCM25EH(APCMX,0,1,APCMPTYP,1)
..I $G(APCMVDTE) D
...D W^APCM25EH("Note: PHR Server access failed during report generation "_$P(APCMSEME,U,2)_" which may",0,1,APCMPTYP,1)
...D W^APCM25EH("have affected the numerator results for this measure. Contact your IT staff to",0,1,APCMPTYP,1)
...D W^APCM25EH("resolve the error and then regenerate the report again to obtain accurate results.",0,1,APCMPTYP,1)
Q
SEM ;EP
I APCMPTYP="P" D
.D
..S M=APCMIC
..D W^APCM2AEH(" 9. Secure Messaging 2016",0,2,APCMPTYP)
..;
..S T=">=1"
..D W^APCM2AEH(T,0,0,APCMPTYP,,35)
..;
..;S (APCMCYN,APCMCYD,APCMCYP)=0
..S (APCMCYN,APCMCYD,APCMCYP)=0
..S APCMDF=31.02,APCMNF=31.01 D SETND^APCM25EA
..D W^APCM2AEH($$C(APCMCYN,0,9),0,0,APCMPTYP,,40)
..D W^APCM2AEH($$C(APCMCYN,0,9),0,0,APCMPTYP,,51),W^APCM2AEH($$C(APCMCYD,0,9),0,0,APCMPTYP,,61)
..;
..D WEXCL
..;
..S I=$P(^APCM25OB(APCMIC,0),U,1)
..D W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
..I $G(APCMSEME) D
...D W^APCM25EH("Note: PHR Server access failed during report generation "_$P(APCMSEME,U,2)_" which may",0,1,APCMPTYP,,0)
...D W^APCM25EH("have affected the numerator results for this measure. Contact your IT staff to",0,1,APCMPTYP,,0)
...D W^APCM25EH("resolve the error and then regenerate the report again to obtain accurate",0,1,APCMPTYP,,0)
...D W^APCM25EH("results.",0,1,APCMPTYP,,0)
I APCMPTYP="D" D
.D
..S M=APCMIC
..S APCMX="Secure Messaging 2016"
..;
..S T=">=1"
..S $P(APCMX,U,2)=T
..;
..S (APCMCYN,APCMCYD,APCMCYP)=0
..S APCMDF=31.02,APCMNF=31.01 D SETND^APCM25EA
..S $P(APCMX,U,3)=APCMCYN ;RATE IS NUMERATOR
..S $P(APCMX,U,4)=APCMCYN ;NUMER
..S $P(APCMX,U,5)=APCMCYD ;DENOM
..D WEXCL
..;
..S I=$P(^APCM25OB(APCMIC,0),U,1)
..S $P(APCMX,U,7)="N/A"
..D W^APCM25EH(APCMX,0,2,APCMPTYP,1)
..Q:'$G(APCMSEME)
..D W^APCM25EH("Note: PHR Server access failed during report generation "_$P(APCMSEME,U,2)_" which may",0,1,APCMPTYP,1)
..D W^APCM25EH("have affected the numerator results for this measure. Contact your IT staff to",0,1,APCMPTYP,1)
..D W^APCM25EH("resolve the error and then regenerate the report again to obtain accurate results.",0,1,APCMPTYP,1)
Q
IMM ;EP
I APCMPTYP="P" D
.S M=APCMIC
.D W^APCM2AEH("10. Public Health",0,2,APCMPTYP)
.D W^APCM2AEH(" Immunization Regis*+",0,1,APCMPTYP)
.;
.S T="Yes"
.D W^APCM2AEH(T,0,0,APCMPTYP,,35)
.;
.D SETND
.D WRATE
.;
.D WNUMDEN
.;
.D WEXCL
.;
.D W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
I APCMPTYP="D" D
.S M=APCMIC
.S APCMX="Public Health" D W^APCM25EH(APCMX,0,2,APCMPTYP,1)
.S APCMX="Immunization Regis*+"
.;
.S T="Yes"
.S $P(APCMX,U,2)=T
.;
.D SETND
.D WRATE
.;
.D WNUMDEN
.;
.D WEXCL
.;
.S $P(APCMX,U,7)="N/A"
.D W^APCM25EH(APCMX,0,1,APCMPTYP,1)
Q
SYN ;EP
I APCMPTYP="P" D
.S M=APCMIC
.;D W^APCM2AEH(" 9. Public Health",0,2,APCMPTYP)
.D W^APCM2AEH(" Syndromic Surveil*+",0,1,APCMPTYP)
.;
.S T="Yes"
.D W^APCM2AEH(T,0,0,APCMPTYP,,35)
.;
.D SETND
.D WRATE
.;
.D WNUMDEN
.;
.D WEXCL
.;
.D W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
I APCMPTYP="D" D
.S M=APCMIC
.;S APCMX="Public Health" D W^APCM25EH(APCMX,0,2,APCMPTYP,1)
.S APCMX="Syndromic Surveil*+"
.;
.S T="Yes"
.S $P(APCMX,U,2)=T
.;
.D SETND
.D WRATE
.;
.D WNUMDEN
.;
.D WEXCL
.;
.S $P(APCMX,U,7)="N/A"
.D W^APCM25EH(APCMX,0,1,APCMPTYP,1)
Q
SR ;EP
I APCMPTYP="P" D
.S M=APCMIC
.;D W^APCM2AEH(" 9. Public Health",0,2,APCMPTYP)
.D W^APCM2AEH(" Rept to Special Reg*+",0,1,APCMPTYP)
.;
.S T="Yes"
.D W^APCM2AEH(T,0,0,APCMPTYP,,35)
.;
.D SETND
.D WRATE
.;
.D WNUMDEN
.;
.D WEXCL
.;
.D W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
I APCMPTYP="D" D
.S M=APCMIC
.S APCMX="Rept to Special Reg*+"
.;
.S T="Yes"
.S $P(APCMX,U,2)=T
.;
.D SETND
.D WRATE
.;
.D WNUMDEN
.;
.D WEXCL
.;
.S $P(APCMX,U,7)="N/A"
.D W^APCM25EH(APCMX,0,1,APCMPTYP,1)
Q
WEXCL ;
S APCMEF=$P(^APCM25OB(M,0),U,11)
I APCMEF]"" D
.S APCMNP=$P(^DD(9001304.0311,APCMEF,0),U,4),N=$P(APCMNP,";"),P=$P(APCMNP,";",2)
.S APCMEV=$$V(1,APCMRPT,N,P,APCMPROV,$S($G(APCMTOT):"T",1:"I"),APCMRPTT)
.I APCMPTYP="P" D W^APCM25EH($S(APCMEV="N/A":"N/A",APCMEV]"":"Yes",1:"No"),0,0,APCMPTYP,,71)
.I APCMPTYP="D" S $P(APCMX,U,6)=$S(APCMEV="N/A":"N/A",APCMEV]"":"Yes",1:"No")
I APCMEF="" D
.I APCMPTYP="P" D W^APCM25EH("N/A",0,0,APCMPTYP,,71)
.S $P(APCMX,U,6)="N/A"
Q
WRATE ;
I APCMPTYP="P" D Q
.I $P(^APCM25OB(M,0),U,6)="A" D W^APCM2AEH($S(APCMCYD]"":$$LBLK^APCLUTL(APCMCYD,8),1:$$LBLK^APCLUTL("N/A",8)),0,0,APCMPTYP,,40)
.I $P(^APCM25OB(M,0),U,6)'="A" D W^APCM2AEH($J(APCMCYP,8,2)_"%",0,0,APCMPTYP,,40)
I $P(^APCM25OB(M,0),U,6)="A" S $P(APCMX,U,3)=$S(APCMCYD]"":APCMCYD,1:"N/A")
I $P(^APCM25OB(M,0),U,6)'="A" S $P(APCMX,U,3)=$S($P(^APCM25OB(M,0),U,6)="A":"N/A",1:$J(APCMCYP,8,2)_"%")
Q
WNUMDEN ;
I APCMPTYP="P" D Q
.D W^APCM2AEH($S($P(^APCM25OB(M,0),U,6)="A":" N/A",APCMCYN'?.N:" N/A",1:$$C(APCMCYN,0,9)),0,0,APCMPTYP,,51)
.D W^APCM2AEH($S($P(^APCM25OB(M,0),U,6)="A":" N/A",APCMCYD'?.N:" N/A",1:$$C(APCMCYD,0,9)),0,0,APCMPTYP,,61)
S $P(APCMX,U,4)=$S($P(^APCM25OB(M,0),U,6)="A":"N/A",1:+APCMCYN)
S $P(APCMX,U,5)=$S($P(^APCM25OB(M,0),U,6)="A":"N/A",1:+APCMCYD)
Q
APCM2AE0 ;IHS/CMI/LAB - IHS MU REPORT;
+1 ;;1.0;MU PERFORMANCE REPORTS;**7,8**;MAR 26, 2012;Build 22
+2 ;
+3 ;
CALC(N,O) ;ENTRY POINT
+1 NEW Z
+2 SET Z=N-O
SET Z=$FNUMBER(Z,"+,",1)
+3 QUIT Z
+4 ;
SB(X) ;EP - Strip
+1 NEW %
+2 XECUTE ^DD("FUNC",$ORDER(^DD("FUNC","B","STRIPBLANKS",0)),1)
+3 QUIT X
+4 ;
C(X,X2,X3) ;
+1 SET X3=""
+2 IF X'?.N
QUIT $$LBLK^APCLUTL(X,7)
+3 DO COMMA^%DTC
+4 SET X=$$STRIP^XLFSTR(X," ")
+5 QUIT $$LBLK^APCLUTL(X,7)
+6 ;
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 .
+1 QUIT $SELECT($GET(DUZ):$SELECT($DATA(^VA(200,DUZ,0)):$PIECE(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
+2 ;
SETN ;EP - set numerator fields
+1 ;SPDX
SET APCMCYN=$$V(1,APCMRPT,N,P,APCMPROV,$SELECT($GET(APCMTOT):"T",1:"I"),APCMRPTT)
+2 ;no % on attestation measures
IF $PIECE(^APCM25OB(M,0),U,6)="A"
QUIT
+3 SET APCMCYP=$SELECT(APCMCYD:((APCMCYN/APCMCYD)*100),1:"")
+4 QUIT
+5 ;
V(T,R,N,P,PROV,K,RT) ;EP
+1 NEW X,Y,Z,I,J
+2 IF RT=1
SET I=PROV_";VA(200,"
+3 IF RT=2
SET I=PROV_";AUTTLOC("
+4 IF T=1
Begin DoDot:1
+5 SET J=$ORDER(^APCMM25C(R,11,"B",I,0))
+6 IF 'J
SET X=0
QUIT
+7 SET X=$PIECE($GET(^APCMM25C(R,11,J,N)),U,P)
End DoDot:1
QUIT X
+8 QUIT ""
SETND ;
+1 SET APCMDF=$PIECE(^APCM25OB(M,0),U,8)
+2 SET APCMNP=$PIECE(^DD(9001304.0311,APCMDF,0),U,4)
SET N=$PIECE(APCMNP,";")
SET P=$PIECE(APCMNP,";",2)
+3 SET APCMCYD=$$V(1,APCMRPT,N,P,APCMPROV,$SELECT($GET(APCMTOT):"T",1:"I"),APCMRPTT)
+4 IF $PIECE(^APCM25OB(M,0),U,6)="A"
SET (APCMPRN,APCMCYN)=""
QUIT
+5 ;numerator field
SET APCMNF=$PIECE(^APCM25OB(M,0),U,9)
+6 SET APCMNP=$PIECE(^DD(9001304.0311,APCMNF,0),U,4)
SET N=$PIECE(APCMNP,";")
SET P=$PIECE(APCMNP,";",2)
+7 DO SETN
+8 QUIT
MEDREC ;EP
+1 IF APCMPTYP="P"
Begin DoDot:1
+2 Begin DoDot:2
+3 SET M=APCMIC
+4 DO W^APCM2AEH(" 7. Medication Rec 2016",0,2,APCMPTYP)
+5 ;
+6 SET T=">50%"
+7 DO W^APCM2AEH(T,0,0,APCMPTYP,,35)
+8 ;
+9 DO SETND
+10 DO WRATE
+11 ;
+12 DO WNUMDEN
+13 ;
+14 DO WEXCL
+15 ;
+16 SET I=$PIECE(^APCM25OB(APCMIC,0),U,1)
+17 DO W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
End DoDot:2
End DoDot:1
+18 IF APCMPTYP="D"
Begin DoDot:1
+19 Begin DoDot:2
+20 SET M=APCMIC
+21 SET APCMX="Medication Rec 2016"
+22 ;
+23 SET T=">50%"
+24 SET $PIECE(APCMX,U,2)=T
+25 ;
+26 DO SETND
+27 DO WRATE
+28 ;
+29 DO WNUMDEN
+30 ;
+31 DO WEXCL
+32 ;
+33 SET I=$PIECE(^APCM25OB(APCMIC,0),U,1)
+34 SET $PIECE(APCMX,U,7)="N/A"
+35 DO W^APCM25EH(APCMX,0,2,APCMPTYP,1)
End DoDot:2
End DoDot:1
+36 QUIT
PEA ;EP
+1 IF APCMPTYP="P"
Begin DoDot:1
+2 SET M=APCMIC
+3 DO W^APCM2AEH(" 8. Patient Elec Access",0,2,APCMPTYP)
+4 ;
+5 SET T=">50%"
+6 DO W^APCM2AEH(T,0,0,APCMPTYP,,35)
+7 ;
+8 DO SETND
+9 DO WRATE
+10 ;
+11 DO WNUMDEN
+12 ;
+13 DO WEXCL
+14 ;
+15 DO W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
End DoDot:1
+16 IF APCMPTYP="D"
Begin DoDot:1
+17 SET M=APCMIC
+18 SET APCMX="Patient Elec Access"
+19 ;
+20 SET T=">50%"
+21 SET $PIECE(APCMX,U,2)=T
+22 ;
+23 DO SETND
+24 DO WRATE
+25 ;
+26 DO WNUMDEN
+27 ;
+28 DO WEXCL
+29 ;
+30 SET $PIECE(APCMX,U,7)="N/A"
+31 DO W^APCM25EH(APCMX,0,2,APCMPTYP,1)
End DoDot:1
+32 ;VDT
+33 IF APCMPTYP="P"
Begin DoDot:1
+34 Begin DoDot:2
+35 SET M=$ORDER(^APCM25OB("B","S2.020.EP.1",0))
+36 DO W^APCM2AEH(" VDT 2016",0,1,APCMPTYP)
+37 ;
+38 SET T=">=1"
+39 DO W^APCM2AEH(T,0,0,APCMPTYP,,35)
+40 ;
+41 DO SETND
+42 DO W^APCM2AEH($$C(APCMCYN,0,9),0,0,APCMPTYP,,40)
+43 ;
+44 DO WNUMDEN
+45 ;
+46 DO WEXCL
+47 ;
+48 SET I=$ORDER(^APCM25OB("B","S2.020.EP,1",0))
+49 DO W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
+50 IF $GET(APCMVDTE)
Begin DoDot:3
+51 DO W^APCM25EH("Note: PHR Server access failed during report generation "_$PIECE(APCMSEME,U,2)_" which may",0,1,APCMPTYP,,0)
+52 DO W^APCM25EH("have affected the numerator results for this measure. Contact your IT staff to",0,1,APCMPTYP,,0)
+53 DO W^APCM25EH("resolve the error and then regenerate the report again to obtain accurate",0,1,APCMPTYP,,0)
+54 DO W^APCM25EH("results.",0,1,APCMPTYP,,0)
End DoDot:3
End DoDot:2
End DoDot:1
+55 IF APCMPTYP="D"
Begin DoDot:1
+56 Begin DoDot:2
+57 ;S M=APCMIC
+58 ;IHS/CMI/LAB - PATCH 8?
SET M=$ORDER(^APCM25OB("B","S2.020.EP.1",0))
+59 SET APCMX="VDT 2016"
+60 ;
+61 SET T=">=1"
+62 SET $PIECE(APCMX,U,2)=T
+63 ;
+64 DO SETND
+65 ;IHS/CMI/LAB - PATCH 8 ADDED "+"
SET $PIECE(APCMX,U,3)=+APCMCYN
+66 ;
+67 DO WNUMDEN
+68 ;
+69 DO WEXCL
+70 ;
+71 SET I=$PIECE(^APCM25OB(APCMIC,0),U,1)
+72 SET $PIECE(APCMX,U,7)="N/A"
+73 DO W^APCM25EH(APCMX,0,1,APCMPTYP,1)
+74 IF $GET(APCMVDTE)
Begin DoDot:3
+75 DO W^APCM25EH("Note: PHR Server access failed during report generation "_$PIECE(APCMSEME,U,2)_" which may",0,1,APCMPTYP,1)
+76 DO W^APCM25EH("have affected the numerator results for this measure. Contact your IT staff to",0,1,APCMPTYP,1)
+77 DO W^APCM25EH("resolve the error and then regenerate the report again to obtain accurate results.",0,1,APCMPTYP,1)
End DoDot:3
End DoDot:2
End DoDot:1
+78 QUIT
SEM ;EP
+1 IF APCMPTYP="P"
Begin DoDot:1
+2 Begin DoDot:2
+3 SET M=APCMIC
+4 DO W^APCM2AEH(" 9. Secure Messaging 2016",0,2,APCMPTYP)
+5 ;
+6 SET T=">=1"
+7 DO W^APCM2AEH(T,0,0,APCMPTYP,,35)
+8 ;
+9 ;S (APCMCYN,APCMCYD,APCMCYP)=0
+10 SET (APCMCYN,APCMCYD,APCMCYP)=0
+11 SET APCMDF=31.02
SET APCMNF=31.01
DO SETND^APCM25EA
+12 DO W^APCM2AEH($$C(APCMCYN,0,9),0,0,APCMPTYP,,40)
+13 DO W^APCM2AEH($$C(APCMCYN,0,9),0,0,APCMPTYP,,51)
DO W^APCM2AEH($$C(APCMCYD,0,9),0,0,APCMPTYP,,61)
+14 ;
+15 DO WEXCL
+16 ;
+17 SET I=$PIECE(^APCM25OB(APCMIC,0),U,1)
+18 DO W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
+19 IF $GET(APCMSEME)
Begin DoDot:3
+20 DO W^APCM25EH("Note: PHR Server access failed during report generation "_$PIECE(APCMSEME,U,2)_" which may",0,1,APCMPTYP,,0)
+21 DO W^APCM25EH("have affected the numerator results for this measure. Contact your IT staff to",0,1,APCMPTYP,,0)
+22 DO W^APCM25EH("resolve the error and then regenerate the report again to obtain accurate",0,1,APCMPTYP,,0)
+23 DO W^APCM25EH("results.",0,1,APCMPTYP,,0)
End DoDot:3
End DoDot:2
End DoDot:1
+24 IF APCMPTYP="D"
Begin DoDot:1
+25 Begin DoDot:2
+26 SET M=APCMIC
+27 SET APCMX="Secure Messaging 2016"
+28 ;
+29 SET T=">=1"
+30 SET $PIECE(APCMX,U,2)=T
+31 ;
+32 SET (APCMCYN,APCMCYD,APCMCYP)=0
+33 SET APCMDF=31.02
SET APCMNF=31.01
DO SETND^APCM25EA
+34 ;RATE IS NUMERATOR
SET $PIECE(APCMX,U,3)=APCMCYN
+35 ;NUMER
SET $PIECE(APCMX,U,4)=APCMCYN
+36 ;DENOM
SET $PIECE(APCMX,U,5)=APCMCYD
+37 DO WEXCL
+38 ;
+39 SET I=$PIECE(^APCM25OB(APCMIC,0),U,1)
+40 SET $PIECE(APCMX,U,7)="N/A"
+41 DO W^APCM25EH(APCMX,0,2,APCMPTYP,1)
+42 IF '$GET(APCMSEME)
QUIT
+43 DO W^APCM25EH("Note: PHR Server access failed during report generation "_$PIECE(APCMSEME,U,2)_" which may",0,1,APCMPTYP,1)
+44 DO W^APCM25EH("have affected the numerator results for this measure. Contact your IT staff to",0,1,APCMPTYP,1)
+45 DO W^APCM25EH("resolve the error and then regenerate the report again to obtain accurate results.",0,1,APCMPTYP,1)
End DoDot:2
End DoDot:1
+46 QUIT
IMM ;EP
+1 IF APCMPTYP="P"
Begin DoDot:1
+2 SET M=APCMIC
+3 DO W^APCM2AEH("10. Public Health",0,2,APCMPTYP)
+4 DO W^APCM2AEH(" Immunization Regis*+",0,1,APCMPTYP)
+5 ;
+6 SET T="Yes"
+7 DO W^APCM2AEH(T,0,0,APCMPTYP,,35)
+8 ;
+9 DO SETND
+10 DO WRATE
+11 ;
+12 DO WNUMDEN
+13 ;
+14 DO WEXCL
+15 ;
+16 DO W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
End DoDot:1
+17 IF APCMPTYP="D"
Begin DoDot:1
+18 SET M=APCMIC
+19 SET APCMX="Public Health"
DO W^APCM25EH(APCMX,0,2,APCMPTYP,1)
+20 SET APCMX="Immunization Regis*+"
+21 ;
+22 SET T="Yes"
+23 SET $PIECE(APCMX,U,2)=T
+24 ;
+25 DO SETND
+26 DO WRATE
+27 ;
+28 DO WNUMDEN
+29 ;
+30 DO WEXCL
+31 ;
+32 SET $PIECE(APCMX,U,7)="N/A"
+33 DO W^APCM25EH(APCMX,0,1,APCMPTYP,1)
End DoDot:1
+34 QUIT
SYN ;EP
+1 IF APCMPTYP="P"
Begin DoDot:1
+2 SET M=APCMIC
+3 ;D W^APCM2AEH(" 9. Public Health",0,2,APCMPTYP)
+4 DO W^APCM2AEH(" Syndromic Surveil*+",0,1,APCMPTYP)
+5 ;
+6 SET T="Yes"
+7 DO W^APCM2AEH(T,0,0,APCMPTYP,,35)
+8 ;
+9 DO SETND
+10 DO WRATE
+11 ;
+12 DO WNUMDEN
+13 ;
+14 DO WEXCL
+15 ;
+16 DO W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
End DoDot:1
+17 IF APCMPTYP="D"
Begin DoDot:1
+18 SET M=APCMIC
+19 ;S APCMX="Public Health" D W^APCM25EH(APCMX,0,2,APCMPTYP,1)
+20 SET APCMX="Syndromic Surveil*+"
+21 ;
+22 SET T="Yes"
+23 SET $PIECE(APCMX,U,2)=T
+24 ;
+25 DO SETND
+26 DO WRATE
+27 ;
+28 DO WNUMDEN
+29 ;
+30 DO WEXCL
+31 ;
+32 SET $PIECE(APCMX,U,7)="N/A"
+33 DO W^APCM25EH(APCMX,0,1,APCMPTYP,1)
End DoDot:1
+34 QUIT
SR ;EP
+1 IF APCMPTYP="P"
Begin DoDot:1
+2 SET M=APCMIC
+3 ;D W^APCM2AEH(" 9. Public Health",0,2,APCMPTYP)
+4 DO W^APCM2AEH(" Rept to Special Reg*+",0,1,APCMPTYP)
+5 ;
+6 SET T="Yes"
+7 DO W^APCM2AEH(T,0,0,APCMPTYP,,35)
+8 ;
+9 DO SETND
+10 DO WRATE
+11 ;
+12 DO WNUMDEN
+13 ;
+14 DO WEXCL
+15 ;
+16 DO W^APCM2AEH("N/A",0,0,APCMPTYP,,77)
End DoDot:1
+17 IF APCMPTYP="D"
Begin DoDot:1
+18 SET M=APCMIC
+19 SET APCMX="Rept to Special Reg*+"
+20 ;
+21 SET T="Yes"
+22 SET $PIECE(APCMX,U,2)=T
+23 ;
+24 DO SETND
+25 DO WRATE
+26 ;
+27 DO WNUMDEN
+28 ;
+29 DO WEXCL
+30 ;
+31 SET $PIECE(APCMX,U,7)="N/A"
+32 DO W^APCM25EH(APCMX,0,1,APCMPTYP,1)
End DoDot:1
+33 QUIT
WEXCL ;
+1 SET APCMEF=$PIECE(^APCM25OB(M,0),U,11)
+2 IF APCMEF]""
Begin DoDot:1
+3 SET APCMNP=$PIECE(^DD(9001304.0311,APCMEF,0),U,4)
SET N=$PIECE(APCMNP,";")
SET P=$PIECE(APCMNP,";",2)
+4 SET APCMEV=$$V(1,APCMRPT,N,P,APCMPROV,$SELECT($GET(APCMTOT):"T",1:"I"),APCMRPTT)
+5 IF APCMPTYP="P"
DO W^APCM25EH($SELECT(APCMEV="N/A":"N/A",APCMEV]"":"Yes",1:"No"),0,0,APCMPTYP,,71)
+6 IF APCMPTYP="D"
SET $PIECE(APCMX,U,6)=$SELECT(APCMEV="N/A":"N/A",APCMEV]"":"Yes",1:"No")
End DoDot:1
+7 IF APCMEF=""
Begin DoDot:1
+8 IF APCMPTYP="P"
DO W^APCM25EH("N/A",0,0,APCMPTYP,,71)
+9 SET $PIECE(APCMX,U,6)="N/A"
End DoDot:1
+10 QUIT
WRATE ;
+1 IF APCMPTYP="P"
Begin DoDot:1
+2 IF $PIECE(^APCM25OB(M,0),U,6)="A"
DO W^APCM2AEH($SELECT(APCMCYD]"":$$LBLK^APCLUTL(APCMCYD,8),1:$$LBLK^APCLUTL("N/A",8)),0,0,APCMPTYP,,40)
+3 IF $PIECE(^APCM25OB(M,0),U,6)'="A"
DO W^APCM2AEH($JUSTIFY(APCMCYP,8,2)_"%",0,0,APCMPTYP,,40)
End DoDot:1
QUIT
+4 IF $PIECE(^APCM25OB(M,0),U,6)="A"
SET $PIECE(APCMX,U,3)=$SELECT(APCMCYD]"":APCMCYD,1:"N/A")
+5 IF $PIECE(^APCM25OB(M,0),U,6)'="A"
SET $PIECE(APCMX,U,3)=$SELECT($PIECE(^APCM25OB(M,0),U,6)="A":"N/A",1:$JUSTIFY(APCMCYP,8,2)_"%")
+6 QUIT
WNUMDEN ;
+1 IF APCMPTYP="P"
Begin DoDot:1
+2 DO W^APCM2AEH($SELECT($PIECE(^APCM25OB(M,0),U,6)="A":" N/A",APCMCYN'?.N:" N/A",1:$$C(APCMCYN,0,9)),0,0,APCMPTYP,,51)
+3 DO W^APCM2AEH($SELECT($PIECE(^APCM25OB(M,0),U,6)="A":" N/A",APCMCYD'?.N:" N/A",1:$$C(APCMCYD,0,9)),0,0,APCMPTYP,,61)
End DoDot:1
QUIT
+4 SET $PIECE(APCMX,U,4)=$SELECT($PIECE(^APCM25OB(M,0),U,6)="A":"N/A",1:+APCMCYN)
+5 SET $PIECE(APCMX,U,5)=$SELECT($PIECE(^APCM25OB(M,0),U,6)="A":"N/A",1:+APCMCYD)
+6 QUIT