## 2 Materials and Methods
### Measures  
Data were collected at two time points (a) a first-time point before beginning endodonttic therapy while waiting to be attended (baseline measurements); and (b) a second-time point after finalizing the treatment. 1. Baseline measurements 1. Psychological variables: - Pain Anticipation: The question ad hoc: 'How you feel the pain will be during treatment?' was used to evaluate pain anticipation. This item presented a 10-point Likert-type response scale, ranging from '0 = no pain' to '10 = maximum pain'. - Dental anxiety: The Modified Dental Anxiety Scale (MDAS) in its Spanish validation was used [21]. It is a short and commonly used tool. The MDAS was developed to improve the psychometric characteristics of the previous Dental Anxiety Scale (DAS) [22, 23]. It contains 5 items related to dental experiences, with a 5-point Likert (from \"not anxious\" to \"extremely anxious\") scale, obtaining a total score range from 5 to 25. A person is classified as'very dentally anxious' with a score of 19 or higher. In previous studies, [PERSON]'s alpha was 0.88 [24]. In our sample, a [PERSON]'s alpha of 0.86 was found. Positive Affect: The Positive and Negative Affect Scale (PANAS) in its Spanish version was used [25]. Specifically, the positive affect subscale was used to measure positive affect. The PANAS was developed by [PERSON] et al. [26] and was adapted and validated in Spanish by [PERSON] et al. [27]. It is made up of two independent scales that allow the measurement of positive affect and negative affect. Each of the scales consists of 10 items with a Likert-type response format of 5 points, ranging from '1 = not at all' to '5 = extremely'. Specifically, a positive affect is defined as the degree to which people have a tendency to experience positive emotions and engage in a pleasurable way with their environment. Previous research has revealed an exceptional internal consistency (0.90) [28]. [PERSON]'s alpha value was 0.85 in our sample. ii Clinical variables: - American Society of Anaesthesiologist's Physical Status Classification System (ASA-PS) [29]: The ASA-PS was used to categorize the physical health of patients. This classification is a widely graded system used in healthcare-related environments. The rating is composed of six types (I to VI). In this research, only class I (healthy patients), class II (mild systemic disease patients), and class III (severe systemic disease patients) were used. The ASA-PS has been widely used in healthcare fields; however, it should be noted that it has a low inter-rater reliability with a profound dependency on the clinician's experience [30]. - Medication: This variable included whether the patients had taken medication (or not) for their current dental trouble before starting endodontic treatment. Previous medication became dichotomous variable scores were either 0 (patient hadn't been taking medication) or 1 (patient had been taking medication). In addition, among the patients who had been taking medication, we registered the type of medication with an item on a response scale '1 = anti-inflammatory drugs', '2 = antibiotics', and '3 = antibiotics and anti-inflammatory drugs'. - The Endodontic Case Difficulty Assessment Form was developed by The American Association of Endodontics (AAE) [31]. The endodontist had to complete this form to identify three influential issues in the treatment: the patient's considerations, diagnosis and treatment considerations, and additional considerations. For each of these categories, degrees of difficulty of treatment (minimal, moderate, and high) were distributed based on risk factors. The sample was distributed as '1 (minimal difficulty) = a case with any complicating factor', '2 (moderate difficulty) = a case with one or more complicating factors', '3 (high difficulty) = exhibiting multiple factors in the \"moderate difficulty\" category'. - Pulpal status: Palpation tests, percussion tests, and thermal sensibility tests were used to diagnose pulpal status.