INTRODUCTION: The National Hospital Discharge Survey is a primary data source for epidemiology research in the United States. To ensure that estimates are reliable, confidence intervals need to be calculated. The original survey data source is not available to the public, and the usual statistical methods are unsuitable for calculating confidence intervals. Instead, calculating confidence intervals requires using the statistical methods and relative standard errors that the U.S. National Center for Health Statistics has provided. However, the relative standard error parameters differ by hospital, patient category, and group. They also change yearly with sampling and are expressed differently before and during or after 1988. Consequently, manual computations of confidence intervals with multiple groups, diseases, and years are inefficient and prone to error. We developed a SAS program to compute confidence intervals for National Hospital Discharge Survey data from 1979 through 2000, newborns excluded. METHODS: We transposed 22 tables of relative standard error parameters (one for each year) into two new parameter tables that maintain the sampling designs before 1988 and during and after 1988 but are similar in overall structure. We unified all values to make each set of relative standard error parameters unique. We developed a program, COMPURSE, to search for relative standard error parameters for inputted estimates and to calculate confidence intervals. We set up an interface program for users to enter data, time period, confidence interval level, and output location; to read the relative standard error parameter tables; and to run the COMPURSE program. RESULTS: For different sets of National Hospital Discharge Survey data, COMPURSE efficiently and correctly retrieved relevant relative standard error parameters for estimates and accurately calculated relative standard errors, standard errors, and confidence intervals for annual estimates, multiple-year summaries, and average annual estimates. CONCLUSION: The program COMPURSE helps users analyze National Hospital Discharge Survey data efficiently