OBJECTIVE: Using a comprehensive inpatient electronic medical record, we sought to develop a risk-adjustment methodology applicable to all hospitalized patients. Further, we assessed the impact of specific data elements on model discrimination, explanatory power, calibration, integrated discrimination improvement, net reclassification improvement, performance across different hospital units, and hospital rankings. DESIGN: Retrospective cohort study using logistic regression with split validation. PARTICIPANTS: A total of 248,383 patients who experienced 391,584 hospitalizations between January 1, 2008 and August 31, 2011. SETTING: Twenty-one hospitals in an integrated health care delivery system in Northern California. RESULTS: Inpatient and 30-day mortality rates were 3.02% and 5.09%, respectively. In the validation dataset, the greatest improvement in discrimination (increase in c statistic) occurred with the introduction of laboratory data; however, subsequent addition of vital signs and end-of-life care directive data had significant effects on integrated discrimination improvement, net reclassification improvement, and hospital rankings. Use of longitudinally captured comorbidities did not improve model performance when compared with present-on-admission coding. Our final model for inpatient mortality, which included laboratory test results, vital signs, and care directives, had a c statistic of 0.883 and a pseudo-R of 0.295. Results for inpatient and 30-day mortality were virtually identical. CONCLUSIONS: Risk-adjustment of hospital mortality using comprehensive electronic medical records is feasible and permits one to develop statistical models that better reflect actual clinician experience. In addition, such models can be used to assess hospital performance across specific subpopulations, including patients admitted to intensive care.