Medical diagnosis is a categorization task that allows physicians to make predictions about features of clinical situations and to determine appropriate course of action. The script concept, which first arose in cognitive psychology, provides a theoretical framework to explain how medical diagnostic knowledge can be structured for diagnostic problem solving. The main characteristics of the script concept are pre-stored knowledge, values acceptable or not acceptable for each illness attribute, and default values. Scripts are networks of knowledge adapted to goals of clinical tasks. The authors describe how scripts are used in diagnostic tasks, how the script concept fits within the clinical reasoning literature, how it contrasts with competing theories of clinical reasoning, how educators can help students build and refine scripts, and how scripts can be used to assess clinical competence.