1
Understanding and Using
NAMCS and NHAMCS Data
Data Tools and Basic Programming Data Tools and Basic Programming
TechniquesTechniques
Donald Cherry
Ambulatory and Hospital Care Statistics Branch
Division of Health Care Statistics
U.S. DEPARTMENT OF HEALTH AND HUMAN SERVICES
Centers for Disease Control and Prevention
National Center for Health Statistics
U.S. DEPARTMENT OF HEALTH AND HUMAN SERVICES
Centers for Disease Control and Prevention
National Center for Health Statistics
2
Overview
Some important features of NAMCS & NHAMCSSome important features of NAMCS & NHAMCS
File structureFile structure
SETSSETS
Exercises using SAS Proc Surveyfreq/Proc Surveymeans, Exercises using SAS Proc Surveyfreq/Proc Surveymeans,
SUDAAN, STATASUDAAN, STATA
Downloading data & creating a SAS datasetDownloading data & creating a SAS dataset
Simple frequencies with/without standard errors Simple frequencies with/without standard errors
Creating a new variable-AsthmaCreating a new variable-Asthma
Visit rates for asthma-male/femaleVisit rates for asthma-male/female
Total number of digestive write-in Total number of digestive write-in
proceduresprocedures
Time spent with physicianTime spent with physician
Considerations Considerations
SummarySummary
3
NAMCS and NHAMCS
National Ambulatory Medical Care Survey National Ambulatory Medical Care Survey
(NAMCS)(NAMCS)
Visits to nonfederal, office-based physicians Visits to nonfederal, office-based physicians
CHC’s sampled beginning in 2006CHC’s sampled beginning in 2006
National Hospital Ambulatory Medical Care National Hospital Ambulatory Medical Care
Survey (NHAMCS)Survey (NHAMCS)
Visits to hospital outpatient and emergency Visits to hospital outpatient and emergency
departmentsdepartments
4
NAMCS Sample Design
Three stage designThree stage design
112 PSUs112 PSUs
Physician practices within PSUsPhysician practices within PSUs
Patient visits within practicesPatient visits within practices
One-week reporting periodOne-week reporting period
About 30 visits per doctor are typically sampledAbout 30 visits per doctor are typically sampled
For 2006—3,350 doctors sampledFor 2006—3,350 doctors sampled
104 CHC’s sampled & physician visits included in 104 CHC’s sampled & physician visits included in
samplesample
Total visits 29,392Total visits 29,392
5
Scope of the NAMCS
Basic unit of sampling is the physician-Basic unit of sampling is the physician-
patient visit patient visit
In scope visits:In scope visits:
Must occur in physician’s officeMust occur in physician’s office
Must be for medical purposesMust be for medical purposes
Administrative visits not sampledAdministrative visits not sampled
House calls, emails, phone calls not House calls, emails, phone calls not
sampledsampled
6
Scope of the NAMCS (cont.)
Physicians must be:Physicians must be:
Classified by AMA or AOA as primarily Classified by AMA or AOA as primarily
engaged in office-based patient careengaged in office-based patient care
nonfederally employednonfederally employed
not in anesthesiology, radiology, or not in anesthesiology, radiology, or
pathology pathology
64 percent unweighted response rate in 64 percent unweighted response rate in
20062006
CHC’s are Federally Qualified or “look CHC’s are Federally Qualified or “look
alike”alike”
7
NHAMCS Sample Design
Multistage probability designMultistage probability design
First stage sample of 112 PSUsFirst stage sample of 112 PSUs
Hospitals within PSUsHospitals within PSUs
Clinics within OPDs, Emergency Service Clinics within OPDs, Emergency Service
Area (ESA) within EDsArea (ESA) within EDs
Patient visits within clinics, ESAsPatient visits within clinics, ESAs
4-week reporting period4-week reporting period
382 hospitals sampled in 2006; 35,849 ED 382 hospitals sampled in 2006; 35,849 ED
visits and 35,105 OPD visitsvisits and 35,105 OPD visits
8
Scope of the NHAMCS
Basic unit of sampling is patient visitBasic unit of sampling is patient visit
Emergency and outpatient departments Emergency and outpatient departments
of noninstitutional general and short-of noninstitutional general and short-
stay hospitalsstay hospitals
Not Federal, military, or Veterans Not Federal, military, or Veterans
Administration facilitiesAdministration facilities
Located in 50 states and D.C.Located in 50 states and D.C.
9
Sample Weight
Each NAMCS record contains a Each NAMCS record contains a
single weight, which we call Patient single weight, which we call Patient
Visit WeightVisit Weight
Same is true for OPD records and ED Same is true for OPD records and ED
recordsrecords
This weight is used for both visits and This weight is used for both visits and
drug/procedure mentionsdrug/procedure mentions
10
Data Items
Patient characteristics Patient characteristics
Age, sex, race, ethnicityAge, sex, race, ethnicity
Visit characteristicsVisit characteristics
Source of payment, continuity of care, reason Source of payment, continuity of care, reason
for visit, diagnosis, treatmentfor visit, diagnosis, treatment
Provider characteristicsProvider characteristics
Physician specialty, hospital ownership…Physician specialty, hospital ownership…
MULTUM drug characteristics added in 2006MULTUM drug characteristics added in 2006
11
Coding Systems Used
Reason for Visit Classification (NCHS)Reason for Visit Classification (NCHS)
ICD-9-CM for diagnoses, causes of ICD-9-CM for diagnoses, causes of
injury and proceduresinjury and procedures
Drug Classification System-MULTUMDrug Classification System-MULTUM
12
File Structure
Download data and layout from Download data and layout from
websitewebsite
http://www.cdc.gov/nchs/about/major/ahcd/http://www.cdc.gov/nchs/about/major/ahcd/
ahcd1.htmahcd1.htm
Flat ASCII files for each setting and Flat ASCII files for each setting and
year:year:
NAMCS: 1973-2006NAMCS: 1973-2006
NHAMCS: 1992-2006NHAMCS: 1992-2006
STATA files on Web:STATA files on Web:
NAMCS: 2003-2005NAMCS: 2003-2005
NHAMCS: 2003-2005NHAMCS: 2003-2005
13
Creating a usable STATA dataset
Two options:Two options:
1)Use the self-extracting file in STATA
folder to open a complete dataset
for the 2003-2005 NAMCS,
NHAMCS-ED, & NHAMCS-OPD
2)Use the DO file (*.do) and the
dictionary file (*.dct) along with the
flat data file (*.exe) to create a
dataset
3)3)StatTransferStatTransfer
14
Organizational structure-NAMCS data
Provider
provider info
practice info
geographic info
Visit
patient & visit info
treatment & outcome info
medications
Medications 1-8 Primary reason for Visit
MULTUM Categories
Primary diagnosis
Write-in scope procedure 1
Other Reason for Visit
Other Reason for Visit
Other diagnosis
Other diagnosis
Write-in scope procedure 2
Other test/service 1
Other test/service 2
Surgical procedure 1
Surgical procedure 2
Non-surgical procedure 1
Non-surgical procedure 2
15
SETS-Statistical Export and
Tabulation System
16
Hands-on Exercises
STATA Users
Double-click: My Computer\Double-click: My Computer\
Local Disk C:\DUC_08Local Disk C:\DUC_08
Open STATAOpen STATA
In the command window In the command window
type:type:
Set Set mem 1000mmem 1000m
Set Set matsize 5000matsize 5000
Under the “File” icon-double-Under the “File” icon-double-
click click namcs05.dtanamcs05.dta
Under “New Do File Editor”-Under “New Do File Editor”-
double-click: STATA double-click: STATA
exercises.doexercises.do
SAS/SUDAAN Users
Double-click: My Computer\
Local Disk C:\DUC_08
Double-click: Final Exercises
20
NAMCS vs. NHAMCS
Consider what types of settings are best Consider what types of settings are best
for a particular analysisfor a particular analysis
Persons of color are more likely to Persons of color are more likely to
visit OPD’s and ED’s than physician visit OPD’s and ED’s than physician
officesoffices
Persons in some age groups make Persons in some age groups make
disproportionately larger shares of disproportionately larger shares of
visits to ED’s than offices and OPD’svisits to ED’s than offices and OPD’s
22
How Good are the Estimates?
Depends … In general, OPD estimates Depends … In general, OPD estimates
tend to be somewhat less reliable than tend to be somewhat less reliable than
NAMCS and ED. NAMCS and ED.
Since 1999, our Advance Data reports Since 1999, our Advance Data reports
include standard errors in every table so include standard errors in every table so
it is easy to compute confidence it is easy to compute confidence
intervals around the estimates.intervals around the estimates.
23
RSE improves incrementally with
the number of years combined
RSE = SE/RSE = SE/xx
RSE for percent of visits by persons RSE for percent of visits by persons
less than 21 years of age with less than 21 years of age with
diabetesdiabetes
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%)
24
Some User Considerations
NAMCS/NHAMCS sample visits, not NAMCS/NHAMCS sample visits, not
patientspatients
No estimates of incidence or No estimates of incidence or
prevalenceprevalence
No state-level estimatesNo state-level estimates
May capture different types of care for May capture different types of care for
solo vs. group practice physicianssolo vs. group practice physicians
Data is only as good as what is Data is only as good as what is
documented in the medical recorddocumented in the medical record
25
If nothing else, remember…The
Public Use Data File
Documentation is YOUR FRIEND!
Each booklet includes:Each booklet 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