Real-world evidence derived from electronic health records (EHRs) is increasingly recognized as a valuable resource for evaluating treatment effectiveness outside randomized clinical trials. However, diseases characterized by complex activity measures, such as inflammatory bowel disease (IBD), present significant challenges because relevant clinical variables are frequently documented in narrative clinical notes rather than structured fields. In this study, we develop an artificial intelligence-based natural language processing (NLP) framework designed to extract disease activity indicators from EHR narratives in patients treated with tofacitinib. The system identifies clinical symptoms, laboratory findings, and physician assessments necessary for calculating standardized disease activity scores such as the Mayo score and Crohn’s Disease Activity Index (CDAI). Using annotated clinical data, we trained transformer-based models to extract disease indicators with high precision and recall. The extracted data were used to reconstruct disease activity scores and evaluate treatment outcomes in real-world clinical settings. Our findings demonstrate that automated information extraction can significantly enhance the utility of EHR data for observational research and real-world evidence generation in complex chronic diseases.