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

BUD8RP6X.m

Go to the documentation of this file.
BUD8RP6X ; IHS/CMI/LAB - measure C ;
 ;;10.0;IHS/RPMS UNIFORM DATA SYSTEM;;FEB 04, 2016;Build 50
 ;
CNTDTAP ;
 S (X,Y)="",C=0 F  S X=$O(BUDDTAP(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDDTAP(X) Q
 .S Y=X
 ;now count
 S BUDDTAP=0,X=0 F  S X=$O(BUDDTAP(X)) Q:X'=+X  S BUDDTAP=BUDDTAP+1
 Q
RESET ;RESET WORKING ARRAYS
 K BUDDT M BUDDT=BUDADT
 K BUDDIP M BUDDIP=BUDADIP
 K BUDTET M BUDTET=BUDATET
 K BUDPER M BUDPER=BUDAPER
 K BUDTD M BUDTD=BUDATD
 Q
RESETD ;RESET DUPES
 S (X,Y)="",C=0 F  S X=$O(BUDDT(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDDT(X) Q
 .S Y=X
 S (X,Y)="",C=0 F  S X=$O(BUDDIP(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDDIP(X) Q
 .S Y=X
 S (X,Y)="",C=0 F  S X=$O(BUDTET(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDTET(X) Q
 .S Y=X
 S (X,Y)="",C=0 F  S X=$O(BUDTD(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDTD(X) Q
 .S Y=X
 S (X,Y)="",C=0 F  S X=$O(BUDPER(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDPER(X) Q
 .S Y=X
 S BUDDT=0,X=0 F  S X=$O(BUDDT(X)) Q:X'=+X  S BUDDT=BUDDT+1
 S BUDTD=0,X=0 F  S X=$O(BUDTD(X)) Q:X'=+X  S BUDTD=BUDTD+1
 S BUDDIP=0,X=0 F  S X=$O(BUDDIP(X)) Q:X'=+X  S BUDDIP=BUDDIP+1
 S BUDTET=0,X=0 F  S X=$O(BUDTET(X)) Q:X'=+X  S BUDTET=BUDTET+1
 S BUDPER=0,X=0 F  S X=$O(BUDPER(X)) Q:X'=+X  S BUDPER=BUDPER+1
 Q
DTAP(P,BDATE,EDATE) ;EP
 K ^TMP($J,"CPT")
 NEW BUDC,BUDG,BUDX,BUDDTAP,BUDTD,BUDDT,BUDDIP,BUDTET,BUDPER
 ;first check for contraindication
 K BUDG S %=P_"^ALL DX 323.51;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I '$D(BUDG(1)) G DTAPIM
 S X=0,G="" F  S X=$O(BUDG(X)) Q:X'=+X!(G]"")  S Y=+$P(BUDG(X),U,4) D
 .S Z=$$VAL^XBDIQ1(9000010.07,Y,.09) I Z="E948.4"!(Z="E948.5")!(Z="948.6") S G="Dtap Contraindication DX/Ecode: "_$P(BUDG(X),U,2)_"/"_Z_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 .S Z=$$VAL^XBDIQ1(9000010.07,Y,.18) I Z="E948.4"!(Z="E948.5")!(Z="948.6") S G="Dtap Contraindication DX/Ecode: "_$P(BUDG(X),U,2)_"/"_Z_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 .S Z=$$VAL^XBDIQ1(9000010.07,Y,.19) I Z="E948.4"!(Z="E948.5")!(Z="948.6") S G="Dtap Contraindication DX/Ecode: "_$P(BUDG(X),U,2)_"/"_Z_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 I G]"" Q G
 K BUDG S %=P_"^ALL DX 323.52;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I '$D(BUDG(1)) G DTAPIM
 S X=0,G="" F  S X=$O(BUDG(X)) Q:X'=+X!(G]"")  S Y=+$P(BUDG(X),U,4) D
 .S Z=$$VAL^XBDIQ1(9000010.07,Y,.09) I Z="E948.4"!(Z="E948.5")!(Z="948.6") S G="Dtap Contraindication DX/Ecode: "_$P(BUDG(X),U,2)_"/"_Z_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 .S Z=$$VAL^XBDIQ1(9000010.07,Y,.18) I Z="E948.4"!(Z="E948.5")!(Z="948.6") S G="Dtap Contraindication DX/Ecode: "_$P(BUDG(X),U,2)_"/"_Z_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 .S Z=$$VAL^XBDIQ1(9000010.07,Y,.19) I Z="E948.4"!(Z="E948.5")!(Z="948.6") S G="Dtap Contraindication DX/Ecode: "_$P(BUDG(X),U,2)_"/"_Z_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 I G]"" Q G
 F BUDZ=1,20,22,50,110,120,130,28,35 S X=$$ANCONT^BUD8RP6C(P,BUDZ,EDATE) Q:X]""
 I X]"" Q "DTaP Contraindication IM package: "_$$DATE^BUD8UTL1($P(X,U))_" "_$P(X,U,2)
DTAPIM ;
 ;first gather up all cpt codes that relate in any way to dtap and store in ^TMP
 S ED=9999999-EDATE-1,BD=9999999-BDATE,G=0
 F  S ED=$O(^AUPNVSIT("AA",P,ED)) Q:ED=""!($P(ED,".")>BD)  D
 .S V=0 F  S V=$O(^AUPNVSIT("AA",P,ED,V)) Q:V'=+V  D
 ..Q:'$D(^AUPNVSIT(V,0))
 ..S X=0 F  S X=$O(^AUPNVCPT("AD",V,X)) Q:X'=+X  D
 ...Q:'$D(^AUPNVCPT(X,0))
 ...S Y=$P(^AUPNVCPT(X,0),U)
 ...Q:Y=""
 ...S Y=$P($$CPT^ICPTCOD(Y),U,2)
 ...I Y=90700!(Y=90721)!(Y=90723)!(Y=90701)!(Y=90720)!(Y=90702)!(Y=90719)!(Y=90703)!(Y=90698)!(Y=90696) S ^TMP($J,"CPT",9999999-$P(ED,"."),Y)=""
 ..S X=0 F  S X=$O(^AUPNVTC("AD",V,X)) Q:X'=+X  D
 ...Q:'$D(^AUPNVTC(X,0))
 ...S Y=$P(^AUPNVTC(X,0),U,7)
 ...Q:Y=""
 ...S Y=$P($$CPT^ICPTCOD(Y),U,2)
 ...I Y=90700!(Y=90721)!(Y=90723)!(Y=90701)!(Y=90720)!(Y=90702)!(Y=90719)!(Y=90703)!(Y=90698)!(Y=90696) S ^TMP($J,"CPT",9999999-$P(ED,"."),Y)=""
 ;now gather up all DTAP immunizations, cpts 
 ;get all immunizations
 S C="1^20^22^50^110^120^130"
 D GETIMMS^BUD8RP6C(P,BDATE,EDATE,C,.BUDX)
 ;go through and set into DTAP if 10 days apart
 S X=0 F  S X=$O(BUDX(X)) Q:X'=+X  S BUDDTAP(X)=BUDX(X)
 D CNTDTAP  ;count to see if there are 4
 I BUDDTAP>3 S Y="DTap: total #: "_BUDDTAP,X=0 F  S X=$O(BUDDTAP(X)) Q:X'=+X  S Y=Y_"  "_BUDDTAP(X)
 I BUDDTAP>3 Q Y
 ;now get cpts for dtap or dtp
 S D=0 F  S D=$O(^TMP($J,"CPT",D)) Q:D'=+D  S Y="" F  S Y=$O(^TMP($J,"CPT",D,Y)) Q:Y=""  D
 .I Y=90698!(Y=90700)!(Y=90701)!(Y=90720)!(Y=90721)!(Y=90723)!(Y=90696) S BUDDTAP(D)="DTaP CPT: "_Y_" on "_$$DATE^BUD8UTL1(D)
 D CNTDTAP  ;count to see if there are 4
 I BUDDTAP>3 S Y="DTaP: total #: "_BUDDTAP,X="" F  S X=$O(BUDDTAP(X)) Q:X'=+X  S Y=Y_"  "_BUDDTAP(X)
 I BUDDTAP>3 Q Y
 K BUDG S %=P_"^ALL DX V06.1;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  S BUDDTAP($P(BUDG(X),U))="DTaP DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 K BUDG S %=P_"^ALL DX V06.2;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  S BUDDTAP($P(BUDG(X),U))="DTaP DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 K BUDG S %=P_"^ALL DX V06.3;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  S BUDDTAP($P(BUDG(X),U))="DTaP DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 K BUDG S %=P_"^ALL PROCEDURE 99.39;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  S BUDDTAP($P(BUDG(X),U))="DTaP Procedure: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 D CNTDTAP  ;count to see if there are 4
 I BUDDTAP>3 S Y="DTaP: total #: "_BUDDTAP,X="" F  S X=$O(BUDDTAP(X)) Q:X'=+X  S Y=Y_"  "_BUDDTAP(X)
 I BUDDTAP>3 Q Y
DT ;
 ;add in dt cpts
 S D=0 F  S D=$O(^TMP($J,"CPT",D)) Q:D'=+D  S Y="" F  S Y=$O(^TMP($J,"CPT",D,Y)) Q:Y=""  D
 .I Y=90702 S BUDDT(D)="DT CPT: "_Y_" on "_$$DATE^BUD8UTL1(D),BUDADT(D)="DT CPT: "_Y_" on "_$$DATE^BUD8UTL1(D)
 ;are there 3 dt and 1 dtap by cvx and/or cpt?
 K BUDG S %=P_"^ALL DX V06.5;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  S BUDDT($P(BUDG(X),U))="DT DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U)),BUDADT($P(BUDG(X),U))="DT DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 K BUDDT,BUDADT
 S C="28"
 K BUDX D GETIMMS^BUD8RP6C(P,BDATE,EDATE,C,.BUDX)
 S X=0 F  S X=$O(BUDX(X)) Q:X'=+X  S BUDDT(X)=BUDX(X),BUDADT(X)=BUDX(X)
DT1 ;
 ;kill off any that are on the same day as the dtaps
 S (X,Y)="",C=0 F  S X=$O(BUDDT(X)) Q:X'=+X  I $D(BUDDTAP(X)) K BUDDT(X)
 S (X,Y)="",C=0 F  S X=$O(BUDDT(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDDT(X) Q
 .S Y=X
 K BUDALL
 S BUDDT=0,X=0 F  S X=$O(BUDDT(X)) Q:X'=+X  S BUDDT=BUDDT+1,BUDALL(X)=BUDDT(X)
 S BUDDTAP=0,X=0 F  S X=$O(BUDDTAP(X)) Q:X'=+X  S BUDDTAP=BUDDTAP+1,BUDALL(X)=BUDDTAP(X)
 S (X,Y)="",C=0 F  S X=$O(BUDALL(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDALL(X) Q
 .S Y=X
 S BUDALL=0 S X=0 F  S X=$O(BUDALL(X)) Q:X'=+X  S BUDALL=BUDALL+1
 I BUDALL>3 D  Q Y
 .S Y=">=1 DTap & DT/TdS",X=0 F  S X=$O(BUDDTAP(X)) Q:X'=+X  S Y=Y_" "_BUDDTAP(X)
 .S X=0 F  S X=$O(BUDDT(X)) Q:X'=+X  S Y=Y_" "_BUDDT(X)
 ;
TETCVX ;
 K BUDTET,BUDATET
 S BUDTET=0
 ;EVIDENCE?
 S BUDEVTD=""
 K BUDG S %=P_"^LAST DX 037.;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S BUDEVTD="Tetanus Evidence: "_$P(BUDG(1),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(1),U))
 I $$PLCODE^BUD8DU(P,"037.") S BUDEVTD="Tetanus Evidence: 037. on Problem List"
 S X=0 F  S X=$O(BUDDT(X)) Q:X'=+X  S BUDTET(X)=BUDDT(X)
 S X=0 F  S X=$O(BUDDTAP(X)) Q:X'=+X  S BUDTET(X)=BUDDTAP(X)
 S D=0 F  S D=$O(^TMP($J,"CPT",D)) Q:D'=+D  S Y="" F  S Y=$O(^TMP($J,"CPT",D,Y)) Q:Y=""  D
 .I Y=90703 S BUDTET(D)="Tetanus CPT: "_Y_" on "_$$DATE^BUD8UTL1(D),BUDATET(D)="TETANUS CPT: "_Y_" on "_$$DATE^BUD8UTL1(D)
 K BUDG S %=P_"^ALL DX V03.7;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  D
 .S BUDTET($P(BUDG(X),U))="Tetanus DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U)),BUDATET($P(BUDG(X),U))="Tetanus DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 K BUDG S %=P_"^ALL PROCEDURE 99.38;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  D
 .S BUDTET($P(BUDG(X),U))="Tetanus Proc: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U)),BUDATET($P(BUDG(X),U))="Tetanus DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 K BUDX S C="35" D GETIMMS^BUD8RP6C(P,BDATE,EDATE,C,.BUDX)
 S X=0 F  S X=$O(BUDX(X)) Q:X'=+X  S BUDTET(X)=BUDX(X),BUDATET(X)=BUDX(X)
 S (X,Y)="",C=0 F  S X=$O(BUDTET(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDTET(X) Q
 .S Y=X
 S X=0 F  S X=$O(BUDTET(X)) Q:X'=+X  S BUDTET=BUDTET+1
DIP ;
 K BUDDIP,BUDADIP
 S BUDDIPEV=""
 K BUDG S %=P_"^LAST DX [BGP DIPHTHERIA EVIDENCE;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S BUDEVDIP="Diptheria Evidence "_$P(BUDG(1),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(1),U))
 I $$PLTAX^BUD8DU(P,"BGP DIPHTHERIA EVIDENCE") I X S BUDEVDIP="Diptheria Evidence: "_$P(X,U,2)_" on Problem List"
 S X=0 F  S X=$O(BUDDT(X)) Q:X'=+X  S BUDDIP(X)=BUDDT(X)
 S X=0 F  S X=$O(BUDDTAP(X)) Q:X'=+X  S BUDDIP(X)=BUDDTAP(X)
 S D=0 F  S D=$O(^TMP($J,"CPT",D)) Q:D'=+D  S Y="" F  S Y=$O(^TMP($J,"CPT",D,Y)) Q:Y=""  D
 .I Y=90719 S BUDDIP(D)="Diptheria CPT: "_Y_" on "_$$DATE^BUD8UTL1(D),BUDADIP(D)="Diptheria CPT: "_Y_" on "_$$DATE^BUD8UTL1(D)
 K BUDG S %=P_"^ALL DX V03.5;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  S BUDDIP($P(BUDG(X),U))="Diptheria DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U)),BUDADIP($P(BUDG(X),U))="Diptheria DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 K BUDG S %=P_"^ALL PROCEDURE 99.36;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  S BUDDIP($P(BUDG(X),U))="Diptheria Proc: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U)),BUDADIP($P(BUDG(X),U))="Diptheria Proc: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 S (X,Y)="",C=0 F  S X=$O(BUDDIP(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDDIP(X) Q
 .S Y=X
 S X=0,BUDDIP=0 F  S X=$O(BUDDIP(X)) Q:X'=+X  S BUDDIP=BUDDIP+1
 ;
PER ;
 K BUDPER,BUDAPER
 S BUDPEREV=""
 K BUDG S %=P_"^LAST DX [BGP PERTUSSIS EVIDENCE;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S BUDEVPER="Pertussis Evidence "_$P(BUDG(1),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(1),U))
 I $$PLTAX^BUD8DU(P,"BGP PERTUSSIS EVIDENCE") I X S BUDEVPER="Pertussis Evidence: "_$P(X,U,2)_" on Problem List"
 S X=0 F  S X=$O(BUDDTAP(X)) Q:X'=+X  S BUDPER(X)=BUDDTAP(X)
 K BUDG S %=P_"^ALL DX V03.6;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  S BUDPER($P(BUDG(X),U))="Pertussis DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U)),BUDAPER($P(BUDG(X),U))="Pertussis DX: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 K BUDG S %=P_"^ALL PROCEDURE 99.37;DURING "_BDATE_"-"_EDATE,E=$$START1^APCLDF(%,"BUDG(")
 I $D(BUDG(1)) S X=0 F  S X=$O(BUDG(X)) Q:X'=+X  D
 .S BUDPER($P(BUDG(X),U))="Pertussis Proc: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U)),BUDAPER($P(BUDG(X),U))="Pertussis Pertussis: "_$P(BUDG(X),U,2)_" on "_$$DATE^BUD8UTL1($P(BUDG(X),U))
 S (X,Y)="",C=0 F  S X=$O(BUDPER(X)) Q:X'=+X  S C=C+1 D
 .I C=1 S Y=X Q
 .I $$FMDIFF^XLFDT(X,Y)<11 K BUDPER(X) Q
 .S Y=X
 S X=0,BUDPER=0 F  S X=$O(BUDPER(X)) Q:X'=+X  S BUDPER=BUDPER+1
CHK ;4 of each or evidence
 I BUDTET>3,BUDPER>3,BUDDIP>3 D  Q Y
 .S Y="4 of each"
 .S X=0 F  S X=$O(BUDTET(X)) Q:X'=+X  S Y=Y_" "_BUDTET(X)
 .S X=0 F  S X=$O(BUDDIP(X)) Q:X'=+X  S Y=Y_" "_BUDDIP(X)
 .S X=0 F  S X=$O(BUDPER(X)) Q:X'=+X  S Y=Y_" "_BUDPER(X)
 I BUDPEREV,BUDTET>3,BUDDIP>3 D  Q Y
 .S Y="evid per, 4 tet, 4 dip "
 .S Y=Y_BUDPEREV
 .S X=0 F  S X=$O(BUDTET(X)) Q:X'=+X  S Y=Y_" "_BUDTET(X)
 .S X=0 F  S X=$O(BUDDIP(X)) Q:X'=+X  S Y=Y_" "_BUDDIP(X)
 I BUDEVTD,BUDPER>3,BUDDIP>3 D  Q Y
 .S Y="evid tetanus, 4 dip, 4 per "
 .S Y=Y_BUDEVTD
 .S X=0 F  S X=$O(BUDPER(X)) Q:X'=+X  S Y=Y_" "_BUDPER(X)
 .S X=0 F  S X=$O(BUDDIP(X)) Q:X'=+X  S Y=Y_" "_BUDDIP(X)
 I BUDDIPEV,BUDTET>3,BUDPER>3 D  Q Y
 .S Y="evid Diptheria, 4 tet, 4 per "
 .S Y=Y_BUDDIPEV
 .S X=0 F  S X=$O(BUDTET(X)) Q:X'=+X  S Y=Y_" "_BUDTET(X)
 .S X=0 F  S X=$O(BUDPER(X)) Q:X'=+X  S Y=Y_" "_BUDPER(X)
 I BUDEVTD,BUDDIPEV,BUDPER>3 D  Q Y
 .S Y="evid tet, evid dip, 4 per "
 .S Y=Y_BUDEVTD_" "_BUDDIPEV
 .S X=0 F  S X=$O(BUDPER(X)) Q:X'=+X  S Y=Y_" "_BUDPER(X)
 I BUDEVTD,BUDPEREV,BUDDIP>3 D  Q Y
 .S Y="evid tet, evid PER, 4 dip "
 .S Y=Y_BUDEVTD_" "_BUDPEREV
 .S X=0 F  S X=$O(BUDDIP(X)) Q:X'=+X  S Y=Y_" "_BUDDIP(X)
 I BUDDIPEV,BUDPEREV,BUDTET>3 D  Q Y
 .S Y="evid dip, evid per, 4 tet "
 .S Y=Y_BUDDIPEV_" "_BUDPEREV
 .S X=0 F  S X=$O(BUDTET(X)) Q:X'=+X  S Y=Y_" "_BUDTET(X)
 Q ""