BKMVQCR1 ;PRXM/HC/BWF - BKMV Quality of Care Report; [ 1/19/2005 7:16 PM ]
;;2.1;HIV MANAGEMENT SYSTEM;;Feb 07, 2011
; Quality of Care Audit Report
Q
CD4CHK ; EP - CD4 algorithm
N HIVDT,SITETAX,SITETAX1,LOINTAX,LOINTAX1,CPTTAX,CPTTAX1,GLOBAL,GLOBAL2,TOTPTS,DFN
S HIVDT=$$FMADD^XLFDT(EDATE,-183)
S SITETAX="BGP CD4 TAX"
S SITETAX1="BKMV CD4 ABS TESTS TAX"
S LOINTAX="BGP CD4 LOINC CODES"
S LOINTAX1="BKMV CD4 ABS LOINC CODES"
S CPTTAX="BGP CD4 CPTS"
S CPTTAX1="BKMV CD4 ABS CPTS"
S GLOBAL="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""CD4ALL"",VSTDT,TEST)"
S GLOBAL2="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""CD4ABS"",VSTDT,TEST)"
S TOTPTS="^TMP(""BKMVQCR"",$J,""HIVCHK"",""CD4PTCNT"")"
S DFN=0,@TOTPTS=0
F S DFN=$O(^TMP("BKMVQCR",$J,"HIVCHK",DFN)) Q:'DFN D
.D CPTTAX^BKMIXX(DFN,CPTTAX,EDATE,HIVDT,GLOBAL)
.D CPTTAX^BKMIXX(DFN,CPTTAX1,EDATE,HIVDT,GLOBAL2)
.D LOINC^BKMIXX(DFN,LOINTAX,EDATE,HIVDT,GLOBAL)
.D LOINC^BKMIXX(DFN,LOINTAX1,EDATE,HIVDT,GLOBAL2)
.D LABTAX^BKMIXX(DFN,SITETAX,EDATE,HIVDT,GLOBAL)
.D LABTAX^BKMIXX(DFN,SITETAX1,EDATE,HIVDT,GLOBAL2)
.I $D(^TMP("BKMVQCR",$J,"HIVCHK",DFN,"CD4ALL"))!$D(^TMP("BKMVQCR",$J,"HIVCHK",DFN,"CD4ABS")) S @TOTPTS=@TOTPTS+1
Q
VRLLD ; EP - Viral Load Check
N VRLDT,SITETAX,LOINTAX,CPTTAX,GLOBAL,GLOBAL2,TOTPTS,DFN
S VRLDT=$$FMADD^XLFDT(EDATE,-183)
S SITETAX="BGP HIV VIRAL LOAD TAX"
S LOINTAX="BGP VIRAL LOAD LOINC CODES"
S CPTTAX="BGP HIV VIRAL LOAD CPTS"
S GLOBAL="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""VRL"",VSTDT,TEST)"
S TOTPTS="^TMP(""BKMVQCR"",$J,""HIVCHK"",""VRLPTCNT"")"
S DFN=0,@TOTPTS=0
F S DFN=$O(^TMP("BKMVQCR",$J,"HIVCHK",DFN)) Q:'DFN D
.D CPTTAX^BKMIXX(DFN,CPTTAX,EDATE,VRLDT,GLOBAL)
.D LOINC^BKMIXX(DFN,LOINTAX,EDATE,VRLDT,GLOBAL)
.D LABTAX^BKMIXX(DFN,SITETAX,EDATE,VRLDT,GLOBAL)
.I $D(^TMP("BKMVQCR",$J,"HIVCHK",DFN,"VRL")) S @TOTPTS=@TOTPTS+1
Q
RPR ; EP - Rapid Plasma Reagin tests
N RPRDT,SITETAX,LOINTAX,CPTTAX,GLOBAL,GLOBAL2,REFGLOB,TOTPTS,DFN
N SITETAX1,LOINTAX1,CPTTAX1
S RPRDT=$$FMADD^XLFDT(EDATE,-365)
S SITETAX="BKM RPR TAX"
S LOINTAX="BKM RPR LOINC CODES"
S CPTTAX="BKM RPR CPTS"
S SITETAX1="BKM FTA-ABS TEST TAX"
S LOINTAX1="BKM FTA-ABS LOINC CODES"
S CPTTAX1="BKM FTA-ABS CPTS"
S GLOBAL="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""RPR"",VSTDT,TEST)"
S REFGLOB="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""RPRREF"",VSTDT,TEST)"
S TOTPTS="^TMP(""BKMVQCR"",$J,""HIVCHK"",""RPRPTCNT"")"
S DFN=0,@TOTPTS=0
F S DFN=$O(^TMP("BKMVQCR",$J,"HIVCHK",DFN)) Q:'DFN D
.D CPTTAX^BKMIXX(DFN,CPTTAX,EDATE,RPRDT,GLOBAL)
.D LOINC^BKMIXX(DFN,LOINTAX,EDATE,RPRDT,GLOBAL)
.D LABTAX^BKMIXX(DFN,SITETAX,EDATE,RPRDT,GLOBAL)
.D CPTTAX^BKMIXX(DFN,CPTTAX1,EDATE,RPRDT,GLOBAL)
.D LOINC^BKMIXX(DFN,LOINTAX1,EDATE,RPRDT,GLOBAL)
.D LABTAX^BKMIXX(DFN,SITETAX1,EDATE,RPRDT,GLOBAL)
.D REFUSAL^BKMIXX2(DFN,60,LOINTAX,EDATE,RPRDT,REFGLOB)
.D REFUSAL^BKMIXX2(DFN,60,SITETAX,EDATE,RPRDT,REFGLOB)
.D REFUSAL^BKMIXX2(DFN,60,LOINTAX1,EDATE,RPRDT,REFGLOB)
.D REFUSAL^BKMIXX2(DFN,60,SITETAX1,EDATE,RPRDT,REFGLOB)
.I $D(^TMP("BKMVQCR",$J,"HIVCHK",DFN,"RPR"))!$D(^TMP("BKMVQCR",$J,"HIVCHK",DFN,"RPRREF")) S @TOTPTS=@TOTPTS+1
Q
BKMVQCR1 ;PRXM/HC/BWF - BKMV Quality of Care Report; [ 1/19/2005 7:16 PM ]
+1 ;;2.1;HIV MANAGEMENT SYSTEM;;Feb 07, 2011
+2 ; Quality of Care Audit Report
+3 QUIT
CD4CHK ; EP - CD4 algorithm
+1 NEW HIVDT,SITETAX,SITETAX1,LOINTAX,LOINTAX1,CPTTAX,CPTTAX1,GLOBAL,GLOBAL2,TOTPTS,DFN
+2 SET HIVDT=$$FMADD^XLFDT(EDATE,-183)
+3 SET SITETAX="BGP CD4 TAX"
+4 SET SITETAX1="BKMV CD4 ABS TESTS TAX"
+5 SET LOINTAX="BGP CD4 LOINC CODES"
+6 SET LOINTAX1="BKMV CD4 ABS LOINC CODES"
+7 SET CPTTAX="BGP CD4 CPTS"
+8 SET CPTTAX1="BKMV CD4 ABS CPTS"
+9 SET GLOBAL="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""CD4ALL"",VSTDT,TEST)"
+10 SET GLOBAL2="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""CD4ABS"",VSTDT,TEST)"
+11 SET TOTPTS="^TMP(""BKMVQCR"",$J,""HIVCHK"",""CD4PTCNT"")"
+12 SET DFN=0
SET @TOTPTS=0
+13 FOR
SET DFN=$ORDER(^TMP("BKMVQCR",$JOB,"HIVCHK",DFN))
IF 'DFN
QUIT
Begin DoDot:1
+14 DO CPTTAX^BKMIXX(DFN,CPTTAX,EDATE,HIVDT,GLOBAL)
+15 DO CPTTAX^BKMIXX(DFN,CPTTAX1,EDATE,HIVDT,GLOBAL2)
+16 DO LOINC^BKMIXX(DFN,LOINTAX,EDATE,HIVDT,GLOBAL)
+17 DO LOINC^BKMIXX(DFN,LOINTAX1,EDATE,HIVDT,GLOBAL2)
+18 DO LABTAX^BKMIXX(DFN,SITETAX,EDATE,HIVDT,GLOBAL)
+19 DO LABTAX^BKMIXX(DFN,SITETAX1,EDATE,HIVDT,GLOBAL2)
+20 IF $DATA(^TMP("BKMVQCR",$JOB,"HIVCHK",DFN,"CD4ALL"))!$DATA(^TMP("BKMVQCR",$JOB,"HIVCHK",DFN,"CD4ABS"))
SET @TOTPTS=@TOTPTS+1
End DoDot:1
+21 QUIT
VRLLD ; EP - Viral Load Check
+1 NEW VRLDT,SITETAX,LOINTAX,CPTTAX,GLOBAL,GLOBAL2,TOTPTS,DFN
+2 SET VRLDT=$$FMADD^XLFDT(EDATE,-183)
+3 SET SITETAX="BGP HIV VIRAL LOAD TAX"
+4 SET LOINTAX="BGP VIRAL LOAD LOINC CODES"
+5 SET CPTTAX="BGP HIV VIRAL LOAD CPTS"
+6 SET GLOBAL="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""VRL"",VSTDT,TEST)"
+7 SET TOTPTS="^TMP(""BKMVQCR"",$J,""HIVCHK"",""VRLPTCNT"")"
+8 SET DFN=0
SET @TOTPTS=0
+9 FOR
SET DFN=$ORDER(^TMP("BKMVQCR",$JOB,"HIVCHK",DFN))
IF 'DFN
QUIT
Begin DoDot:1
+10 DO CPTTAX^BKMIXX(DFN,CPTTAX,EDATE,VRLDT,GLOBAL)
+11 DO LOINC^BKMIXX(DFN,LOINTAX,EDATE,VRLDT,GLOBAL)
+12 DO LABTAX^BKMIXX(DFN,SITETAX,EDATE,VRLDT,GLOBAL)
+13 IF $DATA(^TMP("BKMVQCR",$JOB,"HIVCHK",DFN,"VRL"))
SET @TOTPTS=@TOTPTS+1
End DoDot:1
+14 QUIT
RPR ; EP - Rapid Plasma Reagin tests
+1 NEW RPRDT,SITETAX,LOINTAX,CPTTAX,GLOBAL,GLOBAL2,REFGLOB,TOTPTS,DFN
+2 NEW SITETAX1,LOINTAX1,CPTTAX1
+3 SET RPRDT=$$FMADD^XLFDT(EDATE,-365)
+4 SET SITETAX="BKM RPR TAX"
+5 SET LOINTAX="BKM RPR LOINC CODES"
+6 SET CPTTAX="BKM RPR CPTS"
+7 SET SITETAX1="BKM FTA-ABS TEST TAX"
+8 SET LOINTAX1="BKM FTA-ABS LOINC CODES"
+9 SET CPTTAX1="BKM FTA-ABS CPTS"
+10 SET GLOBAL="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""RPR"",VSTDT,TEST)"
+11 SET REFGLOB="^TMP(""BKMVQCR"",$J,""HIVCHK"",DFN,""RPRREF"",VSTDT,TEST)"
+12 SET TOTPTS="^TMP(""BKMVQCR"",$J,""HIVCHK"",""RPRPTCNT"")"
+13 SET DFN=0
SET @TOTPTS=0
+14 FOR
SET DFN=$ORDER(^TMP("BKMVQCR",$JOB,"HIVCHK",DFN))
IF 'DFN
QUIT
Begin DoDot:1
+15 DO CPTTAX^BKMIXX(DFN,CPTTAX,EDATE,RPRDT,GLOBAL)
+16 DO LOINC^BKMIXX(DFN,LOINTAX,EDATE,RPRDT,GLOBAL)
+17 DO LABTAX^BKMIXX(DFN,SITETAX,EDATE,RPRDT,GLOBAL)
+18 DO CPTTAX^BKMIXX(DFN,CPTTAX1,EDATE,RPRDT,GLOBAL)
+19 DO LOINC^BKMIXX(DFN,LOINTAX1,EDATE,RPRDT,GLOBAL)
+20 DO LABTAX^BKMIXX(DFN,SITETAX1,EDATE,RPRDT,GLOBAL)
+21 DO REFUSAL^BKMIXX2(DFN,60,LOINTAX,EDATE,RPRDT,REFGLOB)
+22 DO REFUSAL^BKMIXX2(DFN,60,SITETAX,EDATE,RPRDT,REFGLOB)
+23 DO REFUSAL^BKMIXX2(DFN,60,LOINTAX1,EDATE,RPRDT,REFGLOB)
+24 DO REFUSAL^BKMIXX2(DFN,60,SITETAX1,EDATE,RPRDT,REFGLOB)
+25 IF $DATA(^TMP("BKMVQCR",$JOB,"HIVCHK",DFN,"RPR"))!$DATA(^TMP("BKMVQCR",$JOB,"HIVCHK",DFN,"RPRREF"))
SET @TOTPTS=@TOTPTS+1
End DoDot:1
+26 QUIT