Design
A three-year, observational, prospective, cohort study, carried out from January 1st 2011 to 31th December 2013.
Setting
The study will be carried out in 75 Primary Health Care Centers (PHCC) in the region of Madrid, Spain.
Subjects of the study
Subjects with diagnosis of T2DM in their computerized clinical records (CCR) and are usually monitored by their process in PHCC.
All PHCC in Madrid have CCR available since 2003 and the diagnoses of diabetes recorded in these have been validated [
34].
Inclusion criteria
18

years of age or older at the date of January 1
st 2011.
Patients who had visited their PHCC at least twice in the last year.
Agree to participate in the study and written informed consent.
Exclusion criteria
Diagnosis of gestational diabetes mellitus.
Institutionalized patients.
Subjects who cannot understand Spanish.
Patients with severe chronic diseases or significant physical or psychic disabilities that might invalidate informed consent or interview (according to clinical judgment).
Legal incompetence or legal guardianship.
Participation in clinical trials.
Sample size
Method of calculation
For the first main objective, for an alpha of 0.05, a power of 80%, a prevalence of depression of 17.6% [
13] and in order to detect an increase of 25% [
25] in the mortality of depressed patients, the overall sample size required 2959 patients. Given these assumptions, and expecting a 10% loss rate, the final sample size required was 3255 patients.
The sample size considerations regarding mortality are based on the results of Schramm in a 5-year follow-up study [
35], corrected for a 3-year period.
The sample size required to perform the other objectives of the study is lower, so the sample size estimated enables to address all the above objectives.
Randomization
Patients with T2DM will be selected by simple random way from the patients with T2DM of each participating general practitioner.
During consultations, patients will be informed about the study and asked whether they would like to take part in it. Those who accept will be asked to complete a signed consent form. Checks will be made to ensure they met all inclusion criteria, but no exclusion criterion.
Variables
The main outcome measures are all-cause and cardiovascular-specific mortality and cardiovascular morbidity (acute myocardial infarction, and stroke).
The exposure variable is the major depressive disorder.
Sociodemographic variables: age (date of birth), gender, nationality, time of residence in Spain, marital status (single, unmarried partners, married, divorced, widowed), educational level (no studies, primary, high school, university), employment status (working, working with a low of three months or more, unemployed, retired/pensioner, student, housework and other situation), employment (manager with over 10 employees, managers with fewer than 10 employees, administrative, self-employed workers and supervisors, skilled manual, semiskilled manual and unskilled manual) and social class (I-V) [
36].
Comorbidity variables: hypertension, heart failure, retinopathynephropathy, neuropathy, amputations, erectile dysfunction, and renal failure.
Other clinical variables: family history (in the first-degree relatives) of diabetes, diabetes duration, and sleeps quantity and quality.
Anthropometric variables: height, weight, hip circumference, waist circumference, systolic blood pressure, and diastolic blood pressure.
Laboratory results: albuminuria, creatinine, lipid profile, A1C and glucose.
Personal health habits: smoking (never, former or current smoker), physical activity level (sedentary, moderate-intensity, vigorous-intensity, competition-level), and drinking (0.1 through 4.9, or 5.0 or more g/d of alcohol).
Treatment: statins, β-blockers, angiotensin-converting enzyme inhibitors, angiotensin receptor blockers, calcium channel blockers, diuretics, antiplatelets, antidiabetics, antidepressant drugs and anxiolytics which were prescribed.
Psychosocial variables: family history (in the first-degree relatives) of psychiatric disorder, personal history of psychiatric disorder, previous and current therapeutic plan, current generalized anxiety disorder, social support, and HRQoL.
The variables and their instrument of measurement are summarized in Table

.
| Table 1Variables and measurement instruments |
Data collection method
The Figure

shows the flowchart of the study.
General practitioners
Medical evaluation will be performed under normal clinical practice conditions, and clinical variables, anthropometric measures, treatments and laboratory results will be collected by general practitioners at baseline and annually during follow-up. These data will be recorded in an electronic Case Report Forms (eCRF) hosted in the website
http://www.madiabetes.com.
Clinical psychologist interview
Different questionnaires and a psychological evaluation will be conducted by clinical psychologists at baseline and annually during follow-up through a telephone interview. The following variables will be collected by this way: current major depressive disorder, generalized anxiety disorder, personal and family history of psychiatric disorder, sociodemographic variables, social support, HRQoL, sleep quantity and quality.
The conversation protocol will be designed in advance and the interviewers will receive homogeneous training in the evaluation procedure of the study in order to minimize the variability in the data collection.
The diagnosis of a current major depressive disorder will be conducted through a semi-structured interview to detect those who meet the Diagnostic and Statistical Manual of Mental Disorders-Fourth Edition (DSM-IV) criteria (codes: 296.26-299.20) [
37]. To meet criteria for depression patients it is required to have at least 5 symptoms, including at least one of the cardinal symptoms: depressed mood or anhedonia, during two-week period. The interview will be based on the module of major depressive disorder of the Mini-International Neuropsychiatric Interview (MINI) [
38], and according to clinical judgment. The use of antidepressant medication in previous three months will also be used as a measure of depression.
The diagnosis of current generalized anxiety disorder will be performed by a semi-structured interview to detect those who meet the DSM-IV criteria (code 300.02). To meet criteria for this disorder, patients required to have at least 3 of the central symptoms of anxiety (feeling wound-up, tense, or restless easily becoming fatigued or worn-out, concentration problems, irritability, significant tension in muscles or difficulty with sleep), at least 6

months. The interview will be based on the module of generalized anxiety disorder of the M.I.N.I. [
38] and according to clinical judgment.
The MINI is a short and efficient diagnostic interview to diagnose mental disorders, compatible with International diagnostic criteria, including the International Classification of Diseases (ICD-10) and the DSM-IV. It has been validated in Spain [
39], and previously has been used in T2DM patients [
40], and by telephone [
41-
43].
Personal history of psychiatric disorder will be registered if patient reports a positive response to the question: “A clinician has ever diagnosed you as having any psychiatric disorder? or there is a diagnosis prior to baseline in the in CCR.
The diagnosis of family history of psychiatric disorder will be registered if the patient reports a positive response to the question: “Has any family member (in first-degree relatives) ever been diagnosed of psychiatric disorder?”
Social support will be measured by the question: “About how many close friends and close relatives do you have (people you feel at ease with and can talk to about what is on your mind)?”, which corresponds to the first item of the Medical Outcomes Study-Social Support Survey (MOS-SSS) [
44].
To assess the HRQoL, the Medical Outcomes Study 12-Item Short-Form Health Survey (SF-12) [
45] will be used. SF-12 is used as a generic measurement of global functioning and HRQoL, is non-disease specific and comprises 12 questions about the physical health component (physical functioning and role limitations due to physical health) and the mental health component (bodily pain, vitality, social functioning, role limitations due to emotional problems, and mental health).
The self-reported of sleep quantity will be measured by the question: “What was the average amount of sleep per night (in hours) and per day (in hours), during the previous month?”. Sleep quality will be measured by the Athens Insomnia Scale (AIS) [
46]. The AIS is a self-assessment psychometric instrument designed for quantifying sleep difficulty, and its consistency, reliability, and validity has been ascertained as a screening or diagnosis tool for insomnia.
Assessment of vital status and death cause
Vital status and death cause will be obtained using data collected by general practitioners, by the telephone interview and it will be ascertained using confidential record linkage with the Spanish National Death Index.
Loss to follow-Up
A low “lost to follow-up rate” will be essential for the validity of the study. The total loss to follow-up at the end of the study should be kept at less than 10% of the recruited population.
In order to minimize the losses to follow-up attributable to general practitioners whom do not continue in the study clinical data will be provided from CCR of patients.
If any patient changes of domicile, an official address search via the local health administration will be conducted.
In order to minimize losses attributable to a fail in locate the patient, up to six telephone calls will be made at different times and on different days; after six failed calls, will try to contact the patient by the general practitioners.
Statistical analysis
The following analyses will be undertaken:
Descriptive analysis of each variable. Description of the profile of patients who abandon the study plus their reason for withdrawal.
Comparison between depressed and not depressed patients with regards to response variables, and prediction factors. Bivariate statistical tests will be used suitable to the type of variable (qualitative or quantitative).
Analysis of primary outcome. There will be a comparison between depressed and not depressed patients in all-cause and cardiovascular mortality, acute myocardial infarction and stroke using the Chi-squared test.
Logistic regression with random effects will be used to adjust for prognostic factors. Confounding factors that might alter the effect recorded will be taken into account in this analysis.
To assess the effect of depression on the mortality, a survival analysis will be used comparing the two groups using the log-rank test. The control of potential confounding variables will be performed by the construction of a Cox regression model.
All analyses will be calculated with their 95% confidence interval; statistical significance will be set at p<0.05. Statistical processing of the data will be performed with SPSS1 v.18 software.
Ethical considerations
The study protocol was approved by the Research Ethics Committee of the Carlos III Hospital in Madrid and met all good clinical practice demands rights.