OBJECTIVES: Develop and estimate the RxRisk model, a risk assessment instrument that uses automated ambulatory pharmacy data to identify chronic conditions and predict future health care cost. The RxRisk model's performance in predicting cost is compared with a demographic-only model, the Ambulatory Clinical Groups (ACG), and Hierarchical Coexisting Conditions (HCC) ICD-9-CM diagnosis-based risk assessment instruments. Each model's power to forecast health care resource use is assessed. DATA SOURCES: Health services utilization and cost data for approximately 1.5 million individuals enrolled in five mixed-model Health Maintenance Organizations (HMOs) from different regions in the United States. STUDY DESIGN: Retrospective cohort study using automated managed care data. SUBJECTS All persons enrolled during 1995 and 1996 in Group Health Cooperative of Puget Sound, HealthPartners of Minnesota and the Colorado, Ohio and Northeast Regions of Kaiser-Permanente. MEASURES RxRisk, an algorithm that classifies prescription drug fills into chronic disease classes for adults and children. RESULTS: HCCs produce the most accurate forecasts of total costs than either RxRisk or ACGs but RxRisk performs similarly to ACGs. Using the R(2) criteria HCCs explain 15.4% of the prospective variance in cost, whereas RxRisk explains 8.7% and ACGs explain 10.2%. However, for key segments of the cost distribution the differences in forecasting power among HCCs, RxRisk, and ACGs are less obvious, with all three models generating similar predictions for the middle 60% of the cost distribution. CONCLUSIONS: HCCs produce more accurate forecasts of total cost, but the pharmacy-based RxRisk is an alternative risk assessment instrument to several diagnostic based models and depending on the nature of the application may be a more appropriate option for medical risk analysis.