Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APCLTAX4

APCLTAX4.m

Go to the documentation of this file.
APCLTAX4 ; IHS/CMI/LAB - TAXONOMY SYSTEM CON'T ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;;
LABLINIT ;EP;TO SET UP LAB LIST ARRAY
 D TAXINIT^APCLTAX0
 Q
Z(X) ;SET TMP NODE
 S VALMCNT=$G(VALMCNT)+1
 S ^TMP("APCLVR",$J,VALMCNT,0)=X
 Q
TAXTEXT ;EP;TO LIST CURRENT TAXONOMIES
DX ;EP;DIAGNOSIS
 ;;SURVEILLANCE DIABETES
 ;;SURVEILLANCE HYPERTENSION
 ;;SURVEILLANCE TUBERCULOSIS
 ;;PROBLEM SMOKING DXS
 ;;SMOKING RELATED DXS
 ;;PROBLEM HTN DIAGNOSES
 ;;PROBLEM DIABETES DX
 ;;TYPE II DXS
 ;;TYPE I DXS
 ;;
HF ;;EP;HEALTH FACTORS
 ;;TOBACCO HLTH FACTORS
 ;;CESSATION HLTH FACTOR
 ;;TB HEALTH FACTORS
 ;;
ET ;;EP;PATIENT ED TOPIC
 ;;DIET EDUC TOPICS
 ;;EXERCISE EDUC TOPICS
 ;;OTHER EDUC TOPICS
 ;;SMOKING CESS EDUC
 ;;
RX ;;EP;RX
 ;;ACE INHIBITORS
 ;;ACARBOSE DRUGS
 ;;ASPIRIN DRUGS
 ;;ANTI-PLATELET DRUGS
 ;;INSULIN DRUGS
 ;;METFORMIN DRUGS
 ;;SULFONYLUREA DRUGS
 ;;SELF MONITOR DRUGS
 ;;GLITAZONE DRUGS
 ;;LIPID LOWERING DRUGS
 ;;STATIN DRUGS
 ;;
PV ;;EP;PROVIDER
 ;;SDM PROVIDERS
 ;;
ADA ;;EP;;ADA
 ;;APCH DM ADA EXAMS
 ;;
LAB ;EP;TO LIST DMS LAB TAXONOMIES
 ;;ALT TAX
 ;;AST TAX
 ;;CHOLESTEROL TAX
 ;;CREATININE TAX
 ;;GLUCOSE TESTS TAX
 ;;HGB A1C TAX
 ;;LDL CHOLESTEROL TAX
 ;;HDL TAX
 ;;MICROALBUMINURIA TAX
 ;;TRIGLYCERIDE TAX
 ;;URINALYSIS TAX
 ;;URINE PROTEIN TAX
 ;;
 Q
PROCESS ;EP;TO PROCESS AND DISPLAY DIFFERENT GROUPS OF DMS TAXONOMIES
 K APCLTAX
 N X,Y,Z
 S X=APCLANAM
 S EP=$S(X["DIAG":"DX",X="RX":"RX",X["ED TOP":"ET",X["FACTOR":"HF",X["PROVIDER":"PV",X["ADA":"ADA",1:"LAB")
 S X=""
 F J=1:1 S X=$T(@EP+J) Q:$P(X,";;",2)=""  D
 .S Y=$P(X,";;",2)
 .I Y'["SURV",$E(Y,1,4)'="APCH" S Y="DM AUDIT "_Y
 .Q:Y=""
 .I EP'="LAB" S Z=$O(^ATXAX("B",Y,0))
 .E  S Z=$O(^ATXLAB("B",Y,0))
 .Q:'Z
 .S APCLTAX(Y)=Z
 Q
LABINIT ;EP;INITIALIZE ARRAY FOR TAXONOMY DISPLAY
 K ^TMP("APCLVR",$J),APCLJ
 S VALMCNT=0
 Q:'$G(APCLTDA)
 S X="     "_$P(^ATXLAB(APCLTDA,0),U)
 D Z(X)
 S X="     No. Lab                             Site/Specimen"
 D Z(X)
 S X="     --- ------------------------------  --------------"
 D Z(X)
 N A,B,X,Y,Z
 S Z=3
 S (APCLX,B)=0
 F  S APCLX=$O(^ATXLAB(APCLTDA,21,APCLX)) Q:'APCLX  D:$D(^ATXLAB(APCLTDA,21,APCLX,0))
 .S Y=$P(^ATXLAB(APCLTDA,21,APCLX,0),U)
 .Q:'Y
 .S Y=$P($G(^LAB(60,Y,0)),U)
 .S B=B+1
 .S A="    "_B
 .S:$L(A)=5 A=" "_A
 .S A=A_"   "
 .S A=A_Y
 .S A=A_$E("                               ",1,32-$L(Y))
 .D Z(A)
 .S APCLJ(APCLTDA,B)=APCLX
 .S (J,APCLY)=0
 .F  S APCLY=$O(^ATXLAB(APCLTDA,21,APCLX,11,APCLY)) Q:'APCLY  D:$D(^ATXLAB(APCLTDA,21,APCLX,11,APCLY,0))
 ..S A=$P(^ATXLAB(APCLTDA,21,APCLX,11,APCLY,0),U)
 ..Q:'A
 ..S J=J+1
 ..S A=$P($G(^LAB(61,A,0)),U)
 ..I J=1 D
 ...S ^TMP("APCLVR",$J,VALMCNT,0)=^TMP("APCLVR",$J,VALMCNT,0)_A
 ..I J>1 D
 ...S X="                                         "_A
 ...D Z(X)
 I '$D(^TMP("APCLVR",$J)) D
 .S ^TMP("APCLVR",$J,1,0)="NO TAXONOMIES ON FILE FOR "_$G(APCLX)
 .S Z=1
 S APCLJ=B
 S VALMCNT=Z
 Q