The goal of this study was to develop an algorithm for detecting epilepsy cases in managed care organizations (MCOs). A data set of potential epilepsy cases was constructed from an MCO's administrative data system for all health plan members continuously enrolled in the MCO for at least 1 year within the study period of July 1, 1996 through June 30, 1998. Epilepsy status was determined using medical record review for a sample of 617 cases. The best algorithm for detecting epilepsy cases was developed by examining combinations of diagnosis, diagnostic procedures, and medication use. The best algorithm derived in the exploratory phase was then applied to a new set of data from the same MCO covering the period of July 1, 1998 through June 30, 2000. A stratified sample based on ethnicity and age was drawn from the preliminary algorithm-identified epilepsy cases and non-cases. Medical record review was completed for 644 cases to determine the accuracy of the algorithm. Data from both phases were combined to permit refinement of logistic regression models and to provide more stable estimates of the parameters. The best model used diagnoses and antiepileptic drugs as predictors and had a positive predictive value of 84% (sensitivity 82%, specificity 94%). The best model correctly classified 90% of the cases. A stable algorithm that can be used to identify epilepsy patients within MCOs was developed. Implications for use of the algorithm in other health care settings are discussed.