BGPMUHD6 ; IHS/MSC/SAT - Delimited MU measure VTE3 and VTE4;07-Apr-2011 13:15;DU
;;14.1;IHS CLINICAL REPORTING;**1**;MAY 29, 2014;Build 2
;Delimited output
; STK2^BGPMUHD1 = delimited routine for 0435 STK-2 Antithrombolytic Therapy at discharge
; STK3^BGPMUHD1 = delimited routine for 0436 STK-3 Anticoagulation Therapy at discharge
; STK4^BGPMUHD2 = delimited routine for 0437 STK-4 thrombolytic therapy within 3 hours
; STK5^BGPMUHD2 = delimited routine for 0438 STK-5 Antithrombolytic Therapy by end of day 2
; STK6^BGPMUHD3 = delimited routine for 0439 STK-6 Statin Medicine at Discharge
; STK8^BGPMUHD3 = delimited routine for 0440 STK-8 Educational Materials at discharge
; STK10^BGPMUHD4 = delimited routine for 0441 STK-10 Rehabilitation Service at discharge
;
; VTE1^BGPMUHD5 = delimited routine for 0371 VTE-1 Prophylaxis within 24 hours
; VTE2^BGPMUHD5 = delimited routine for 0372 VTE-2 Prophylaxis for ICU pts
; VTE3^BGPMUHD6 = delimited routine for 0373 VTE-3 Anticoagulation overlap therapy
; VTE4^BGPMUHD6 = delimited routine for 0374 VTE-4 Platelet monitoring for UFH
; VTE5^BGPMUHD7 = delimited routine for 0375 VTE-5 VTE discharge instructions
; VTE6^BGPMUHD7 = delimited routine for 0376 VTE-6 Potentially preventable VTE
;Delimited output for VTE Measure 0373
VTE3 ;EP
D P1B
K ^TMP("BGPMU0373",$J)
Q
P1B ;Write individual measure
N BGPPTYPE,X,Y,Z,DEN,NUM,PC,STRING1,STRING2,PRD,PRN,PRD1,PRD6,PRN1
S BGPPROV=""
S BGPPTYPE="D"
S STRING1=$$373^BGPMUHP7("C")
S STRING2=$$373^BGPMUHP7("P")
S STRING3=$$373^BGPMUHP7("B")
D SUM373
S PRD1=$P(STRING1,U,1)-$P(STRING2,U,1)
S PRD2=$P(STRING1,U,5)-$P(STRING2,U,5)
S PRD3=$P(STRING1,U,5)-$P(STRING3,U,5)
S PRD4=$P(STRING1,U,6)-$P(STRING2,U,6)
S PRD5=$P(STRING1,U,6)-$P(STRING3,U,6)
I $P(STRING3,U,1)'=0 S PRD6=$$ROUND^BGPMUA01(($P(STRING1,U,1)/$P(STRING3,U,1)),3)*100
E S PRD6=0
S X=U_"REPORT PERIOD"_U_"%"_U_"PREV YR PERIOD"_U_"%"_U_"CHG FROM PREV YR"_U_"BASE YR"_U_"%"_U_"CHG FROM BASE %"
D S^BGPMUDEL(X,1,1)
S X="# Discharges for Pts w/confirmed VTE"_U_$P(STRING1,U,1)_U_U_$P(STRING2,U,1)_U_U_U_$P(STRING3,U,1)_U_U
D S^BGPMUDEL(X,1,1)
S X="# Excluded (Exc)"_U_$P(STRING1,U,4)_U_U_$P(STRING2,U,4)_U_U_U_$P(STRING3,U,4)
D S^BGPMUDEL(X,1,1)
S X="# Discharges for Pts w/confirmed VTE Less Exc"_U_($P(STRING1,U,1)-$P(STRING1,U,4))_U_U_($P(STRING2,U,1)-$P(STRING2,U,4))_U_U_U_($P(STRING3,U,1)-$P(STRING3,U,4))
D S^BGPMUDEL(X,1,1)
S X="# w/overlap therapy at discharge"_U_$P(STRING1,U,2)_U_$J($P(STRING1,U,5),5,1)_U_$P(STRING2,U,2)_U_$J($P(STRING2,U,5),5,1)_U_$FN(PRD2,",+",1)_U_$P(STRING3,U,2)_U_$J($P(STRING3,U,5),5,1)_U_$FN(PRD3,",+",1)
D S^BGPMUDEL(X,2,1)
S X="# w/o overlap therapy at discharge"_U_$P(STRING1,U,3)_U_$J($P(STRING1,U,6),5,1)_U_$P(STRING2,U,3)_U_$J($P(STRING2,U,6),5,1)_U_$FN(PRD4,",+",1)_U_$P(STRING3,U,3)_U_$J($P(STRING3,U,6),5,1)_U_$FN(PRD5,",+",1)
D S^BGPMUDEL(X,1,1)
I $D(BGPLIST(BGPIC)) D TC
Q
TC ;Do the Details
N PT,NODE,NAME,BP
S X="**** CONFIDENTIAL PATIENT INFORMATION COVERED BY PRIVACY ACT ****" D S^BGPMUDEL(X,2,1)
S X="This measure assesses the number of patients diagnosed with confirmed VTE who" D S^BGPMUDEL(X,2,1)
S X="received an overlap of parenteral (intravenous [IV] or subcutaneous [subcu])" D S^BGPMUDEL(X,1,1)
S X="anticoagulation and warfarin therapy. For patients who received less than 5 days" D S^BGPMUDEL(X,1,1)
S X="of overlap therapy, they must be discharged on both medications. Overlap therapy" D S^BGPMUDEL(X,1,1)
S X="must be administered for at least 5 days with an international normalized" D S^BGPMUDEL(X,1,1)
S X="ratio (INR) >= 2 prior to discontinuation of the parenteral anticoagulation therapy" D S^BGPMUDEL(X,1,1)
S X="or the patient must be discharged on both medications, if any." D S^BGPMUDEL(X,1,1)
S X="Patients who do not meet the numerator criteria are listed first (NM:), followed by patients who do meet the numerator criteria (M:). Excluded patients are listed last."
D S^BGPMUDEL(X,2,1)
S X="The following are the abbreviations used in the denominator and numerator columns:"
D S^BGPMUDEL(X,2,1)
S X="ADM=Admit Date for Inpatient w/confirmed VTE who received warfarin" D S^BGPMUDEL(X,1,1)
S X="OVLP DAYS=Number of inpt overlap days" D S^BGPMUDEL(X,1,1)
S X="INR=Last INR before discharge" D S^BGPMUDEL(X,1,1)
S X="RX=Discharged on overlap therapy" D S^BGPMUDEL(X,1,1)
;
S X="PATIENT NAME"_U_"HRN"_U_"COMMUNITY"_U_"SEX"_U_"AGE"_U_"DENOMINATOR"_U_"NUMERATOR" D S^BGPMUDEL(X,2,1)
S PTCT=0
I (BGPLIST="A")!(BGPLIST="D")&($D(^TMP("BGPMU0373",$J,"PAT","C","NOT"))) D
.K BGPARR
.D PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0373"","_$J_",""PAT"",""C"",""NOT"")")
.S PT=0 F S PT=$O(BGPARR(PT)) Q:PT="" D
..S PTCT=PTCT+1
..S NODE=$G(BGPARR(PT))
..D D373(NODE)
I (BGPLIST="A")!(BGPLIST="N")&($D(^TMP("BGPMU0373",$J,"PAT","C","NUM"))) D
.K BGPARR
.D PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0373"","_$J_",""PAT"",""C"",""NUM"")")
.S PT=0 F S PT=$O(BGPARR(PT)) Q:PT="" D
..S PTCT=PTCT+1
..S NODE=$G(BGPARR(PT))
..D D373(NODE)
;Excluded patients
I BGPLIST="A"&($D(^TMP("BGPMU0373",$J,"PAT","C","EXC"))) D
.D PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0373"","_$J_",""PAT"",""C"",""EXC"")")
.S PT=0 F S PT=$O(BGPARR(PT)) Q:PT="" D
..S PTCT=PTCT+1
..S NODE=$G(BGPARR(PT))
..D DEXC373(NODE)
S X="Total # of patients on list: "_PTCT D S^BGPMUDEL(X,2,1)
Q
;
;Delimited output for VTE Measure 0374
VTE4 ;EP
D P1
K ^TMP("BGPMU0374",$J)
Q
P1 ;Write individual measure
N BGPPTYPE,X,Y,Z,DEN,NUM,PC,STRING1,STRING2,PRD,PRN,PRD1,PRD6,PRN1
S BGPPROV=""
S BGPPTYPE="D"
S STRING1=$$374^BGPMUHP7("C")
S STRING2=$$374^BGPMUHP7("P")
S STRING3=$$374^BGPMUHP7("B")
D SUM374
S PRD1=$P(STRING1,U,1)-$P(STRING2,U,1)
S PRD2=$P(STRING1,U,5)-$P(STRING2,U,5)
S PRD3=$P(STRING1,U,5)-$P(STRING3,U,5)
S PRD4=$P(STRING1,U,6)-$P(STRING2,U,6)
S PRD5=$P(STRING1,U,6)-$P(STRING3,U,6)
I $P(STRING3,U,1)'=0 S PRD6=$$ROUND^BGPMUA01(($P(STRING1,U,1)/$P(STRING3,U,1)),3)*100
E S PRD6=0
S X=U_"REPORT PERIOD"_U_"%"_U_"PREV YR PERIOD"_U_"%"_U_"CHG FROM PREV YR"_U_"BASE YR"_U_"%"_U_"CHG FROM BASE %"
D S^BGPMUDEL(X,1,1)
S X="# Discharges for Pts w/confirmed VTE"_U_$P(STRING1,U,1)_U_U_$P(STRING2,U,1)_U_U_U_$P(STRING3,U,1)_U_U
D S^BGPMUDEL(X,1,1)
S X="# Excluded (Exc)"_U_$P(STRING1,U,4)_U_U_$P(STRING2,U,4)_U_U_U_$P(STRING3,U,4)
D S^BGPMUDEL(X,1,1)
S X="# Discharges for Pts w/confirmed VTE Less Exc"_U_($P(STRING1,U,1)-$P(STRING1,U,4))_U_U_($P(STRING2,U,1)-$P(STRING2,U,4))_U_U_U_($P(STRING3,U,1)-$P(STRING3,U,4))
D S^BGPMUDEL(X,1,1)
S X="# w/IV UFH therapy & platelet count"_U_$P(STRING1,U,2)_U_$J($P(STRING1,U,5),5,1)_U_$P(STRING2,U,2)_U_$J($P(STRING2,U,5),5,1)_U_$FN(PRD2,",+",1)_U_$P(STRING3,U,2)_U_$J($P(STRING3,U,5),5,1)_U_$FN(PRD3,",+",1)
D S^BGPMUDEL(X,2,1)
S X="# w/o IV UFH therapy & platelet count"_U_$P(STRING1,U,3)_U_$J($P(STRING1,U,6),5,1)_U_$P(STRING2,U,3)_U_$J($P(STRING2,U,6),5,1)_U_$FN(PRD4,",+",1)_U_$P(STRING3,U,3)_U_$J($P(STRING3,U,6),5,1)_U_$FN(PRD5,",+",1)
D S^BGPMUDEL(X,1,1)
I $D(BGPLIST(BGPIC)) D TC1
Q
TC1 ;Do the Details
N PT,NODE,NAME,BP
S X="**** CONFIDENTIAL PATIENT INFORMATION COVERED BY PRIVACY ACT ****" D S^BGPMUDEL(X,2,1)
S X="This measure assesses the number of patients diagnosed with confirmed VTE who" D S^BGPMUDEL(X,2,1)
S X="received intravenous (IV) UFH therapy dosages AND had their platelet counts" D S^BGPMUDEL(X,1,1)
S X="monitored using defined parameters such as a nomogram or protocol, if any." D S^BGPMUDEL(X,1,1)
S X="Patients who do not meet the numerator criteria are listed first (NM:), followed by patients who do meet the numerator criteria (M:). Excluded patients are listed last." D S^BGPMUDEL(X,2,1)
S X="The following are the abbreviations used in the denominator and numerator columns:" D S^BGPMUDEL(X,2,1)
S X="ADM=Admit date for Inpatient w/confirmed VTE receiving IV UFH therapy" D S^BGPMUDEL(X,1,1)
S X="MED=Start date of IV UFH therapy " D S^BGPMUDEL(X,1,1)
S X="LAB#=Date of Platelet Count Laboratory Test" D S^BGPMUDEL(X,1,1)
S X="PATIENT NAME"_U_"HRN"_U_"COMMUNITY"_U_"SEX"_U_"AGE"_U_"DENOMINATOR"_U_"NUMERATOR" D S^BGPMUDEL(X,2,1)
S PTCT=0
I (BGPLIST="A")!(BGPLIST="D")&($D(^TMP("BGPMU0374",$J,"PAT","C","NOT"))) D
.K BGPARR
.D PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0374"","_$J_",""PAT"",""C"",""NOT"")")
.S PT=0 F S PT=$O(BGPARR(PT)) Q:PT="" D
..S PTCT=PTCT+1
..S NODE=$G(BGPARR(PT))
..D D374(NODE)
I (BGPLIST="A")!(BGPLIST="N")&($D(^TMP("BGPMU0374",$J,"PAT","C","NUM"))) D
.K BGPARR
.D PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0374"","_$J_",""PAT"",""C"",""NUM"")")
.S PT=0 F S PT=$O(BGPARR(PT)) Q:PT="" D
..S PTCT=PTCT+1
..S NODE=$G(BGPARR(PT))
..D D374(NODE)
;Excluded patients
I BGPLIST="A"&($D(^TMP("BGPMU0374",$J,"PAT","C","EXC"))) D
.D PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0374"","_$J_",""PAT"",""C"",""EXC"")")
.S PT=0 F S PT=$O(BGPARR(PT)) Q:PT="" D
..S PTCT=PTCT+1
..S NODE=$G(BGPARR(PT))
..D DEXC374(NODE)
S X="Total # of patients on list: "_PTCT D S^BGPMUDEL(X,2,1)
Q
;
D373(NODE) ;
N BGPI,DATA,NAME,HRN,DEN,NUM,AGE,DFN,CNT,INR,INRDT,DD
S DFN=$P(NODE,U,1)
S NAME=$E($$GET1^DIQ(2,$P(NODE,U,1),.01),1,23)
S HRN=$$HRN^AUPNPAT(DFN,DUZ(2))
S AGE=$$AGE^AUPNPAT(DFN,BGPED)
S SEX=$$SEX^AUPNPAT(DFN)
S COMM=$E($$GET1^DIQ(9000001,DFN,1118),1,10)
S DEN=$P($P($P(NODE,U,2),";",1),":",1)
S CNT=$P(NODE,U,3),INR=$P(NODE,U,4),INRDT=$P(NODE,U,5)
S DD=$P(NODE,U,6)
S NUMDATA=$P(NODE,U,4) ;$P(UFHIP,U,2)_";"_PLATE1_";"_PLATE2_";"_PLATE3
S X=NAME_U_HRN_U_COMM_U_SEX_U_AGE_U_"ADM "_$$FMTE^XLFDT(DEN,2)_$S($L($P(NODE,"U",2),";")>1:";",1:"")_U_$S(CNT'="":"M:OVLP DAYS: "_CNT,1:"NM:")
I INR'="" S X=X_";INR: "_INR_" "_INRDT
I DD'="" S X=X_";RX:"_$$FMTE^XLFDT($P(DD,".",1),2)
D S^BGPMUDEL(X,1,1)
Q
D374(NODE) ;GET DATA
N BGPI,DATA,NAME,HRN,DEN,AGE,DFN,NUMDATA
S DFN=$P(NODE,U,1)
S NAME=$E($$GET1^DIQ(2,$P(NODE,U,1),.01),1,23)
S HRN=$$HRN^AUPNPAT(DFN,DUZ(2))
S AGE=$$AGE^AUPNPAT(DFN,BGPED)
S SEX=$$SEX^AUPNPAT(DFN)
S COMM=$E($$GET1^DIQ(9000001,DFN,1118),1,10)
S DEN=$P($P($P(NODE,U,2),";",1),":",1)
S NUMDATA=$P(NODE,U,5) ;$P(UFHIP,U,2)_";"_PLATE1_";"_PLATE2_";"_PLATE3
S X=NAME_U_HRN_U_COMM_U_SEX_U_AGE_U_"ADM "_$$FMTE^XLFDT(DEN,2)_$S($L($P(NODE,"U",2),";")>1:";",1:"")_U_$S(NUMDATA'="":"M:MED "_$$FMTE^XLFDT($P(NUMDATA,";",1),2),1:"NM:")
I NUMDATA'="" F I=1:1:3 D
.S X=X_";LAB"_I_" "_$$FMTE^XLFDT($P(NUMDATA,";",(I+1)),2)
D S^BGPMUDEL(X,1,1)
Q
DEXC374(NODE) ;GET DATA
D DEXC373(NODE)
Q
DEXC373(NODE) ;GET DATA
N BGPI,DATA,NAME,HRN,DEN,NUM,AGE,DFN
S DFN=$P(NODE,U,1)
S NAME=$E($$GET1^DIQ(2,$P(NODE,U,1),.01),1,23)
S HRN=$$HRN^AUPNPAT(DFN,DUZ(2))
S AGE=$$AGE^AUPNPAT(DFN,BGPED)
S SEX=$$SEX^AUPNPAT(DFN)
S COMM=$E($$GET1^DIQ(9000001,DFN,1118),1,10)
S DEN=$P($P($P(NODE,U,2),";",1),":",1)
S NUM=$P(NODE,U,3)
S X=NAME_U_HRN_U_COMM_U_SEX_U_AGE_U_"Excluded"
D S^BGPMUDEL(X,1,1)
Q
;
SUM373 ;Populate "BGPMU SUMMARY" for VTE-3 Measure 0373
;Initialize iCare/summary global
N BGPDNCNT,BGPSSTR,J,N
S J=$J
S BGPDNCNT=0
K ^TMP("BGPMU SUMMARY",J,BGPIC)
S ^TMP("BGPMU SUMMARY",J,BGPIC)="0373"_U_"VTE-3"
S N=1 ;only 1 numerator
;Setup summary page/iCare ^TMP global
S CDEN1CT=+$G(^TMP("BGPMU0373",J,"C","DEN")) ;current
S CNUM1CT=+$G(^TMP("BGPMU0373",J,"C","NUM"))
S CEXC1CT=+$G(^TMP("BGPMU0373",J,"C","EXC"))
S CMP=$S((CDEN1CT-CEXC1CT)>0:$$ROUND^BGPMUA01(CNUM1CT/(CDEN1CT-CEXC1CT),3)*100,1:0)
S PDEN1CT=+$G(^TMP("BGPMU0373",J,"P","DEN")) ;previous
S PNUM1CT=+$G(^TMP("BGPMU0373",J,"P","NUM"))
S PEXC1CT=+$G(^TMP("BGPMU0373",J,"P","EXC"))
S PMP=$S((PDEN1CT-PEXC1CT)>0:$$ROUND^BGPMUA01(PNUM1CT/(PDEN1CT-PEXC1CT),3)*100,1:0)
S BDEN1CT=+$G(^TMP("BGPMU0373",J,"B","DEN")) ;baseline
S BNUM1CT=+$G(^TMP("BGPMU0373",J,"B","NUM"))
S BEXC1CT=+$G(^TMP("BGPMU0373",J,"B","EXC"))
S BMP=$S((BDEN1CT-BEXC1CT)>0:$$ROUND^BGPMUA01(BNUM1CT/(BDEN1CT-BEXC1CT),3)*100,1:0)
S BGPDNCNT=BGPDNCNT+1
S BGPSSTR="MU.EP.0373."_N_U_"# w/overlap at discharge or INR>2"_U_CEXC1CT_U_CDEN1CT_U_CNUM1CT_U_CMP_U_U_U_U
; 11 12 13 14
S BGPSSTR=BGPSSTR_U_PEXC1CT_U_PDEN1CT_U_PNUM1CT_U_PMP
; 15 16 17 18
S BGPSSTR=BGPSSTR_U_BEXC1CT_U_BDEN1CT_U_BNUM1CT_U_BMP
S ^TMP("BGPMU SUMMARY",J,BGPIC,BGPDNCNT)=BGPSSTR
Q
SUM374 ;Populate "BGPMU SUMMARY" for VTE-4 Measure 0374
;Initialize iCare/summary global
N BGPDNCNT,BGPSSTR,J,N
S J=$J
S BGPDNCNT=0
K ^TMP("BGPMU SUMMARY",J,BGPIC)
S ^TMP("BGPMU SUMMARY",J,BGPIC)="0374"_U_"VTE-4"
S N=1 ;only 1 numerator
;Setup summary page/iCare ^TMP global
S CDEN1CT=+$G(^TMP("BGPMU0374",J,"C","DEN")) ;current
S CNUM1CT=+$G(^TMP("BGPMU0374",J,"C","NUM"))
S CEXC1CT=+$G(^TMP("BGPMU0374",J,"C","EXC"))
S CMP=$S((CDEN1CT-CEXC1CT)>0:$$ROUND^BGPMUA01(CNUM1CT/(CDEN1CT-CEXC1CT),3)*100,1:0)
S PDEN1CT=+$G(^TMP("BGPMU0374",J,"P","DEN")) ;previous
S PNUM1CT=+$G(^TMP("BGPMU0374",J,"P","NUM"))
S PEXC1CT=+$G(^TMP("BGPMU0374",J,"P","EXC"))
S PMP=$S((PDEN1CT-PEXC1CT)>0:$$ROUND^BGPMUA01(PNUM1CT/(PDEN1CT-PEXC1CT),3)*100,1:0)
S BDEN1CT=+$G(^TMP("BGPMU0374",J,"B","DEN")) ;baseline
S BNUM1CT=+$G(^TMP("BGPMU0374",J,"B","NUM"))
S BEXC1CT=+$G(^TMP("BGPMU0374",J,"B","EXC"))
S BMP=$S((BDEN1CT-BEXC1CT)>0:$$ROUND^BGPMUA01(BNUM1CT/(BDEN1CT-BEXC1CT),3)*100,1:0)
S BGPDNCNT=BGPDNCNT+1
S BGPSSTR="MU.EP.0374."_N_U_"# w/IV UFH therapy/platelet count"_U_CEXC1CT_U_CDEN1CT_U_CNUM1CT_U_CMP_U_U_U_U
; 11 12 13 14
S BGPSSTR=BGPSSTR_U_PEXC1CT_U_PDEN1CT_U_PNUM1CT_U_PMP
; 15 16 17 18
S BGPSSTR=BGPSSTR_U_BEXC1CT_U_BDEN1CT_U_BNUM1CT_U_BMP
S ^TMP("BGPMU SUMMARY",J,BGPIC,BGPDNCNT)=BGPSSTR
Q
;
XML0373 ;XML output for VTE Measure 0373
; BGPXML(i)=Population Number^Numerator Number^Denominator Count
N STRING
S STRING=$$373^BGPMUHP7("C")
S BGPXML(1)="NQF_0373"_U_U_+$P(STRING,U,1)_U_+$P(STRING,U,2)
K ^TMP("BGPMU0373",$J)
Q
;
XML0374 ;XML output for VTE Measure 0374
; BGPXML(i)=Population Number^Numerator Number^Denominator Count
N STRING
S STRING=$$374^BGPMUHP7("C")
S BGPXML(1)="NQF_0374"_U_U_+$P(STRING,U,1)_U_+$P(STRING,U,2)
K ^TMP("BGPMU0374",$J)
Q
BGPMUHD6 ; IHS/MSC/SAT - Delimited MU measure VTE3 and VTE4;07-Apr-2011 13:15;DU
+1 ;;14.1;IHS CLINICAL REPORTING;**1**;MAY 29, 2014;Build 2
+2 ;Delimited output
+3 ; STK2^BGPMUHD1 = delimited routine for 0435 STK-2 Antithrombolytic Therapy at discharge
+4 ; STK3^BGPMUHD1 = delimited routine for 0436 STK-3 Anticoagulation Therapy at discharge
+5 ; STK4^BGPMUHD2 = delimited routine for 0437 STK-4 thrombolytic therapy within 3 hours
+6 ; STK5^BGPMUHD2 = delimited routine for 0438 STK-5 Antithrombolytic Therapy by end of day 2
+7 ; STK6^BGPMUHD3 = delimited routine for 0439 STK-6 Statin Medicine at Discharge
+8 ; STK8^BGPMUHD3 = delimited routine for 0440 STK-8 Educational Materials at discharge
+9 ; STK10^BGPMUHD4 = delimited routine for 0441 STK-10 Rehabilitation Service at discharge
+10 ;
+11 ; VTE1^BGPMUHD5 = delimited routine for 0371 VTE-1 Prophylaxis within 24 hours
+12 ; VTE2^BGPMUHD5 = delimited routine for 0372 VTE-2 Prophylaxis for ICU pts
+13 ; VTE3^BGPMUHD6 = delimited routine for 0373 VTE-3 Anticoagulation overlap therapy
+14 ; VTE4^BGPMUHD6 = delimited routine for 0374 VTE-4 Platelet monitoring for UFH
+15 ; VTE5^BGPMUHD7 = delimited routine for 0375 VTE-5 VTE discharge instructions
+16 ; VTE6^BGPMUHD7 = delimited routine for 0376 VTE-6 Potentially preventable VTE
+17 ;Delimited output for VTE Measure 0373
VTE3 ;EP
+1 DO P1B
+2 KILL ^TMP("BGPMU0373",$JOB)
+3 QUIT
P1B ;Write individual measure
+1 NEW BGPPTYPE,X,Y,Z,DEN,NUM,PC,STRING1,STRING2,PRD,PRN,PRD1,PRD6,PRN1
+2 SET BGPPROV=""
+3 SET BGPPTYPE="D"
+4 SET STRING1=$$373^BGPMUHP7("C")
+5 SET STRING2=$$373^BGPMUHP7("P")
+6 SET STRING3=$$373^BGPMUHP7("B")
+7 DO SUM373
+8 SET PRD1=$PIECE(STRING1,U,1)-$PIECE(STRING2,U,1)
+9 SET PRD2=$PIECE(STRING1,U,5)-$PIECE(STRING2,U,5)
+10 SET PRD3=$PIECE(STRING1,U,5)-$PIECE(STRING3,U,5)
+11 SET PRD4=$PIECE(STRING1,U,6)-$PIECE(STRING2,U,6)
+12 SET PRD5=$PIECE(STRING1,U,6)-$PIECE(STRING3,U,6)
+13 IF $PIECE(STRING3,U,1)'=0
SET PRD6=$$ROUND^BGPMUA01(($PIECE(STRING1,U,1)/$PIECE(STRING3,U,1)),3)*100
+14 IF '$TEST
SET PRD6=0
+15 SET X=U_"REPORT PERIOD"_U_"%"_U_"PREV YR PERIOD"_U_"%"_U_"CHG FROM PREV YR"_U_"BASE YR"_U_"%"_U_"CHG FROM BASE %"
+16 DO S^BGPMUDEL(X,1,1)
+17 SET X="# Discharges for Pts w/confirmed VTE"_U_$PIECE(STRING1,U,1)_U_U_$PIECE(STRING2,U,1)_U_U_U_$PIECE(STRING3,U,1)_U_U
+18 DO S^BGPMUDEL(X,1,1)
+19 SET X="# Excluded (Exc)"_U_$PIECE(STRING1,U,4)_U_U_$PIECE(STRING2,U,4)_U_U_U_$PIECE(STRING3,U,4)
+20 DO S^BGPMUDEL(X,1,1)
+21 SET X="# Discharges for Pts w/confirmed VTE Less Exc"_U_($PIECE(STRING1,U,1)-$PIECE(STRING1,U,4))_U_U_($PIECE(STRING2,U,1)-$PIECE(STRING2,U,4))_U_U_U_($PIECE(STRING3,U,1)-$PIECE(STRING3,U,4))
+22 DO S^BGPMUDEL(X,1,1)
+23 SET X="# w/overlap therapy at discharge"_U_$PIECE(STRING1,U,2)_U_$JUSTIFY($PIECE(STRING1,U,5),5,1)_U_$PIECE(STRING2,U,2)_U_$JUSTIFY($PIECE(STRING2,U,5),5,1)_U_$FNUMBER(PRD2,",+",1)_U_$PIECE(STRING3,U,2)_U_$JUSTIFY(...
... $PIECE(STRING3,U,5),5,1)_U_$FNUMBER(PRD3,",+",1)
+24 DO S^BGPMUDEL(X,2,1)
+25 SET X="# w/o overlap therapy at discharge"_U_$PIECE(STRING1,U,3)_U_$JUSTIFY($PIECE(STRING1,U,6),5,1)_U_$PIECE(STRING2,U,3)_U_$JUSTIFY($PIECE(STRING2,U,6),5,1)_U_$FNUMBER(PRD4,",+",1)_U_$PIECE(STRING3,U,3)_U_$JUSTIFY(...
... $PIECE(STRING3,U,6),5,1)_U_$FNUMBER(PRD5,",+",1)
+26 DO S^BGPMUDEL(X,1,1)
+27 IF $DATA(BGPLIST(BGPIC))
DO TC
+28 QUIT
TC ;Do the Details
+1 NEW PT,NODE,NAME,BP
+2 SET X="**** CONFIDENTIAL PATIENT INFORMATION COVERED BY PRIVACY ACT ****"
DO S^BGPMUDEL(X,2,1)
+3 SET X="This measure assesses the number of patients diagnosed with confirmed VTE who"
DO S^BGPMUDEL(X,2,1)
+4 SET X="received an overlap of parenteral (intravenous [IV] or subcutaneous [subcu])"
DO S^BGPMUDEL(X,1,1)
+5 SET X="anticoagulation and warfarin therapy. For patients who received less than 5 days"
DO S^BGPMUDEL(X,1,1)
+6 SET X="of overlap therapy, they must be discharged on both medications. Overlap therapy"
DO S^BGPMUDEL(X,1,1)
+7 SET X="must be administered for at least 5 days with an international normalized"
DO S^BGPMUDEL(X,1,1)
+8 SET X="ratio (INR) >= 2 prior to discontinuation of the parenteral anticoagulation therapy"
DO S^BGPMUDEL(X,1,1)
+9 SET X="or the patient must be discharged on both medications, if any."
DO S^BGPMUDEL(X,1,1)
+10 SET X="Patients who do not meet the numerator criteria are listed first (NM:), followed by patients who do meet the numerator criteria (M:). Excluded patients are listed last."
+11 DO S^BGPMUDEL(X,2,1)
+12 SET X="The following are the abbreviations used in the denominator and numerator columns:"
+13 DO S^BGPMUDEL(X,2,1)
+14 SET X="ADM=Admit Date for Inpatient w/confirmed VTE who received warfarin"
DO S^BGPMUDEL(X,1,1)
+15 SET X="OVLP DAYS=Number of inpt overlap days"
DO S^BGPMUDEL(X,1,1)
+16 SET X="INR=Last INR before discharge"
DO S^BGPMUDEL(X,1,1)
+17 SET X="RX=Discharged on overlap therapy"
DO S^BGPMUDEL(X,1,1)
+18 ;
+19 SET X="PATIENT NAME"_U_"HRN"_U_"COMMUNITY"_U_"SEX"_U_"AGE"_U_"DENOMINATOR"_U_"NUMERATOR"
DO S^BGPMUDEL(X,2,1)
+20 SET PTCT=0
+21 IF (BGPLIST="A")!(BGPLIST="D")&($DATA(^TMP("BGPMU0373",$JOB,"PAT","C","NOT")))
Begin DoDot:1
+22 KILL BGPARR
+23 DO PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0373"","_$JOB_",""PAT"",""C"",""NOT"")")
+24 SET PT=0
FOR
SET PT=$ORDER(BGPARR(PT))
IF PT=""
QUIT
Begin DoDot:2
+25 SET PTCT=PTCT+1
+26 SET NODE=$GET(BGPARR(PT))
+27 DO D373(NODE)
End DoDot:2
End DoDot:1
+28 IF (BGPLIST="A")!(BGPLIST="N")&($DATA(^TMP("BGPMU0373",$JOB,"PAT","C","NUM")))
Begin DoDot:1
+29 KILL BGPARR
+30 DO PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0373"","_$JOB_",""PAT"",""C"",""NUM"")")
+31 SET PT=0
FOR
SET PT=$ORDER(BGPARR(PT))
IF PT=""
QUIT
Begin DoDot:2
+32 SET PTCT=PTCT+1
+33 SET NODE=$GET(BGPARR(PT))
+34 DO D373(NODE)
End DoDot:2
End DoDot:1
+35 ;Excluded patients
+36 IF BGPLIST="A"&($DATA(^TMP("BGPMU0373",$JOB,"PAT","C","EXC")))
Begin DoDot:1
+37 DO PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0373"","_$JOB_",""PAT"",""C"",""EXC"")")
+38 SET PT=0
FOR
SET PT=$ORDER(BGPARR(PT))
IF PT=""
QUIT
Begin DoDot:2
+39 SET PTCT=PTCT+1
+40 SET NODE=$GET(BGPARR(PT))
+41 DO DEXC373(NODE)
End DoDot:2
End DoDot:1
+42 SET X="Total # of patients on list: "_PTCT
DO S^BGPMUDEL(X,2,1)
+43 QUIT
+44 ;
+45 ;Delimited output for VTE Measure 0374
VTE4 ;EP
+1 DO P1
+2 KILL ^TMP("BGPMU0374",$JOB)
+3 QUIT
P1 ;Write individual measure
+1 NEW BGPPTYPE,X,Y,Z,DEN,NUM,PC,STRING1,STRING2,PRD,PRN,PRD1,PRD6,PRN1
+2 SET BGPPROV=""
+3 SET BGPPTYPE="D"
+4 SET STRING1=$$374^BGPMUHP7("C")
+5 SET STRING2=$$374^BGPMUHP7("P")
+6 SET STRING3=$$374^BGPMUHP7("B")
+7 DO SUM374
+8 SET PRD1=$PIECE(STRING1,U,1)-$PIECE(STRING2,U,1)
+9 SET PRD2=$PIECE(STRING1,U,5)-$PIECE(STRING2,U,5)
+10 SET PRD3=$PIECE(STRING1,U,5)-$PIECE(STRING3,U,5)
+11 SET PRD4=$PIECE(STRING1,U,6)-$PIECE(STRING2,U,6)
+12 SET PRD5=$PIECE(STRING1,U,6)-$PIECE(STRING3,U,6)
+13 IF $PIECE(STRING3,U,1)'=0
SET PRD6=$$ROUND^BGPMUA01(($PIECE(STRING1,U,1)/$PIECE(STRING3,U,1)),3)*100
+14 IF '$TEST
SET PRD6=0
+15 SET X=U_"REPORT PERIOD"_U_"%"_U_"PREV YR PERIOD"_U_"%"_U_"CHG FROM PREV YR"_U_"BASE YR"_U_"%"_U_"CHG FROM BASE %"
+16 DO S^BGPMUDEL(X,1,1)
+17 SET X="# Discharges for Pts w/confirmed VTE"_U_$PIECE(STRING1,U,1)_U_U_$PIECE(STRING2,U,1)_U_U_U_$PIECE(STRING3,U,1)_U_U
+18 DO S^BGPMUDEL(X,1,1)
+19 SET X="# Excluded (Exc)"_U_$PIECE(STRING1,U,4)_U_U_$PIECE(STRING2,U,4)_U_U_U_$PIECE(STRING3,U,4)
+20 DO S^BGPMUDEL(X,1,1)
+21 SET X="# Discharges for Pts w/confirmed VTE Less Exc"_U_($PIECE(STRING1,U,1)-$PIECE(STRING1,U,4))_U_U_($PIECE(STRING2,U,1)-$PIECE(STRING2,U,4))_U_U_U_($PIECE(STRING3,U,1)-$PIECE(STRING3,U,4))
+22 DO S^BGPMUDEL(X,1,1)
+23 SET X="# w/IV UFH therapy & platelet count"_U_$PIECE(STRING1,U,2)_U_$JUSTIFY($PIECE(STRING1,U,5),5,1)_U_$PIECE(STRING2,U,2)_U_$JUSTIFY($PIECE(STRING2,U,5),5,1)_U_$FNUMBER(PRD2,",+",1)_U_$PIECE(STRING3,U,2)_U_...
... $JUSTIFY($PIECE(STRING3,U,5),5,1)_U_$FNUMBER(PRD3,",+",1)
+24 DO S^BGPMUDEL(X,2,1)
+25 SET X="# w/o IV UFH therapy & platelet count"_U_$PIECE(STRING1,U,3)_U_$JUSTIFY($PIECE(STRING1,U,6),5,1)_U_$PIECE(STRING2,U,3)_U_$JUSTIFY($PIECE(STRING2,U,6),5,1)_U_$FNUMBER(PRD4,",+",1)_U_$PIECE(STRING3,U,3)_U_...
... $JUSTIFY($PIECE(STRING3,U,6),5,1)_U_$FNUMBER(PRD5,",+",1)
+26 DO S^BGPMUDEL(X,1,1)
+27 IF $DATA(BGPLIST(BGPIC))
DO TC1
+28 QUIT
TC1 ;Do the Details
+1 NEW PT,NODE,NAME,BP
+2 SET X="**** CONFIDENTIAL PATIENT INFORMATION COVERED BY PRIVACY ACT ****"
DO S^BGPMUDEL(X,2,1)
+3 SET X="This measure assesses the number of patients diagnosed with confirmed VTE who"
DO S^BGPMUDEL(X,2,1)
+4 SET X="received intravenous (IV) UFH therapy dosages AND had their platelet counts"
DO S^BGPMUDEL(X,1,1)
+5 SET X="monitored using defined parameters such as a nomogram or protocol, if any."
DO S^BGPMUDEL(X,1,1)
+6 SET X="Patients who do not meet the numerator criteria are listed first (NM:), followed by patients who do meet the numerator criteria (M:). Excluded patients are listed last."
DO S^BGPMUDEL(X,2,1)
+7 SET X="The following are the abbreviations used in the denominator and numerator columns:"
DO S^BGPMUDEL(X,2,1)
+8 SET X="ADM=Admit date for Inpatient w/confirmed VTE receiving IV UFH therapy"
DO S^BGPMUDEL(X,1,1)
+9 SET X="MED=Start date of IV UFH therapy "
DO S^BGPMUDEL(X,1,1)
+10 SET X="LAB#=Date of Platelet Count Laboratory Test"
DO S^BGPMUDEL(X,1,1)
+11 SET X="PATIENT NAME"_U_"HRN"_U_"COMMUNITY"_U_"SEX"_U_"AGE"_U_"DENOMINATOR"_U_"NUMERATOR"
DO S^BGPMUDEL(X,2,1)
+12 SET PTCT=0
+13 IF (BGPLIST="A")!(BGPLIST="D")&($DATA(^TMP("BGPMU0374",$JOB,"PAT","C","NOT")))
Begin DoDot:1
+14 KILL BGPARR
+15 DO PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0374"","_$JOB_",""PAT"",""C"",""NOT"")")
+16 SET PT=0
FOR
SET PT=$ORDER(BGPARR(PT))
IF PT=""
QUIT
Begin DoDot:2
+17 SET PTCT=PTCT+1
+18 SET NODE=$GET(BGPARR(PT))
+19 DO D374(NODE)
End DoDot:2
End DoDot:1
+20 IF (BGPLIST="A")!(BGPLIST="N")&($DATA(^TMP("BGPMU0374",$JOB,"PAT","C","NUM")))
Begin DoDot:1
+21 KILL BGPARR
+22 DO PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0374"","_$JOB_",""PAT"",""C"",""NUM"")")
+23 SET PT=0
FOR
SET PT=$ORDER(BGPARR(PT))
IF PT=""
QUIT
Begin DoDot:2
+24 SET PTCT=PTCT+1
+25 SET NODE=$GET(BGPARR(PT))
+26 DO D374(NODE)
End DoDot:2
End DoDot:1
+27 ;Excluded patients
+28 IF BGPLIST="A"&($DATA(^TMP("BGPMU0374",$JOB,"PAT","C","EXC")))
Begin DoDot:1
+29 DO PTLSORT^BGPMUUTL(.BGPARR,"^TMP(""BGPMU0374"","_$JOB_",""PAT"",""C"",""EXC"")")
+30 SET PT=0
FOR
SET PT=$ORDER(BGPARR(PT))
IF PT=""
QUIT
Begin DoDot:2
+31 SET PTCT=PTCT+1
+32 SET NODE=$GET(BGPARR(PT))
+33 DO DEXC374(NODE)
End DoDot:2
End DoDot:1
+34 SET X="Total # of patients on list: "_PTCT
DO S^BGPMUDEL(X,2,1)
+35 QUIT
+36 ;
D373(NODE) ;
+1 NEW BGPI,DATA,NAME,HRN,DEN,NUM,AGE,DFN,CNT,INR,INRDT,DD
+2 SET DFN=$PIECE(NODE,U,1)
+3 SET NAME=$EXTRACT($$GET1^DIQ(2,$PIECE(NODE,U,1),.01),1,23)
+4 SET HRN=$$HRN^AUPNPAT(DFN,DUZ(2))
+5 SET AGE=$$AGE^AUPNPAT(DFN,BGPED)
+6 SET SEX=$$SEX^AUPNPAT(DFN)
+7 SET COMM=$EXTRACT($$GET1^DIQ(9000001,DFN,1118),1,10)
+8 SET DEN=$PIECE($PIECE($PIECE(NODE,U,2),";",1),":",1)
+9 SET CNT=$PIECE(NODE,U,3)
SET INR=$PIECE(NODE,U,4)
SET INRDT=$PIECE(NODE,U,5)
+10 SET DD=$PIECE(NODE,U,6)
+11 ;$P(UFHIP,U,2)_";"_PLATE1_";"_PLATE2_";"_PLATE3
SET NUMDATA=$PIECE(NODE,U,4)
+12 SET X=NAME_U_HRN_U_COMM_U_SEX_U_AGE_U_"ADM "_$$FMTE^XLFDT(DEN,2)_$SELECT($LENGTH($PIECE(NODE,"U",2),";")>1:";",1:"")_U_$SELECT(CNT'="":"M:OVLP DAYS: "_CNT,1:"NM:")
+13 IF INR'=""
SET X=X_";INR: "_INR_" "_INRDT
+14 IF DD'=""
SET X=X_";RX:"_$$FMTE^XLFDT($PIECE(DD,".",1),2)
+15 DO S^BGPMUDEL(X,1,1)
+16 QUIT
D374(NODE) ;GET DATA
+1 NEW BGPI,DATA,NAME,HRN,DEN,AGE,DFN,NUMDATA
+2 SET DFN=$PIECE(NODE,U,1)
+3 SET NAME=$EXTRACT($$GET1^DIQ(2,$PIECE(NODE,U,1),.01),1,23)
+4 SET HRN=$$HRN^AUPNPAT(DFN,DUZ(2))
+5 SET AGE=$$AGE^AUPNPAT(DFN,BGPED)
+6 SET SEX=$$SEX^AUPNPAT(DFN)
+7 SET COMM=$EXTRACT($$GET1^DIQ(9000001,DFN,1118),1,10)
+8 SET DEN=$PIECE($PIECE($PIECE(NODE,U,2),";",1),":",1)
+9 ;$P(UFHIP,U,2)_";"_PLATE1_";"_PLATE2_";"_PLATE3
SET NUMDATA=$PIECE(NODE,U,5)
+10 SET X=NAME_U_HRN_U_COMM_U_SEX_U_AGE_U_"ADM "_$$FMTE^XLFDT(DEN,2)_$SELECT($LENGTH($PIECE(NODE,"U",2),";")>1:";",1:"")_U_$SELECT(NUMDATA'="":"M:MED "_$$FMTE^XLFDT($PIECE(NUMDATA,";",1),2),1:"NM:")
+11 IF NUMDATA'=""
FOR I=1:1:3
Begin DoDot:1
+12 SET X=X_";LAB"_I_" "_$$FMTE^XLFDT($PIECE(NUMDATA,";",(I+1)),2)
End DoDot:1
+13 DO S^BGPMUDEL(X,1,1)
+14 QUIT
DEXC374(NODE) ;GET DATA
+1 DO DEXC373(NODE)
+2 QUIT
DEXC373(NODE) ;GET DATA
+1 NEW BGPI,DATA,NAME,HRN,DEN,NUM,AGE,DFN
+2 SET DFN=$PIECE(NODE,U,1)
+3 SET NAME=$EXTRACT($$GET1^DIQ(2,$PIECE(NODE,U,1),.01),1,23)
+4 SET HRN=$$HRN^AUPNPAT(DFN,DUZ(2))
+5 SET AGE=$$AGE^AUPNPAT(DFN,BGPED)
+6 SET SEX=$$SEX^AUPNPAT(DFN)
+7 SET COMM=$EXTRACT($$GET1^DIQ(9000001,DFN,1118),1,10)
+8 SET DEN=$PIECE($PIECE($PIECE(NODE,U,2),";",1),":",1)
+9 SET NUM=$PIECE(NODE,U,3)
+10 SET X=NAME_U_HRN_U_COMM_U_SEX_U_AGE_U_"Excluded"
+11 DO S^BGPMUDEL(X,1,1)
+12 QUIT
+13 ;
SUM373 ;Populate "BGPMU SUMMARY" for VTE-3 Measure 0373
+1 ;Initialize iCare/summary global
+2 NEW BGPDNCNT,BGPSSTR,J,N
+3 SET J=$JOB
+4 SET BGPDNCNT=0
+5 KILL ^TMP("BGPMU SUMMARY",J,BGPIC)
+6 SET ^TMP("BGPMU SUMMARY",J,BGPIC)="0373"_U_"VTE-3"
+7 ;only 1 numerator
SET N=1
+8 ;Setup summary page/iCare ^TMP global
+9 ;current
SET CDEN1CT=+$GET(^TMP("BGPMU0373",J,"C","DEN"))
+10 SET CNUM1CT=+$GET(^TMP("BGPMU0373",J,"C","NUM"))
+11 SET CEXC1CT=+$GET(^TMP("BGPMU0373",J,"C","EXC"))
+12 SET CMP=$SELECT((CDEN1CT-CEXC1CT)>0:$$ROUND^BGPMUA01(CNUM1CT/(CDEN1CT-CEXC1CT),3)*100,1:0)
+13 ;previous
SET PDEN1CT=+$GET(^TMP("BGPMU0373",J,"P","DEN"))
+14 SET PNUM1CT=+$GET(^TMP("BGPMU0373",J,"P","NUM"))
+15 SET PEXC1CT=+$GET(^TMP("BGPMU0373",J,"P","EXC"))
+16 SET PMP=$SELECT((PDEN1CT-PEXC1CT)>0:$$ROUND^BGPMUA01(PNUM1CT/(PDEN1CT-PEXC1CT),3)*100,1:0)
+17 ;baseline
SET BDEN1CT=+$GET(^TMP("BGPMU0373",J,"B","DEN"))
+18 SET BNUM1CT=+$GET(^TMP("BGPMU0373",J,"B","NUM"))
+19 SET BEXC1CT=+$GET(^TMP("BGPMU0373",J,"B","EXC"))
+20 SET BMP=$SELECT((BDEN1CT-BEXC1CT)>0:$$ROUND^BGPMUA01(BNUM1CT/(BDEN1CT-BEXC1CT),3)*100,1:0)
+21 SET BGPDNCNT=BGPDNCNT+1
+22 SET BGPSSTR="MU.EP.0373."_N_U_"# w/overlap at discharge or INR>2"_U_CEXC1CT_U_CDEN1CT_U_CNUM1CT_U_CMP_U_U_U_U
+23 ; 11 12 13 14
+24 SET BGPSSTR=BGPSSTR_U_PEXC1CT_U_PDEN1CT_U_PNUM1CT_U_PMP
+25 ; 15 16 17 18
+26 SET BGPSSTR=BGPSSTR_U_BEXC1CT_U_BDEN1CT_U_BNUM1CT_U_BMP
+27 SET ^TMP("BGPMU SUMMARY",J,BGPIC,BGPDNCNT)=BGPSSTR
+28 QUIT
SUM374 ;Populate "BGPMU SUMMARY" for VTE-4 Measure 0374
+1 ;Initialize iCare/summary global
+2 NEW BGPDNCNT,BGPSSTR,J,N
+3 SET J=$JOB
+4 SET BGPDNCNT=0
+5 KILL ^TMP("BGPMU SUMMARY",J,BGPIC)
+6 SET ^TMP("BGPMU SUMMARY",J,BGPIC)="0374"_U_"VTE-4"
+7 ;only 1 numerator
SET N=1
+8 ;Setup summary page/iCare ^TMP global
+9 ;current
SET CDEN1CT=+$GET(^TMP("BGPMU0374",J,"C","DEN"))
+10 SET CNUM1CT=+$GET(^TMP("BGPMU0374",J,"C","NUM"))
+11 SET CEXC1CT=+$GET(^TMP("BGPMU0374",J,"C","EXC"))
+12 SET CMP=$SELECT((CDEN1CT-CEXC1CT)>0:$$ROUND^BGPMUA01(CNUM1CT/(CDEN1CT-CEXC1CT),3)*100,1:0)
+13 ;previous
SET PDEN1CT=+$GET(^TMP("BGPMU0374",J,"P","DEN"))
+14 SET PNUM1CT=+$GET(^TMP("BGPMU0374",J,"P","NUM"))
+15 SET PEXC1CT=+$GET(^TMP("BGPMU0374",J,"P","EXC"))
+16 SET PMP=$SELECT((PDEN1CT-PEXC1CT)>0:$$ROUND^BGPMUA01(PNUM1CT/(PDEN1CT-PEXC1CT),3)*100,1:0)
+17 ;baseline
SET BDEN1CT=+$GET(^TMP("BGPMU0374",J,"B","DEN"))
+18 SET BNUM1CT=+$GET(^TMP("BGPMU0374",J,"B","NUM"))
+19 SET BEXC1CT=+$GET(^TMP("BGPMU0374",J,"B","EXC"))
+20 SET BMP=$SELECT((BDEN1CT-BEXC1CT)>0:$$ROUND^BGPMUA01(BNUM1CT/(BDEN1CT-BEXC1CT),3)*100,1:0)
+21 SET BGPDNCNT=BGPDNCNT+1
+22 SET BGPSSTR="MU.EP.0374."_N_U_"# w/IV UFH therapy/platelet count"_U_CEXC1CT_U_CDEN1CT_U_CNUM1CT_U_CMP_U_U_U_U
+23 ; 11 12 13 14
+24 SET BGPSSTR=BGPSSTR_U_PEXC1CT_U_PDEN1CT_U_PNUM1CT_U_PMP
+25 ; 15 16 17 18
+26 SET BGPSSTR=BGPSSTR_U_BEXC1CT_U_BDEN1CT_U_BNUM1CT_U_BMP
+27 SET ^TMP("BGPMU SUMMARY",J,BGPIC,BGPDNCNT)=BGPSSTR
+28 QUIT
+29 ;
XML0373 ;XML output for VTE Measure 0373
+1 ; BGPXML(i)=Population Number^Numerator Number^Denominator Count
+2 NEW STRING
+3 SET STRING=$$373^BGPMUHP7("C")
+4 SET BGPXML(1)="NQF_0373"_U_U_+$PIECE(STRING,U,1)_U_+$PIECE(STRING,U,2)
+5 KILL ^TMP("BGPMU0373",$JOB)
+6 QUIT
+7 ;
XML0374 ;XML output for VTE Measure 0374
+1 ; BGPXML(i)=Population Number^Numerator Number^Denominator Count
+2 NEW STRING
+3 SET STRING=$$374^BGPMUHP7("C")
+4 SET BGPXML(1)="NQF_0374"_U_U_+$PIECE(STRING,U,1)_U_+$PIECE(STRING,U,2)
+5 KILL ^TMP("BGPMU0374",$JOB)
+6 QUIT