BGP1XTEL ; IHS/CMI/LAB - TAXONOMY CHECK FOR FY04 CRS REPORT ;
;;11.1;IHS CLINICAL REPORTING SYSTEM;;JUN 27, 2011;Build 33
;
;
D HOME^%ZIS
W:$D(IOF) @IOF
W !!,"Checking for Taxonomies to support the 2011 Elder Care Report. ",!,"Please enter the device for printing.",!
ZIS ;
S XBRC="",XBRP="TAXCHK^BGP1XTEL",XBNS="",XBRX="XIT^BGP1XTEL"
D ^XBDBQUE
D XIT
Q
TAXCHK ;EP
;D HOME^%ZIS
K BGPQUIT
GUICHK ;EP
W !,"Checking for Taxonomies to support the Elder Care CRS Report...",!
NEW A,BGPX,I,Y,Z,J,BGPY,BGPT
K A
;S T="TAXS" F J=1:1 S Z=$T(@T+J),BGPX=$P(Z,";;",2),Y=$P(Z,";;",3) Q:BGPX="" D
S BGPT="" F S BGPT=$O(^BGPTAXB("B",BGPT)) Q:BGPT="" D
.S BGPY=$O(^BGPTAXB("B",BGPT,0))
.Q:'$D(^BGPTAXB(BGPY,12,"B",4))
.;I $P(^BGPTAXB(BGPY,0),U,2)'="L" S BGPX=$O(^ATXAX("B",BGPT,0))
.;I $P(^BGPTAXB(BGPY,0),U,2)="L" S BGPX=$O(^ATXLAB("B",BGPT,0))
.S BGPTYPE=$P(^BGPTAXB(BGPY,0),U,2),Y=$G(^BGPTAXB(BGPY,11,1,0))
.I BGPTYPE'="L" D
..I '$D(^ATXAX("B",BGPT)) S A(BGPT)=Y_"^is Missing" Q
..S I=$O(^ATXAX("B",BGPT,0))
..I '$D(^ATXAX(I,21,"B")) S A(BGPT)=Y_"^has no entries "
.I BGPTYPE="L" D
..I '$D(^ATXLAB("B",BGPT)) S A(BGPT)=Y_"^is Missing " Q
..S I=$O(^ATXLAB("B",BGPT,0))
..I '$D(^ATXLAB(I,21,"B")) S A(BGPT)=Y_"^has no entries "
I '$D(A) W !,"All taxonomies are present.",! K A,BGPX,Y,I,Z D DONE Q
W !!,"In order for the Elder Care CRS Report to find all necessary data, several",!,"taxonomies must be established. The following taxonomies are missing or have",!,"no entries:"
S BGPX="" F S BGPX=$O(A(BGPX)) Q:BGPX=""!($D(BGPQUIT)) D
.I $Y>(IOSL-2) D PAGE Q:$D(BGPQUIT)
.W !,$P(A(BGPX),U)," [",BGPX,"] ",$P(A(BGPX),U,2)
.Q
DONE ;
K BGPQUIT
Q:$D(ZTQUEUED)
I $E(IOST)="C",IO=IO(0) S DIR(0)="EO",DIR("A")="End of taxonomy check. PRESS ENTER" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
Q
XIT ;EP
K BGP,BGPX,BGPQUIT,BGPLINE,BGPJ,BGPX,BGPTEXT,BGP
K X,Y,J
Q
PAGE ;
I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BGPQUIT="" Q
Q
TAXS ;
;;BGP DEPRESSIVE DISORDERS;;Depressive Disorders ICD9 Diagnosis Taxonomy
;;BGP PRIMARY CARE CLINICS
;;SURVEILLANCE DIABETES;;Diabetes Diagnoses Codes
;;BGP HGBA1C LOINC CODES
;;BGP LIPID PROFILE LOINC CODES
;;BGP LDL LOINC CODES
;;BGP TRIGLYCERIDE LOINC CODES
;;BGP HDL LOINC CODES
;;BGP URINE PROTEIN LOINC CODES
;;BGP MICROALBUM LOINC CODES
;;BGP CPT FLU;;Flu CPTs Taxonomy
;;BGP UNI MASTECTOMY PROCEDURES
;;BGP CPT MAMMOGRAM
;;BGP COLORECTAL CANCER DXS
;;BGP FOBT LOINC CODES
;;BGP RECTAL PROCEDURE CODES
;;BGP SIG CPTS
;;BGP BE CPTS
;;BGP COLO CPTS
;;BGP DV DXS
;;BGP GPRA SMOKING DXS
;;BGP ASTHMA DXS
;;BGP TOTAL CHOLESTEROL LOINC
;;BGP FRACTURE DXS
;;BGP FRACTURE CPTS
;;BGP FRACTURE PROCEDURES
;;BGP HEDIS OSTEOPOROSIS DRUGS
;;
LAB ;
;;DM AUDIT CREATININE TAX;;CREATININE test lab taxonomy
;;DM AUDIT HGB A1C TAX;;HGB A1C Lab Taxonomy
;;DM AUDIT LIPID PROFILE TAX;;Lipid Profile Lab Taxonomy
;;DM AUDIT LDL CHOLESTEROL TAX;;LDL Cholesterol Lab Taxonomy
;;DM AUDIT TRIGLYCERIDE TAX;;Triglyceride Lab Taxonomy
;;DM AUDIT HDL TAX;;HDL Lab Taxonomy
;;DM AUDIT URINE PROTEIN TAX;;Urine Protein Lab Taxonomy
;;DM AUDIT MICROALBUMINURIA TAX;;Microalbuminuia Lab Taxonomy
;;BGP GPRA ESTIMATED GFR TAX;;Estimated GFR Taxonomy
;;BGP GPRA FOB TESTS;;Fecal Occult Blood Tests taxonomy
;;DM AUDIT CHOLESTEROL TAX;;Cholesterol Taxonomy
;;
BGP1XTEL ; IHS/CMI/LAB - TAXONOMY CHECK FOR FY04 CRS REPORT ;
+1 ;;11.1;IHS CLINICAL REPORTING SYSTEM;;JUN 27, 2011;Build 33
+2 ;
+3 ;
+4 DO HOME^%ZIS
+5 IF $DATA(IOF)
WRITE @IOF
+6 WRITE !!,"Checking for Taxonomies to support the 2011 Elder Care Report. ",!,"Please enter the device for printing.",!
ZIS ;
+1 SET XBRC=""
SET XBRP="TAXCHK^BGP1XTEL"
SET XBNS=""
SET XBRX="XIT^BGP1XTEL"
+2 DO ^XBDBQUE
+3 DO XIT
+4 QUIT
TAXCHK ;EP
+1 ;D HOME^%ZIS
+2 KILL BGPQUIT
GUICHK ;EP
+1 WRITE !,"Checking for Taxonomies to support the Elder Care CRS Report...",!
+2 NEW A,BGPX,I,Y,Z,J,BGPY,BGPT
+3 KILL A
+4 ;S T="TAXS" F J=1:1 S Z=$T(@T+J),BGPX=$P(Z,";;",2),Y=$P(Z,";;",3) Q:BGPX="" D
+5 SET BGPT=""
FOR
SET BGPT=$ORDER(^BGPTAXB("B",BGPT))
IF BGPT=""
QUIT
Begin DoDot:1
+6 SET BGPY=$ORDER(^BGPTAXB("B",BGPT,0))
+7 IF '$DATA(^BGPTAXB(BGPY,12,"B",4))
QUIT
+8 ;I $P(^BGPTAXB(BGPY,0),U,2)'="L" S BGPX=$O(^ATXAX("B",BGPT,0))
+9 ;I $P(^BGPTAXB(BGPY,0),U,2)="L" S BGPX=$O(^ATXLAB("B",BGPT,0))
+10 SET BGPTYPE=$PIECE(^BGPTAXB(BGPY,0),U,2)
SET Y=$GET(^BGPTAXB(BGPY,11,1,0))
+11 IF BGPTYPE'="L"
Begin DoDot:2
+12 IF '$DATA(^ATXAX("B",BGPT))
SET A(BGPT)=Y_"^is Missing"
QUIT
+13 SET I=$ORDER(^ATXAX("B",BGPT,0))
+14 IF '$DATA(^ATXAX(I,21,"B"))
SET A(BGPT)=Y_"^has no entries "
End DoDot:2
+15 IF BGPTYPE="L"
Begin DoDot:2
+16 IF '$DATA(^ATXLAB("B",BGPT))
SET A(BGPT)=Y_"^is Missing "
QUIT
+17 SET I=$ORDER(^ATXLAB("B",BGPT,0))
+18 IF '$DATA(^ATXLAB(I,21,"B"))
SET A(BGPT)=Y_"^has no entries "
End DoDot:2
End DoDot:1
+19 IF '$DATA(A)
WRITE !,"All taxonomies are present.",!
KILL A,BGPX,Y,I,Z
DO DONE
QUIT
+20 WRITE !!,"In order for the Elder Care CRS Report to find all necessary data, several",!,"taxonomies must be established. The following taxonomies are missing or have",!,"no entries:"
+21 SET BGPX=""
FOR
SET BGPX=$ORDER(A(BGPX))
IF BGPX=""!($DATA(BGPQUIT))
QUIT
Begin DoDot:1
+22 IF $Y>(IOSL-2)
DO PAGE
IF $DATA(BGPQUIT)
QUIT
+23 WRITE !,$PIECE(A(BGPX),U)," [",BGPX,"] ",$PIECE(A(BGPX),U,2)
+24 QUIT
End DoDot:1
DONE ;
+1 KILL BGPQUIT
+2 IF $DATA(ZTQUEUED)
QUIT
+3 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
SET DIR(0)="EO"
SET DIR("A")="End of taxonomy check. PRESS ENTER"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+4 QUIT
XIT ;EP
+1 KILL BGP,BGPX,BGPQUIT,BGPLINE,BGPJ,BGPX,BGPTEXT,BGP
+2 KILL X,Y,J
+3 QUIT
PAGE ;
+1 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
WRITE !
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET BGPQUIT=""
QUIT
+2 QUIT
TAXS ;
+1 ;;BGP DEPRESSIVE DISORDERS;;Depressive Disorders ICD9 Diagnosis Taxonomy
+2 ;;BGP PRIMARY CARE CLINICS
+3 ;;SURVEILLANCE DIABETES;;Diabetes Diagnoses Codes
+4 ;;BGP HGBA1C LOINC CODES
+5 ;;BGP LIPID PROFILE LOINC CODES
+6 ;;BGP LDL LOINC CODES
+7 ;;BGP TRIGLYCERIDE LOINC CODES
+8 ;;BGP HDL LOINC CODES
+9 ;;BGP URINE PROTEIN LOINC CODES
+10 ;;BGP MICROALBUM LOINC CODES
+11 ;;BGP CPT FLU;;Flu CPTs Taxonomy
+12 ;;BGP UNI MASTECTOMY PROCEDURES
+13 ;;BGP CPT MAMMOGRAM
+14 ;;BGP COLORECTAL CANCER DXS
+15 ;;BGP FOBT LOINC CODES
+16 ;;BGP RECTAL PROCEDURE CODES
+17 ;;BGP SIG CPTS
+18 ;;BGP BE CPTS
+19 ;;BGP COLO CPTS
+20 ;;BGP DV DXS
+21 ;;BGP GPRA SMOKING DXS
+22 ;;BGP ASTHMA DXS
+23 ;;BGP TOTAL CHOLESTEROL LOINC
+24 ;;BGP FRACTURE DXS
+25 ;;BGP FRACTURE CPTS
+26 ;;BGP FRACTURE PROCEDURES
+27 ;;BGP HEDIS OSTEOPOROSIS DRUGS
+28 ;;
LAB ;
+1 ;;DM AUDIT CREATININE TAX;;CREATININE test lab taxonomy
+2 ;;DM AUDIT HGB A1C TAX;;HGB A1C Lab Taxonomy
+3 ;;DM AUDIT LIPID PROFILE TAX;;Lipid Profile Lab Taxonomy
+4 ;;DM AUDIT LDL CHOLESTEROL TAX;;LDL Cholesterol Lab Taxonomy
+5 ;;DM AUDIT TRIGLYCERIDE TAX;;Triglyceride Lab Taxonomy
+6 ;;DM AUDIT HDL TAX;;HDL Lab Taxonomy
+7 ;;DM AUDIT URINE PROTEIN TAX;;Urine Protein Lab Taxonomy
+8 ;;DM AUDIT MICROALBUMINURIA TAX;;Microalbuminuia Lab Taxonomy
+9 ;;BGP GPRA ESTIMATED GFR TAX;;Estimated GFR Taxonomy
+10 ;;BGP GPRA FOB TESTS;;Fecal Occult Blood Tests taxonomy
+11 ;;DM AUDIT CHOLESTEROL TAX;;Cholesterol Taxonomy
+12 ;;