ImportanceFrailty is associated with adverse outcomes after even minor physiologic stressors. The validated Risk Analysis Index (RAI) quantifies frailty; however, existing methods limit application to in-person interview (clinical RAI) and quality improvement datasets (administrative RAI).ObjectiveTo expand the utility of the RAI utility to available International Classification of Diseases, Tenth Revision, Clinical Modification (ICD-10-CM) administrative data, using the National Inpatient Sample (NIS).Design, Setting, and ParticipantsRAI parameters were systematically adapted to ICD-10-CM codes (RAI-ICD) and were derived (NIS 2019) and validated (NIS 2020). The primary analysis included survey-weighed discharge data among adults undergoing major surgical procedures. Additional external validation occurred by including all operative and nonoperative hospitalizations in the NIS (2020) and in a multihospital health care system (UPMC, 2021-2022). Data analysis was conducted from January to May 2023.ExposuresRAI parameters and in-hospital mortality.Main Outcomes and MeasuresThe association of RAI parameters with in-hospital mortality was calculated and weighted using logistic regression, generating an integerized RAI-ICD score. After initial validation, thresholds defining categories of frailty were selected by a full complement of test statistics. Rates of elective admission, length of stay, hospital charges, and in-hospital mortality were compared across frailty categories. C statistics estimated model discrimination.ResultsRAI-ICD parameters were weighted in the 9 548 206 patients who were hospitalized (mean [SE] age, 55.4 (0.1) years; 3 742 330 male [weighted percentage, 39.2%] and 5 804 431 female [weighted percentage, 60.8%]), modeling in-hospital mortality (2.1%; 95% CI, 2.1%-2.2%) with excellent derivation discrimination (C statistic, 0.810; 95% CI, 0.808-0.813). The 11 RAI-ICD parameters were adapted to 323 ICD-10-CM codes. The operative validation population of 8 113 950 patients (mean [SE] age, 54.4 (0.1) years; 3 148 273 male [weighted percentage, 38.8%] and 4 965 737 female [weighted percentage, 61.2%]; in-hospital mortality, 2.5% [95% CI, 2.4%-2.5%]) mirrored the derivation population. In validation, the weighted and integerized RAI-ICD yielded good to excellent discrimination in the NIS operative sample (C statistic, 0.784; 95% CI, 0.782-0.786), NIS operative and nonoperative sample (C statistic, 0.778; 95% CI, 0.777-0.779), and the UPMC operative and nonoperative sample (C statistic, 0.860; 95% CI, 0.857-0.862). Thresholds defining robust (RAI-ICD <27), normal (RAI-ICD, 27-35), frail (RAI-ICD, 36-45), and very frail (RAI-ICD >45) strata of frailty maximized precision (F1 = 0.33) and sensitivity and specificity (Matthews correlation coefficient = 0.26). Adverse outcomes increased with increasing frailty.Conclusion and RelevanceIn this cohort study of hospitalized adults, the RAI-ICD was rigorously adapted, derived, and validated. These findings suggest that the RAI-ICD can extend the quantification of frailty to inpatient adult ICD-10-CM–coded patient care datasets.