Accepted for/Published in: JMIR Medical Informatics
Date Submitted: Apr 23, 2026
Date Accepted: Oct 2, 2026
Development of Large Language Models to Define Social Determinants of Health from Patient-Reported and Clinician-Documented Measures: Method/Study Design
ABSTRACT
Background:
Social determinants of health (SDOH) profoundly influence cancer and cardiovascular disease (CVD) risk, yet systematic extraction of SDOH from unstructured electronic health records (EHR) remains challenging. Traditional natural language processing (NLP) approaches require extensive manual annotation and institution-specific training data, while active SDOH screening imposes burden on patients and clinicians and is prone to missingness. Large language models (LLM) offer a promising alternative, but existing LLM-based SDOH extraction studies lack patient-level validation, are limited to constrained note types, and have not been validated against patient-reported outcomes.
Objective:
To develop and validate an LLM-based NLP framework for extracting SDOH from EHR at both the individual note and patient level, with comprehensive error analysis and comparison across both clinician-documented and patient-reported measures.
Methods:
From three independent cohorts, 100 patients were sampled and categorized into five distinct batches, and 97 patients yielded meaningful notes to construct the final dataset. Batch one was used for prompt development to evaluate five LLMs, with the best model then validated on the remaining four batches. Five SDOH domains were extracted: employment, financial toxicity, distress, food insecurity, and physical activity. Validation errors were categorized by a trained clinician at both the note-level (n=284) and patient-level (n=56). Agreement between clinician-documented and patient-reported SDOH measures was also assessed.
Results:
GPT-4.1 achieved 0.94 accuracy in the development batch. Across validation batches 2–5, GPT-4.1 achieved a note-level accuracy of 0.94 (SD 0.01; mean across batches) across the five SDOH domains, with an overall κ=0.72. Mean patient-level accuracy across validation batches was 0.88 (SD 0.04) for the five domains. Clinician-validated error analysis at both the note and patient level identified incorrect inferences as the predominant error type (note level, 57.7%; patient level, 44.6%). Clinician-documented and patient-reported SDOH showed moderate agreement (κ=0.17–0.52), with under-documentation of financial toxicity (58.8% agreement) and food insecurity (78.4%), and over-documentation of distress (69.1%).
Conclusions:
GPT-4.1 provides validated SDOH extraction at both the note and patient level. Most errors stemmed from model interpretation rather than the model’s inability to find relevant information. Moderate agreement between documentation sources (patient-reported vs. clinician-documented) highlights their complementary value and the need to improve clinician documentation of SDOH domains. Clinical Trial: Trial Registration: NCT01173341, NCT05078190, NCT05096338
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.