1 understanding and using namcs and nhamcs data data tools and basic programming techniques donald...

Download 1 Understanding and Using NAMCS and NHAMCS Data Data Tools and Basic Programming Techniques Donald Cherry Ambulatory and Hospital Care Statistics Branch

If you can't read please download the document

Upload: thomas-holland

Post on 13-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

  • Slide 1

1 Understanding and Using NAMCS and NHAMCS Data Data Tools and Basic Programming Techniques Donald Cherry Ambulatory and Hospital Care Statistics Branch Division of Health Care Statistics Slide 2 2 Overview Some important features of NAMCS & NHAMCS Some important features of NAMCS & NHAMCS File structure File structure SETS SETS Exercises using SAS Proc Surveyfreq/Proc Surveymeans, SUDAAN, STATA Exercises using SAS Proc Surveyfreq/Proc Surveymeans, SUDAAN, STATA Downloading data & creating a SAS dataset Simple frequencies with/without standard errors Creating a new variable-Asthma Visit rates for asthma-male/female Total number of digestive write-in procedures procedures Time spent with physician Considerations Considerations Summary Summary Slide 3 3 NAMCS and NHAMCS National Ambulatory Medical Care Survey (NAMCS) National Ambulatory Medical Care Survey (NAMCS) Visits to nonfederal, office-based physicians CHCs sampled beginning in 2006 National Hospital Ambulatory Medical Care Survey (NHAMCS) National Hospital Ambulatory Medical Care Survey (NHAMCS) Visits to hospital outpatient and emergency departments Slide 4 4 NAMCS Sample Design Three stage design Three stage design 112 PSUs Physician practices within PSUs Patient visits within practices One-week reporting period One-week reporting period About 30 visits per doctor are typically sampled About 30 visits per doctor are typically sampled For 20063,350 doctors sampled For 20063,350 doctors sampled 104 CHCs sampled & physician visits included in sample 104 CHCs sampled & physician visits included in sample Total visits 29,392 Total visits 29,392 Slide 5 5 Scope of the NAMCS Basic unit of sampling is the physician-patient visit Basic unit of sampling is the physician-patient visit In scope visits: In scope visits: Must occur in physicians office Must be for medical purposes Administrative visits not sampled House calls, emails, phone calls not sampled Slide 6 6 Scope of the NAMCS (cont.) Physicians must be: Physicians must be: Classified by AMA or AOA as primarily engaged in office-based patient care nonfederally employed not in anesthesiology, radiology, or pathology 64 percent unweighted response rate in 2006 CHCs are Federally Qualified or look alike CHCs are Federally Qualified or look alike Slide 7 7 NHAMCS Sample Design Multistage probability design Multistage probability design First stage sample of 112 PSUs First stage sample of 112 PSUs Hospitals within PSUs Hospitals within PSUs Clinics within OPDs, Emergency Service Area (ESA) within EDs Clinics within OPDs, Emergency Service Area (ESA) within EDs Patient visits within clinics, ESAs Patient visits within clinics, ESAs 4-week reporting period 4-week reporting period 382 hospitals sampled in 2006; 35,849 ED visits and 35,105 OPD visits 382 hospitals sampled in 2006; 35,849 ED visits and 35,105 OPD visits Slide 8 8 Scope of the NHAMCS Basic unit of sampling is patient visit Basic unit of sampling is patient visit Emergency and outpatient departments of noninstitutional general and short- stay hospitals Emergency and outpatient departments of noninstitutional general and short- stay hospitals Not Federal, military, or Veterans Administration facilities Not Federal, military, or Veterans Administration facilities Located in 50 states and D.C. Located in 50 states and D.C. Slide 9 9 Sample Weight Each NAMCS record contains a single weight, which we call Patient Visit Weight Each NAMCS record contains a single weight, which we call Patient Visit Weight Same is true for OPD records and ED records Same is true for OPD records and ED records This weight is used for both visits and drug/procedure mentions This weight is used for both visits and drug/procedure mentions Slide 10 10 Data Items Patient characteristics Patient characteristics Age, sex, race, ethnicity Visit characteristics Visit characteristics Source of payment, continuity of care, reason for visit, diagnosis, treatment Provider characteristics Provider characteristics Physician specialty, hospital ownership MULTUM drug characteristics added in 2006 MULTUM drug characteristics added in 2006 Slide 11 11 Coding Systems Used Reason for Visit Classification (NCHS) Reason for Visit Classification (NCHS) ICD-9-CM for diagnoses, causes of injury and procedures ICD-9-CM for diagnoses, causes of injury and procedures Drug Classification System-MULTUM Drug Classification System-MULTUM Slide 12 12 File Structure Download data and layout from website Download data and layout from website http://www.cdc.gov/nchs/about/major/ahcd/ahcd1. htm Flat ASCII files for each setting and year: Flat ASCII files for each setting and year: NAMCS: 1973-2006 NHAMCS: 1992-2006 STATA files on Web: STATA files on Web: NAMCS: 2003-2005 NHAMCS: 2003-2005 Slide 13 13 Creating a usable STATA dataset Two options: Two options: 1) 1) Use the self-extracting file in STATA folder to open a complete dataset for the 2003-2005 NAMCS, NHAMCS-ED, & NHAMCS-OPD 2) 2) Use the DO file (*.do) and the dictionary file (*.dct) along with the flat data file (*.exe) to create a dataset 3) StatTransfer Slide 14 14 Organizational structure-NAMCS data Provider provider info practice info geographic info Visit patient & visit info treatment & outcome info medications Medications 1-8 MULTUM Categories Primary reason for Visit Other Reason for Visit Primary diagnosis Other diagnosis Write-in scope procedure 1 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 Slide 15 15 SETS-Statistical Export and Tabulation System Slide 16 16 Hands-on Exercises STATA Users Double-click: My Computer\Local Disk C:\DUC_08 Double-click: My Computer\Local Disk C:\DUC_08 Open STATA Open STATA In the command window type: In the command window type: Set mem 1000m Set matsize 5000 Under the File icon-double- click namcs05.dta Under the File icon-double- click namcs05.dta Under New Do File Editor- double-click: STATA exercises.do Under New Do File Editor- double-click: STATA exercises.do SAS/SUDAAN Users Double-click: My Computer\Local Disk C:\DUC_08 Double-click: Final Exercises Slide 17 17 Visit rate estimates PhycodeSexPatwt (Patwt/Pop)*10 0 Sexwt 14011100(100/800)*10012.5 18201300(300/800)*10037.5 1001150(50/800)*1006.25 5001120(120/800)*10015 71.25 visits per 100 persons Female population=800New variableCalculation* *Note: Rate=est/pop= patwt/pop=1/pop* patwt. Sample size=4 Visits=570 Slide 18 18 RecordProc1Proc2Proc3Proc4Proc5Proc6Proc7Proc8Totproc 1191100000000000000000000000000001 2218221860000000000000000000000002 3549000000000000000000000000000001 4000000000000000000000000000000000 5819200000000000000000000000082002 Note: 0000=No procedure recorded. Calculating Total Number of Write-in Procedures Slide 19 19 Data Considerations Slide 20 20 NAMCS vs. NHAMCS Consider what types of settings are best for a particular analysis Consider what types of settings are best for a particular analysis Persons of color are more likely to visit OPDs and EDs than physician offices Persons in some age groups make disproportionately larger shares of visits to EDs than offices and OPDs Slide 21 21 Procedures Program Categorical Variables Continuous Variables SAS PROC SURVEYFREQ PROC SURVEYMEANS STATA SVY: TAB SVY: MEAN SUDAAN PROC CROSSTAB PROC DESCRIPT Slide 22 22 How Good are the Estimates? Depends In general, OPD estimates tend to be somewhat less reliable than NAMCS and ED. Depends In general, OPD estimates tend to be somewhat less reliable than NAMCS and ED. Since 1999, our Advance Data reports include standard errors in every table so it is easy to compute confidence intervals around the estimates. Since 1999, our Advance Data reports include standard errors in every table so it is easy to compute confidence intervals around the estimates. Slide 23 23 RSE improves incrementally with the number of years combined RSE = SE/x RSE = SE/x RSE for percent of visits by persons less than 21 years of age with diabetes RSE for percent of visits by persons less than 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 (24%) 1998, 1999, & 2000 RSE =.05/.21 =.24 (24%) Slide 24 24 Some User Considerations NAMCS/NHAMCS sample visits, not patients NAMCS/NHAMCS sample visits, not patients No estimates of incidence or prevalence No estimates of incidence or prevalence No state-level estimates No state-level estimates May capture different types of care for solo vs. group practice physicians May capture different types of care for solo vs. group practice physicians Data is only as good as what is documented in the medical record Data is only as good as what is documented in the medical record Slide 25 25 If nothing else, rememberThe Public Use Data File Documentation is YOUR FRIEND! Each booklet includes: Each booklet includes: A description of the survey Record format Marginal data (summaries) Various definitions Reason for Visit classification codes Medication & generic names Therapeutic classes