1 understanding and using namcs and nhamcs data: a hands-on workshop part ii-advanced programming...
TRANSCRIPT
1
Understanding and Using NAMCS and NHAMCS Data:
A Hands-On Workshop
Part II-Advanced Programming Techniques
Esther Hing
U.S. DEPARTMENT OF HEALTH AND HUMAN SERVICESCenters for Disease Control and PreventionNational Center for Health Statistics
U.S. DEPARTMENT OF HEALTH AND HUMAN SERVICESCenters for Disease Control and PreventionNational Center for Health Statistics
Overview
Issues when trending NAMCS/NHAMCS dataIssues when trending NAMCS/NHAMCS data
CHC data & estimatesCHC data & estimates
Provider-level estimatesProvider-level estimates
Visit-level data aggregated to provider-level Visit-level data aggregated to provider-level statisticsstatistics
Visits vs. patient estimatesVisits vs. patient estimates
SummarySummary
Survey content varies over time
Variables routinely rotate on and off surveyVariables routinely rotate on and off survey Be careful about trending diagnosis prior to Be careful about trending diagnosis prior to
1979 because of ICDA (based on ICD-8)1979 because of ICDA (based on ICD-8) Even after 1980- be careful about changes in Even after 1980- be careful about changes in
ICD-9-CMICD-9-CM Number of medications varies over yearsNumber of medications varies over years
1980-81 – 8 medications1980-81 – 8 medications1985, 1989-94 – 5 medications1985, 1989-94 – 5 medications1995-2002 – 6 medications1995-2002 – 6 medications2003 and after--8 medications2003 and after--8 medications
Medications coded according to MULTUM Medications coded according to MULTUM terminology in 2006, and according to the terminology in 2006, and according to the National Drug code Directory maintained by National Drug code Directory maintained by FDA in years before 2006 are not comparable.FDA in years before 2006 are not comparable.
Diagnostic & therapeutic service checkboxes Diagnostic & therapeutic service checkboxes varyvary
PDF of Survey Content for the NAMCS and NHAMCS is on webpagewww.cdc.gov/nchs/about/major/ahcd1.htm
Public Use Data File Documentation for each year is another source
Documentation includes:Documentation includes: A description of the surveyA description of the survey Record formatRecord format Marginal data (summaries)Marginal data (summaries) Various definitionsVarious definitions Reason for Visit classification codesReason for Visit classification codes Medication & generic namesMedication & generic names Therapeutic classesTherapeutic classes
Combining multiple years
2 year combinations are best for 2 year combinations are best for subpopulation analysissubpopulation analysis
3-4 year combinations for disease 3-4 year combinations for disease specific analysisspecific analysis
Keep adding years until you have Keep adding years until you have at least 30 raw cases in important at least 30 raw cases in important cellscells
RSE improves incrementally with RSE improves incrementally with the number of years combinedthe number of years combined
RSE improves incrementally with the number of years
combined
RSE = SE/RSE = SE/xx
RSE for percent of visits by persons less RSE for percent of visits by persons less than 21 years of age with diabetesthan 21 years of age with diabetes 1999 RSE = .08/.18 = .44 (44%)1999 RSE = .08/.18 = .44 (44%) 1998 & 1999 RSE = .06/.18 = .33 (33%)1998 & 1999 RSE = .06/.18 = .33 (33%) 1998, 1999, & 2000 RSE = .05/.21 = .24 1998, 1999, & 2000 RSE = .05/.21 = .24
(24%)(24%)
NAMCS, hospital emergency department NAMCS, hospital emergency department (ED), and outpatient department (OPD) data (ED), and outpatient department (OPD) data can be combined in one or multiple yearscan be combined in one or multiple years
NAMCS & OPD variables virtually identical, NAMCS & OPD variables virtually identical, many ED variables are samemany ED variables are same
OPD and NAMCS should be combined to get OPD and NAMCS should be combined to get estimates of ambulatory physician care estimates of ambulatory physician care especially for African-American, Medicaid or especially for African-American, Medicaid or adolescent subpopulationsadolescent subpopulations
Only NAMCS has physician specialtyOnly NAMCS has physician specialty
Combining multiple settings
Variance computations Survey design variables need to be identical Survey design variables need to be identical
across time and settings regardless of across time and settings regardless of software usedsoftware used
SUDAAN 3 & 4-stage design variables SUDAAN 3 & 4-stage design variables available for survey years 1993 through available for survey years 1993 through 20012001
Starting in 2002, 1-stage design variables Starting in 2002, 1-stage design variables were released with PUF files, permitting use were released with PUF files, permitting use of SUDAAN 1-stage WR variances, STATA, of SUDAAN 1-stage WR variances, STATA, SAS’s Complex Survey procedures and SAS’s Complex Survey procedures and SPSS’s Complex Samples 12.0 module SPSS’s Complex Samples 12.0 module
2001
3- or 4-Stage
design variables
2003
2002
1-Stage design
variables only
1-Stage design
variables
3- or 4-Stage design
variables
Design Variables—Survey Years
Code to create design variables: survey years 2001
& earlier
CPSUM=PSUM;CSTRATM = STRATM;IF CPSUM IN(1, 2, 3, 4) THEN DO;CPSUM = PROVIDER +100000;CSTRATM = (STRATM*100000) +(1000*(MOD(YEAR,100))) + (SUBFILE*100) + PROSTRAT;END;ELSE CSTRATM = (STRATM*100000);
NAMCS sample of Community Health Centers (CHCs)
CHC physicians always included in NAMCSCHC physicians always included in NAMCS Typically small n of CHC physicians Typically small n of CHC physicians
precluded presentation of estimates precluded presentation of estimates (unreliable) (unreliable)
2006 NAMCS included separate stratum of 2006 NAMCS included separate stratum of about 100 CHCsabout 100 CHCs
Within CHCs, up to 3 physicians or mid-Within CHCs, up to 3 physicians or mid-level providers (physician assistants or level providers (physician assistants or nurse practitioners) and their visits nurse practitioners) and their visits sampledsampled
15
Comparison of primary care visits to community health centers and physician
offices
1/Difference between community health centers and physician offices is statistically significant (p<0.05). SOURCE: Cherry DK, Hing E, Woodwell DA, Rechtsteiner EA. National Ambulatory Medical Care Survey:
2006 Summary. National health statistics reports; no.3. Hyattsville, MD: National Center for Health Statistics. 2008.
9.6
40.6
76.5
95.2
10.3
51.3
77.7
96.0
0 10 20 30 40 50 60 70 80 90 100
Any non-medicationtreatment/3
Any health education/1
Any drug mention
Anydiagnostic/screening
service
Percent of visits
Community health center
Physician office
NAMCS sample of Community Health Centers limitations
2006 NAMCS PUF only includes CHC 2006 NAMCS PUF only includes CHC physician visits physician visits
Additional level of sampling for CHC Additional level of sampling for CHC providers increases sampling variability providers increases sampling variability of estimatesof estimates
CHC physician visits insufficient for CHC physician visits insufficient for detailed analysis of CHC physiciansdetailed analysis of CHC physicians
2006-07 CHC PUF file planned for 2006-07 CHC PUF file planned for release in 2009; will include visits to release in 2009; will include visits to mid-level providers mid-level providers
Physician weight released on NAMCS PUF file
NAMCS physician weight (PHYSWT) NAMCS physician weight (PHYSWT) first released on 2005 PUFfirst released on 2005 PUF
PHYSWT only on first visit record PHYSWT only on first visit record for physicianfor physician
Physician file created by selecting Physician file created by selecting records with PHYSWT>0records with PHYSWT>0
Survey design variables same for Survey design variables same for physicians as visits physicians as visits
Physician characteristics on 2006 NAMCS PUF filePhysician characteristics on PUF:Physician characteristics on PUF:
Physician specialty (SPECR)Physician specialty (SPECR) Physician specialty group (SPECCAT)Physician specialty group (SPECCAT) Geographic region (REGION)Geographic region (REGION) Metropolitan statistical area (MSA) Metropolitan statistical area (MSA) Solo practice (SOLO)Solo practice (SOLO) Other Induction interview variables on Other Induction interview variables on
pages 62-73 of NAMCS PUF pages 62-73 of NAMCS PUF documentation documentation
Other information on NAMCS Physician weight Selected physician estimates Selected physician estimates
presented on page 88 of 2006 presented on page 88 of 2006 NAMCS PUF documentationNAMCS PUF documentation
See pages 27-28 for additional See pages 27-28 for additional information about the physician-information about the physician-level weightlevel weight
Exercise: compare visit estimates with physician estimates Compare number of visits by Compare number of visits by
physician specialty with number of physician specialty with number of physicians by specialtyphysicians by specialty
StepsSteps Read NAMCS PUFRead NAMCS PUF Estimate visits using PUFEstimate visits using PUF Estimate physicians from Estimate physicians from
physician filephysician file
Run Exercise 1
Reads NAMCS PUF and produces Reads NAMCS PUF and produces weighted frequency of visits by weighted frequency of visits by physician specialtyphysician specialty
Run Exercise 2: Creates physician Run Exercise 2: Creates physician file and produces weighted file and produces weighted frequency of physicians by frequency of physicians by specialtyspecialty
PHYSWT>0 cases n=1,268PHYSWT>0 cases n=1,268
Run Exercise 3: Compute standard Run Exercise 3: Compute standard errors of physician percentages by errors of physician percentages by specialty using SAS’s PROC specialty using SAS’s PROC SURVEYFREQSURVEYFREQ
Physician weight caveatNAMCS PUF files PUF physician estimates may differ PUF physician estimates may differ
slightly from published physician slightly from published physician estimates (e.g. Physicians using estimates (e.g. Physicians using electronic medical records in 2005 EStat electronic medical records in 2005 EStat report) report)
2005 NAMCS PUF includes only 2005 NAMCS PUF includes only physicians with visit records (n=1,058)physicians with visit records (n=1,058)
EStat estimates include additional 223 in-EStat estimates include additional 223 in-scope physicians unavailable during scope physicians unavailable during sample week (on vacation or sample week (on vacation or conferences) who responded to Physician conferences) who responded to Physician Induction Interview (n=1,281)Induction Interview (n=1,281)
Provider weights released on NHAMCS PUF file Hospital ED weight (EDWT) only on first ED Hospital ED weight (EDWT) only on first ED
visit record for department within sample visit record for department within sample hospitalhospital
Hospital OPD weight (OPDWT) only on first Hospital OPD weight (OPDWT) only on first OPD visit record for that department within OPD visit record for that department within sample hospitalsample hospital
Create hospital file by selecting records with Create hospital file by selecting records with EDWT>0 or OPDWT>0 for more accurate EDWT>0 or OPDWT>0 for more accurate variance estimates; use subpopulation option variance estimates; use subpopulation option to select either ED or OPD data to select either ED or OPD data
Survey design variables same for hospital Survey design variables same for hospital departments as visits departments as visits
Provider weights released on NHAMCS PUF file (cont.) Selected ED estimates (n=364) Selected ED estimates (n=364)
presented on page 112 of 2006 presented on page 112 of 2006 NHAMCS PUF documentationNHAMCS PUF documentation
Selected OPD estimates (n=235) Selected OPD estimates (n=235) presented page 116-117 of 2006 presented page 116-117 of 2006 NHAMCS PUF documentation NHAMCS PUF documentation
See pages 23-24 for more details See pages 23-24 for more details on use of ED and OPD weighton use of ED and OPD weight
Provider weights released on 2006 NHAMCS PUF file (cont.)ED characteristics on PUF: ED characteristics on PUF:
Hospital ownership (OWNER), Hospital ownership (OWNER), Receipt of Medicaid Disproportionate Receipt of Medicaid Disproportionate
Share Program funds (MDSP), Share Program funds (MDSP), Receipt of bioterrorism hospital Receipt of bioterrorism hospital
preparedness funding (BIOTER), preparedness funding (BIOTER), Geographic region (REGION), Geographic region (REGION), Metropolitan statistical area (MSA), and Metropolitan statistical area (MSA), and Multiple variables on ED use of Multiple variables on ED use of
electronic medical recordselectronic medical records
Provider weights released on 2006 NHAMCS PUF file (cont.)OPD characteristics on PUF: OPD characteristics on PUF:
Hospital ownership (OWNER), Hospital ownership (OWNER), Receipt of Medicaid Disproportionate Receipt of Medicaid Disproportionate
Share Program funds (MDSP), Share Program funds (MDSP), Receipt of bioterrorism hospital Receipt of bioterrorism hospital
preparedness funding (BIOTER), preparedness funding (BIOTER), Geographic region (REGION), Geographic region (REGION), Metropolitan statistical area (MSA), and Metropolitan statistical area (MSA), and Multiple variables on OPD use of Multiple variables on OPD use of
electronic medical recordselectronic medical records
Why aggregate visit data to provider level
Provides additional information about Provides additional information about provider provider
Visit characteristic linked to providers Visit characteristic linked to providers can be compared across providerscan be compared across providers
ExamplesExamples Average caseload by expected Average caseload by expected
payment source across EDspayment source across EDs Average visit duration in EDs by ED Average visit duration in EDs by ED
visit volumevisit volume
35
Example
Note: Plus sign indicates median percentages across all emergency departments. Box represents the middle 50 percent of emergency departments. Lines represent emergency departments with extreme percentages.
SOURCE: Burt, McCaig. Staffing, Capacity, and ambulance diversion in emergency department:
United States, 2003-04. Advance data from vital and health statistics; no. 376. 2006.
Figure 7: Box plots of emergency departments in caseload percentages for expected sources of
payment: United States, 2003-04
0
20
40
60
80
100
Privateinsurance
Medicare Medicaid Uninsured
Pe
rce
nta
ge
of
vis
its
Steps
Convert dichotomous analytic variables Convert dichotomous analytic variables to 0/1 format (requires conversion to to 0/1 format (requires conversion to percentages afterwards)percentages afterwards)
Convert missing values on continuous Convert missing values on continuous variables to “.” variables to “.”
Use PROC SUMMARY to create one Use PROC SUMMARY to create one record per provider along with record per provider along with aggregate statistic for that provideraggregate statistic for that provider
Run weighted average on provider fileRun weighted average on provider file
Aggregate ED waiting time from visit file and estimate distribution across EDs by MSA status
Run Exercise 4: Read ED visit file Run Exercise 4: Read ED visit file and aggregate waiting time; print and aggregate waiting time; print first 10 observationsfirst 10 observations
Aggregate ED waiting time from visit file and estimate distribution across EDs by MSA status (Cont.)
Run Exercise 5: Computes average Run Exercise 5: Computes average waiting times in hospital EDs in waiting times in hospital EDs in MSAs and Non-MSAsMSAs and Non-MSAs
Distribution of average waiting time across EDs in MSAs and Non-MSAs
0
20
40
60
80
100
120
140
160
5 10 25 50 75 90 95
Ave
rag
e w
ait
per
ED
in
min
ute
s
MSA
Non-MSA
Percentile
Advantages & limitations of population-based surveys
Population-based surveysPopulation-based surveys Estimate persons, including those Estimate persons, including those
who never saw a health care who never saw a health care provider during reference period provider during reference period (e.g., last 12 months) (e.g., last 12 months)
Health care utilization data subject Health care utilization data subject to recall or proxy reporting for to recall or proxy reporting for childrenchildren
Less likely to measure rare medical Less likely to measure rare medical conditions conditions
Advantages & limitations of encounter-based surveys
Encounter-based surveysEncounter-based surveys Estimate the number, kind, and Estimate the number, kind, and
characteristics of health care characteristics of health care encountersencounters
Useful in estimating the burden of Useful in estimating the burden of illness on the health care system illness on the health care system
Can estimate rare medical Can estimate rare medical conditionsconditions
Characteristics not subject to recall Characteristics not subject to recall since information found in medical since information found in medical recordrecord
Estimate visits not patients Estimate visits not patients
Advantages of translating NAMCS/NHAMCS encounter data to patient estimates
Describes patterns of care by Describes patterns of care by frequency of visits to the doctorfrequency of visits to the doctor
Provides more information about Provides more information about patients from encounter-level datapatients from encounter-level data
Better describes quality of care to Better describes quality of care to patients vs. describing content of patients vs. describing content of encounterencounter
How are patients estimated from ambulatory encounter data?
Based on multiplicity estimator; Based on multiplicity estimator; component of network theorycomponent of network theory
Multiplicity inherent in ambulatory Multiplicity inherent in ambulatory datadata On average, patients see their On average, patients see their
physician about 3 times a yearphysician about 3 times a year Some patients see multiple Some patients see multiple
physicians during yearphysicians during year
References
Burt CW and Hing E. Making patient-level Burt CW and Hing E. Making patient-level estimates from medical encounter records estimates from medical encounter records using a multiplicity estimator. using a multiplicity estimator. Stat MedStat Med 2007; 26:1762-1774.2007; 26:1762-1774.
Sirken MG. Network Sampling. In Sirken MG. Network Sampling. In Encyclopedia Encyclopedia of Biostatisticsof Biostatistics, Armitage P, Colton T (eds). , Armitage P, Colton T (eds). Wiley: West Sussex. 1998; 2977-2986.Wiley: West Sussex. 1998; 2977-2986.
Birnbaum ZW, Sirken MG. Birnbaum ZW, Sirken MG. Design of Sample Design of Sample Surveys to Estimate the Prevalence of Rare Surveys to Estimate the Prevalence of Rare Diseases.Diseases. Vital and Health Statistics, PHS Vital and Health Statistics, PHS Publication No. 1, Series 2 (1). U.S. Publication No. 1, Series 2 (1). U.S. Government Printing Office: Washington, Government Printing Office: Washington, 1965.1965.
(visit weight)jk
Sjk
patient weight =
Number of visits in the past 12 months to sampled provider
Patients estimated using multiplicity estimator
Assumptions of patient estimate
Patient is relation between Patient is relation between person and sampled doctorperson and sampled doctor
Assumes previous visits by same Assumes previous visits by same patient have similar visit patient have similar visit characteristicscharacteristics
One person can be different One person can be different patients to different doctorspatients to different doctors
Limitations of patient estimator
Assumption of similar characteristics is not Assumption of similar characteristics is not applicable to all analytical variablesapplicable to all analytical variables
Patient estimates not equivalent to person-Patient estimates not equivalent to person-level estimates (doesn’t count persons with no level estimates (doesn’t count persons with no medical encounters)medical encounters)
Patient estimates limited to physician offices Patient estimates limited to physician offices and hospital outpatient departmentsand hospital outpatient departments
Multiplicity information first collected in half Multiplicity information first collected in half samples of 2001 NAMCS and NHAMCS (OPD)samples of 2001 NAMCS and NHAMCS (OPD)
Question on multiplicity of visits available on Question on multiplicity of visits available on PUF since 2002PUF since 2002
Multiplicity information will be available for ED Multiplicity information will be available for ED visits in 2007visits in 2007
Comparison of distributions for visits and patients: NAMCS 2001
Visits Patients
1 2-3 4-6 7+ 1 2-3 4-6 7+0
10
20
30
40
50
60Percent
Percent distribution for people making any health care visits by number of visits made in one year: NHIS, 1999-2000
1-3 4-9 10+Number of visits
0
10
20
30
40
50
60Percent of persons
Rate of persons making no health care visit was 17.5.
SOURCE: Cherry, DK. QuickStat MMWR. November 2, 2007/ 56(43); 1142.
22.1
17.918.3 18.5
12.1
14.512.9
9.2
0
5
10
15
20
25
30
Men Women
Pe
rce
nt
of
pa
tie
nts
45-54 yrs 55-64 yrs 65-74 yrs 75 yrs and over
Estimated Percentage of Patients Aged >45 Years Who Received Exercise Counseling from their Primary-Care Physicians, by Sex and Age Group—National Ambulatory Medical Care Survey and National Hospital Ambulatory Medical Care Survey, United States, 2003-2005
Patient weight summary
Visit records may be re-weighted to Visit records may be re-weighted to provide patient-level estimatesprovide patient-level estimates
Re-weighted distribution more closely Re-weighted distribution more closely resembles population-based resembles population-based estimatesestimates
No change in sampling variance No change in sampling variance estimation procedure other than estimation procedure other than using the new weight using the new weight
Past visits items provide depth to Past visits items provide depth to analysis of ambulatory care analysis of ambulatory care utilizationutilization
Creation of a re-weighting factorItem Item categoriescategories
Annual Annual visitsvisits
SSjk jk
(Interval (Interval midpoinmidpoint)t)
VR (visit VR (visit ratio)ratio)
NewNew 11 11 11
0 visits0 visits 11 11 11
1-2 visits1-2 visits 2-32-3 2.52.5 .4.4
3-5 visits3-5 visits 4-64-6 55 .2.2
6+ visits6+ visits 7+7+ 88 .125.125
67
(visit weight)jk
Sjk
patient weight =
Number of visits in the past 12 months to sampled provider
Patients estimated using multiplicity estimator
SAS code-multiplicity estimator
if pastvis=8 then vr=1;else if pastvis=1 then vr=1;else if pastvis=2 then vr=.4;else if pastvis=3 then vr=.2;else if pastvis=4 then vr=.125;
vrpatwt=patwt*vr;
Patient estimate exercise
Compare distribution of visits and Compare distribution of visits and patients with 7+ visits during past patients with 7+ visits during past 12 months by patient age12 months by patient age
Run exercise 6: Computes Run exercise 6: Computes distribution of visits by agedistribution of visits by age
Patient estimate exercise
Run exercise 7: Computes Run exercise 7: Computes distribution of patients with 7+ distribution of patients with 7+ visits during past 12 monthsvisits during past 12 months
Use patient weight (VRPATWT)Use patient weight (VRPATWT)
Number of visits and patients with 7+ visits during past 12 months
0
10
20
30
40
50
Visits Patients
Num
ber i
n m
illio
ns
Under 15 years 15-24 years 45-64 years 65-74 years 75+ years