Queries of electronic health record (EHR) data repositories allow for automated data collection. These techniques have not been used in hepatology due to the inability to capture hepatic encephalopathy (HE) grades, which are inputs for acute-on-chronic liver failure (ACLF) models. Here, we describe a methodology to use EHR data to calculate rolling ACLF scores. We examined 239 patient admissions with end-stage liver disease from July 2014 to June 2019. We mapped EHR flowsheet data to determine HE grades and calculated two longitudinally updated ACLF scores. We validated HE grades and ACLF diagnoses by chart review and calculated sensitivity, specificity, and Cohen's kappa. Of 239 patient admissions analyzed, 37% were women, 46% were non-Hispanic white, median age was 60 years, and the median Model for End-Stage Liver Disease-Na score at admission was 25. Of the 239, 7% were diagnosed with ACLF as defined by the North American Consortium for the Study of End-Stage Liver Disease (NACSELD) diagnostic criteria at admission, 27% during the hospitalization, and 9% at discharge. Forty percent were diagnosed with ACLF by the European Association for the Study of the Liver- Chronic Liver Failure Consortium (CLIF-C) diagnostic criteria at admission, 51% during the hospitalization, and 34% at discharge. From the chart review of 51 admissions, we found sensitivities and specificities for any HE (grades 1-4) were 92%-97% and 76%-95%, respectively; for severe HE (grades 3-4), sensitivities and specificities were 100% and 78%-98%, respectively. Cohen's kappa between flowsheet and chart review of HE grades ranged from 0.55 to 0.72. Sensitivities and specificities for NACSELD-ACLF diagnoses were 75%-100% and 96%-100%, respectively; for CLIF-C-ACLF diagnoses, these were 91%-100% and 96-100%, respectively. We generated approximately 28 unique ACLF scores per patient per admission day. Conclusion: We developed an informatics-based methodology to calculate longitudinally updated ACLF scores. This opens new analytic potentials, such as big data methods, to develop electronic phenotypes for patients with ACLF.