***************************************************************; *Program name: ohddent.sas *; *Reads: oral health exam, dental section OHXDENT, OHXDEN_B or combined dataset OHXDENAB *; *Writes: ohddent, ohddentX *; *Does: Creates calculated caries variables for public release *; *Date: May 24, 2005 *; * *; *Authors: *; * NIH/NIDCR - Robert Selwitz, Tianxia Wu, Richard Oldakowski *; * CDC/NCCDPHP - Susan Griffin, Eugenio Beltran, Laurie Barker *; * CDC/NCHS - Bruce Dye *; *The authors would like to acknowledge the contributions of: Drs. Keith Heller and Mark Macek, who generously shared code to calculate many of these variables from the NHANES 1988-1994 data set. *; ***************************************************************; /* This program reads a dataset called "ohxdenAB" which was created by merging datasets ohxdent (1999-2000) and ohxden_b (2001-2002). This program creates the following variables: OHDNPRIa="Number of primary teeth present - tc" OHDPRIa="Any primary teeth present - tc" OHDNPRIb="Number of primary teeth present - ctc" OHDPRIb="Any primary teeth present - ctc" OHDNPRM="Number of permanent teeth present - tc - 32 tooth spaces" OHDPRM="Any permanent teeth present - tc - 32 tooth spaces" OHDNPRMa="Number of permanent teeth present - tc - 28 tooth spaces" OHDPRMa="Any permanent teeth present - tc - 28 tooth spaces" OHDNPRMb="Number of permanent teeth present - ctc" OHDPRMb="Any permanent teeth present - ctc" OHDPgrp="Number of permanent teeth in groups - tc - 32 tooth spaces" OHDPgrpa="Number of permanent teeth in groups - tc - 28 tooth spaces" OHDPgrpb="Number of permanent teeth in groups - ctc " OHDNTP="Number of primary and permanent teeth present - tc - 32 tooth spaces" OHDTP="Any primary and permanent teeth present - tc - 32 tooth spaces" OHDNTPa="Number of primary and permanent teeth present - tc - 28 tooth spaces" OHDTPa="Any primary and permanent teeth present - tc - 28 tooth spaces" OHDNTPb="Number of primary and permanent teeth present - ctc" OHDTPb="Any primary and permanent teeth present - ctc" OHDNPU="Number of teeth in upper arch - tc - 16 tooth spaces incl. 3rd molars" OHDPU="Any teeth in upper arch - tc - 16 tooth spaces incl. 3rd molars" OHDNPL="Number of teeth in lower arch - tc - 16 tooth spaces incl. 3rd molars" OHDPL="Any teeth in lower arch - tc - 16 tooth spaces incl. 3rd molars" OHDNPUa="Number of teeth in upper arch - tc - 14 tooth spaces iexcl. 3rd molars" OHDPUa="Any teeth in upper arch - tc - 14 tooth spaces excl. 3rd molars" OHDNPLa="Number of teeth in lower arch - tc - 14 tooth spaces excl. 3rd molars" OHDPLa="Any teeth in lower arch - tc - 14 tooth spaces excl. 3rd molars" OHDTUD="Untreated decay: has 1 or more primary teeth with untreated decay" OHDTCE="Caries experience: has 1 or more primary teeth affected by decay/sequelae" OHDTST="st - number of sound primary teeth" OHDTDT="dt - number of decayed primary teeth" OHDTFT="ft - number of filled primary teeth" OHDTDFT="dft - number of decayed and filled primary teeth dt+ft" OHDTDDFT="d/dft (percent)" OHDTFDFT="f/dft (percent)" OHDTSS="ss - number of sound primary surfaces" OHDTDS="ds - number of decayed primary surfaces" OHDTDSl="ds - number of decayed primary surfaces - lingual" OHDTDSo="ds - number of decayed primary surfaces - occlusal" OHDTDSb="ds - number of decayed primary surfaces - buccal" OHDTDSm="ds - number of decayed primary surfaces - mesial" OHDTDSd="ds - number of decayed primary surfaces - distal" OHDTDSlb="ds - number of decayed primary surfaces - lingual/buccal" OHDTDSmd="ds - number of decayed primary surfaces - mesial/distal" OHDTFS="fs - number of filled primary surfaces" OHDTFSl="fs - number of filled primary surfaces - lingual" OHDTFSo="fs - number of filled primary surfaces - occlusal" OHDTFSb="fs - number of filled primary surfaces - buccal" OHDTFSm="fs - number of filled primary surfaces - mesial" OHDTFSd="fs - number of filled primary surfaces - distal" OHDTFSlb="fs - number of filled primary surfaces - lingual/buccal" OHDTFSmd="fs - number of filled primary surfaces - mesial/distal" OHDTDFS="dfs - number of decayed and filled primary surfaces ds+fs" OHDTDFSl="dfs - number of decayed and filled primary surfaces ds+fs - lingual" OHDTDFSo="dfs - number of decayed and filled primary surfaces ds+fs - occlusal" OHDTDFSb="dfs - number of decayed and filled primary surfaces ds+fs - buccal" OHDTDFSm="dfs - number of decayed and filled primary surfaces ds+fs - mesial" OHDTDFSd="dfs - number of decayed and filled primary surfaces ds+fs - distal" OHDTDFSlb="dfs - number of decayed and filled primary surfaces ds+fs - lingual/buccal" OHDTDFSmd="dfs - number of decayed and filled primary surfaces ds+fs - mesial/distal" OHDTDDFS="d/dfs (percent)" OHDTFDFS="f/dfs (percent)" OHDTplDFS="lingual/dfs (percent) - lingual" OHDTpoDFS="occlusal/dfs (percent) - occlusal" OHDTpbDFS="buccal/dfs (percent) - buccal" OHDTpmDFS="mesial/dfs (percent) - mesial" OHDTpdDFS="distal/dfs (percent) - distal" OHDTplbDFS="lingual-buccal/dfs (percent) - lingual/buccal" OHDTpmdDFS="mesial-distal/dfs (percent) - mesial/distal" OHDPUD="Untreated decay: has 1 or more permanent teeth with untreated decay" OHDPCE="Caries experience: has 1 or more permanent teeth with untreated (D) or treated (F) decay" OHDPCEa="Caries experience: has 1 or more permanent teeth with untreated (D) or treated (F) decay or teeth missing due to caries or perio" OHDPST="ST - number of sound permanent teeth" OHDPDT="DT - number of decayed permanent teeth" OHDPMT="MT - number of permanent teeth missing due to caries or perio" OHDPFT="FT - number of filled permanent teeth" OHDPDFT="DFT - number of decayed and filled permanent teeth DT+FT" OHDPDMFT="DMFT - number of decayed and filled permanent teeth DT+MT+FT" OHDPDDFT="D/DFT (percent)" OHDPFDFT="F/DFT (percent)" OHDPDDMFT="D/DMFT (percent)" OHDPFDMFT="F/DMFT (percent)" OHDPMDMFT="M/DMFT (percent)" OHDPSS="SS - number of sound permanent surfaces" OHDPDS="DS - number of decayed permanent surfaces" OHDPDSl="DS - number of decayed permanent surfaces - lingual" OHDPDSo="DS - number of decayed permanent surfaces - occlusal" OHDPDSb="DS - number of decayed permanent surfaces - buccal" OHDPDSm="DS - number of decayed permanent surfaces - mesial" OHDPDSd="DS - number of decayed permanent surfaces - distal" OHDPDSlb="DS - number of decayed permanent surfaces - lingual/buccal" OHDPDSmd="DS - number of decayed permanent surfaces - mesial/distal" OHDPMS="MS - number of permanent surfaces missing due to caries or perio" OHDPMSl="MS - number of permanent surfaces missing due to caries or perio - lingual" OHDPMSo="MS - number of permanent surfaces missing due to caries or perio - occlusal" OHDPMSb="MS - number of permanent surfaces missing due to caries or perio - buccal" OHDPMSm="MS - number of permanent surfaces missing due to caries or perio - mesial" OHDPMSd="MS - number of permanent surfaces missing due to caries or perio - distal" OHDPMSlb="MS - number of permanent surfaces missing due to caries or perio - lingual/buccal" OHDPMSmd="MS - number of permanent surfaces missing due to caries or perio - mesial/distal" OHDPFS="FS - number of filled permanent surfaces" OHDPFSl="FS - number of filled permanent surfaces - lingual" OHDPFSo="FS - number of filled permanent surfaces - occlusal" OHDPFSb="FS - number of filled permanent surfaces - buccal" OHDPFSm="FS - number of filled permanent surfaces - mesial" OHDPFSd="FS - number of filled permanent surfaces - distal" OHDPFSlb="FS - number of filled permanent surfaces - lingual/buccal" OHDPFSmd="FS - number of filled permanent surfaces - mesial/distal" OHDPDFS="DFS - number of decayed and filled permanent surfaces DS+FS" OHDPDFSl="DFS - number of decayed and filled permanent surfaces DS+FS - lingual" OHDPDFSo="DFS - number of decayed and filled permanent surfaces DS+FS - occlusal" OHDPDFSb="DFS - number of decayed and filled permanent surfaces DS+FS - buccal" OHDPDFSm="DFS - number of decayed and filled permanent surfaces DS+FS - mesial" OHDPDFSd="DFS - number of decayed and filled permanent surfaces DS+FS - distal" OHDPDFSlb="DFS - number of decayed and filled permanent surfaces DS+FS - lingual/buccal" OHDPDFSmd="DFS - number of decayed and filled permanent surfaces DS+FS - mesial/distal" OHDPDMFS="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS" OHDPDMFSl="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual" OHDPDMFSo="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - occlusal" OHDPDMFSb="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - buccal" OHDPDMFSm="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial" OHDPDMFSd="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - distal" OHDPDMFSlb="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual/buccal" OHDPDMFSmd="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial/distal" OHDPDDFS="D/DFS (percent)" OHDPFDFS="F/DFS (percent)" OHDPDDMFS="D/DMFS (percent)" OHDPFDMFS="F/DMFS (percent)" OHDPMDMFS="M/DMFS (percent)" OHDPplDFS="lingual/DFS (percent) - lingual" OHDPpoDFS="occlusal/DFS (percent) - occlusal" OHDPpbDFS="buccal/DFS (percent) - buccal" OHDPpmDFS="mesial/DFS (percent) - mesial" OHDPpdDFS="distal/DFS (percent) - distal" OHDPplbDFS="lingual-buccal/DFS (percent) - lingual/buccal" OHDPpmdDFS="mesial-distal/DFS (percent) - mesial/distal" OHDPplDMFS="lingual/DMFS (percent) - lingual" OHDPpoDMFS="occlusal/DMFS (percent) - occlusal" OHDPpbDMFS="buccal/DMFS (percent) - buccal" OHDPpmDMFS="mesial/DMFS (percent) - mesial" OHDPpdDMFS="distal/DMFS (percent) - distal" OHDPplbDMFS="lingual-buccal/DMFS (percent) - lingual/buccal" OHDPpmdDMFS="mesial-distal/DMFS (percent) - mesial/distal" OHDPRTNT28a="Tooth retention - has 28 permanent teeth present - tc" OHDPRTNT28b="Tooth retention - has 28 permanent teeth present - ctc" OHDPRTNT21a="Tooth retention - has 21 or more permanent teeth - tc" OHDPRTNT21b="Tooth retention - has 21 or more permanent teeth - ctc" OHDPRTNT20a="Tooth retention - has 20 or more permanent teeth - tc" OHDPRTNT20b="Tooth retention - has 20 or more permanent teeth - ctc" OHDPRTNT6a="Tooth retention - has 6 or more permanent teeth - tc " OHDPRTNT6b="Tooth retention - has 6 or more permanent teeth -ctc " OHDPRTNT1a="Tooth retention - has 1 or more permanent teeth - tc " OHDPRTNT1b="Tooth retention - has 1 or more permanent teeth - ctc " OHDPLOST0="Tooth retention - lost no permanent teeth due to caries or perio (based on CTC = tooth missing due to caries/perio)" OHDPLOST6="Tooth loss - lost 6 or more teeth due to caries or perio" OHDPLOST8="Tooth loss - lost 8 or more teeth due to caries or perio" OHDPgrp="Tooth retention - WHO groups - tc - 32 tooth spaces" OHDPgrpa="Tooth retention - WHO groups - tc - 28 tooth spaces" OHDPgrpb="Tooth retention - WHO groups - ctc" OHXRTDF="Root Caries - caries or restorations" OHDMUD="Untreated decay mixed dentition - BSS" OHDMCE="Caries experience mixed dentition - decayed or filled" OHDMCEa="Caries experience mixed dentition - including missing perm due to caries or perio" OHDMCEbss="Caries experience mixed dentition - BSS - including missing perm molars due to caries or perio" OHDMST="st + ST - number of sound primary and permanent teeth" OHDMSS="ss + SS = number of sound primary and permanent surfaces" */ LIBNAME NHANESAB "K:/DOH/EVERYONE/NHANES/NHANES19992002/AnalysisFiles"; title1 "NHANES Caries, tooth retention and tooth loss variables for public release"; /*Select variables needed to create calculated caries variables for public release*/ /*Data step 1*/ data NHANESAB.ohddent; set NHANESAB.ohxdenAB; keep seqn /*Tooth count variables*/ /*Variables arrayed in order from upper right 3rd molar to lower right 3rd molar*/ ohd01tc ohd02tc ohd03tc ohd04tc ohd05tc ohd06tc ohd07tc ohd08tc ohd09tc ohd10tc ohd11tc ohd12tc ohd13tc ohd14tc ohd15tc ohd16tc ohd17tc ohd18tc ohd19tc ohd20tc ohd21tc ohd22tc ohd23tc ohd24tc ohd25tc ohd26tc ohd27tc ohd28tc ohd29tc ohd30tc ohd31tc ohd32tc /*Coronal caries tooth call variables*/ /*Variables arrayed in order from upper right 2nd molar to lower right 2nd molar*/ ohd02ctc ohd03ctc ohd04ctc ohd05ctc ohd06ctc ohd07ctc ohd08ctc ohd09ctc ohd10ctc ohd11ctc ohd12ctc ohd13ctc ohd14ctc ohd15ctc ohd18ctc ohd19ctc ohd20ctc ohd21ctc ohd22ctc ohd23ctc ohd24ctc ohd25ctc ohd26ctc ohd27ctc ohd28ctc ohd29ctc ohd30ctc ohd31ctc /*Coronal caries surface call variables*/ /*Variables arrayed in order from upper right 2nd molar to lower right 2nd molar*/ /* each variable contains information on all surfaces for one tooth*/ ohd02csc ohd03csc ohd04csc ohd05csc ohd06csc ohd07csc ohd08csc ohd09csc ohd10csc ohd11csc ohd12csc ohd13csc ohd14csc ohd15csc ohd18csc ohd19csc ohd20csc ohd21csc ohd22csc ohd23csc ohd24csc ohd25csc ohd26csc ohd27csc ohd28csc ohd29csc ohd30csc ohd31csc /*Root Caries variables*/ /*Whole mouth indicators of presence of root caries and root restorations*/ OHXRCAR OHXRRES /*NCHS edentulous indicator*/ /*Compare to calculated indicators for dentate and edentate*/ OHXEDEN ; run; /*Count teeth and surfaces by coronal caries tooth and surface call codes*/ /*Data step 2*/ data NHANESAB.ohddent; set NHANESAB.ohddent; /*data step 2, section 1*/ /*Tooth count variables*/ array tca[32] ohd01tc ohd02tc ohd03tc ohd04tc ohd05tc ohd06tc ohd07tc ohd08tc ohd09tc ohd10tc ohd11tc ohd12tc ohd13tc ohd14tc ohd15tc ohd16tc ohd17tc ohd18tc ohd19tc ohd20tc ohd21tc ohd22tc ohd23tc ohd24tc ohd25tc ohd26tc ohd27tc ohd28tc ohd29tc ohd30tc ohd31tc ohd32tc ; array tc[28] ohd02tc ohd03tc ohd04tc ohd05tc ohd06tc ohd07tc ohd08tc ohd09tc ohd10tc ohd11tc ohd12tc ohd13tc ohd14tc ohd15tc ohd18tc ohd19tc ohd20tc ohd21tc ohd22tc ohd23tc ohd24tc ohd25tc ohd26tc ohd27tc ohd28tc ohd29tc ohd30tc ohd31tc ; /*Coronal caries tooth call variables*/ array ctc[28] ohd02ctc ohd03ctc ohd04ctc ohd05ctc ohd06ctc ohd07ctc ohd08ctc ohd09ctc ohd10ctc ohd11ctc ohd12ctc ohd13ctc ohd14ctc ohd15ctc ohd18ctc ohd19ctc ohd20ctc ohd21ctc ohd22ctc ohd23ctc ohd24ctc ohd25ctc ohd26ctc ohd27ctc ohd28ctc ohd29ctc ohd30ctc ohd31ctc ; /*Coronal caries surface call variables*/ array csc[28] ohd02csc ohd03csc ohd04csc ohd05csc ohd06csc ohd07csc ohd08csc ohd09csc ohd10csc ohd11csc ohd12csc ohd13csc ohd14csc ohd15csc ohd18csc ohd19csc ohd20csc ohd21csc ohd22csc ohd23csc ohd24csc ohd25csc ohd26csc ohd27csc ohd28csc ohd29csc ohd30csc ohd31csc ; /*data step 2, section 2*/ /*Initialize tooth counters to 0 - count number of teeth based on 32 tooth spaces*/ tcpri32=0; /*primary teeth*/ tcprm32=0; /*permanent teeth*/ tcimp32=0; /*implants*/ tcmiss32=0; /*missing teeth*/ tcnodata32=0; /*missing data*/ do i=1 to 32; if tca[i] = . then tcnodata32 + 1; else if tca[i] = 1 then tcpri32 + 1; else if tca[i] = 2 then tcprm32 + 1; else if tca[i] = 3 then tcimp32 + 1; else if tca[i] = 4 then tcmiss32 + 1; end; drop i; /*Set tooth counters to missing if all tooth count vars missing data*/ if tcnodata32=32 then do; tcpri32=.; tcprm32=.; tcimp32=.; tcmiss32=.; end; /*total number of primary(T) and permanent(P) teeth*/ tc32TP=sum(of tcpri32 tcprm32); /*total number of primary(T), permanent(P) or implanted (I) teeth*/ tc32TPI=sum(of tcpri32 tcprm32 tcimp32); /*Dentate based on permanent teeth - 32 tooth spaces*/ if tcprm32=. then do; dentate32P=.; edentate32P=.; end; else if tcprm32 >=0 then do; if tcprm32=0 then do; dentate32P=2; edentate32P=1; end; else if tcprm32>=1 then do; dentate32P=1; edentate32P=2; end; end; /*Dentate based on permanent and primary teeth - 32 tooth spaces*/ if tc32TP=. then do; dentate32TP=.; edentate32TP=.; end; else if tc32TP >=0 then do; if tc32TP=0 then do; dentate32TP=2; edentate32TP=1; end; else if tc32TP>=1 then do; dentate32TP=1; edentate32TP=2; end; end; /*Dentate based on primary, permanent, and implanted teeth - 32 tooth spaces*/ if tc32TPI=. then do; dentate32TPI=.; edentate32TPI=.; end; else if tc32TPI >=0 then do; if tc32TPI=0 then do; dentate32TPI=2; edentate32TPI=1; end; else if tc32TPI>=1 then do; dentate32TPI=1; edentate32TPI=2; end; end; /*Initialize tooth counters to 0 - count number of teeth based on 28 tooth spaces*/ tcpri28=0; /*primary teeth*/ tcprm28=0; /*permanent teeth*/ tcimp28=0; /*implants*/ tcmiss28=0; /*missing teeth*/ tcnodata28=0; /*missing data*/ do i=1 to 28; if tc[i] = . then tcnodata28 + 1; else if tc[i] = 1 then tcpri28 + 1; else if tc[i] = 2 then tcprm28 + 1; else if tc[i] = 3 then tcimp28 + 1; else if tc[i] = 4 then tcmiss28 + 1; end; drop i; /*Set tooth counters to missing if all tooth count vars missing data*/ if tcnodata28=28 then do; tcpri28=.; tcprm28=.; tcimp28=.; tcmiss28=.; end; /*total number of primary(T) and permanent(P) teeth*/ tc28TP=sum(of tcpri28 tcprm28); /*total number of primary(T), permanent(P) or implanted (I) teeth*/ tc28TPI=sum(of tcpri28 tcprm28 tcimp28); /*Dentate based on permanent teeth - 28 tooth spaces*/ if tcprm28=. then do; dentate28P=.; edentate28P=.; end; else if tcprm28 >=0 then do; if tcprm28=0 then do; dentate28P=2; edentate28P=1; end; else if tcprm28>=1 then do; dentate28P=1; edentate28P=2; end; end; /*Dentate based on permanent and primary teeth - 28 tooth spaces*/ if tc28TP=. then do; dentate28TP=.; edentate28TP=.; end; else if tc28TP >=0 then do; if tc28TP=0 then do; dentate28TP=2; edentate28TP=1; end; else if tc28TP>=1 then do; dentate28TP=1; edentate28TP=2; end; end; /*Dentate based on primary, permanent, and implanted teeth - 28 tooth spaces*/ if tc28TPI=. then do; dentate28TPI=.; edentate28TPI=.; end; else if tc28TPI >=0 then do; if tc28TPI=0 then do; dentate28TPI=2; edentate28TPI=1; end; else if tc28TPI>=1 then do; dentate28TPI=1; edentate28TPI=2; end; end; /*No permanent teeth by arch - counting 3rd molars - 16 teeth per arch*/ array uppera[16] ohd08tc ohd07tc ohd06tc ohd05tc ohd04tc ohd03tc ohd02tc ohd01tc ohd09tc ohd10tc ohd11tc ohd12tc ohd13tc ohd14tc ohd15tc ohd16tc ; array lowera[16] ohd24tc ohd23tc ohd22tc ohd21tc ohd20tc ohd19tc ohd18tc ohd19tc ohd25tc ohd26tc ohd27tc ohd28tc ohd29tc ohd30tc ohd31tc ohd32tc ; tcprmu16=0; /*number of permanent teeth in upper arch*/ tcnodatau16=0; /*number of teeth with no data in upper arch*/ do i=1 to 16; if uppera[i]=. then tcnodatau16+1; else if uppera[i]=2 then tcprmu16+1; end; drop i; if tcnodatau16=16 then tcprmu16=.; tcprml16=0; /*number of permanent teeth in lower arch*/ tcnodatal16=0; /*number of teeth with no data in lower arch*/ do i=1 to 16; if lowera[i]=. then tcnodatal16+1; else if lowera[i]=2 then tcprml16+1; end; drop i; if tcnodatal16=16 then tcprml16=.; /*No permanent teeth by arch - not counting 3rd molars - 14 teeth per arch*/ array upper[14] ohd08tc ohd07tc ohd06tc ohd05tc ohd04tc ohd03tc ohd02tc ohd09tc ohd10tc ohd11tc ohd12tc ohd13tc ohd14tc ohd15tc ; array lower[14] ohd24tc ohd23tc ohd22tc ohd21tc ohd20tc ohd19tc ohd18tc ohd25tc ohd26tc ohd27tc ohd28tc ohd29tc ohd30tc ohd31tc ; tcprmu14=0; /*number of permanent teeth in upper arch*/ tcnodatau14=0; /*number of teeth with no data in upper arch*/ do i=1 to 14; if upper[i]=. then tcnodatau14+1; else if upper[i]=2 then tcprmu14+1; end; drop i; if tcnodatau14=14 then tcprmu14=.; tcprml14=0; /*number of permanent teeth in lower arch*/ tcnodatal14=0; /*number of teeth with no data in lower arch*/ do i=1 to 14; if lower[i]=. then tcnodatal14+1; else if lower[i]=2 then tcprml14+1; end; drop i; if tcnodatal14=14 then tcprml14=.; /*Count number of missing permanent molars for BSS indicators of Caries Experience*/ array permol[8] ohd02ctc ohd03ctc ohd14ctc ohd15ctc ohd18ctc ohd19ctc ohd30ctc ohd31ctc ; PMTmol=0; /*set counter to 0 for number of permanent molars missing due to caries or perio*/ /*if tooth level variable is E for missing permanent due to caries*/ /*If tooth is coded R for missing due to dental disease but replaced by a fixed restoration or P for missing due to dental disease but replaced by a removable restoration*/ do i=1 to 8; if permol[i] in('E','P','R') then PMTmol+1; end; drop i; /*data step 2, section 3*/ /*Initialize counters for components of dft, dfs, DFMT and DMFS and other tooth codes*/ /*Count number of ... */ tst=0; /*sound primary teeth*/ tdt=0; /*decayed primary teeth*/ tft=0; /*filled primary teeth*/ tss=0; /*sound primary surfaces*/ tsso=0; /*sound primary occlusal surfaces*/ tssl=0; /*sound primary lingual surfaces*/ tssb=0; /*sound primary buccal surfaces*/ tssm=0; /*sound primary mesial surfaces*/ tssd=0; /*sound primary distal surfaces*/ tds=0; /*decayed primary surfaces*/ tdso=0; /*decayed primary occlusal surfaces*/ tdsl=0; /*decayed primary lingual surfaces*/ tdsb=0; /*decayed primary buccal surfaces*/ tdsm=0; /*decayed primary mesial surfaces*/ tdsd=0; /*decayed primary distal surfaces*/ tfs=0; /*filled primary surfaces*/ tfso=0; /*filled primary occlusal surfaces*/ tfsl=0; /*filled primary lingual surfaces*/ tfsb=0; /*filled primary buccal surfaces*/ tfsm=0; /*filled primary mesial surfaces*/ tfsd=0; /*filled primary distal surfaces*/ tvalid=0; /*primary teeth with valid data*/ tnodata=0; /*primary teeth with no data*/ tcant=0; /*primary teeth that cannot be assessed*/ PST=0; /*sound permanent teeth*/ PDT=0; /*decayed permanent teeth*/ PMT=0; /*missing permanent teeth (due to disease)*/ PFT=0; /*filled permanent teeth*/ PSS=0; /*sound permanent surfaces*/ PSSo=0; /*sound permanent occlusal surfaces*/ PSSl=0; /*sound permanent lingual surfaces*/ PSSb=0; /*sound permanent buccal surfaces*/ PSSm=0; /*sound permanent mesial surfaces*/ PSSd=0; /*sound permanent distal surfaces*/ PDS=0; /*decayed permanent surfaces*/ PDSo=0; /*decayed permanent occlusal surfaces*/ PDSl=0; /*decayed permanent lingual surfaces*/ PDSb=0; /*decayed permanent buccal surfaces*/ PDSm=0; /*decayed permanent mesial surfaces*/ PDSd=0; /*decayed permanent distal surfaces*/ PMS=0; /*missing permanent surfaces (due to disease)*/ PMSo=0; /*missing permanent occlusal surfaces*/ PMSl=0; /*missing permanent lingual surfaces*/ PMSb=0; /*missing permanent buccal surfaces*/ PMSm=0; /*missing permanent mesial surfaces*/ PMSd=0; /*missing permanent distal surfaces*/ PFS=0; /*filled permanent surfaces*/ PFSo=0; /*filled permanent occlusal surfaces*/ PFSl=0; /*filled permanent lingual surfaces*/ PFSb=0; /*filled permanent buccal surfaces*/ PFSm=0; /*filled permanent mesial surfaces*/ PFSd=0; /*filled permanent distal surfaces*/ PVALID=0; /*permanent teeth with valid scores*/ PUNERPT=0; /*Unerupted teeth*/ PNODATA=0; /*permanent teeth with no data*/ PCANT=0; /*permanent teeth that cannot be assessed*/ do i=1 to 28; /*if tooth code is D for sound primary, set all surface codes to 1 for sound*/ if ctc(i) = 'D' then do; if i in(5,6,7,8,9,10) or i in(19,20,21,22,23,24) then do; tss+4; /*count 4 sound anterior surfaces*/ tssl+1; /*count 1 sound lingual surface */ tssb+1; /*count 1 sound buccal surface */ tssm+1; /*count 1 sound mesial surface */ tssd+1; /*count 1 sound distal surface */ end; /*Set 5 surfaces for posterior teeth to 1 for sound primary*/ else if i in(3,4,11,12) or i in(17,18,25,26) then do; tss+5; /*count 5 sound posterior surfaces*/ tsso+1; /*count 1 sound occlusal surface */ tssl+1; /*count 1 sound lingual surface */ tssb+1; /*count 1 sound buccal surface */ tssm+1; /*count 1 sound mesial surface */ tssd+1; /*count 1 sound distal surface */ end; tst+1; /*Count 1 sound tooth*/ tvalid+1; /*count as tooth with valid score*/ end; /*if tooth code is K for primary with surface conditions*/ else if ctc(i) = 'K' then do; substrng = csc(i); /* initialize counters */ decay = 0; filling = 0; x='X'; /*Read the surface variable string place by place*/ /*Code the NHANES III-like surface variables */ do j = 1 to 10; retain decay filling; x = substr(substrng,j,1); if x = '0' then do; tds+1; tdsl+1; end; else if x = '1' then do; tds+1; tdso+1; end; else if x = '2' then do; tds+1; tdsb+1; end; else if x = '3' then do; tds+1; tdsm+1; end; else if x = '4' then do; tds+1; tdsd+1; end; else if x = '5' then do; tfs+1; tfsl+1; end; else if x = '6' then do; tfs+1; tfso+1; end; else if x = '7' then do; tfs+1; tfsb+1; end; else if x = '8' then do; tfs+1; tfsm+1; end; else if x = '9' then do; tfs+1; tfsd+1; end; if x in('0','1','2','3','4') then decay = 1; else if x in('5','6','7','8','9') then filling = 1; end; /*Count decay or filling at tooth level*/ /*If both decay and fillings are present, only decay is coded*/ if decay = 1 then tdt+1; /*Count a decayed primary tooth*/ else if filling = 1 then tft+1; /*Count a filled primary tooth*/ tvalid+1; /*Count a primary tooth with valid code*/ end; else /*if tooth level variable is E for missing permanent due to caries*/ /*If tooth is coded R for missing due to dental disease but replaced by a fixed restoration or P for missing due to dental disease but replaced by a removable restoration*/ if ctc(i) in ('E','P','R') then do; /*Set anterior teeth surfaces to missing*/ if i in(5,6,7,8,9,10) or i in(19,20,21,22,23,24) then do; PMS+4; /*Count 4 permanent surfaces as missing*/ PMSl+1; /*Count one permanent lingual surface missing*/ PMSb+1; /*Count one permanent buccal surface missing*/ PMSm+1; /*Count one permanent mesial surface missing*/ PMSd+1; /*Count one permanent distal surface missing*/ end; /*Set posterior teeth surfaces to missing*/ else if i in(1,2,3,4) or i in(11,12,13,14,15,16,17,18) or i in(25,26,27,28) then do; PMS+5; /*Count 5 permanent surfaces as missing*/ PMSl+1; /*Count one permanent lingual surface missing*/ PMSo+1; /*Count one permanent occlusal surface missing*/ PMSb+1; /*Count one permanent buccal surface missing*/ PMSm+1; /*Count one permanent mesial surface missing*/ PMSd+1; /*Count one permanent distal surface missing*/ end; PMT+1;/*Count missing permanent tooth*/ PVALID+1; /*Count a permanent tooth with a valid score*/ end; /*If tooth is M for missing permanent due to other causes*/ else if ctc(i) = 'M' then PVALID+1; /*Count a permanent tooth with a valid score*/ /*If tooth is coded X for missing due to other causes with fixed replacement or Q for missing due to other causes with removable replacement*/ else if ctc(i) in ('Q','X') then PVALID+1; /*Count a permanent tooth with a valid score*/ /*If tooth is coded S for sound permanent*/ else if ctc(i) = 'S' then do; if i in(5,6,7,8,9,10) or i in(19,20,21,22,23,24) then do ; PSS+4;/*Count 4 sound permanent surfaces*/ PSSl+1; /*Count one sound permanent lingual surface*/ PSSb+1; /*Count one sound permanent buccal surface*/ PSSm+1; /*Count one sound permanent mesial surface*/ PSSd+1; /*Count one sound permanent distal surface*/ end; else if i in(1,2,3,4) or i in(11,12,13,14,15,16,17,18) or i in(25,26,27,28) then do; PSS+5;/*Count 5 sound permanent surfaces*/ PSSl+1; /*Count one sound permanent lingual surface*/ PSSo+1; /*Count one sound permanent occlusal surface*/ PSSb+1; /*Count one sound permanent buccal surface*/ PSSm+1; /*Count one sound permanent mesial surface*/ PSSd+1; /*Count one sound permanent distal surface*/ end; PST+1; /*Count a sound permanent tooth*/ PVALID+1; /*Count a permanent tooth with a valid score*/ end; /*If tooth is coded Z for permanent with surface conditions*/ else if ctc(i) = 'Z' then do; substrng = csc(i); /*Set counters to zero*/ decay = 0; filling = 0; x='X'; /*Read surface variable string place by place*/ do j = 1 to 10; retain decay filling; x = substr(substrng,j,1); if x = '0' then do; PDS+1; PDSl+1; end; else if x = '1' then do; PDS+1; PDSo+1; end; else if x = '2' then do; PDS+1; PDSb+1; end; else if x = '3' then do; PDS+1; PDSm+1; end; else if x = '4' then do; PDS+1; PDSd+1; end; else if x = '5' then do; PFS+1; PFSl+1; end; else if x = '6' then do; PFS+1; PFSo+1; end; else if x = '7' then do; PFS+1; PFSb+1; end; else if x = '8' then do; PFS+1; PFSm+1; end; else if x = '9' then do; PFS+1; PFSd+1; end; if x in('0','1','2','3','4') then decay = 1; else if x in('5','6','7','8','9') then filling = 1; end; /*If both decay and filling are present, only decay is coded*/ if decay = 1 then PDT+1; /*Count a decayed tooth*/ else if filling = 1 then PFT+1; /*Count a filled tooth*/ PVALID+1; end; /*If tooth is coded U for unerupted*/ else if ctc(i) = 'U' then PUNERPT+1; /*Count an unerupted tooth*/ /*If tooth is coded Y for tooth present condition cannot be assessed*/ else if ctc(i) = 'Y' and tc(i)=1 then tcant+1; /*Count a primary tooth that can't be assessed*/ else if ctc(i) = 'Y' and tc(i)=2 then PCANT+1; /*Count a permanent tooth that can't be assessed*/ /*If Coronal caries tooth count variable is missing data*/ else if ctc(i) = '' and tc(i)= 1 then tnodata+1; /* Count a primary tooth with no data */ else if ctc(i) = '' and tc(i)=2 then PNODATA+1; /*Count a permanent tooth with no data*/ end; drop i j substrng x decay filling; /*Create flags for participants with one or more CTC codes useable for calculating df/DMF indices does not count teeth with codes Y for cannot assess, U for unerupted does count teeth with codes for missing due to other than caries/perio and missing but replaced*/ /*tvldCTC primary teeth with valid CTC scores for dft/s*/ if tvalid>0 then TvldCTC=1; else TvldCTC=.; /*PvldCTC permanent teeth with valid CTC scores for DMFT/S*/ if PVALID>0 then PvldCTC=1; else PvldCTC=.; /*TPvldCTC primary or permanent teeth with valid CTC scores for df/DMF in mixed dentition*/ if tvalid>0 or PVALID>0 then TPvldCTC=1; else TPvldCTC=.; /*Create flag for participants with one or more teeth present based on CTC codes for 28 teeth*/ /*TnpresCTC primary teeth present - CTC for 28 teeth*/ TnpresCTC=sum(of tst tdt tft tcant); if TnpresCTC>0 then TpresCTC=1; else TpresCTC=.; /*PpresCTC permanent teeth present - CTC for 28 teeth*/ PnpresCTC=sum(of PST PDT PFT PCANT); if PnpresCTC>0 then PpresCTC=1; else PpresCTC=.; /*TPpresCTC primary and permanent teeth present CTC for 28 teeth*/ TPnpresCTC=sum(of tst tdt tft tcant PST PDT PFT PCANT); if TPnpresCTC>0 then TPpresCTC=1; else TPpresCTC=.; /*data step2, section 4*/ label tcpri32="primary teeth - 32 tooth spaces" tcprm32="permanent teeth - 32 tooth spaces" tcimp32="implants - 32 tooth spaces" tcmiss32="missing teeth - 32 tooth spaces" tcnodata32="missing data - 32 tooth spaces" tc32TP="total number of primary(T) and permanent(P) teeth - 32 spaces" tc32TPI="total number of primary(T), permanent(P) or implanted (I) teeth - 32 spaces" dentate32P="Dentate based on perm teeth 32 spaces - 1=yes 2=no" edentate32P="Edentate based on perm teeth 32 spaces - 1=yes 2=no" dentate32TP="Dentate based on primary and perm teeth 32 spaces - 1=yes 2=no" edentate32TP="Edentate based on primary and perm teeth 32 spaces - 1=yes 2=no" dentate32TPI="Dentate based on primary, perm and implanted teeth 32 spaces - 1=yes 2=no" edentate32TPI="Edentate based on primary, perm and implanted teeth 32 spaces - 1=yes 2=no" tcpri28="primary teeth - 28 tooth spaces" tcprm28="permanent teeth - 28 tooth spaces" tcimp28="implants - 28 tooth spaces" tcmiss28="missing teeth - 28 tooth spaces" tcnodata28="missing data - 28 tooth spaces" tc28TP="total number of primary(T) and permanent(P) teeth - 28 spaces" tc28TPI="total number of primary(T), permanent(P) or implanted (I) teeth - 28 spaces" dentate28P="Dentate based on perm teeth 28 spaces - 1=yes 2=no" edentate28P="Edentate based on perm teeth 28 spaces - 1=yes 2=no" dentate28TP="Dentate based on primary and perm teeth 28 spaces - 1=yes 2=no" edentate28TP="Edentate based on primary and perm teeth 28 spaces - 1=yes 2=no" dentate28TPI="Dentate based on primary, perm and implanted teeth 28 spaces - 1=yes 2=no" edentate28TPI="Edentate based on primary, perm and implanted teeth 28 spaces - 1=yes 2=no" tcprmu14="permanent teeth in upper arch - 14 spaces excl. 3rd molars" tcprml14="permanent teeth in lower arch - 14 spaces excl. 3rd molars" tcnodatau14="teeth with no data in upper arch - 14 spaces excl. 3rd molars" tcnodatal14="teeth with no data in lower arch - 14 spaces excl. 3rd molars" tcprmu16="permanent teeth in upper arch - 16 spaces incl. 3rd molars" tcprml16="permanent teeth in lower arch - 16 spaces incl. 3rd molars" tcnodatau16="teeth with no data in upper arch - 16 spaces incl. 3rd molars" tcnodatal16="teeth with no data in lower arch - 16 spaces incl. 3rd molars" TnpresCTC="number of primary teeth present - based on CTC codes" TpresCTC="has any primary teeth present - based on CTC codes" TvldCTC="number of primary teeth with valid CTC scores for df indices" PnpresCTC="number of permanent teeth present - based on CTC codes" PpresCTC="has any permanent teeth present - based on CTC codes" PvldCTC="number of permanent teeth with valid CTC scores for DMF indices" TPnpresCTC="number of primary and permanent teeth present - based on CTC codes" TPpresCTC="has any primary or permanent teeth present - based on CTC codes" TPvldCTC="number of primary and permanent teeth with valid CTC scores for df indices" tst="sound primary teeth" tdt="decayed primary teeth" tft="filled primary teeth" tss="sound primary surfaces" tssl="sound primary surfaces - lingual" tsso="sound primary surfaces - occlusal" tssb="sound primary surfaces - buccal" tssm="sound primary surfaces - mesial" tssd="sound primary surfaces - distal" tds="decayed primary surfaces" tdsl="decayed primary surfaces - lingual" tdso="decayed primary surfaces - occlusal" tdsb="decayed primary surfaces - buccal" tdsm="decayed primary surfaces - mesial" tdsd="decayed primary surfaces - distal" tfs="filled primary surfaces" tfsl="filled primary surfaces - lingual" tfso="filled primary surfaces - occlusal" tfsb="filled primary surfaces - buccal" tfsm="filled primary surfaces - mesial" tfsd="filled primary surfaces - distal" tvalid="number of primary teeth with valid data for creating df indices" tnodata="primary teeth with no data" tcant="primary teeth that cannot be assessed" PST="sound permanent teeth" PDT="decayed permanent teeth" PMT="missing permanent teeth (due to disease)" PMTmol="missing permanent molars (due to disease)" PFT="filled permanent teeth" PSS="sound permanent surfaces" PSSl="sound permanent surfaces - lingual" PSSo="sound permanent surfaces - occlusal" PSSb="sound permanent surfaces - buccal" PSSm="sound permanent surfaces - mesial" PSSd="sound permanent surfaces - distal" PDS="decayed permanent surfaces" PDSl="decayed permanent surfaces - lingual" PDSo="decayed permanent surfaces - occlusal" PDSb="decayed permanent surfaces - buccal" PDSm="decayed permanent surfaces - mesial" PDSd="decayed permanent surfaces - distal" PMS="missing permanent surfaces (due to disease)" PMSl="missing permanent surfaces (due to disease) - lingual" PMSo="missing permanent surfaces (due to disease) - occlusal" PMSb="missing permanent surfaces (due to disease) - buccal" PMSm="missing permanent surfaces (due to disease) - mesial" PMSd="missing permanent surfaces (due to disease) - distal" PFS="filled permanent surfaces" PFSl="filled permanent surfaces - lingual" PFSo="filled permanent surfaces - occlusal" PFSb="filled permanent surfaces - buccal" PFSm="filled permanent surfaces - mesial" PFSd="filled permanent surfaces - distal" PVALID="number of permanent teeth with valid data for creating DMF indices" PUNERPT="unerupted teeth" PNODATA="permanent teeth with no data" PCANT="permanent teeth that cannot be assessed" ; run; /*Create public release variables for primary and permanent dentition*/ /*data step 3*/ data NHANESAB.ohddent; set NHANESAB.ohddent; /*Create public release variables for df indices for primary teeth and surfaces*/ /*If no data on tooth count variables then set all primary variables to . for no data*/ /*data step 3, section 1*/ if tcnodata28=28 then do; OHDTST=.; /*st - number of sound primary teeth*/ OHDTDT=.; /*dt - number of decayed primary teeth*/ OHDTFT=.; /*ft - number of filled primary teeth*/ OHDTDFT=.; /*dft - number of decayed and filled primary teeth dt+ft*/ OHDTDDFT=.; /*percent d/dft*/ OHDTFDFT=.; /*percent f/dft*/ OHDTSS=.; /*ss - number of sound primary surfaces*/ OHDTDS=.; /*ds - number of decayed primary surfaces*/ OHDTDSl=.; /*ds - number of decayed primary surfaces - lingual*/ OHDTDSo=.; /*ds - number of decayed primary surfaces - occlusal*/ OHDTDSb=.; /*ds - number of decayed primary surfaces - buccal*/ OHDTDSm=.; /*ds - number of decayed primary surfaces - mesial*/ OHDTDSd=.; /*ds - number of decayed primary surfaces - distal*/ OHDTDSlb=.; /*ds - number of decayed primary surfaces - lingual/buccal*/ OHDTDSmd=.; /*ds - number of decayed primary surfaces - mesial/distal*/ OHDTFS=.; /*fs - number of filled primary surfaces*/ OHDTFSl=.; /*fs - number of filled primary surfaces - lingual*/ OHDTFSo=.; /*fs - number of filled primary surfaces - occlusal*/ OHDTFSb=.; /*fs - number of filled primary surfaces - buccal*/ OHDTFSm=.; /*fs - number of filled primary surfaces - mesial*/ OHDTFSd=.; /*fs - number of filled primary surfaces - distal*/ OHDTFSlb=.; /*fs - number of filled primary surfaces - lingual/buccal*/ OHDTFSmd=.; /*fs - number of filled primary surfaces - mesial/distal*/ OHDTDFS=.; /*dfs - number of decayed and filled primary surfaces ds+fs*/ OHDTDFSl=.; /*dfs - number of decayed and filled primary surfaces ds+fs - lingual*/ OHDTDFSo=.; /*dfs - number of decayed and filled primary surfaces ds+fs - occlusal*/ OHDTDFSb=.; /*dfs - number of decayed and filled primary surfaces ds+fs - buccal*/ OHDTDFSm=.; /*dfs - number of decayed and filled primary surfaces ds+fs - mesial*/ OHDTDFSd=.; /*dfs - number of decayed and filled primary surfaces ds+fs - distal*/ OHDTDFSlb=.; /*dfs - number of decayed and filled primary surfaces ds+fs - lingual/buccal*/ OHDTDFSmd=.; /*dfs - number of decayed and filled primary surfaces ds+fs - mesial/distal*/ OHDTDDFS=.; /*percent d/dfs*/ OHDTFDFS=.; /*percent f/dfs*/ OHDTplDFS=.; /*percent lingual/dfs*/ OHDTpoDFS=.; /*percent occlusal/dfs*/ OHDTpbDFS=.; /*percent buccal/dfs*/ OHDTpmDFS=.; /*percent mesial/dfs*/ OHDTpdDFS=.; /*percent distal/dfs*/ OHDTplbDFS=.; /*percent lingual-buccal/dfs*/ OHDTpmdDFS=.; /*percent mesial-distal/dfs*/ OHDTUD=.; /*Untreated decay: has 1 or more primary teeth with untreated decay*/ OHDTCE=.; /*Caries experience: has 1 or more primary teeth affected by decay/sequelae*/ end; /* if no primary teeth present set all primary variables to 8, 88, or 888 for no primary teeth*/ else if tcpri28=0 or (tcpri28>0 and tvalid=0 and tcant=0) then do; OHDTST=88; /*st - number of sound primary teeth*/ OHDTDT=88; /*dt - number of decayed primary teeth*/ OHDTFT=88; /*ft - number of filled primary teeth*/ OHDTDFT=88; /*dft - number of decayed and filled primary teeth dt+ft*/ OHDTDDFT=888; /*percent d/dft*/ OHDTFDFT=888; /*percent f/dft*/ OHDTSS=888; /*ss - number of sound primary surfaces*/ OHDTDS=888; /*ds - number of decayed primary surfaces*/ OHDTDSl=888; /*ds - number of decayed primary surfaces - lingual*/ OHDTDSo=888; /*ds - number of decayed primary surfaces - occlusal*/ OHDTDSb=888; /*ds - number of decayed primary surfaces - buccal*/ OHDTDSm=888; /*ds - number of decayed primary surfaces - mesial*/ OHDTDSd=888; /*ds - number of decayed primary surfaces - distal*/ OHDTDSlb=888; /*ds - number of decayed primary surfaces - lingual/buccal*/ OHDTDSmd=888; /*ds - number of decayed primary surfaces - mesial/distal*/ OHDTFS=888; /*fs - number of filled primary surfaces*/ OHDTFSl=888; /*fs - number of filled primary surfaces - lingual*/ OHDTFSo=888; /*fs - number of filled primary surfaces - occlusal*/ OHDTFSb=888; /*fs - number of filled primary surfaces - buccal*/ OHDTFSm=888; /*fs - number of filled primary surfaces - mesial*/ OHDTFSd=888; /*fs - number of filled primary surfaces - distal*/ OHDTFSlb=888; /*fs - number of filled primary surfaces - lingual/buccal*/ OHDTFSmd=888; /*fs - number of filled primary surfaces - mesial/distal*/ OHDTDFS=888; /*dfs - number of decayed and filled primary surfaces ds+fs*/ OHDTDFSl=888; /*dfs - number of decayed and filled primary surfaces ds+fs - lingual*/ OHDTDFSo=888; /*dfs - number of decayed and filled primary surfaces ds+fs - occlusal*/ OHDTDFSb=888; /*dfs - number of decayed and filled primary surfaces ds+fs - buccal*/ OHDTDFSm=888; /*dfs - number of decayed and filled primary surfaces ds+fs - mesial*/ OHDTDFSd=888; /*dfs - number of decayed and filled primary surfaces ds+fs - distal*/ OHDTDFSlb=888; /*dfs - number of decayed and filled primary surfaces ds+fs - lingual/buccal*/ OHDTDFSmd=888; /*dfs - number of decayed and filled primary surfaces ds+fs - mesial/distal*/ OHDTDDFS=888; /*percent d/dfs*/ OHDTFDFS=888; /*percent f/dfs*/ OHDTplDFS=888; /*percent lingual/dfs*/ OHDTpoDFS=888; /*percent occlusal/dfs*/ OHDTpbDFS=888; /*percent buccal/dfs*/ OHDTpmDFS=888; /*percent mesial/dfs*/ OHDTpdDFS=888; /*percent distal/dfs*/ OHDTplbDFS=888; /*percent lingual-buccal/dfs*/ OHDTpmdDFS=888; /*percent mesial-distal/dfs*/ OHDTUD=8; /*Untreated decay: has 1 or more primary teeth with untreated decay*/ OHDTCE=8; /*Caries experience: has 1 or more primary teeth affected by decay/sequelae*/ end; /*If no primary teeth present with valid data for calculating df indices set to 9, 99 or 999*/ else if tcpri28>0 and tvalid=0 and tcant>0 then do; OHDTST=99; /*st - number of sound primary teeth*/ OHDTDT=99; /*dt - number of decayed primary teeth*/ OHDTFT=99; /*ft - number of filled primary teeth*/ OHDTDFT=99; /*dft - number of decayed and filled primary teeth dt+ft*/ OHDTDDFT=999; /*percent d/dft*/ OHDTFDFT=999; /*percent f/dft*/ OHDTSS=999; /*ss - number of sound primary surfaces*/ OHDTDS=999; /*ds - number of decayed primary surfaces*/ OHDTDSl=999; /*ds - number of decayed primary surfaces - lingual*/ OHDTDSo=999; /*ds - number of decayed primary surfaces - occlusal*/ OHDTDSb=999; /*ds - number of decayed primary surfaces - buccal*/ OHDTDSm=999; /*ds - number of decayed primary surfaces - mesial*/ OHDTDSd=999; /*ds - number of decayed primary surfaces - distal*/ OHDTDSlb=999; /*ds - number of decayed primary surfaces - lingual/buccal*/ OHDTDSmd=999; /*ds - number of decayed primary surfaces - mesial/distal*/ OHDTFS=999; /*fs - number of filled primary surfaces*/ OHDTFSl=999; /*fs - number of filled primary surfaces - lingual*/ OHDTFSo=999; /*fs - number of filled primary surfaces - occlusal*/ OHDTFSb=999; /*fs - number of filled primary surfaces - buccal*/ OHDTFSm=999; /*fs - number of filled primary surfaces - mesial*/ OHDTFSd=999; /*fs - number of filled primary surfaces - distal*/ OHDTFSlb=999; /*fs - number of filled primary surfaces - lingual/buccal*/ OHDTFSmd=999; /*fs - number of filled primary surfaces - mesial/distal*/ OHDTDFS=999; /*dfs - number of decayed and filled primary surfaces ds+fs*/ OHDTDFSl=999; /*dfs - number of decayed and filled primary surfaces ds+fs - lingual*/ OHDTDFSo=999; /*dfs - number of decayed and filled primary surfaces ds+fs - occlusal*/ OHDTDFSb=999; /*dfs - number of decayed and filled primary surfaces ds+fs - buccal*/ OHDTDFSm=999; /*dfs - number of decayed and filled primary surfaces ds+fs - mesial*/ OHDTDFSd=999; /*dfs - number of decayed and filled primary surfaces ds+fs - distal*/ OHDTDFSlb=999; /*dfs - number of decayed and filled primary surfaces ds+fs - lingual/buccal*/ OHDTDFSmd=999; /*dfs - number of decayed and filled primary surfaces ds+fs - mesial/distal*/ OHDTDDFS=999; /*percent d/dfs*/ OHDTFDFS=999; /*percent f/dfs*/ OHDTplDFS=999; /*percent lingual/dfs*/ OHDTpoDFS=999; /*percent occlusal/dfs*/ OHDTpbDFS=999; /*percent buccal/dfs*/ OHDTpmDFS=999; /*percent mesial/dfs*/ OHDTpdDFS=999; /*percent distal/dfs*/ OHDTplbDFS=999; /*percent lingual-buccal/dfs*/ OHDTpmdDFS=999; /*percent mesial-distal/dfs*/ OHDTUD=9; /*Untreated decay: has 1 or more primary teeth with untreated decay*/ OHDTCE=9; /*Caries experience: has 1 or more primary teeth affected by decay/sequelae*/ end; else if tvalid>0 then do; OHDTST=tst; /*st - number of sound primary teeth*/ OHDTDT=tdt; /*dt - number of decayed primary teeth*/ OHDTFT=tft; /*ft - number of filled primary teeth*/ OHDTDFT=tdt+tft; /*dft - number of decayed and filled primary teeth dt+ft*/ if OHDTDFT>0 then OHDTDDFT=round((tdt/(tdt+tft))*100); /*percent d/dft*/ else OHDTDDFT=.; if OHDTDFT>0 then OHDTFDFT=round((tft/(tdt+tft))*100); /*percent f/dft*/ else OHDTFDFT=.; OHDTSS=tss; /*ss - number of sound primary surfaces*/ OHDTDS=tds; /*ds - number of decayed primary surfaces*/ OHDTDSl=tdsl; /*ds - number of decayed primary surfaces - lingual*/ OHDTDSo=tdso; /*ds - number of decayed primary surfaces - occlusal*/ OHDTDSb=tdsb; /*ds - number of decayed primary surfaces - buccal*/ OHDTDSm=tdsm; /*ds - number of decayed primary surfaces - mesial*/ OHDTDSd=tdsd; /*ds - number of decayed primary surfaces - distal*/ OHDTDSlb=tdsl+tdsb; /*ds - number of decayed primary surfaces - lingual/buccal*/ OHDTDSmd=tdsm+tdsd; /*ds - number of decayed primary surfaces - mesial/distal*/ OHDTFS=tfs; /*fs - number of filled primary surfaces*/ OHDTFSl=tfsl; /*fs - number of filled primary surfaces - lingual*/ OHDTFSo=tfso; /*fs - number of filled primary surfaces - occlusal*/ OHDTFSb=tfsb; /*fs - number of filled primary surfaces - buccal*/ OHDTFSm=tfsm; /*fs - number of filled primary surfaces - mesial*/ OHDTFSd=tfsd; /*fs - number of filled primary surfaces - distal*/ OHDTFSlb=tfsl+tfsb; /*fs - number of filled primary surfaces - lingual/buccal*/ OHDTFSmd=tfsm+tfsd; /*fs - number of filled primary surfaces - mesial/distal*/ OHDTDFS=tds+tfs; /*dfs - number of decayed and filled primary surfaces ds+fs*/ OHDTDFSl=tdsl+tfsl; /*dfs - number of decayed and filled primary surfaces ds+fs - lingual*/ OHDTDFSo=tdso+tfso; /*dfs - number of decayed and filled primary surfaces ds+fs - occlusal*/ OHDTDFSb=tdsb+tfsb; /*dfs - number of decayed and filled primary surfaces ds+fs - buccal*/ OHDTDFSm=tdsm+tfsm; /*dfs - number of decayed and filled primary surfaces ds+fs - mesial*/ OHDTDFSd=tdsd+tfsd; /*dfs - number of decayed and filled primary surfaces ds+fs - distal*/ OHDTDFSlb=tdsl+tdsb+tfsl+tfsb; /*dfs - number of decayed and filled primary surfaces ds+fs - lingual/buccal*/ OHDTDFSmd=tdsm+tdsd+tfsm+tfsd; /*dfs - number of decayed and filled primary surfaces ds+fs - mesial/distal*/ if OHDTDFS>0 then OHDTDDFS=round((tds/(tds+tfs))*100); /*percent d/dfs*/ else OHDTDDFS=.; if OHDTDFS>0 then OHDTFDFS=round((tfs/(tds+tfs))*100); /*percent f/dfs*/ else OHDTFDFS=.; if OHDTDFS>0 then OHDTplDFS=round(((tdsl+tfsl)/(tds+tfs))*100); /*percent lingual/dfs*/ else OHDTplDFS=.; if OHDTDFS>0 then OHDTpoDFS=round(((tdso+tfso)/(tds+tfs))*100); /*percent occlusal/dfs*/ else OHDTpoDFS=.; if OHDTDFS>0 then OHDTpbDFS=round(((tdsb+tfsb)/(tds+tfs))*100); /*percent buccal/dfs*/ else OHDTpbDFS=.; if OHDTDFS>0 then OHDTpmDFS=round(((tdsm+tfsm)/(tds+tfs))*100); /*percent mesial/dfs*/ else OHDTpmDFS=.; if OHDTDFS>0 then OHDTpdDFS=round(((tdsd+tfsd)/(tds+tfs))*100); /*percent distal/dfs*/ else OHDTpdDFS=.; if OHDTDFS>0 then OHDTplbDFS=round(((tdsl+tdsb+tfsl+tfsb)/(tds+tfs))*100); /*percent lingual-buccal/dfs*/ else OHDTplbDFS=.; if OHDTDFS>0 then OHDTpmdDFS=round(((tdsm+tdsd+tfsm+tfsd)/(tds+tfs))*100); /*percent mesial-distal/dfs*/ else OHDTpmdDFS=.; OHDTUD=1*(tdt>0) + 2*(tdt=0); /*Untreated decay: has 1 or more primary teeth with untreated decay*/ OHDTCE=1*(tdt>0 or tft>0) + 2*(tdt=0 and tft=0); /*Caries experience: has 1 or more primary teeth affected by decay/sequelae*/ end; /*data step 3, section 2*/ /*Create public release variables for DMF indices for permanent teeth and surfaces*/ /*if all teeth are missing data, set all permanent variables to . for no data*/ if tcnodata28=28 then do; OHDPST=.; /*ST - number of sound permanent teeth*/ OHDPDT=.; /*DT - number of decayed permanent teeth*/ OHDPMT=.; /*MT - number of permanent teeth missing due to caries or perio*/ OHDPFT=.; /*FT - number of filled permanent teeth*/ OHDPDFT=.; /*DFT - number of decayed and filled permanent teeth DT+FT*/ OHDPDMFT=.; /*DMFT - number of decayed and filled permanent teeth DT+MT+FT*/ OHDPDDFT=.;/*D/DFT (percent)*/ OHDPFDFT=.;/*F/DFT (percent)*/ OHDPDDMFT=.;/*D/DMFT (percent)*/ OHDPFDMFT=.;/*F/DMFT (percent)*/ OHDPMDMFT=.;/*M/DMFT (percent)*/ OHDPSS=.; /*SS - number of sound permanent surfaces*/ OHDPDS=.; /*DS - number of decayed permanent surfaces*/ OHDPDSl=.; /*DS - number of decayed permanent surfaces - lingual*/ OHDPDSo=.; /*DS - number of decayed permanent surfaces - occlusal*/ OHDPDSb=.; /*DS - number of decayed permanent surfaces - buccal*/ OHDPDSm=.; /*DS - number of decayed permanent surfaces - mesial*/ OHDPDSd=.; /*DS - number of decayed permanent surfaces - distal*/ OHDPDSlb=.; /*DS - number of decayed permanent surfaces - lingual/buccal*/ OHDPDSmd=.; /*DS - number of decayed permanent surfaces - mesial/distal*/ OHDPMS=.; /*MS - number of permanent surfaces missing due to caries or perio*/ OHDPMSl=.; /*MS - number of permanent surfaces missing due to caries or perio - lingual*/ OHDPMSo=.; /*MS - number of permanent surfaces missing due to caries or perio - occlusal*/ OHDPMSb=.; /*MS - number of permanent surfaces missing due to caries or perio - buccal*/ OHDPMSm=.; /*MS - number of permanent surfaces missing due to caries or perio - mesial*/ OHDPMSd=.; /*MS - number of permanent surfaces missing due to caries or perio - distal*/ OHDPMSlb=.; /*MS - number of permanent surfaces missing due to caries or perio - lingual/buccal*/ OHDPMSmd=.; /*MS - number of permanent surfaces missing due to caries or perio - mesial/distal*/ OHDPFS=.; /*FS - number of filled permanent surfaces*/ OHDPFSl=.; /*FS - number of filled permanent surfaces - lingual*/ OHDPFSo=.; /*FS - number of filled permanent surfaces - occlusal*/ OHDPFSb=.; /*FS - number of filled permanent surfaces - buccal*/ OHDPFSm=.; /*FS - number of filled permanent surfaces - mesial*/ OHDPFSd=.; /*FS - number of filled permanent surfaces - distal*/ OHDPFSlb=.; /*FS - number of filled permanent surfaces - lingual/buccal*/ OHDPFSmd=.; /*FS - number of filled permanent surfaces - mesial/distal*/ OHDPDFS=.; /*DFS - number of decayed and filled permanent surfaces DS+FS*/ OHDPDFSl=.; /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual*/ OHDPDFSo=.; /*DFS - number of decayed and filled permanent surfaces DS+FS - occlusal*/ OHDPDFSb=.; /*DFS - number of decayed and filled permanent surfaces DS+FS - buccal*/ OHDPDFSm=.; /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial*/ OHDPDFSd=.; /*DFS - number of decayed and filled permanent surfaces DS+FS - distal*/ OHDPDFSlb=.; /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual/buccal*/ OHDPDFSmd=.; /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial/distal*/ OHDPDMFS=.; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS*/ OHDPDMFSl=.; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual*/ OHDPDMFSo=.; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - occlusal*/ OHDPDMFSb=.; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - buccal*/ OHDPDMFSm=.; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial*/ OHDPDMFSd=.; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - distal*/ OHDPDMFSlb=.; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual/buccal*/ OHDPDMFSmd=.; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial/distal*/ OHDPDDFS=.;/*D/DFS (percent)*/ OHDPFDFS=.;/*F/DFS (percent)*/ OHDPDDMFS=.;/*D/DMFS (percent)*/ OHDPFDMFS=.;/*F/DMFS (percent)*/ OHDPMDMFS=.;/*M/DMFS (percent)*/ OHDPplDFS=.;/*lingual/DFS (percent) - lingual*/ OHDPpoDFS=.;/*occlusal/DFS (percent) - occlusal*/ OHDPpbDFS=.;/*buccal/DFS (percent) - buccal*/ OHDPpmDFS=.;/*mesial/DFS (percent) - mesial*/ OHDPpdDFS=.;/*distal/DFS (percent) - distal*/ OHDPplbDFS=.;/*lingual-buccal/DFS (percent) - lingual/buccal*/ OHDPpmdDFS=.;/*mesial-distal/DFS (percent) - mesial/distal*/ OHDPplDMFS=.;/*lingual/DMFS (percent) - lingual*/ OHDPpoDMFS=.;/*occlusal/DMFS (percent) - occlusal*/ OHDPpbDMFS=.;/*buccal/DMFS (percent) - buccal*/ OHDPpmDMFS=.;/*mesial/DMFS (percent) - mesial*/ OHDPpdDMFS=.;/*distal/DMFS (percent) - distal*/ OHDPplbDMFS=.;/*lingual-buccal/DMFS (percent) - lingual/buccal*/ OHDPpmdDMFS=.;/*mesial-distal/DMFS (percent) - mesial/distal*/ OHDPUD=.; /*Untreated decay: has 1 or more permanent teeth with untreated decay*/ OHDPCE=.; /*Caries experience: has 1 or more permanent teeth with treated or untreated decay*/ OHDPCEa=.; /*Caries experience: has 1 or more permanent teeth with treated or untreated decay or teeth missing due to caries or perio*/ end; /*if no permanent teeth are present or marked missing, mark all permanent tooth DMF indices variables 8,88, or 888 for no permanent teeth*/ else if (tcprm28=0 and tcmiss28=0) or ((tcprm28>0 or tcmiss28>0) and PVALID=0 and PCANT=0) then do; OHDPST=88; /*ST - number of sound permanent teeth*/ OHDPDT=88; /*DT - number of decayed permanent teeth*/ OHDPMT=88; /*MT - number of permanent teeth missing due to caries or perio*/ OHDPFT=88; /*FT - number of filled permanent teeth*/ OHDPDFT=88; /*DFT - number of decayed and filled permanent teeth DT+FT*/ OHDPDMFT=88; /*DMFT - number of decayed and filled permanent teeth DT+MT+FT*/ OHDPDDFT=888;/*D/DFT (percent)*/ OHDPFDFT=888;/*F/DFT (percent)*/ OHDPDDMFT=888;/*D/DMFT (percent)*/ OHDPFDMFT=888;/*F/DMFT (percent)*/ OHDPMDMFT=888;/*M/DMFT (percent)*/ OHDPSS=888; /*SS - number of sound permanent surfaces*/ OHDPDS=888; /*DS - number of decayed permanent surfaces*/ OHDPDSl=888; /*DS - number of decayed permanent surfaces - lingual*/ OHDPDSo=888; /*DS - number of decayed permanent surfaces - occlusal*/ OHDPDSb=888; /*DS - number of decayed permanent surfaces - buccal*/ OHDPDSm=888; /*DS - number of decayed permanent surfaces - mesial*/ OHDPDSd=888; /*DS - number of decayed permanent surfaces - distal*/ OHDPDSlb=888; /*DS - number of decayed permanent surfaces - lingual/buccal*/ OHDPDSmd=888; /*DS - number of decayed permanent surfaces - mesial/distal*/ OHDPMS=888; /*MS - number of permanent surfaces missing due to caries or perio*/ OHDPMSl=888; /*MS - number of permanent surfaces missing due to caries or perio - lingual*/ OHDPMSo=888; /*MS - number of permanent surfaces missing due to caries or perio - occlusal*/ OHDPMSb=888; /*MS - number of permanent surfaces missing due to caries or perio - buccal*/ OHDPMSm=888; /*MS - number of permanent surfaces missing due to caries or perio - mesial*/ OHDPMSd=888; /*MS - number of permanent surfaces missing due to caries or perio - distal*/ OHDPMSlb=888; /*MS - number of permanent surfaces missing due to caries or perio - lingual/buccal*/ OHDPMSmd=888; /*MS - number of permanent surfaces missing due to caries or perio - mesial/distal*/ OHDPFS=888; /*FS - number of filled permanent surfaces*/ OHDPFSl=888; /*FS - number of filled permanent surfaces - lingual*/ OHDPFSo=888; /*FS - number of filled permanent surfaces - occlusal*/ OHDPFSb=888; /*FS - number of filled permanent surfaces - buccal*/ OHDPFSm=888; /*FS - number of filled permanent surfaces - mesial*/ OHDPFSd=888; /*FS - number of filled permanent surfaces - distal*/ OHDPFSlb=888; /*FS - number of filled permanent surfaces - lingual/buccal*/ OHDPFSmd=888; /*FS - number of filled permanent surfaces - mesial/distal*/ OHDPDFS=888; /*DFS - number of decayed and filled permanent surfaces DS+FS*/ OHDPDFSl=888; /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual*/ OHDPDFSo=888; /*DFS - number of decayed and filled permanent surfaces DS+FS - occlusal*/ OHDPDFSb=888; /*DFS - number of decayed and filled permanent surfaces DS+FS - buccal*/ OHDPDFSm=888; /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial*/ OHDPDFSd=888; /*DFS - number of decayed and filled permanent surfaces DS+FS - distal*/ OHDPDFSlb=888; /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual/buccal*/ OHDPDFSmd=888; /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial/distal*/ OHDPDMFS=888; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS*/ OHDPDMFSl=888; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual*/ OHDPDMFSo=888; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - occlusal*/ OHDPDMFSb=888; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - buccal*/ OHDPDMFSm=888; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial*/ OHDPDMFSd=888; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - distal*/ OHDPDMFSlb=888; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual/buccal*/ OHDPDMFSmd=888; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial/distal*/ OHDPDDFS=888;/*D/DFS (percent)*/ OHDPFDFS=888;/*F/DFS (percent)*/ OHDPDDMFS=888;/*D/DMFS (percent)*/ OHDPFDMFS=888;/*F/DMFS (percent)*/ OHDPMDMFS=888;/*M/DMFS (percent)*/ OHDPplDFS=888;/*lingual/DFS (percent) - lingual*/ OHDPpoDFS=888;/*occlusal/DFS (percent) - occlusal*/ OHDPpbDFS=888;/*buccal/DFS (percent) - buccal*/ OHDPpmDFS=888;/*mesial/DFS (percent) - mesial*/ OHDPpdDFS=888;/*distal/DFS (percent) - distal*/ OHDPplbDFS=888;/*lingual-buccal/DFS (percent) - lingual/buccal*/ OHDPpmdDFS=888;/*mesial-distal/DFS (percent) - mesial/distal*/ OHDPplDMFS=888;/*lingual/DMFS (percent) - lingual*/ OHDPpoDMFS=888;/*occlusal/DMFS (percent) - occlusal*/ OHDPpbDMFS=888;/*buccal/DMFS (percent) - buccal*/ OHDPpmDMFS=888;/*mesial/DMFS (percent) - mesial*/ OHDPpdDMFS=888;/*distal/DMFS (percent) - distal*/ OHDPplbDMFS=888;/*lingual-buccal/DMFS (percent) - lingual/buccal*/ OHDPpmdDMFS=888;/*mesial-distal/DMFS (percent) - mesial/distal*/ OHDPUD=8; /*Untreated decay: has 1 or more permanent teeth with untreated decay*/ OHDPCE=8; /*Caries experience: has 1 or more permanent teeth with treated or untreated decay*/ OHDPCEa=8; /*Caries experience: has 1 or more permanent teeth with treated or untreated decay or teeth missing due to caries or perio*/ end; /*if no permanent teeth with valid data for calculating DMF indices, set to 9, 99, or 999*/ else if (tcprm28>0 or tcmiss28>0) and PVALID=0 and PCANT>0 then do; OHDPST=99; /*ST - number of sound permanent teeth*/ OHDPDT=99; /*DT - number of decayed permanent teeth*/ OHDPMT=99; /*MT - number of permanent teeth missing due to caries or perio*/ OHDPFT=99; /*FT - number of filled permanent teeth*/ OHDPDFT=99; /*DFT - number of decayed and filled permanent teeth DT+FT*/ OHDPDMFT=99; /*DMFT - number of decayed and filled permanent teeth DT+MT+FT*/ OHDPDDFT=999;/*D/DFT (percent)*/ OHDPFDFT=999;/*F/DFT (percent)*/ OHDPDDMFT=999;/*D/DMFT (percent)*/ OHDPFDMFT=999;/*F/DMFT (percent)*/ OHDPMDMFT=999;/*M/DMFT (percent)*/ OHDPSS=999; /*SS - number of sound permanent surfaces*/ OHDPDS=999; /*DS - number of decayed permanent surfaces*/ OHDPDSl=999; /*DS - number of decayed permanent surfaces - lingual*/ OHDPDSo=999; /*DS - number of decayed permanent surfaces - occlusal*/ OHDPDSb=999; /*DS - number of decayed permanent surfaces - buccal*/ OHDPDSm=999; /*DS - number of decayed permanent surfaces - mesial*/ OHDPDSd=999; /*DS - number of decayed permanent surfaces - distal*/ OHDPDSlb=999; /*DS - number of decayed permanent surfaces - lingual/buccal*/ OHDPDSmd=999; /*DS - number of decayed permanent surfaces - mesial/distal*/ OHDPMS=999; /*MS - number of permanent surfaces missing due to caries or perio*/ OHDPMSl=999; /*MS - number of permanent surfaces missing due to caries or perio - lingual*/ OHDPMSo=999; /*MS - number of permanent surfaces missing due to caries or perio - occlusal*/ OHDPMSb=999; /*MS - number of permanent surfaces missing due to caries or perio - buccal*/ OHDPMSm=999; /*MS - number of permanent surfaces missing due to caries or perio - mesial*/ OHDPMSd=999; /*MS - number of permanent surfaces missing due to caries or perio - distal*/ OHDPMSlb=999; /*MS - number of permanent surfaces missing due to caries or perio - lingual/buccal*/ OHDPMSmd=999; /*MS - number of permanent surfaces missing due to caries or perio - mesial/distal*/ OHDPFS=999; /*FS - number of filled permanent surfaces*/ OHDPFSl=999; /*FS - number of filled permanent surfaces - lingual*/ OHDPFSo=999; /*FS - number of filled permanent surfaces - occlusal*/ OHDPFSb=999; /*FS - number of filled permanent surfaces - buccal*/ OHDPFSm=999; /*FS - number of filled permanent surfaces - mesial*/ OHDPFSd=999; /*FS - number of filled permanent surfaces - distal*/ OHDPFSlb=999; /*FS - number of filled permanent surfaces - lingual/buccal*/ OHDPFSmd=999; /*FS - number of filled permanent surfaces - mesial/distal*/ OHDPDFS=999; /*DFS - number of decayed and filled permanent surfaces DS+FS*/ OHDPDFSl=999; /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual*/ OHDPDFSo=999; /*DFS - number of decayed and filled permanent surfaces DS+FS - occlusal*/ OHDPDFSb=999; /*DFS - number of decayed and filled permanent surfaces DS+FS - buccal*/ OHDPDFSm=999; /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial*/ OHDPDFSd=999; /*DFS - number of decayed and filled permanent surfaces DS+FS - distal*/ OHDPDFSlb=999; /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual/buccal*/ OHDPDFSmd=999; /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial/distal*/ OHDPDMFS=999; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS*/ OHDPDMFSl=999; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual*/ OHDPDMFSo=999; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - occlusal*/ OHDPDMFSb=999; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - buccal*/ OHDPDMFSm=999; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial*/ OHDPDMFSd=999; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - distal*/ OHDPDMFSlb=999; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual/buccal*/ OHDPDMFSmd=999; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial/distal*/ OHDPDDFS=999;/*D/DFS (percent)*/ OHDPFDFS=999;/*F/DFS (percent)*/ OHDPDDMFS=999;/*D/DMFS (percent)*/ OHDPFDMFS=999;/*F/DMFS (percent)*/ OHDPMDMFS=999;/*M/DMFS (percent)*/ OHDPplDFS=999;/*lingual/DFS (percent) - lingual*/ OHDPpoDFS=999;/*occlusal/DFS (percent) - occlusal*/ OHDPpbDFS=999;/*buccal/DFS (percent) - buccal*/ OHDPpmDFS=999;/*mesial/DFS (percent) - mesial*/ OHDPpdDFS=999;/*distal/DFS (percent) - distal*/ OHDPplbDFS=999;/*lingual-buccal/DFS (percent) - lingual/buccal*/ OHDPpmdDFS=999;/*mesial-distal/DFS (percent) - mesial/distal*/ OHDPplDMFS=999;/*lingual/DMFS (percent) - lingual*/ OHDPpoDMFS=999;/*occlusal/DMFS (percent) - occlusal*/ OHDPpbDMFS=999;/*buccal/DMFS (percent) - buccal*/ OHDPpmDMFS=999;/*mesial/DMFS (percent) - mesial*/ OHDPpdDMFS=999;/*distal/DMFS (percent) - distal*/ OHDPplbDMFS=999;/*lingual-buccal/DMFS (percent) - lingual/buccal*/ OHDPpmdDMFS=999;/*mesial-distal/DMFS (percent) - mesial/distal*/ OHDPUD=9; /*Untreated decay: has 1 or more permanent teeth with untreated decay*/ OHDPCE=9; /*Caries experience: has 1 or more permanent teeth with treated or untreated decay*/ OHDPCEa=9; /*Caries experience: has 1 or more permanent teeth with treated or untreated decay or teeth missing due to caries or perio*/ end; else if PVALID>0 then do; OHDPST=PST; /*ST - number of sound permanent teeth*/ OHDPDT=PDT; /*DT - number of decayed permanent teeth*/ OHDPMT=PMT; /*MT - number of permanent teeth missing due to caries or perio*/ OHDPFT=PFT; /*FT - number of filled permanent teeth*/ OHDPDFT=PDT+PFT; /*DFT - number of decayed and filled permanent teeth DT+FT*/ OHDPDMFT=PDT+PMT+PFT; /*DMFT - number of decayed and filled permanent teeth DT+MT+FT*/ if OHDPDFT>0 then OHDPDDFT=round((PDT/(PDT+PFT))*100);/*D/DFT (percent)*/ else OHDPDDFT=.; if OHDPDFT>0 then OHDPFDFT=round((PFT/(PDT+PFT))*100);/*F/DFT (percent)*/ else OHDPFDFT=.; if OHDPDMFT>0 then OHDPDDMFT=round((PDT/(PDT+PFT+PMT))*100);/*D/DMFT (percent)*/ else OHDPDDMFT=.; if OHDPDMFT>0 then OHDPFDMFT=round((PFT/(PDT+PFT+PMT))*100);/*F/DMFT (percent)*/ else OHDPFDMFT=.; if OHDPDMFT>0 then OHDPMDMFT=round((PMT/(PDT+PFT+PMT))*100);/*M/DMFT (percent)*/ else OHDPMDMFT=.; /* Revision 6/15/2004: DMFT corrected from PDT+PMT+PDT to PDT+PMT+PFT*/ OHDPSS=PSS; /*SS - number of sound permanent surfaces*/ OHDPDS=PDS; /*DS - number of decayed permanent surfaces*/ OHDPDSl=PDSl; /*DS - number of decayed permanent surfaces due to caries or perio - lingual*/ OHDPDSo=PDSo; /*DS - number of decayed permanent surfaces due to caries or perio - occlusal*/ OHDPDSb=PDSb; /*DS - number of decayed permanent surfaces due to caries or perio - buccal*/ OHDPDSm=PDSm; /*DS - number of decayed permanent surfaces due to caries or perio - mesial*/ OHDPDSd=PDSd; /*DS - number of decayed permanent surfaces due to caries or perio - distal*/ OHDPDSlb=PDSl+PDSb; /*DS - number of decayed permanent surfaces due to caries or perio - lingual/buccal*/ OHDPDSmd=PDSm+PDSd; /*DS - number of decayed permanent surfaces due to caries or perio - mesial/distal*/ OHDPMS=PMS; /*MS - number of permanent surfaces missing due to caries or perio*/ OHDPMSl=PMSl; /*MS - number of permanent surfaces missing due to caries or perio - lingual*/ OHDPMSo=PMSo; /*MS - number of permanent surfaces missing due to caries or perio - occlusal*/ OHDPMSb=PMSb; /*MS - number of permanent surfaces missing due to caries or perio - buccal*/ OHDPMSm=PMSm; /*MS - number of permanent surfaces missing due to caries or perio - mesial*/ OHDPMSd=PMSd; /*MS - number of permanent surfaces missing due to caries or perio - distal*/ OHDPMSlb=PMSl+PMSb; /*MS - number of permanent surfaces missing due to caries or perio - lingual/buccal*/ OHDPMSmd=PMSm+PMSd; /*MS - number of permanent surfaces missing due to caries or perio - mesial/distal*/ OHDPFS=PFS; /*FS - number of filled permanent surfaces*/ OHDPFSl=PFSl; /*FS - number of filled permanent surfaces - lingual*/ OHDPFSo=PFSo; /*FS - number of filled permanent surfaces - occlusal*/ OHDPFSb=PFSb; /*FS - number of filled permanent surfaces - buccal*/ OHDPFSm=PFSm; /*FS - number of filled permanent surfaces - mesial*/ OHDPFSd=PFSd; /*FS - number of filled permanent surfaces - distal*/ OHDPFSlb=PFSl+PFSb; /*FS - number of filled permanent surfaces - lingual/buccal*/ OHDPFSmd=PFSm+PFSd; /*FS - number of filled permanent surfaces - mesial/distal*/ OHDPDFS=PDS+PFS; /*DFS - number of decayed and filled permanent surfaces DS+FS*/ OHDPDFSl=PDSl+PFSl; /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual*/ OHDPDFSo=PDSo+PFSo; /*DFS - number of decayed and filled permanent surfaces DS+FS - occlusal*/ OHDPDFSb=PDSb+PFSb; /*DFS - number of decayed and filled permanent surfaces DS+FS - buccal*/ OHDPDFSm=PDSm+PFSm; /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial*/ OHDPDFSd=PDSd+PFSd; /*DFS - number of decayed and filled permanent surfaces DS+FS - distal*/ OHDPDFSlb=PDSl+PDSb+PFSl+PFSb; /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual/buccal*/ OHDPDFSmd=PDSm+PDSd+PFSm+PFSd; /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial/distal*/ OHDPDMFS=PDS+PMS+PFS; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS*/ OHDPDMFSl=PDSl+PMSl+PFSl; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual*/ OHDPDMFSo=PDSo+PMSo+PFSo; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - occlusal*/ OHDPDMFSb=PDSb+PMSb+PFSb; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - buccal*/ OHDPDMFSm=PDSm+PMSm+PFSm; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial*/ OHDPDMFSd=PDSd+PMSd+PFSd; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - distal*/ OHDPDMFSlb=PDSl+PDSb+PMSl+PMSb+PFSl+PFSb; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual/buccal*/ OHDPDMFSmd=PDSm+PDSd+PMSm+PMSd+PFSm+PFSd; /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial/distal*/ if OHDPDFS>0 then OHDPDDFS=round((PDS/(PDS+PFS))*100);/*D/DFS (percent)*/ else OHDPDDFS=.; if OHDPDFS>0 then OHDPFDFS=round((PFS/(PDS+PFS))*100);/*F/DFS (percent)*/ else OHDPFDFS=.; if OHDPDMFS>0 then OHDPDDMFS=round((PDS/(PDS+PFS+PMS))*100);/*D/DMFS (percent)*/ else OHDPDDMFS=.; if OHDPDMFS>0 then OHDPFDMFS=round((PFS/(PDS+PFS+PMS))*100);/*F/DMFS (percent)*/ else OHDPFDMFS=.; if OHDPDMFS>0 then OHDPMDMFS=round((PMS/(PDS+PFS+PMS))*100);/*M/DMFS (percent)*/ else OHDPMDMFS=.; if OHDPDFS>0 then OHDPplDFS=round(((PDSl+PFSl)/(PDS+PFS))*100);/*lingual/DFS (percent) - lingual*/ else OHDPplDFS=.; if OHDPDFS>0 then OHDPpoDFS=round(((PDSo+PFSo)/(PDS+PFS))*100);/*occlusal/DFS (percent) - occlusal*/ else OHDPpoDFS=.; if OHDPDFS>0 then OHDPpbDFS=round(((PDSb+PFSb)/(PDS+PFS))*100);/*buccal/DFS (percent) - buccal*/ else OHDPpbDFS=.; if OHDPDFS>0 then OHDPpmDFS=round(((PDSm+PFSm)/(PDS+PFS))*100);/*mesial/DFS (percent) - mesial*/ else OHDPpmDFS=.; if OHDPDFS>0 then OHDPpdDFS=round(((PDSd+PFSd)/(PDS+PFS))*100);/*distal/DFS (percent) - distal*/ else OHDPpdDFS=.; if OHDPDFS>0 then OHDPplbDFS=round(((PDSl+PDSb+PFSl+PFSb)/(PDS+PFS))*100);/*lingual-buccal/DFS (percent) - lingual/buccal*/ else OHDPplbDFS=.; if OHDPDFS>0 then OHDPpmdDFS=round(((PDSm+PDSd+PFSm+PFSd)/(PDS+PFS))*100);/*mesial-distal/DFS (percent) - mesial/distal*/ else OHDPpmdDFS=.; if OHDPDMFS>0 then OHDPplDMFS=round(((PDSl+PFSl+PMSl)/(PDS+PFS+PMS))*100);/*lingual/DMFS (percent) - lingual*/ else OHDPplDMFS=.; if OHDPDMFS>0 then OHDPpoDMFS=round(((PDSo+PFSo+PMSo)/(PDS+PFS+PMS))*100);/*occlusal/DMFS (percent) - occlusal*/ else OHDPpoDMFS=.; if OHDPDMFS>0 then OHDPpbDMFS=round(((PDSb+PFSb+PMSb)/(PDS+PFS+PMS))*100);/*buccal/DMFS (percent) - buccal*/ else OHDPpbDMFS=.; if OHDPDMFS>0 then OHDPpmDMFS=round(((PDSm+PFSm+PMSm)/(PDS+PFS+PMS))*100);/*mesial/DMFS (percent) - mesial*/ else OHDPpmDMFS=.; if OHDPDMFS>0 then OHDPpdDMFS=round(((PDSd+PFSd+PMSd)/(PDS+PFS+PMS))*100);/*distal/DMFS (percent) - distal*/ else OHDPpdDMFS=.; if OHDPDMFS>0 then OHDPplbDMFS=round(((PDSl+PDSb+PFSl+PFSb+PMSl+PMSb)/(PDS+PFS+PMS))*100);/*lingual-buccal/DMFS (percent) - lingual/buccal*/ else OHDPplbDMFS=.; if OHDPDMFS>0 then OHDPpmdDMFS=round(((PDSm+PDSd+PFSm+PFSd+PMSm+PMSd)/(PDS+PFS+PMS))*100);/*mesial-distal/DMFS (percent) - mesial/distal*/ else OHDPpmdDMFS=.; OHDPUD=1*(PDT>0)+2*(PDT=0); /*Untreated decay: has 1 or more permanent teeth with untreated decay*/ OHDPCE=1*(PDT>0 or PFT>0)+2*(PDT=0 and PFT=0); /*Caries experience: has 1 or more permanent teeth with treated or untreated decay*/ OHDPCEa=1*(PDT>0 or PFT>0 or PMT>0)+2*(PDT=0 and PFT=0 and PMT=0); /*Caries experience: has 1 or more permanent teeth with treated, untreated or missing teeth due to caries or perio*/ end; /*df/DMF indices for mixed dentition*/ /*BSS indicators*/ /*untreated decay in mixed dentition*/ if OHDTUD=. and OHDPUD=. then OHDMUD=.; else if OHDTUD=1 or OHDPUD=1 then OHDMUD=1; else if OHDTUD=2 or OHDPUD=2 then OHDMUD=2; else if OHDTUD=8 or OHDPUD=8 then OHDMUD=8; else if OHDTUD=9 or OHDPUD=9 then OHDMUD=9; else OHDMUD=.; /*Caries experience in mixed dentition*/ if OHDTCE=. and OHDPCE=. then OHDMCE=.; else if OHDTCE=1 or OHDPCE=1 then OHDMCE=1; else if OHDTCE=2 or OHDPCE=2 then OHDMCE=2; else if OHDTCE=8 or OHDPCE=8 then OHDMCE=8; else if OHDTCE=9 or OHDPCE=9 then OHDMCE=9; else OHDMCE=.; /*Caries experience in mixed dentition, counting missing due to caries or perio*/ if OHDTCE=. and OHDPCEa=. then OHDMCEa=.; else if OHDTCE=1 or OHDPCEa=1 then OHDMCEa=1; else if OHDTCE=2 or OHDPCEa=2 then OHDMCEa=2; else if OHDTCE=8 or OHDPCEa=8 then OHDMCEa=8; else if OHDTCE=9 or OHDPCEa=9 then OHDMCEa=9; else OHDMCEa=.; /*Caries experience in mixed dentition, counting permanent molars missing due to caries or perio*/ if OHDTCE=. and OHDPCE=. then OHDMCEbss=.; else if OHDTCE=1 or OHDPCE=1 or PMTmol>0 then OHDMCEbss=1; else if OHDTCE=2 or OHDPCE=2 then OHDMCEbss=2; else if OHDTCE=8 or OHDPCE=8 then OHDMCEbss=8; else if OHDTCE=9 or OHDPCE=9 then OHDMCEbss=9; else OHDMCEbss=.; /*Number of sound teeth in the mixed dentition*/ if OHDTST >=0 and OHDTST<88 and OHDPST>=0 and OHDPST<88 then OHDMST=sum(of OHDTST OHDPST); else if OHDTST=. and OHDPST=. then OHDMST=.; else if OHDTST=. and OHDPST ne . then OHDMST=OHDPST; else if OHDTST ne . and OHDPST=. then OHDMST=OHDTST; else if OHDTST in(88,99) and OHDPST >=0 and OHDPST<88 then OHDMST=OHDPST; else if OHDTST >=0 and OHDTST <88 and OHDPST in(88,99) then OHDMST=OHDTST; else if OHDTST=88 or OHDPST=88 then OHDMST=88; else if OHDTST=99 or OHDPST=99 then OHDMST=99; /*Number of sound surfaces in the mixed dentition*/ if OHDTSS >=0 and OHDTSS<888 and OHDPSS>=0 and OHDPSS<888 then OHDMSS=sum(of OHDTSS OHDPSS); else if OHDTSS=. and OHDPSS=. then OHDMSS=.; else if OHDTSS=. and OHDPSS ne . then OHDMSS=OHDPSS; else if OHDTSS ne . and OHDPSS=. then OHDMSS=OHDTSS; else if OHDTSS in(888,999) and OHDPSS >=0 and OHDPSS<888 then OHDMSS=OHDPSS; else if OHDTSS >=0 and OHDTSS <888 and OHDPSS in(888,999) then OHDMSS=OHDTSS; else if OHDTSS=888 or OHDPSS=888 then OHDMSS=888; else if OHDTSS=999 or OHDPSS=999 then OHDMSS=999; /*Number of teeth present, any teeth present */ /*primary dentition*/ /*based on tooth count variables*/ OHDNPRIa=tcpri28; if tcpri28=. then OHDPRIa=.; else if tcpri28=0 then OHDPRIa=2; else if tcpri28>=1 then OHDPRIa=1; /*based on coronal caries tooth call variables*/ if tvalid>0 or tcant>0 then do; OHDNPRIb=sum(of tst tdt tft tcant); if OHDNPRIb=. then OHDPRIb=.; else if OHDNPRIb=0 then OHDPRIb=2; else if OHDNPRIb>=1 then OHDPRIb=1; end; /*permanent dentition*/ /*based on tooth count variables*/ OHDNPRM=tcprm32; /*Number of permanent teeth present - tc - 32 tooth space counts*/ if tcprm32=. then OHDPRM=.; /*Any permanent teeth present - tc - 32 tooth space counts*/ else if tcprm32=0 then OHDPRM=2; else if tcprm32>=1 then OHDPRM=1; OHDNPRMa=tcprm28; /*Number of permanent teeth present - tc - 28 tooth space counts, excl. 3rd molars*/ if tcprm28=. then OHDPRMa=.;/*Any permanent teeth present - tc - 28 tooth space counts*/ else if tcprm28=0 then OHDPRMa=2; else if tcprm28>=1 then OHDPRMa=1; /*based on coronal caries tooth call variables*/ if PVALID>0 or PCANT>0 then do; OHDNPRMb=sum(of PST PDT PFT PCANT); /*Number of permanent teeth present - ctc*/ if OHDNPRMb=. then OHDPRMb=.; /*Any permanent teeth present - ctc*/ else if OHDNPRMb=0 then OHDPRMb=2; else if OHDNPRMb>=1 then OHDPRMb=1; end; /*Number of permanent teeth present in groups*/ if OHDNPRM=. then OHDPgrp=.; /*Tooth retention - WHO groups - tc - 32 tooth spaces*/ else if OHDNPRM=0 then OHDPgrp=1; else if 1<=OHDNPRM<=10 then OHDPgrp=2; else if 11<=OHDNPRM<=20 then OHDPgrp=3; else if 21<=OHDNPRM<=27 then OHDPgrp=4; else if OHDNPRM>=28 then OHDPgrp=5; if OHDNPRMa=. then OHDPgrpa=.; /*Tooth retention - WHO groups - tc - 28 tooth spaces*/ else if OHDNPRMa=0 then OHDPgrpa=1; else if 1<=OHDNPRMa<=10 then OHDPgrpa=2; else if 11<=OHDNPRMa<=20 then OHDPgrpa=3; else if 21<=OHDNPRMa<=27 then OHDPgrpa=4; else if OHDNPRMa=28 then OHDPgrpa=5; if PVALID>0 or PCANT>0 then do; if OHDNPRMb=0 then OHDPgrpb=1; /*Tooth retention - WHO groups - ctc*/ else if 1<=OHDNPRMb<=10 then OHDPgrpb=2; else if 11<=OHDNPRMb<=20 then OHDPgrpb=3; else if 21<=OHDNPRMb<=27 then OHDPgrpb=4; else if OHDNPRMb=28 then OHDPgrpb=5; end; /*mixed dentition*/ OHDNTP=tc32TP; /*Number of primary and permanent teeth present - tc - 32 tooth spaces*/ if tc32TP=. then OHDTP=.; /*Any primary or permanent teeth present - tc - 32 tooth spaces*/ else if tc32TP=0 then OHDTP=2; else if tc32TP>=1 then OHDTP=1; OHDNTPa=tc28TP; /*Number of primary and permanent teeth present - tc - 28 tooth spaces*/ if tc28TP=. then OHDTPa=.; /*Any primary or permanent teeth present - tc - 28 tooth spaces*/ else if tc28TP=0 then OHDTPa=2; else if tc28TP>=1 then OHDTPa=1; if tvalid>0 or PVALID>0 or tcant>0 or PCANT>0 then do; OHDNTPb=sum(of tst tdt tft tcant PST PDT PFT PCANT); /*Number of primary and permanent teeth present - ctc*/ if OHDNTPb=. then OHDTPb=.; /*Any primary or permanent teeth present - ctc*/ else if OHDNTPb=0 then OHDTPb=2; else if OHDNTPb>=1 then OHDTPb=1; end; /*Dentate and Edentate by arch*/ OHDNPU=tcprmu16; /*Number of teeth in upper arch - tc - 16 tooth spaces incl. 3rd molars*/ if tcprmu16=. then OHDPU=.; /*Any teeth in upper arch - tc - 16 tooth spaces*/ else if tcprmu16=0 then OHDPU=2; else if tcprmu16>=1 then OHDPU=1; OHDNPL=tcprml16; /*Number of teeth in lower arch - tc - 16 tooth spaces incl. 3rd molars*/ if tcprml16=. then OHDPL=.; /*Any teeth in lower arch - tc - 16 tooth spaces*/ else if tcprml16=0 then OHDPL=2; else if tcprml16>=1 then OHDPL=1; OHDNPUa=tcprmu14; /*Number of teeth in upper arch - tc - 14 tooth spaces excl. 3rd molars*/ if tcprmu14=. then OHDPUa=.; /*Any teeth in upper arch - tc - 14 tooth spaces*/ else if tcprmu14=0 then OHDPUa=2; else if tcprmu14>=1 then OHDPUa=1; OHDNPLa=tcprml14; /*Number of teeth in lower arch - tc - 14 tooth spaces excl. 3rd molars*/ if tcprml14=. then OHDPLa=.; /*Any teeth in lower arch - tc - 14 tooth spaces*/ else if tcprml14=0 then OHDPLa=2; else if tcprml14>=1 then OHDPLa=1; /*Tooth retention and loss*/ /* Based on tooth count variables*/ if tcnodata28<28 then do; OHDPRTNT28a=1*(tcprm28=28)+2*(0<=tcprm28<28); /*Tooth retention - has 28 permanent teeth present - tc*/ OHDPRTNT21a=1*(tcprm28>=21)+2*(0<=tcprm28<=20); /*Tooth retention - has 21 or more permanent teeth - tc*/ OHDPRTNT20a=1*(tcprm28>=20)+2*(0<=tcprm28<=19); /*Tooth retention - has 20 or more permanent teeth - tc*/ OHDPRTNT6a=1*(tcprm28>=6)+2*(0<=tcprm28<6); /*Tooth retention - has 6 or more permanent teeth - tc */ OHDPRTNT1a=1*(tcprm28>=1)+2*(tcprm28=0); /*Tooth retention - has 1 or more permanent teeth - tc */ end; /*Based on coronal caries tooth call variables*/ if PVALID>0 or PCANT>0 then do; OHDPRTNT28b=1*(OHDNPRMb=28)+2*(0<=OHDNPRMb<28); /*Tooth retention - has 28 permanent teeth present - ctc*/ OHDPRTNT21b=1*(OHDNPRMb>=21)+2*(0<=OHDNPRMb<=20); /*Tooth retention - has 21 or more permanent teeth - ctc*/ OHDPRTNT20b=1*(OHDNPRMb>=20)+2*(0<=OHDNPRMb<=19); /*Tooth retention - has 20 or more permanent teeth - ctc*/ OHDPRTNT6b=1*(OHDNPRMb>=6)+2*(0<=OHDNPRMb<6); /*Tooth retention - has 6 or more permanent teeth -ctc */ OHDPRTNT1b=1*(OHDNPRMb>=1)+2*(OHDNPRMb=0); /*Tooth retention - has 1 or more permanent teeth - ctc */ OHDPLOST0=1*(PMT=0)+2*(PMT>0); /*Tooth loss - lost no permanent teeth due to caries or perio*/ OHDPLOST6=1*(PMT>=6)+2*(0<=PMT<6);/*Tooth loss - lost 6 or more teeth due to caries or perio*/ OHDPLOST8=1*(PMT>=8)+2*(0<=PMT<8);/*Tooth loss - lost 8 or more teeth due to caries or perio*/ end; /*data step 3, section 3*/ /*Root Caries indicators*/ if OHXRCAR=. and OHXRRES=. then OHXRTDF=.; else if OHXRCAR in (.,9) and OHXRRES in (.,9) then OHXRTDF=9; else if OHXRCAR=2 and OHXRRES=2 then OHXRTDF=2; else if OHXRCAR=1 or OHXRRES=1 then OHXRTDF=1; /*data step 3, section 4*/ label OHDNPRIa="Number of primary teeth present - tc" OHDPRIa="Any primary teeth present - tc" OHDNPRIb="Number of primary teeth present - ctc" OHDPRIb="Any primary teeth present - ctc" OHDNPRM="Number of permanent teeth present - tc - 32 tooth spaces" OHDPRM="Any permanent teeth present - tc - 32 tooth spaces" OHDNPRMa="Number of permanent teeth present - tc - 28 tooth spaces" OHDPRMa="Any permanent teeth present - tc - 28 tooth spaces" OHDNPRMb="Number of permanent teeth present - ctc" OHDPRMb="Any permanent teeth present - ctc" OHDPgrp="Number of permanent teeth in groups - tc - 32 tooth spaces" OHDPgrpa="Number of permanent teeth in groups - tc - 28 tooth spaces" OHDPgrpb="Number of permanent teeth in groups - ctc " OHDNTP="Number of primary and permanent teeth present - tc - 32 tooth spaces" OHDTP="Any primary and permanent teeth present - tc - 32 tooth spaces" OHDNTPa="Number of primary and permanent teeth present - tc - 28 tooth spaces" OHDTPa="Any primary and permanent teeth present - tc - 28 tooth spaces" OHDNTPb="Number of primary and permanent teeth present - ctc" OHDTPb="Any primary and permanent teeth present - ctc" OHDNPU="Number of teeth in upper arch - tc - 16 tooth spaces incl. 3rd molars" OHDPU="Any teeth in upper arch - tc - 16 tooth spaces incl. 3rd molars" OHDNPL="Number of teeth in lower arch - tc - 16 tooth spaces incl. 3rd molars" OHDPL="Any teeth in lower arch - tc - 16 tooth spaces incl. 3rd molars" OHDNPUa="Number of teeth in upper arch - tc - 14 tooth spaces excl. 3rd molars" OHDPUa="Any teeth in upper arch - tc - 14 tooth spaces excl. 3rd molars" OHDNPLa="Number of teeth in lower arch - tc - 14 tooth spaces excl. 3rd molars" OHDPLa="Any teeth in lower arch - tc - 14 tooth spaces excl. 3rd molars" OHDTUD="Untreated decay: has 1 or more primary teeth with untreated decay" OHDTCE="Caries experience: has 1 or more primary teeth affected by decay/sequelae" OHDTST="st - number of sound primary teeth" OHDTDT="dt - number of decayed primary teeth" OHDTFT="ft - number of filled primary teeth" OHDTDFT="dft - number of decayed and filled primary teeth dt+ft" OHDTDDFT="d/dft (percent)" OHDTFDFT="f/dft (percent)" OHDTSS="ss - number of sound primary surfaces" OHDTDS="ds - number of decayed primary surfaces" OHDTDSl="ds - number of decayed primary surfaces - lingual" OHDTDSo="ds - number of decayed primary surfaces - occlusal" OHDTDSb="ds - number of decayed primary surfaces - buccal" OHDTDSm="ds - number of decayed primary surfaces - mesial" OHDTDSd="ds - number of decayed primary surfaces - distal" OHDTDSlb="ds - number of decayed primary surfaces - lingual/buccal" OHDTDSmd="ds - number of decayed primary surfaces - mesial/distal" OHDTFS="fs - number of filled primary surfaces" OHDTFSl="fs - number of filled primary surfaces - lingual" OHDTFSo="fs - number of filled primary surfaces - occlusal" OHDTFSb="fs - number of filled primary surfaces - buccal" OHDTFSm="fs - number of filled primary surfaces - mesial" OHDTFSd="fs - number of filled primary surfaces - distal" OHDTFSlb="fs - number of filled primary surfaces - lingual/buccal" OHDTFSmd="fs - number of filled primary surfaces - mesial/distal" OHDTDFS="dfs - number of decayed and filled primary surfaces ds+fs" OHDTDFSl="dfs - number of decayed and filled primary surfaces ds+fs - lingual" OHDTDFSo="dfs - number of decayed and filled primary surfaces ds+fs - occlusal" OHDTDFSb="dfs - number of decayed and filled primary surfaces ds+fs - buccal" OHDTDFSm="dfs - number of decayed and filled primary surfaces ds+fs - mesial" OHDTDFSd="dfs - number of decayed and filled primary surfaces ds+fs - distal" OHDTDFSlb="dfs - number of decayed and filled primary surfaces ds+fs - lingual/buccal" OHDTDFSmd="dfs - number of decayed and filled primary surfaces ds+fs - mesial/distal" OHDTDDFS="d/dfs (percent)" OHDTFDFS="f/dfs (percent)" OHDTplDFS="lingual/dfs (percent) - lingual" OHDTpoDFS="occlusal/dfs (percent) - occlusal" OHDTpbDFS="buccal/dfs (percent) - buccal" OHDTpmDFS="mesial/dfs (percent) - mesial" OHDTpdDFS="distal/dfs (percent) - distal" OHDTplbDFS="lingual-buccal/dfs (percent) - lingual/buccal" OHDTpmdDFS="mesial-distal/dfs (percent) - mesial/distal" OHDPUD="Untreated decay: has 1 or more permanent teeth with untreated decay" OHDPCE="Caries experience: has 1 or more permanent teeth with untreated (D) or treated (F) decay" OHDPCEa="Caries experience: has 1 or more permanent teeth with untreated (D) or treated (F) decay or teeth missing due to caries or perio" OHDPST="ST - number of sound permanent teeth" OHDPDT="DT - number of decayed permanent teeth" OHDPMT="MT - number of permanent teeth missing due to caries or perio" OHDPFT="FT - number of filled permanent teeth" OHDPDFT="DFT - number of decayed and filled permanent teeth DT+FT" OHDPDMFT="DMFT - number of decayed, missing and filled permanent teeth DT+MT+FT" OHDPDDFT="D/DFT (percent)" OHDPFDFT="F/DFT (percent)" OHDPDDMFT="D/DMFT (percent)" OHDPFDMFT="F/DMFT (percent)" OHDPMDMFT="M/DMFT (percent)" OHDPSS="SS - number of sound permanent surfaces" OHDPDS="DS - number of decayed permanent surfaces" OHDPDSl="DS - number of decayed permanent surfaces - lingual" OHDPDSo="DS - number of decayed permanent surfaces - occlusal" OHDPDSb="DS - number of decayed permanent surfaces - buccal" OHDPDSm="DS - number of decayed permanent surfaces - mesial" OHDPDSd="DS - number of decayed permanent surfaces - distal" OHDPDSlb="DS - number of decayed permanent surfaces - lingual/buccal" OHDPDSmd="DS - number of decayed permanent surfaces - mesial/distal" OHDPMS="MS - number of permanent surfaces missing due to caries or perio" OHDPMSl="MS - number of permanent surfaces missing due to caries or perio - lingual" OHDPMSo="MS - number of permanent surfaces missing due to caries or perio - occlusal" OHDPMSb="MS - number of permanent surfaces missing due to caries or perio - buccal" OHDPMSm="MS - number of permanent surfaces missing due to caries or perio - mesial" OHDPMSd="MS - number of permanent surfaces missing due to caries or perio - distal" OHDPMSlb="MS - number of permanent surfaces missing due to caries or perio - lingual/buccal" OHDPMSmd="MS - number of permanent surfaces missing due to caries or perio - mesial/distal" OHDPFS="FS - number of filled permanent surfaces" OHDPFSl="FS - number of filled permanent surfaces - lingual" OHDPFSo="FS - number of filled permanent surfaces - occlusal" OHDPFSb="FS - number of filled permanent surfaces - buccal" OHDPFSm="FS - number of filled permanent surfaces - mesial" OHDPFSd="FS - number of filled permanent surfaces - distal" OHDPFSlb="FS - number of filled permanent surfaces - lingual/buccal" OHDPFSmd="FS - number of filled permanent surfaces - mesial/distal" OHDPDFS="DFS - number of decayed and filled permanent surfaces DS+FS" OHDPDFSl="DFS - number of decayed and filled permanent surfaces DS+FS - lingual" OHDPDFSo="DFS - number of decayed and filled permanent surfaces DS+FS - occlusal" OHDPDFSb="DFS - number of decayed and filled permanent surfaces DS+FS - buccal" OHDPDFSm="DFS - number of decayed and filled permanent surfaces DS+FS - mesial" OHDPDFSd="DFS - number of decayed and filled permanent surfaces DS+FS - distal" OHDPDFSlb="DFS - number of decayed and filled permanent surfaces DS+FS - lingual/buccal" OHDPDFSmd="DFS - number of decayed and filled permanent surfaces DS+FS - mesial/distal" OHDPDMFS="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS" OHDPDMFSl="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual" OHDPDMFSo="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - occlusal" OHDPDMFSb="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - buccal" OHDPDMFSm="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial" OHDPDMFSd="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - distal" OHDPDMFSlb="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual/buccal" OHDPDMFSmd="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial/distal" OHDPDDFS="D/DFS (percent)" OHDPFDFS="F/DFS (percent)" OHDPDDMFS="D/DMFS (percent)" OHDPFDMFS="F/DMFS (percent)" OHDPMDMFS="M/DMFS (percent)" OHDPplDFS="lingual/DFS (percent) - lingual" OHDPpoDFS="occlusal/DFS (percent) - occlusal" OHDPpbDFS="buccal/DFS (percent) - buccal" OHDPpmDFS="mesial/DFS (percent) - mesial" OHDPpdDFS="distal/DFS (percent) - distal" OHDPplbDFS="lingual-buccal/DFS (percent) - lingual/buccal" OHDPpmdDFS="mesial-distal/DFS (percent) - mesial/distal" OHDPplDMFS="lingual/DMFS (percent) - lingual" OHDPpoDMFS="occlusal/DMFS (percent) - occlusal" OHDPpbDMFS="buccal/DMFS (percent) - buccal" OHDPpmDMFS="mesial/DMFS (percent) - mesial" OHDPpdDMFS="distal/DMFS (percent) - distal" OHDPplbDMFS="lingual-buccal/DMFS (percent) - lingual/buccal" OHDPpmdDMFS="mesial-distal/DMFS (percent) - mesial/distal" OHDPRTNT28a="Tooth retention - has 28 permanent teeth present - tc" OHDPRTNT28b="Tooth retention - has 28 permanent teeth present - ctc" OHDPRTNT21a="Tooth retention - has 21 or more permanent teeth - tc" OHDPRTNT21b="Tooth retention - has 21 or more permanent teeth - ctc" OHDPRTNT20a="Tooth retention - has 20 or more permanent teeth - tc" OHDPRTNT20b="Tooth retention - has 20 or more permanent teeth - ctc" OHDPRTNT6a="Tooth retention - has 6 or more permanent teeth - tc " OHDPRTNT6b="Tooth retention - has 6 or more permanent teeth -ctc " OHDPRTNT1a="Tooth retention - has 1 or more permanent teeth - tc " OHDPRTNT1b="Tooth retention - has 1 or more permanent teeth - ctc " OHDPLOST0="Tooth retention - lost no permanent teeth due to caries or perio (based on CTC = tooth missing due to caries/perio)" OHDPLOST6="Tooth loss - lost 6 or more teeth due to caries or perio" OHDPLOST8="Tooth loss - lost 8 or more teeth due to caries or perio" OHXRTDF="Root Caries - Whole mouth root caries or root restorations" OHDMUD="Untreated decay mixed dentition - BSS" OHDMCE="Caries experience mixed dentition - decayed or filled" OHDMCEa="Caries experience mixed dentition - including missing perm due to caries or perio" OHDMCEbss="Caries experience mixed dentition - BSS - including missing perm molars due to caries or perio" OHDMST="st + ST - number of sound primary and permanent teeth" OHDMSS="ss + SS = number of sound primary and permanent surfaces" ; run; /*Keep only SEQN and public release calculated caries variables*/ /*data step 4*/ data NHANESAB.ohddent; set NHANESAB.ohddent; keep SEQN dentate32P /* Dentate based on perm teeth 32 spaces - 1=yes 2=no */ edentate32P /* Edentate based on perm teeth 32 spaces - 1=yes 2=no */ dentate32TP /* Dentate based on primary and perm teeth 32 spaces - 1=yes 2=no */ edentate32TP /* Edentate based on primary and perm teeth 32 spaces - 1=yes 2=no */ dentate32TPI /* Dentate based on primary, perm and implanted teeth 32 spaces - 1=yes 2=no */ edentate32TPI /* Edentate based on primary, perm and implanted teeth 32 spaces - 1=yes 2=no */ dentate28P /* Dentate based on perm teeth 28 spaces - 1=yes 2=no */ edentate28P /* Edentate based on perm teeth 28 spaces - 1=yes 2=no */ dentate28TP /* Dentate based on primary and perm teeth 28 spaces - 1=yes 2=no */ edentate28TP /* Edentate based on primary and perm teeth 28 spaces - 1=yes 2=no */ dentate28TPI /* Dentate based on primary, perm and implanted teeth 28 spaces - 1=yes 2=no */ edentate28TPI /* Edentate based on primary, perm and implanted teeth 28 spaces - 1=yes 2=no */ OHDNPRIa /*Number of primary teeth present - tc*/ OHDPRIa /*Any primary teeth present - tc*/ OHDNPRIb /*Number of primary teeth present - ctc*/ OHDPRIb /*Any primary teeth present - ctc*/ OHDNPRM /*Number of permanent teeth present - tc - 32 tooth spaces*/ OHDPRM /*Any permanent teeth present - tc - 32 tooth spaces*/ OHDNPRMa /*Number of permanent teeth present - tc - 28 tooth spaces*/ OHDPRMa /*Any permanent teeth present - tc - 28 tooth spaces*/ OHDNPRMb /*Number of permanent teeth present - ctc*/ OHDPRMb /*Any permanent teeth present - ctc*/ OHDPgrp /*Number of permanent teeth in groups - tc - 32 tooth spaces*/ OHDPgrpa /*Number of permanent teeth in groups - tc - 28 tooth spaces*/ OHDPgrpb /*Number of permanent teeth in groups - ctc */ OHDNTP /*Number of primary and permanent teeth present - tc - 32 tooth spaces*/ OHDTP /*Any primary and permanent teeth present - tc - 32 tooth spaces*/ OHDNTPa /*Number of primary and permanent teeth present - tc - 28 tooth spaces*/ OHDTPa /*Any primary and permanent teeth present - tc - 28 tooth spaces*/ OHDNTPb /*Number of primary and permanent teeth present - ctc*/ OHDTPb /*Any primary and permanent teeth present - ctc*/ OHDNPU /*Number of teeth in upper arch - tc - 16 tooth spaces incl. 3rd molars*/ OHDPU /*Any teeth in upper arch - tc - 16 tooth spaces incl. 3rd molars*/ OHDNPL /*Number of teeth in lower arch - tc - 16 tooth spaces incl. 3rd molars*/ OHDPL /*Any teeth in lower arch - tc - 16 tooth spaces incl. 3rd molars*/ OHDNPUa /*Number of teeth in upper arch - tc - 14 tooth spaces iexcl. 3rd molars*/ OHDPUa /*Any teeth in upper arch - tc - 14 tooth spaces excl. 3rd molars*/ OHDNPLa /*Number of teeth in lower arch - tc - 14 tooth spaces excl. 3rd molars*/ OHDPLa /*Any teeth in lower arch - tc - 14 tooth spaces excl. 3rd molars*/ OHDTUD /*Untreated decay: has 1 or more primary teeth with untreated decay*/ OHDTCE /*Caries experience: has 1 or more primary teeth affected by decay/sequelae*/ OHDTST /*st - number of sound primary teeth*/ OHDTDT /*dt - number of decayed primary teeth*/ OHDTFT /*ft - number of filled primary teeth*/ OHDTDFT /*dft - number of decayed and filled primary teeth dt+ft*/ OHDTDDFT /*d/dft (percent)*/ OHDTFDFT /*f/dft (percent)*/ OHDTSS /*ss - number of sound primary surfaces*/ OHDTDS /*ds - number of decayed primary surfaces*/ OHDTDSl /*ds - number of decayed primary surfaces - lingual*/ OHDTDSo /*ds - number of decayed primary surfaces - occlusal*/ OHDTDSb /*ds - number of decayed primary surfaces - buccal*/ OHDTDSm /*ds - number of decayed primary surfaces - mesial*/ OHDTDSd /*ds - number of decayed primary surfaces - distal*/ OHDTDSlb /*ds - number of decayed primary surfaces - lingual/buccal*/ OHDTDSmd /*ds - number of decayed primary surfaces - mesial/distal*/ OHDTFS /*fs - number of filled primary surfaces*/ OHDTFSl /*fs - number of filled primary surfaces - lingual*/ OHDTFSo /*fs - number of filled primary surfaces - occlusal*/ OHDTFSb /*fs - number of filled primary surfaces - buccal*/ OHDTFSm /*fs - number of filled primary surfaces - mesial*/ OHDTFSd /*fs - number of filled primary surfaces - distal*/ OHDTFSlb /*fs - number of filled primary surfaces - lingual/buccal*/ OHDTFSmd /*fs - number of filled primary surfaces - mesial/distal*/ OHDTDFS /*dfs - number of decayed and filled primary surfaces ds+fs*/ OHDTDFSl /*dfs - number of decayed and filled primary surfaces ds+fs - lingual*/ OHDTDFSo /*dfs - number of decayed and filled primary surfaces ds+fs - occlusal*/ OHDTDFSb /*dfs - number of decayed and filled primary surfaces ds+fs - buccal*/ OHDTDFSm /*dfs - number of decayed and filled primary surfaces ds+fs - mesial*/ OHDTDFSd /*dfs - number of decayed and filled primary surfaces ds+fs - distal*/ OHDTDFSlb /*dfs - number of decayed and filled primary surfaces ds+fs - lingual/buccal*/ OHDTDFSmd /*dfs - number of decayed and filled primary surfaces ds+fs - mesial/distal*/ OHDTDDFS /*d/dfs (percent)*/ OHDTFDFS /*f/dfs (percent)*/ OHDTplDFS /*lingual/dfs (percent) - lingual*/ OHDTpoDFS /*occlusal/dfs (percent) - occlusal*/ OHDTpbDFS /*buccal/dfs (percent) - buccal*/ OHDTpmDFS /*mesial/dfs (percent) - mesial*/ OHDTpdDFS /*distal/dfs (percent) - distal*/ OHDTplbDFS /*lingual-buccal/dfs (percent) - lingual/buccal*/ OHDTpmdDFS /*mesial-distal/dfs (percent) - mesial/distal*/ OHDPUD /*Untreated decay: has 1 or more permanent teeth with untreated decay*/ OHDPCE /*Caries experience: has 1 or more permanent teeth with untreated (D) or treated (F) decay*/ OHDPCEa /*Caries experience: has 1 or more permanent teeth with untreated (D) or treated (F) decay or teeth missing due to caries or perio*/ OHDPST /*ST - number of sound permanent teeth*/ OHDPDT /*DT - number of decayed permanent teeth*/ OHDPMT /*MT - number of permanent teeth missing due to caries or perio*/ OHDPFT /*FT - number of filled permanent teeth*/ OHDPDFT /*DFT - number of decayed and filled permanent teeth DT+FT*/ OHDPDMFT /*DMFT - number of decayed and filled permanent teeth DT+MT+FT*/ OHDPDDFT /*D/DFT (percent)*/ OHDPFDFT /*F/DFT (percent)*/ OHDPDDMFT /*D/DMFT (percent)*/ OHDPFDMFT /*F/DMFT (percent)*/ OHDPMDMFT /*M/DMFT (percent)*/ OHDPSS /*SS - number of sound permanent surfaces*/ OHDPDS /*DS - number of decayed permanent surfaces*/ OHDPDSl /*DS - number of decayed permanent surfaces - lingual*/ OHDPDSo /*DS - number of decayed permanent surfaces - occlusal*/ OHDPDSb /*DS - number of decayed permanent surfaces - buccal*/ OHDPDSm /*DS - number of decayed permanent surfaces - mesial*/ OHDPDSd /*DS - number of decayed permanent surfaces - distal*/ OHDPDSlb /*DS - number of decayed permanent surfaces - lingual/buccal*/ OHDPDSmd /*DS - number of decayed permanent surfaces - mesial/distal*/ OHDPMS /*MS - number of permanent surfaces missing due to caries or perio*/ OHDPMSl /*MS - number of permanent surfaces missing due to caries or perio - lingual*/ OHDPMSo /*MS - number of permanent surfaces missing due to caries or perio - occlusal*/ OHDPMSb /*MS - number of permanent surfaces missing due to caries or perio - buccal*/ OHDPMSm /*MS - number of permanent surfaces missing due to caries or perio - mesial*/ OHDPMSd /*MS - number of permanent surfaces missing due to caries or perio - distal*/ OHDPMSlb /*MS - number of permanent surfaces missing due to caries or perio - lingual/buccal*/ OHDPMSmd /*MS - number of permanent surfaces missing due to caries or perio - mesial/distal*/ OHDPFS /*FS - number of filled permanent surfaces*/ OHDPFSl /*FS - number of filled permanent surfaces - lingual*/ OHDPFSo /*FS - number of filled permanent surfaces - occlusal*/ OHDPFSb /*FS - number of filled permanent surfaces - buccal*/ OHDPFSm /*FS - number of filled permanent surfaces - mesial*/ OHDPFSd /*FS - number of filled permanent surfaces - distal*/ OHDPFSlb /*FS - number of filled permanent surfaces - lingual/buccal*/ OHDPFSmd /*FS - number of filled permanent surfaces - mesial/distal*/ OHDPDFS /*DFS - number of decayed and filled permanent surfaces DS+FS*/ OHDPDFSl /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual*/ OHDPDFSo /*DFS - number of decayed and filled permanent surfaces DS+FS - occlusal*/ OHDPDFSb /*DFS - number of decayed and filled permanent surfaces DS+FS - buccal*/ OHDPDFSm /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial*/ OHDPDFSd /*DFS - number of decayed and filled permanent surfaces DS+FS - distal*/ OHDPDFSlb /*DFS - number of decayed and filled permanent surfaces DS+FS - lingual/buccal*/ OHDPDFSmd /*DFS - number of decayed and filled permanent surfaces DS+FS - mesial/distal*/ OHDPDMFS /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS*/ OHDPDMFSl /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual*/ OHDPDMFSo /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - occlusal*/ OHDPDMFSb /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - buccal*/ OHDPDMFSm /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial*/ OHDPDMFSd /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - distal*/ OHDPDMFSlb /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual/buccal*/ OHDPDMFSmd /*DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial/distal*/ OHDPDDFS /*D/DFS (percent)*/ OHDPFDFS /*F/DFS (percent)*/ OHDPDDMFS /*D/DMFS (percent)*/ OHDPFDMFS /*F/DMFS (percent)*/ OHDPMDMFS /*M/DMFS (percent)*/ OHDPplDFS /*lingual/DFS (percent) - lingual*/ OHDPpoDFS /*occlusal/DFS (percent) - occlusal*/ OHDPpbDFS /*buccal/DFS (percent) - buccal*/ OHDPpmDFS /*mesial/DFS (percent) - mesial*/ OHDPpdDFS /*distal/DFS (percent) - distal*/ OHDPplbDFS /*lingual-buccal/DFS (percent) - lingual/buccal*/ OHDPpmdDFS /*mesial-distal/DFS (percent) - mesial/distal*/ OHDPplDMFS /*lingual/DMFS (percent) - lingual*/ OHDPpoDMFS /*occlusal/DMFS (percent) - occlusal*/ OHDPpbDMFS /*buccal/DMFS (percent) - buccal*/ OHDPpmDMFS /*mesial/DMFS (percent) - mesial*/ OHDPpdDMFS /*distal/DMFS (percent) - distal*/ OHDPplbDMFS /*lingual-buccal/DMFS (percent) - lingual/buccal*/ OHDPpmdDMFS /*mesial-distal/DMFS (percent) - mesial/distal*/ OHDPRTNT28a /*Tooth retention - has 28 permanent teeth present - tc*/ OHDPRTNT28b /*Tooth retention - has 28 permanent teeth present - ctc*/ OHDPRTNT21a /*Tooth retention - has 21 or more permanent teeth - tc*/ OHDPRTNT21b /*Tooth retention - has 21 or more permanent teeth - ctc*/ OHDPRTNT20a /*Tooth retention - has 20 or more permanent teeth - tc*/ OHDPRTNT20b /*Tooth retention - has 20 or more permanent teeth - ctc*/ OHDPRTNT6a /*Tooth retention - has 6 or more permanent teeth - tc */ OHDPRTNT6b /*Tooth retention - has 6 or more permanent teeth -ctc */ OHDPRTNT1a /*Tooth retention - has 1 or more permanent teeth - tc */ OHDPRTNT1b /*Tooth retention - has 1 or more permanent teeth - ctc */ OHDPLOST0 /*Tooth retention - lost no permanent teeth due to caries or perio (based on CTC = tooth missing due to caries/perio)*/ OHDPLOST6 /*Tooth loss - lost 6 or more teeth due to caries or perio*/ OHDPLOST8 /*Tooth loss - lost 8 or more teeth due to caries or perio*/ OHDPgrp /*Tooth retention - WHO groups - tc - 32 tooth spaces*/ OHDPgrpa /*Tooth retention - WHO groups - tc - 28 tooth spaces*/ OHDPgrpb /*Tooth retention - WHO groups - ctc*/ OHXRTDF /*Root Caries - untreated decay or restorations*/ OHXRCAR /*Root Caries - untreated decay */ OHXRRES /*Root Caries - restorations*/ OHDMUD /*Untreated decay mixed dentition - BSS*/ OHDMCE /*Caries experience mixed dentition - decayed or filled*/ OHDMCEa /*Caries experience mixed dentition - including missing perm due to caries or perio*/ OHDMCEbss /*Caries experience mixed dentition - BSS - including missing perm molars due to caries or perio*/ OHDMST /*st + ST - number of sound primary and permanent teeth*/ OHDMSS /*ss + SS = number of sound primary and permanent surfaces*/ ; run; /*change no teeth and cannot be assessed from 8,88,888 and 9,99,999 to missing*/ /*data step 5*/ data NHANESAB.ohddentX; set NHANESAB.ohddent; array cntmisa[12] OHDTUD OHDTCE OHDPUD OHDPCE OHDPCEa OHXRTDF OHXRCAR OHXRRES OHDMUD OHDMCE OHDMCEa OHDMCEbss ; array cntmisb[11] OHDTST OHDTDT OHDTFT OHDTDFT OHDPST OHDPDT OHDPMT OHDPFT OHDPDFT OHDPDMFT OHDMST ; array cntmisc[102] OHDTDDFT OHDTFDFT OHDTSS OHDTDS OHDTDSl OHDTDSo OHDTDSb OHDTDSm OHDTDSd OHDTDSlb OHDTDSmd OHDTFS OHDTFSl OHDTFSo OHDTFSb OHDTFSm OHDTFSd OHDTFSlb OHDTFSmd OHDTDFS OHDTDFSl OHDTDFSo OHDTDFSb OHDTDFSm OHDTDFSd OHDTDFSlb OHDTDFSmd OHDTDDFS OHDTFDFS OHDTplDFS OHDTpoDFS OHDTpbDFS OHDTpmDFS OHDTpdDFS OHDTplbDFS OHDTpmdDFS OHDPDDFT OHDPFDFT OHDPDDMFT OHDPFDMFT OHDPMDMFT OHDPSS OHDPDS OHDPDSl OHDPDSo OHDPDSb OHDPDSm OHDPDSd OHDPDSlb OHDPDSmd OHDPMS OHDPMSl OHDPMSo OHDPMSb OHDPMSm OHDPMSd OHDPMSlb OHDPMSmd OHDPFS OHDPFSl OHDPFSo OHDPFSb OHDPFSm OHDPFSd OHDPFSlb OHDPFSmd OHDPDFS OHDPDFSl OHDPDFSo OHDPDFSb OHDPDFSm OHDPDFSd OHDPDFSlb OHDPDFSmd OHDPDMFS OHDPDMFSl OHDPDMFSo OHDPDMFSb OHDPDMFSm OHDPDMFSd OHDPDMFSlb OHDPDMFSmd OHDPDDFS OHDPFDFS OHDPDDMFS OHDPFDMFS OHDPMDMFS OHDPplDFS OHDPpoDFS OHDPpbDFS OHDPpmDFS OHDPpdDFS OHDPplbDFS OHDPpmdDFS OHDPplDMFS OHDPpoDMFS OHDPpbDMFS OHDPpmDMFS OHDPpdDMFS OHDPplbDMFS OHDPpmdDMFS OHDMSS ; array cntmisax[12] OHDTUDx OHDTCEx OHDPUDx OHDPCEx OHDPCEax OHXRTDFx OHXRCARx OHXRRESx OHDMUDx OHDMCEx OHDMCEax OHDMCEbssx ; array cntmisbx[11] OHDTSTx OHDTDTx OHDTFTx OHDTDFTx OHDPSTx OHDPDTx OHDPMTx OHDPFTx OHDPDFTx OHDPDMFTx OHDMSTx ; array cntmiscx[102] OHDTDDFTX OHDTFDFTX OHDTSSX OHDTDSX OHDTDSlX OHDTDSoX OHDTDSbX OHDTDSmX OHDTDSdX OHDTDSlbX OHDTDSmdX OHDTFSX OHDTFSlX OHDTFSoX OHDTFSbX OHDTFSmX OHDTFSdX OHDTFSlbX OHDTFSmdX OHDTDFSX OHDTDFSlX OHDTDFSoX OHDTDFSbX OHDTDFSmX OHDTDFSdX OHDTDFSlbX OHDTDFSmdX OHDTDDFSX OHDTFDFSX OHDTplDFSX OHDTpoDFSX OHDTpbDFSX OHDTpmDFSX OHDTpdDFSX OHDTplbDFSX OHDTpmdDFSX OHDPDDFTX OHDPFDFTX OHDPDDMFTX OHDPFDMFTX OHDPMDMFTX OHDPSSX OHDPDSX OHDPDSlX OHDPDSoX OHDPDSbX OHDPDSmX OHDPDSdX OHDPDSlbX OHDPDSmdX OHDPMSX OHDPMSlX OHDPMSoX OHDPMSbX OHDPMSmX OHDPMSdX OHDPMSlbX OHDPMSmdX OHDPFSX OHDPFSlX OHDPFSoX OHDPFSbX OHDPFSmX OHDPFSdX OHDPFSlbX OHDPFSmdX OHDPDFSX OHDPDFSlX OHDPDFSoX OHDPDFSbX OHDPDFSmX OHDPDFSdX OHDPDFSlbX OHDPDFSmdX OHDPDMFSX OHDPDMFSlX OHDPDMFSoX OHDPDMFSbX OHDPDMFSmX OHDPDMFSdX OHDPDMFSlbX OHDPDMFSmdX OHDPDDFSX OHDPFDFSX OHDPDDMFSX OHDPFDMFSX OHDPMDMFSX OHDPplDFSX OHDPpoDFSX OHDPpbDFSX OHDPpmDFSX OHDPpdDFSX OHDPplbDFSX OHDPpmdDFSX OHDPplDMFSX OHDPpoDMFSX OHDPpbDMFSX OHDPpmDMFSX OHDPpdDMFSX OHDPplbDMFSX OHDPpmdDMFSX OHDMSSX ; do i=1 to 12; if cntmisa[i] in (8,9) then cntmisax[i]=.; else cntmisax[i]=cntmisa[i]; end; drop i; do i=1 to 11; if cntmisb[i] in (88,99) then cntmisbx[i]=.; else cntmisbx[i]=cntmisb[i]; end; drop i; do i=1 to 102; if cntmisc[i] in (888,999) then cntmisc[i]=.; else cntmiscx[i]=cntmisc[i]; end; drop i; drop OHDTUD OHDTCE OHDPUD OHDPCE OHDPCEa OHXRTDF OHXRCAR OHXRRES OHDMUD OHDMCE OHDMCEa OHDMCEbss OHDTST OHDTDT OHDTFT OHDTDFT OHDPST OHDPDT OHDPMT OHDPFT OHDPDFT OHDPDMFT OHDMST OHDTDDFT OHDTFDFT OHDTSS OHDTDS OHDTDSl OHDTDSo OHDTDSb OHDTDSm OHDTDSd OHDTDSlb OHDTDSmd OHDTFS OHDTFSl OHDTFSo OHDTFSb OHDTFSm OHDTFSd OHDTFSlb OHDTFSmd OHDTDFS OHDTDFSl OHDTDFSo OHDTDFSb OHDTDFSm OHDTDFSd OHDTDFSlb OHDTDFSmd OHDTDDFS OHDTFDFS OHDTplDFS OHDTpoDFS OHDTpbDFS OHDTpmDFS OHDTpdDFS OHDTplbDFS OHDTpmdDFS OHDPDDFT OHDPFDFT OHDPDDMFT OHDPFDMFT OHDPMDMFT OHDPSS OHDPDS OHDPDSl OHDPDSo OHDPDSb OHDPDSm OHDPDSd OHDPDSlb OHDPDSmd OHDPMS OHDPMSl OHDPMSo OHDPMSb OHDPMSm OHDPMSd OHDPMSlb OHDPMSmd OHDPFS OHDPFSl OHDPFSo OHDPFSb OHDPFSm OHDPFSd OHDPFSlb OHDPFSmd OHDPDFS OHDPDFSl OHDPDFSo OHDPDFSb OHDPDFSm OHDPDFSd OHDPDFSlb OHDPDFSmd OHDPDMFS OHDPDMFSl OHDPDMFSo OHDPDMFSb OHDPDMFSm OHDPDMFSd OHDPDMFSlb OHDPDMFSmd OHDPDDFS OHDPFDFS OHDPDDMFS OHDPFDMFS OHDPMDMFS OHDPplDFS OHDPpoDFS OHDPpbDFS OHDPpmDFS OHDPpdDFS OHDPplbDFS OHDPpmdDFS OHDPplDMFS OHDPpoDMFS OHDPpbDMFS OHDPpmDMFS OHDPpdDMFS OHDPplbDMFS OHDPpmdDMFS OHDMSS ; label OHDTUDX="Untreated decay: has 1 or more primary teeth with untreated decay" OHDTCEX="Caries experience: has 1 or more primary teeth affected by decay/sequelae" OHDTSTX="st - number of sound primary teeth" OHDTDTX="dt - number of decayed primary teeth" OHDTFTX="ft - number of filled primary teeth" OHDTDFTX="dft - number of decayed and filled primary teeth dt+ft" OHDTDDFTX="d/dft (percent)" OHDTFDFTX="f/dft (percent)" OHDTSSX="ss - number of sound primary surfaces" OHDTDSX="ds - number of decayed primary surfaces" OHDTDSlX="ds - number of decayed primary surfaces - lingual" OHDTDSoX="ds - number of decayed primary surfaces - occlusal" OHDTDSbX="ds - number of decayed primary surfaces - buccal" OHDTDSmX="ds - number of decayed primary surfaces - mesial" OHDTDSdX="ds - number of decayed primary surfaces - distal" OHDTDSlbX="ds - number of decayed primary surfaces - lingual/buccal" OHDTDSmdX="ds - number of decayed primary surfaces - mesial/distal" OHDTFSX="fs - number of filled primary surfaces" OHDTFSlX="fs - number of filled primary surfaces - lingual" OHDTFSoX="fs - number of filled primary surfaces - occlusal" OHDTFSbX="fs - number of filled primary surfaces - buccal" OHDTFSmX="fs - number of filled primary surfaces - mesial" OHDTFSdX="fs - number of filled primary surfaces - distal" OHDTFSlbX="fs - number of filled primary surfaces - lingual/buccal" OHDTFSmdX="fs - number of filled primary surfaces - mesial/distal" OHDTDFSX="dfs - number of decayed and filled primary surfaces ds+fs" OHDTDFSlX="dfs - number of decayed and filled primary surfaces ds+fs - lingual" OHDTDFSoX="dfs - number of decayed and filled primary surfaces ds+fs - occlusal" OHDTDFSbX="dfs - number of decayed and filled primary surfaces ds+fs - buccal" OHDTDFSmX="dfs - number of decayed and filled primary surfaces ds+fs - mesial" OHDTDFSdX="dfs - number of decayed and filled primary surfaces ds+fs - distal" OHDTDFSlbX="dfs - number of decayed and filled primary surfaces ds+fs - lingual/buccal" OHDTDFSmdX="dfs - number of decayed and filled primary surfaces ds+fs - mesial/distal" OHDTDDFSX="d/dfs (percent)" OHDTFDFSX="f/dfs (percent)" OHDTplDFSX="lingual/dfs (percent)" OHDTpoDFSX="occlusal/dfs (percent)" OHDTpbDFSX="buccal/dfs (percent)" OHDTpmDFSX="mesial/dfs (percent)" OHDTpdDFSX="distal/dfs (percent)" OHDTplbDFSX="lingual-buccal/dfs (percent)" OHDTpmdDFSX="mesial-distal/dfs (percent)" OHDPUDX="Untreated decay: has 1 or more permanent teeth with untreated decay" OHDPCEX="Caries experience: has 1 or more permanent teeth with untreated (D) or treated (F) decay" OHDPCEaX="Caries experience: has 1 or more permanent teeth with untreated (D) or treated (F) decay or teeth missing due to caries or perio" OHDPSTX="ST - number of sound permanent teeth" OHDPDTX="DT - number of decayed permanent teeth" OHDPMTX="MT - number of permanent teeth missing due to caries or perio" OHDPFTX="FT - number of filled permanent teeth" OHDPDFTX="DFT - number of decayed and filled permanent teeth DT+FT" OHDPDMFTX="DMFT - number of decayed and filled permanent teeth DT+MT+FT" OHDPDDFTX="D/DFT (percent)" OHDPFDFTX="F/DFT (percent)" OHDPDDMFTX="D/DMFT (percent)" OHDPFDMFTX="F/DMFT (percent)" OHDPMDMFTX="M/DMFT (percent)" OHDPSSX="SS - number of sound permanent surfaces" OHDPDSX="DS - number of decayed permanent surfaces" OHDPDSlX="DS - number of decayed permanent surfaces - lingual" OHDPDSoX="DS - number of decayed permanent surfaces - occlusal" OHDPDSbX="DS - number of decayed permanent surfaces - buccal" OHDPDSmX="DS - number of decayed permanent surfaces - mesial" OHDPDSdX="DS - number of decayed permanent surfaces - distal" OHDPDSlbX="DS - number of decayed permanent surfaces - lingual/buccal" OHDPDSmdX="DS - number of decayed permanent surfaces - mesial/distal" OHDPMSX="MS - number of permanent surfaces missing due to caries or perio" OHDPMSlX="MS - number of permanent surfaces missing due to caries or perio - lingual" OHDPMSoX="MS - number of permanent surfaces missing due to caries or perio - occlusal" OHDPMSbX="MS - number of permanent surfaces missing due to caries or perio - buccal" OHDPMSmX="MS - number of permanent surfaces missing due to caries or perio - mesial" OHDPMSdX="MS - number of permanent surfaces missing due to caries or perio - distal" OHDPMSlbX="MS - number of permanent surfaces missing due to caries or perio - lingual/buccal" OHDPMSmdX="MS - number of permanent surfaces missing due to caries or perio- mesial/distal" OHDPFSX="FS - number of filled permanent surfaces" OHDPFSlX="FS - number of filled permanent surfaces - lingual" OHDPFSoX="FS - number of filled permanent surfaces - occlusal" OHDPFSbX="FS - number of filled permanent surfaces - buccal" OHDPFSmX="FS - number of filled permanent surfaces - mesial" OHDPFSdX="FS - number of filled permanent surfaces - distal" OHDPFSlbX="FS - number of filled permanent surfaces - lingual/buccal" OHDPFSmdX="FS - number of filled permanent surfaces - mesial/distal" OHDPDFSX="DFS - number of decayed and filled permanent surfaces DS+FS" OHDPDFSlX="DFS - number of decayed and filled permanent surfaces DS+FS - lingual" OHDPDFSoX="DFS - number of decayed and filled permanent surfaces DS+FS - occlusal" OHDPDFSbX="DFS - number of decayed and filled permanent surfaces DS+FS - buccal" OHDPDFSmX="DFS - number of decayed and filled permanent surfaces DS+FS - mesial" OHDPDFSdX="DFS - number of decayed and filled permanent surfaces DS+FS - distal" OHDPDFSlbX="DFS - number of decayed and filled permanent surfaces DS+FS - lingual/buccal" OHDPDFSmdX="DFS - number of decayed and filled permanent surfaces DS+FS - mesial/distal" OHDPDMFSX="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS" OHDPDMFSlX="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual" OHDPDMFSoX="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - occlusal" OHDPDMFSbX="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - buccal" OHDPDMFSmX="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial" OHDPDMFSdX="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - distal" OHDPDMFSlbX="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - lingual/buccal" OHDPDMFSmdX="DMFS - number of decayed, missing (due to disease) and filled permanent surfaces DS+MS+FS - mesial/distal" OHDPDDFSX="D/DFS (percent)" OHDPFDFSX="F/DFS (percent)" OHDPDDMFSX="D/DMFS (percent)" OHDPFDMFSX="F/DMFS (percent)" OHDPMDMFSX="M/DMFS (percent)" OHDPplDFSX="lingual/DFS (percent)" OHDPpoDFSX="occlusal/DFS (percent)" OHDPpbDFSX="buccal/DFS (percent)" OHDPpmDFSX="mesial/DFS (percent)" OHDPpdDFSX="distal/DFS (percent)" OHDPplbDFSX="lingual-buccal/DFS (percent)" OHDPpmdDFSX="mesial-distal/DFS (percent)" OHDPplDMFSX="lingual/DMFS (percent)" OHDPpoDMFSX="occlusal/DMFS (percent)" OHDPpbDMFSX="buccal/DMFS (percent)" OHDPpmDMFSX="mesial/DMFS (percent)" OHDPpdDMFSX="distal/DMFS (percent)" OHDPplbDMFSX="lingual-buccal/DMFS (percent)" OHDPpmdDMFSX="mesial-distal/DMFS (percent)" OHXRTDFX="Root Caries or restorations" OHXRCARX="Root Caries" OHXRRESX="Root Restorations" OHDMUD="Untreated decay mixed dentition - BSS" OHDMCE="Caries experience mixed dentition - decayed or filled" OHDMCEa="Caries experience mixed dentition - including missing perm due to caries or perio" OHDMCEbss="Caries experience mixed dentition - BSS - including missing perm molars due to caries or perio" OHDMSTX="st + ST - number of sound primary and permanent teeth" OHDMSSX="ss + SS - number of sound primary and permanent surfaces" ; run; /* Formats for public release variables To use formats uncomment this section and move to top of program Add format statements to data steps or procs */ /* proc format; value tcprev 8="No primary teeth present or with valid codes" 9="Cannot be asssessed" ; value pcprev 8="No permanent teeth present, missing or with valid codes" 9="Cannot be asssessed" ; value tct 88="No primary teeth present or with valid codes" 99="Cannot be asssessed" ; value pct 88="No permanent teeth present, missing or with valid codes" 99="Cannot be asssessed" ; value tcs 888="No primary teeth present or with valid codes" 999="Cannot be asssessed" ; value pcs 888="No permanent teeth present, missing or with valid codes" 999="Cannot be asssessed" ; run; */ /*end ohddent.sas.*/