Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Real world evidence of calcifediol or vitamin D prescription and mortality rate of COVID-19 in a retrospective cohort of hospitalized Andalusian patients


COVID-19 is a major worldwide health problem because of acute respiratory distress syndrome, and mortality. Several lines of evidence have suggested a relationship between the vitamin D endocrine system and severity of COVID-19. We present a survival study on a retrospective cohort of 15,968 patients, comprising all COVID-19 patients hospitalized in Andalusia between January and November 2020. Based on a central registry of electronic health records (the Andalusian Population Health Database, BPS), prescription of vitamin D or its metabolites within 15–30 days before hospitalization were recorded. The effect of prescription of vitamin D (metabolites) for other indication previous to the hospitalization was studied with respect to patient survival. Kaplan–Meier survival curves and hazard ratios support an association between prescription of these metabolites and patient survival. Such association was stronger for calcifediol (Hazard Ratio, HR = 0.67, with 95% confidence interval, CI, of [0.50–0.91]) than for cholecalciferol (HR = 0.75, with 95% CI of [0.61–0.91]), when prescribed 15 days prior hospitalization. Although the relation is maintained, there is a general decrease of this effect when a longer period of 30 days prior hospitalization is considered (calcifediol HR = 0.73, with 95% CI [0.57–0.95] and cholecalciferol HR = 0.88, with 95% CI [0.75, 1.03]), suggesting that association was stronger when the prescription was closer to the hospitalization.


Vitamin D deficiency has been associated with a large number of diseases including immune disorders and infections. The causal role of vitamin D for rickets and osteomalacia is well demonstrated and its role in aggravating osteoporosis is well accepted1. Vitamin D3 (cholecalciferol), the threshold nutrient of the vitamin D endocrine system (VDES), is acquired by cutaneous synthesis under the influence of UV-B light and in minimal amounts from the diet. It is transported, like other VDES metabolites, by vitamin D-binding protein (DBP). Vitamin D is converted to 25-hydroxyvitamin D (25OHD) in the liver, through the action of 25 hydroxylase (mainly CYP2R1 and some other P450 enzymes). 25OHD or calcifediol is the best biomarker of nutritional status. It is also is substrate for the synthesis of 1,25(OH)2D or calcitriol through the action of 1α hydroxylase (CYP27B) in the kidney for its endocrine actions, and in multiple cells of the body for its auto/paracrine action. The systemic hormone calcitriol binds with high affinity to its nuclear receptor, the vitamin D receptor (VDR), regulating transcription of a large number (~ 3%) of genes, with a broad spectrum of functional activities1. However, its extra-skeletal effects are more disputed. Several Mendelian Randomization studies demonstrated that genetically low serum 25OHD concentrations increase the risk of multiple sclerosis2 and a meta-analysis found a reduced incidence of upper respiratory infections when supplements of vitamin D are given to relatively vitamin D deficient subjects3. There are now multiple association studies4,5,6,7,8,9,10 and meta-analyses11,12,13 linking a poor vitamin D status with increased risk4,8,9,10 or severity of COVID-19 infections4,5,6,7.

A recent UK study by NICE, however, concluded that there is insufficient evidence to recommend vitamin D supplementation solely for the purpose of prevention of COVID-19 (complications) but recommends the UK guidelines to prevent vitamin D deficiency in general. The NICE experts agreed that a poor vitamin D status was associated with more severe outcomes from COVID-19 but without proof of causality, especially because the risk factors for severe COVID-19 outcomes are also risk factors for low vitamin D status14. This is also the conclusion from a recent Cochrane analysis15. Moreover, a recent study on systematic drug repurposing for COVID-19 based on machine learning has found that, among others, the VDR protein could have a protector effect over pathways affected by the SARS-CoV-2 infection16, suggesting a potential protecting role for VDES metabolites such as cholecalciferol, calcifediol or calcitriol. This drug repurposing study used mechanistic models17 of the COVID-19 disease map18 to find relevant interactions between proteins (already targets of drugs with other indications) and the pathways affected by COVID-19 disease infection either directly or downstream, collectively known as the COVID-19 disease map18, thus providing mechanistic evidences of the protective effect of VDES metabolites in COVID-19.

Although randomized clinical trials remain the gold standard to prove efficacy and safety of whatever interventions19, other types of studies may be faster and more efficient to provide clinical guidelines, especially when lifesaving procedures are needed in an emergency situation such as the present COVID-19 pandemic. Thus, the increasing availability of digital health data, together with the raising costs and known limitations of traditional trials, has fostered the interest in the use of real-world data (RWD)20, defined as patient’s data on their health status and on health care received, collected from their electronic health records (EHR)20,21. RWD can be analyzed to generate real word evidence (RWE)22. Actually, RWE provide a better image of the actual clinical environments in which medical interventions are carried out when compared to conventional randomized clinical trials, given that RWD includes detailed data on patient demographics, comorbidities, adherence, and simultaneous prescriptions23,24.

Since 2001, the Andalusian Public Health System has been thoroughly storing all the EHRs data of Andalusian patients in the Population Health Base (BPS)25. This makes of BPS one of the largest repositories of highly detailed clinical data in the world (with over 13 million of comprehensive registries)25. BPS constitutes a unique and privileged environment to carry out large-scale RWE studies.

Here we used RWD from BPS to obtain RWE of the effectiveness of the prior prescription of cholecalciferol, calcifediol or calcitriol VDES metabolites with nutrient, pre-hormone or hormone activity respectively, on mortality rate among patients hospitalized for COVID-19.


Data processing

A retrospective cohort of 15,968 patients, which include all Andalusian patients with COVID-19 diagnosis that were hospitalized between January and November 2020, was found in BPS and collected. Figure S1 depicts the frequency of hospital admission of patients with COVID-19 diagnosis along this period. Patient data on medication and other relevant covariates (see Table 1) was downloaded from the BPS.

Table 1 Data imported from BPS for each patient: code and definition of the variable.

Vitamin D endocrine system metabolites and survival

The effect of cholecalciferol, calcifediol or calcitriol prescription, both aggregated (ADM) and independently, 15 and 30 days prior hospitalization, was studied with respect to the outcome of death at 30 days. As described in “Methods”, PSM was applied to the treated and untreated patients. This rendered a satisfactory covariate balance and no significant correlations between the covariates was observed in the samples paired by the PSM model (Table 2). Kaplan–Meier curves shows the survival of patients who received a prescription for ADM 15 days (Fig. 1A) and 30 days (Fig. 1B) prior hospitalization, suggesting a significant association between ADM prescription and patient survival. Kaplan–Meier curves for specific cholecalciferol, calcifediol or calcitriol prescriptions (Fig. S2) supporting the same significant association between any of the individual prescriptions and patient survival, except for calcitriol with an erratic (non-significant) behavior due the already mentioned small sample size. The comparison of specific prescriptions supports a significantly increased survival of patients who received a prescription for calcifediol than those who received a prescription for cholecalciferol (see Table 3), pointing to a stronger association of calcifediol with patient survival.

Table 2 Matched covariates across treated and untreated patients. ADM columns contain the absolute number of treated and untreated and the percentage between parentheses. The column p-value corresponds to a χ2 test that systematically demonstrates that the values are equilibrated between both groups (no significant differences between ADM treated and untreated).
Figure 1
figure 1

Kaplan–Meier curves of patients who received a prescription for ADM (A) 15 days and (B) 30 days before hospitalization for death outcome.

Table 3 Comparison between the survival curves by the Log Rank test with the corresponding p-values both unadjusted and FDR-adjusted.

To study in more detail the protective effect of VDES prescription a Cox regression was used to estimate the degree of association between the prescriptions and death risk by means of the hazard ratios. Figure 2 summarizes the hazard ratios with respect to the outcome death for the calcifediol and cholecalciferol prescriptions as well as the ADM prescription aggregated, in the two periods of administration considered (15 and 30 days prior hospitalization). Except for the case of cholecalciferol at 30 days, the prescriptions demonstrated a significant association with increased patient survival. From Fig. 2 it becomes apparent that calcifediol (HR = 0.67, CI [0.50–0.91]) shows a clearly higher association with patient survival than cholecalciferol (HR = 0.75, CI [0.61–0.91), when prescribed 15 days prior to hospitalization. However, if a larger period of 30 days is considered this effect decreases (calcifediol HR = 0.73, CI [0.57–0.95] and cholecalciferol HR = 0.88, CI [0.75, 1,03]). Calcitriol was not included, given the small sample size (< 30 patients). Additional analysis with different assumptions and different methodologies, such as bootstrap) support the results obtained (Fig. S3). Additionally, a more sophisticated analysis has been carried out to determine in detail the effect of each prescription along time (RMSTs). The RMST curve represents the expected survival days (on average) that subjects from the prescription group have with respect to untreated patients during the hospitalization time considered. Figure S4 shows that calcifediol prescription shows a significantly better survival than untreated for most of the 30 days interval studied. Cholecalciferol prescription shows better survival than untreated patients as well, although it is only statistically significant for a short period, and is always below calcifediol.

Figure 2
figure 2

Hazard ratios with respect to the outcome death under ATT assumption for the cholecalciferol, calcifediol and ADM prescription in the two periods considered (15 and 30 days before hospitalization). In all the cases (except for cholecalciferol at 30 days) a significant association between prescription of these metabolites and patient survival is observed: confidence intervals do not cross the 1 line (α = 0.05).


Andalusia, with 8.5 million inhabitants is the third largest region in Europe, having a population similar to Austria and being bigger than half of the countries of the European Union. Moreover, it has the largest population under a universal EHR. All data recorded by the Andalusian Public Health System is stored in the BPS. This allowed an unprecedented region-wise cohort study of 15,968 patients, which corresponds to all the COVID-19 patients that were hospitalized between January and November 2020.

This large-scale RWE study clearly shows that prescription for whatever indication with VDES metabolites significantly reduces the risk of death in patients hospitalized for COVD-19, This effect is stronger in patients who received a prescription for calcifediol, but also occurs in patients who received a prescription for cholecalciferol and inconclusive in the case of calcitriol (due to the small sample size its effect was not statistically significant). To our knowledge, this is the first study to investigate the effect of prior prescription of VDES metabolites (cholecalciferol, calcifediol or calcitriol) on death in patients hospitalized for COVID. Moreover, due to the country-size scale of this observational study it is easy to mimic the randomization element of a randomized clinical trial (RCT) and properly compare treatment groups, given the number of individuals available to properly adjust for all baseline cofounders26. Actually, the use of propensity scores provides additional adjustment to control for confounding variables27. Here, as shown in Table 2, confounding effects between the compared groups due to the known variables associated to the outcomes considered can be ruled out. The Health record system can only identify subjects receiving a prescription but cannot verify the actual intake of the prescribed drugs. Compliance is usually highest shortly after the prescription and declines afterwards. Therefore, due to the short time between the prescription and start of the COVID-19 infection it is highly likely that most subjects have taken their vitamin D (metabolites). A lower compliance may even imply a relative higher efficacy as the number of prescriptions and number of COVID-19 hospitalizations are well documented.

The consistency of the results presented here strongly suggests that patients who have been prescribed treatment preferentially with calcifediol (and less intensively with cholecalciferol) for other health objectives (usually for the prevention or treatment of primary or secondary osteoporosis or population at risk of vitamin D deficiency) presented a better response to COVID-19. In Andalusia, 25OHD deficiency (≤ 20 ng/ml) is usually very prevalent in spring and winter (34.5 and 37.2%), which is maintained even in summer (26.9%), but was probably higher during the lockdown in the period covered by the present study. 25OHD due to its half-life of two to three weeks is used as a nutritional marker of endocrine system levels of vitamin D and is a substrate for the synthesis of 1,25(OH)2D in multiple organs and systems28. However, the data used in this study did not contain information on the real doses of vitamin D or calcifediol taken prior the hospitalization. Therefore, it is unclear whether the better protection by calcifediol prescription compared to vitamin D itself is due to their intrinsic differences or was caused by different dosing.

Recently, numerous epidemiological and association studies have been published investigating the links between circulating levels of 25OHD, and the incidence and severity of COVID-19 infections9,10,11,12,29. Initially, these were observational ecologic studies that described a higher incidence of COVID-19 infection and death in countries where vitamin D deficiency (or low sun exposure) was common12,30,31,32. Thereafter, several studies evaluated the association between vitamin D status and risk or severity of SARS-CoV-2 infection4,5,6,7,8,9. Two recent meta-analyses have looked at published data linking vitamin D status with the risk or severity (ICU admission and mortality) of COVID-19 infections12,13. Probably related to the selection of studies they came to different conclusions, as one meta-analysis12 found an uncertain trend and the other13 a significantly increased risk of infection in subjects with the poorest vitamin D status. More relevant to the present study, one meta-analysis concluded that there was a non-significant trend between low 25OHD levels (below 20 ng/ml) and need for ICU admission, length of hospital stay or mortality12. The other meta-analysis with a greater restriction of high-quality studies, which included 2,756 patients, found a significantly higher mortality (OR: 2.47, 95% CI: 1.50 to 4.05), higher rates of hospital admissions (OR: 2.18, IC del 95%: 1.48–3.21 and longer hospital stay in subjects with the poorest vitamin D status13.

These results suggest that improving serum 25OHD concentration may improve the prognosis of COVID-1911,12,29. In a recent RCT, patients with baseline serum 25OHD levels < 20 ng/ml were compared with two standard treatment regimens in Spain (calcifediol 266 μg/month and cholecalciferol 25,000 IU (625 µg/month).—At first month, 13.5% (95% CI 9.1–19.0%) of patients in the calcifediol group and none of those receiving cholecalciferol (95% CI 0.0–3.7%) reached serum levels of 30 ng/ml. At month 4, 35. 0% of postmenopausal women treated with calcifediol and 8.2% of those treated with cholecalciferol reached serum 25(OH)D levels above 30 ng/ml (p < 0.0001). Few studies have compared the efficacy of calcifediol and cholecalciferol in increasing serum 25(OH)D levels and have reported similar findings. However, none of them compared monthly doses of both metabolites33.

A pilot controlled trial reported that administration of calcifediol versus no calcifediol reduced the need for ICU treatment in 76 hospitalized participants with COVID-19 who also received best available therapy34, as demonstrated initially by a pilot controlled trial in 76 hospitalized participants with COVID-19 who also received best available therapy which reported that administration of calcifediol 0.532 mg on entry and then 0.266 mg on day 3, 7, 14, 21, and 28) versus no calcifediol showed a dramatic decrease in the need for ICU admission in the treatment group (1 out of 50, 2%) as compared to the control group (13 out of 26, 50%). In order to determine if this difference was due to different characteristics of the patients in the two groups, the authors reported statistics for 15 prognostic risk factors and used a multivariate logistic regression to compute the adjusted odds ratio correcting for the two risk factors, hypertension and type 2 diabetes mellitus, that were significantly higher in the control group. After correcting for these imbalances, ICU admissions were still dramatically lower among the treated patients (odds ratio 0.03, 95% CI 0.003–0.25). The mortality rate among treated patients was also lower (0 out of 50 treated patients, 0%, versus 2 out of 26 control patients, 8%). The number of deaths was too small to achieve statistical significance against a null hypothesis of no effect, but the result is consistent with the plausible hypothesis that the decrease in mortality would be similar to the decrease in ICU admissions34. Recently, a larger observational cohort study included patients admitted to COVID-19 wards of Hospital del Mar, Barcelona, Spain. Calcifediol treatment using a similar schedule as in pilot study mentioned above, at hospital admission significantly reduced the need for ICU support and reduced mortality35. Out of 838 patients, 447 received calcifediol, whereas 391 were not treated at the time of hospital admission. The prescription of calcifediol was based on the ward they were assigned to, based on availability of beds. In five out of 8 wards patients received calcifediol whereas this was not the case in the other 3 wards. Treatment was otherwise similar and there were no significant baseline differences in patient characteristics. Among those treated on admission with calcifediol, 4.5% required ICU admission versus 21% in the untreated group. Logistic regression of calcifediol treatment on ICU admission, adjusted by age, gender, linearized 25OHD levels at baseline, and comorbidities showed that treated patients had a reduced risk to require ICU (OR 0.13, 95% CI 0.07–0.23). Moreover, 4.7% treated 55 with calcifediol at admission died compared to 15.9% of non-treated. Adjusted results showed a reduced mortality risk with an OR 0.21 [95% CI 0.10; 57 0.43]. In addition, in a retrospective study reported of patients hospitalized for laboratory confirmed COVID-19 infection, patients from five hospitals in Southern Spain received or not calcifediol (similar schedule mentioned formerly). Patients from one hospital received the option to receive calcifediol whereas this option was not available in the other hospitals. General treatment was otherwise very similar. In-hospital mortality during the first 30 days was 17.5%. The OR of death for patients receiving calcifediol (mortality rate of 5%) was 0.22 (95% CI 0.08–0.61), compared to patients not receiving such treatment (mortality rate of 20%; p = 0.000485). In the multivariable logistic regression model, there were significant differences in mortality for patients receiving calcifediol, compared with patients not receiving (OR = 0.104, 95% CI 0.027–0.404)36.

A multicenter, double-blind, randomized, placebo-controlled RCT in Brazil using a single large bolus administration of vitamin D3 (200,000 IU), showed however no improvement in outcome of COVID-19 (risk of death, need for mechanical ventilation or risk of ICU admission). Hospital stay was also not different between treated and untreated patients (mean 7 days in both). The start of vitamin D3 administration was very late in the evolution of the natural history of the disease (mean 10 days from the onset of symptoms), and 90% of all patients required oxygen at the start of the study37.

In a retrospective cohort study in the Barcelona area the risk of COVID-19 infection was evaluated in subjects who were prescribed vitamin D or calcifediol during the previous 4 months38. Similar to our study, the data were generated from the health records of the area. The hazard ratio of infection was slightly (but significantly) lower in subjects on vitamin D (HR = 0.95, CI 0.91–0.98) but not in subjects on calcifediol. Serum concentrations of 25OHD were available for a small subset of the population.

In assessing COVID-19 Outcomes in patients with serum 25OHD levels > 30 ng/mL, supplemented with cholecalciferol, they observed: that the rate of SARS-CoV2 infection (HR = 0.66, 95% CI 0.57–0.77), the risk of severe COVID-19 (HR = 0.72,  95% CI 0.52–1.00) and COVID-19 mortality (HR = 0.66, 95% CI 0.46–0.93) were significantly lower compared to vitamin D-deficient patients (25OHD < 20 ng/mL) not receiving supplementation. Similarly, when the treatment administered was calcifediol, both the rate of SARS-CoV2 infection (HR = 0.69, 95% CI 0.61–0.79), and the risk of severe COVID-19 (HR = 0.61, 95% CI 0.46–0.81 ) and most notably COVID-19 mortality (HR = 0.56, 95% CI (0.42–0.76) were significantly lower. This study had a different design than ours as we only included subjects with a recent (15–30 days) prescription of vitamin D or calcifediol (rather than supplementation in the previous 4 months) and also included subjects with severe infection requiring hospitalization.

The same research group in a retrospective cohort study in Catalonia (Spain), in patients with advanced chronic kidney disease (stages 4 and/or 5) evaluated the impact of calcitriol, the hormonal form of VDES. After propensity score matching, 6252 patients on calcitriol and 12,504 matched control patients were included in the study. Prescription of calcitriol was associated with a reduced risk of SARS-CoV2 infection (HR = 0.78, 95% 0.64–0.94), reduced risk of severe COVID-19 and reduced COVID-19 mortality (HR = 0.57, 0.41–0.80). In treated patients, regardless of renal function, there was an inverse association between mean daily dose of calcitriol and COVID-19 severity or mortality39. Supporting these general observations another recent study shows the association between vitamin D deficiency and higher risk of COVID-19 hospitalization40.

From a mechanistic perspective, there is good reason to postulate that the vitamin D endocrine system may have beneficial effects on different stages of COVID-19 infections such as the early viral infection (by innate immunity antiviral effector mechanisms, including induction of antimicrobial peptides and autophagy) and the later hyperinflammatory phase of COVID-1941,42,43. Moreover, activation of the vitamin D receptor (VDR) signaling pathway may have a critical modulatory role to host responses in acute respiratory distress syndrome42 by decreasing the cytokine/chemokine storm, producing a shift towards amplified adaptive Th2 immune responses, regulating the renin-angiotensin-bradykinin system, modulating neutrophil activity44 and maintaining the integrity of the pulmonary epithelial barrier, stimulating epithelial repair45,46,47 and decreasing the increased coagulability and prothrombotic tendency associated with severe COVID-1941,42,48,49. Regulation of the renin-angiotensin-bradykinin system is of particular relevance in mitigating the progression of severe COVID-19, where over-activation of RAS is associated with a poor prognosis50. Moreover, the protective effect of drugs targeting the VDR and the GC (Vitamin D Binding Protein or DBP) proteins of VDES has been suggested in a recent study on systematic drug repurposing for COVID-1916. The ML study has demonstrated the relevance of drugs targeting VDR and GC (DBP) proteins in the activity of COVID19-related signaling circuits (see Table S1). These signaling circuits affect cellular processes involved in modulating the immune activity, decreasing the inflammatory response, but also in slowing down cellular energetics.

Thus, both observational evidence and mechanistic knowledge support a crucial role of the vitamin D endocrine system in the response to severe outcomes of the COVID-19.


This study strongly suggests that calcifediol or cholecalciferol prescriptions established previously to hospitalization were associated with a better survival rate among hospitalized COVID-19 patients. A significant reduction in mortality between 10 and 50% is observed when the prescription of cholecalciferol and calcifediol, respectively, was made within 15 days prior to hospitalization, and from 5 to 43% if the period considered for vitamin D prescription expands to 30 days. Most likely this effect occurs through VDR stimulation. VDES metabolite treatment may represent an effective, accessible, safe, well-tolerated and cost-effective preventive therapeutic approach for COVID-19, which is dramatically increasing in incidence and for which few validated treatments currently exist. Further large prospective, preferably interventional, Randomized Controlled Trials are needed to confirm whether regular treatment or supplementation of older adults with calcifediol or vitamin D3 improves COVID-19 outcomes.

The results reported here support the establishment of public health policies that make it possible to maintain adequate levels of 25OHD for the synthesis of calcitriol to enable a better prognosis in patients affected by COVID-19. In the light of the results obtained, calcifediol preferably, or cholecalciferol with a lower effect, can adequately meet these objectives. In fact, calcifediol may have some advantages over native vitamin D3. Thus, the former has a more reliable intestinal absorption (close to 100%) and can more rapidly restore serum concentrations of 25OHD as it does not require hepatic 25-hydroxylation33,51. In fact, calcifediol is three times more potent than oral cholecalciferol in raising serum 25OHD levels52. This is especially relevant in clinical situations whereby rapid restoration of serum 25OHD is desirable and CYP2R1 expression is compromised52, explaining and giving causal consistency to the stronger association between survival and the prescription of calcifediol fifteen and thirty days prior to hospitalization by COVID-19.

This cost-effective and widely available treatment could have positive implications for the management of COVID-19 worldwide, particularly in developing countries.

Materials and methods

Design and patient selection

This study aimed to study a retrospective cohort including all Andalusian patients hospitalized with COVID-19 diagnosis. Following the inclusion criteria of having a COVID-19 diagnosis (by PCR or antigen test) and an overlapping hospitalization during the period January to November.

Data preprocessing

Medication data related to VDES metabolites in the office and hospital pharmacy records were found for the following pharmaceutical compounds: cholecalciferol, calcifediol and calcitriol. For this study, individuals with prescriptions for a specific metabolite within a period from P days (P = 15 and 30 days) before the hospital admission until the discharge (or death) were compared to untreated individuals (with no prescriptions for VDES metabolites). In parallel, individuals were considered prescribed with All Vitamin D Metabolites (ADM) in the case that one of the previous pharmaceutical compounds were prescribed. A total of 570 patients received a prescription for cholecalciferol, 374 for calcifediol, and 18 for calcitriol if a period of P = 15 days is considered, and 802, 439 and 28, respectively, if a P = 30 days period is considered. Calcitriol was excluded from the individual studies, due to the low number of cases, but was considered as part of ADM, totaling 962 and 1269 for 15 and 30 days, respectively.

The main primary outcome was COVID-19 death (certified death events during hospitalization). Following previous similar studies, the first 30 days of hospital stay were considered for survival calculations53. The time variable in the models corresponds to the length (in days) of hospital stay. The stays that imply one or more changes of hospital units are combined in a single stay where the admission and discharge dates are set to either the start of the first or the end of the last combined stay. Finally, in order to reduce possible confounding effects due to reinfection mechanisms we have opted to include only the first stay for each patient.

Propensity score matching

To reduce the confounding effects of several conditions on the outcome a 1:1 ratio Propensity Score Matching (PSM) was applied to match treated (in this case treatment refers to patients who received a prescription) and untreated patients without replacement in the survival analysis. Variables previously associated with COVID-19 mortality, such as: age, sex, pneumonia/flu vaccination status, hypertension, chronic obstructive pulmonary disease, diabetes, obesity, chronic pulmonary and digestive diseases, asthma, chronic heart diseases and cancer were included54 (Table 4). All the values agree with previous reports55. The propensity scores have been estimated by means of a Generalized Additive Model with a logit as the link function while the matching, to ensure a similar distribution of all the covariates across prescription groups, has been done using the nearest neighbor matching modality56. To ensure a similar distribution of all the covariates across the compared groups (beyond considering only standardized means differences) the higher order moments of covariates were used as recently recommended57. Covariate balance in matched samples is checked by a X2 test to confirm that no biases against prescribed or untreated matched patients exist.

Table 4 Variables previously associated to COVID-19 prognosis and symptoms in previous publications54 as distributed in the whole set of patients studied here. Columns survival and death contain the absolute number of individuals with the specific covariate, and in parentheses the percentage, that survive and die, respectively. A X2 test is carried out to check for direct associations (with no covariate correction) with death. The difference of percentages accounts for the effect: e.g. asthma protects and cancer increases the risk. The p-value column accounts for the significance.

Survival on the matched samples

Kaplan–Meier estimate was used to infer the survival probability difference between patients which received a prescription and untreated patients. Survival curves for the different groups are compared with a Log Rank test.

Robust estimation of the treatment (vitamin D prescription) effect using the whole population

Although PSM is a widely used technique because it leverages the use of parametric and non-parametric models to covariate-treatment-outcome unbalanced data, the consistency of any estimator derived from the propensity scores is limited by exchangeability assumptions between the treated and untreated samples, the covariate adjustment and model specification (among others) mainly due to the fact that the propensity score is computed with the same data as the modelling. Here, the hazard ratios for each of the treatments of interest have been computed by means of the closed-form estimator58 using a weighted Cox model with inverse propensity weighting under the Average Treatment Effect on the Overall (ATE) and the Average Treatment Effect on the Treated (ATT) assumptions, the most used weighting approximations to estimate treatment effects59. Note that the ATE weights are stabilized by factoring the overall probability of being exposed to a given treatment into the equation58.

Furthermore, an alternative estimation of the treatment effect has been obtained by means of bootstrapping (n = 1000 iterations) a weighted Cox model with the sample weights computed by means of a Binomial General Linear Model which regress the treatment as a function of the covariates60.

Modeling survival along time

For each time point the restricted mean survival time (RMST) of the treated versus the untreated for each prescription has been compared. The RMST is computed as the area under the survival curve up to the time point (t) and, therefore, the comparison measures the difference and ratio of RMST between treated and untreated patients. The interpretation of the curve is straightforward, representing each time point (t) the expected days (on average) that subjects from the group with vitamin D metabolite prescriptions live longer (or shorter) than untreated patients when patients are followed up to time t. Interestingly, the significance of the RMST comparison can be estimated (p-value corrected for multiple testing with False Discovery Rate, FDR61) for each time point. Note that the dynamic estimated ratio of RMST is more prone to detect plateaus on the treatment (vitamin D metabolite prescriptions) effect over time62, so both curves are complementary.


For the matching analysis we have used the MatchIt63 R package (version 4.1.0). The treatment effect models have been implemented with the hrIPW64 R package (version 0.1.3). RMST computations have been performed with the survRM265 R package (version 1.0.3). Survival curves and plots have been generated with the R survival66 (version 3.2.7) and survminer67 (version 0.4.8) packages, respectively.

Ethics declaration

The Ethics Committee for the Coordination of Biomedical Research in Andalusia approved the study “Retrospective analysis of all COVID-19 patients in the entire Andalusian community and generation of a prognostic predictor that can be applied preventively in possible future outbreaks” (29th September, 2020, Acta 09/20) and waived informed consent for the secondary use of clinical data for research purposes. All research was performed in accordance with relevant guidelines and regulations.

Data availability

The data that support the findings of this study are available from the Andalusian Population Health Database (Base Poblacional de Salud: but restrictions apply to the availability of these data, which were used under license for the current study, and so are not publicly available.


  1. 1.

    Bouillon, R. et al. Skeletal and extraskeletal actions of vitamin D: Current evidence and outstanding questions. Endocr. Rev. 40, 1109–1151 (2019).

    PubMed  Google Scholar 

  2. 2.

    Jiang, X., Ge, T. & Chen, C.-Y. The causal role of circulating vitamin D concentrations in human complex traits and diseases: A large-scale Mendelian randomization study. Sci. Rep. 11, 1–10 (2021).

    Google Scholar 

  3. 3.

    Martineau, A. R. et al. Vitamin D supplementation to prevent acute respiratory tract infections: Systematic review and meta-analysis of individual participant data. BMJ 356, i6583 (2017).

    PubMed  PubMed Central  Google Scholar 

  4. 4.

    Kaufman, H. W., Niles, J. K., Kroll, M. H., Bi, C. & Holick, M. F. SARS-CoV-2 positivity rates associated with circulating 25-hydroxyvitamin D levels. PLoS One 15, e0239252 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  5. 5.

    Baktash, V. et al. Vitamin D status and outcomes for hospitalised older patients with COVID-19. Postgrad. Med. J. 97, 442–447 (2021).

    PubMed  Google Scholar 

  6. 6.

    Faul, J. et al. Vitamin D deficiency and ARDS after SARS-CoV-2 infection. Ir. Med. J. 113, 84 (2020).

    CAS  PubMed  Google Scholar 

  7. 7.

    Radujkovic, A. et al. Vitamin D deficiency and outcome of COVID-19 patients. Nutrients 12, 2757 (2020).

    CAS  PubMed Central  Google Scholar 

  8. 8.

    Merzon, E. et al. Low plasma 25 (OH) vitamin D level is associated with increased risk of COVID-19 infection: An Israeli population-based study. FEBS J. 287, 3693–3702 (2020).

    CAS  PubMed  Google Scholar 

  9. 9.

    Meltzer, D. O. et al. Association of vitamin D status and other clinical characteristics with COVID-19 test results. JAMA Netw. Open 3, e2019722 (2020).

    PubMed  PubMed Central  Google Scholar 

  10. 10.

    Hernández, J. L. et al. Vitamin D status in hospitalized patients with SARS-CoV-2 infection. J. Clin. Endocrinol. Metab. 106, e1343–e1353 (2021).

    PubMed  Google Scholar 

  11. 11.

    Pereira, M., Dantas Damascena, A., Galvão Azevedo, L. M., de Almeida Oliveira, T. & da Mota Santana, J. Vitamin D deficiency aggravates COVID-19: Systematic review and meta-analysis. Crit. Rev. Food Sci. Nutr. (2020).

    Article  PubMed  Google Scholar 

  12. 12.

    Bassatne, A. et al. The link between COVID-19 and VItamin D (VIVID): A systematic review and meta-analysis. Metabolism 119, 154753 (2021).

    CAS  PubMed  PubMed Central  Google Scholar 

  13. 13.

    Wang, Z. et al. Association of vitamin D deficiency with COVID-19 infection severity: Systematic review and meta-analysis. Clin. Endocrinol. (2021).

    Article  Google Scholar 

  14. 14.

    NICE guideline COVID-19 rapid guideline: Vitamin D (2020).

  15. 15.

    Stroehlein, J. K. et al. Vitamin D supplementation for the treatment of COVID-19: A living systematic review. Cochrane Database Syst. Rev. 5, CD015043 (2021).

    PubMed  Google Scholar 

  16. 16.

    Loucera, C. et al. Drug repurposing for COVID-19 using machine learning and mechanistic models of signal transduction circuits related to SARS-CoV-2 infection. Signal Transduct. Target. Ther. 5, 290. (2020).

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  17. 17.

    Rian, K. et al. Mechanistic modeling of the SARS-CoV-2 disease map. BioData Min. 14, 5. (2021).

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  18. 18.

    Ostaszewski, M. et al. COVID-19 Disease Map, building a computational repository of SARS-CoV-2 virus-host interaction mechanisms. Sci. Data 7, 136 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  19. 19.

    Bothwell, L. E. & Podolsky, S. H. The emergence of the randomized, controlled trial. N. Engl. J. Med. 375, 501–504 (2016).

    PubMed  Google Scholar 

  20. 20.

    Corrigan-Curay, J., Sacks, L. & Woodcock, J. Real-world evidence and real-world data for evaluating drug safety and effectiveness. J. Am. Med. Assoc. 320, 867–868. (2018).

    Article  Google Scholar 

  21. 21.

    US Food and Drug Administration. Use of real-world evidence to support regulatory decision-making for medical devices: Guidance for industry and Food and Drug Administration staff. (2017).

  22. 22.

    Sherman, R. E. et al. Real-world evidence—What is it and what can it tell us. N. Engl. J. Med. 375, 2293–2297 (2016).

    PubMed  Google Scholar 

  23. 23.

    Hannan, E. L. Randomized clinical trials and observational studies: Guidelines for assessing respective strengths and limitations. JACC Cardiovasc. Interv. 1, 211–217 (2008).

    PubMed  Google Scholar 

  24. 24.

    Cowie, M. R. et al. Electronic health records to facilitate clinical research. Clin. Res. Cardiol. 106, 1–9 (2017).

    PubMed  Google Scholar 

  25. 25.

    Muñoyerro-Muñiz, D. et al. Health record linkage: Andalusian health population database. Gac. Sanit. 34, 105–113 (2019).

    PubMed  Google Scholar 

  26. 26.

    Carrigan, G. et al. Using electronic health records to derive control arms for early phase single-arm lung cancer trials: Proof-of-concept in randomized controlled trials. Clin. Pharmacol. Ther. 107, 369–377 (2020).

    PubMed  Google Scholar 

  27. 27.

    Ramagopalan, S. V., Simpson, A. & Sammon, C. Can real-world data really replace randomised clinical trials?. BMC Med. 18, 1–2 (2020).

    Google Scholar 

  28. 28.

    González-Molero, I. et al. Vitamin D deficiency in Spain: A population-based cohort study. Eur. J. Clin. Nutr. 65, 321–328 (2011).

    PubMed  Google Scholar 

  29. 29.

    Liu, N. et al. Low vitamin D status is associated with coronavirus disease 2019 outcomes: A systematic review and meta-analysis. Int. J. Infect. Dis. 104, 58–64 (2021).

    CAS  PubMed  PubMed Central  Google Scholar 

  30. 30.

    Rhodes, J. M., Subramanian, S., Laird, E. & Kenny, R. A. low population mortality from COVID-19 in countries south of latitude 35 degrees North supports vitamin D as a factor determining severity. Aliment. Pharmacol. Ther. 51, 1434 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  31. 31.

    Ilie, P. C., Stefanescu, S. & Smith, L. The role of vitamin D in the prevention of coronavirus disease 2019 infection and mortality. Aging Clin. Exp. Res. 32, 1195–1198 (2020).

    PubMed  Google Scholar 

  32. 32.

    Marik, P. E., Kory, P. & Varon, J. Does vitamin D status impact mortality from SARS-CoV-2 infection?. Med. Drug Discov. 6, 100041 (2020).

    PubMed  PubMed Central  Google Scholar 

  33. 33.

    Pérez-Castrillón, J. L. et al. Calcifediol is superior to cholecalciferol in improving vitamin D status in postmenopausal women: A randomized trial. J. Bone Miner. Res. 36, 1967–1978 (2021).

    PubMed  Google Scholar 

  34. 34.

    Castillo, M. E. et al. Effect of calcifediol treatment and best available therapy versus best available therapy on intensive care unit admission and mortality among patients hospitalized for COVID-19: A pilot randomized clinical study. J. Steroid Biochem. Mol. Biol. 203, 105751 (2020).

    Google Scholar 

  35. 35.

    Nogues, X. et al. Calcifediol treatment and COVID-19-related outcomes. (2021).

  36. 36.

    Alcala-Diaz, J. F. et al. Calcifediol treatment and hospital mortality due to COVID-19: A cohort study. Nutrients 13, 1760 (2021).

    CAS  PubMed  PubMed Central  Google Scholar 

  37. 37.

    Murai, I. H. et al. Effect of a single high dose of vitamin D3 on hospital length of stay in patients with moderate to severe COVID-19: A randomized clinical trial. J. Am. Med. Assoc. 325, 1053–1060 (2021).

    CAS  Google Scholar 

  38. 38.

    Oristrell, J. et al. Vitamin D supplementation and COVID-19 risk: A population-based, cohort study. J. Endocrinol. Investig. (2021).

    Article  Google Scholar 

  39. 39.

    Oristrell, J. et al. Association of calcitriol supplementation with reduced COVID-19 mortality in patients with chronic kidney disease: A population-based study. Biomedicines 9, 509 (2021).

    CAS  PubMed  PubMed Central  Google Scholar 

  40. 40.

    Jude, E. B., Ling, S. F., Allcock, R., Yeap, B. X. Y. & Pappachan, J. M. Vitamin D deficiency is associated with higher hospitalization risk from COVID-19: A retrospective case-control study. J. Clin. Endocrinol. Metab. 106, e4708–e4715. (2021).

    Article  PubMed  Google Scholar 

  41. 41.

    Bilezikian, J. P. et al. Mechanisms in endocrinology: Vitamin D and COVID-19. Eur. J. Endocrinol. 183, R133–R147 (2020).

    CAS  PubMed  Google Scholar 

  42. 42.

    Quesada-Gomez, J. M., Entrenas-Castillo, M. & Bouillon, R. Vitamin D receptor stimulation to reduce acute respiratory distress syndrome (ARDS) in patients with coronavirus SARS-CoV-2 infections: Revised Ms SBMB 2020_166. J. Steroid Biochem. Mol. Biol. 202, 105719 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  43. 43.

    Grant, W. B. et al. Evidence that vitamin D supplementation could reduce risk of influenza and COVID-19 infections and deaths. Nutrients 12, 988 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  44. 44.

    Takano, Y., Mitsuhashi, H. & Ueno, K. 1α, 25-Dihydroxyvitamin D3 inhibits neutrophil recruitment in hamster model of acute lung injury. Steroids 76, 1305–1309 (2011).

    CAS  PubMed  Google Scholar 

  45. 45.

    Zheng, S. et al. Vitamin D attenuates lung injury via stimulating epithelial repair, reducing epithelial cell apoptosis and inhibits TGF-β induced epithelial to mesenchymal transition. Biochem. Pharmacol. 177, 113955 (2020).

    CAS  PubMed  Google Scholar 

  46. 46.

    Kong, J. et al. VDR attenuates acute lung injury by blocking Ang-2-Tie-2 pathway and renin-angiotensin system. Mol. Endocrinol. 27, 2116–2125 (2013).

    CAS  PubMed  PubMed Central  Google Scholar 

  47. 47.

    Shi, Y. Y. et al. Vitamin D/VDR signaling attenuates lipopolysaccharide-induced acute lung injury by maintaining the integrity of the pulmonary epithelial barrier. Mol. Med. Rep. 13, 1186–1194 (2016).

    ADS  CAS  PubMed  Google Scholar 

  48. 48.

    Martinez-Moreno, J. M. et al. Vitamin D modulates tissue factor and protease-activated receptor 2 expression in vascular smooth muscle cells. FASEB J. 30, 1367–1376 (2016).

    CAS  PubMed  Google Scholar 

  49. 49.

    Blondon, M. et al. Thrombin generation and fibrin clot structure after vitamin D supplementation. Endocr. Connect. 8, 1447–1454 (2019).

    CAS  PubMed  PubMed Central  Google Scholar 

  50. 50.

    Xu, J. et al. Vitamin D alleviates lipopolysaccharide-induced acute lung injury via regulation of the renin-angiotensin system. Mol. Med. Rep. 16, 7432–7438 (2017).

    CAS  PubMed  PubMed Central  Google Scholar 

  51. 51.

    Charoenngam, N. et al. A pilot-randomized, double-blind crossover trial to evaluate the pharmacokinetics of orally administered 25-hydroxyvitamin D3 and vitamin D3 in healthy adults with differing BMI and in adults with intestinal malabsorption. Am. J. Clin. Nutr. 114, 1189–1199 (2021).

    PubMed  Google Scholar 

  52. 52.

    Quesada-Gomez, J. & Bouillon, R. Is calcifediol better than cholecalciferol for vitamin D supplementation?. Osteoporos. Int. 29, 1697–1711 (2018).

    CAS  PubMed  Google Scholar 

  53. 53.

    Sterne, J. A. et al. Association between administration of systemic corticosteroids and mortality among critically ill patients with COVID-19: A meta-analysis. J. Am. Med. Assoc. 324, 1330–1341 (2020).

    CAS  Google Scholar 

  54. 54.

    Gutiérrez-Gutiérrez, B. et al. Identification and validation of clinical phenotypes with prognostic implications in patients admitted to hospital with COVID-19: A multicentre cohort study. Lancet Infect. Dis. (2021).

    Article  PubMed  PubMed Central  Google Scholar 

  55. 55.

    Ng, W. H. et al. Comorbidities in SARS-CoV-2 patients: A systematic review and meta-analysis. MBio 12, e03647-03620 (2021).

    Google Scholar 

  56. 56.

    Zakrison, T., Austin, P. & McCredie, V. A systematic review of propensity score methods in the acute care surgery literature: Avoiding the pitfalls and proposing a set of reporting guidelines. Eur. J. Trauma Emerg. Surg. 44, 385–395 (2018).

    CAS  PubMed  Google Scholar 

  57. 57.

    Ho, D. E., Imai, K., King, G. & Stuart, E. A. Matching as nonparametric preprocessing for reducing model dependence in parametric causal inference. Polit. Anal. 15, 199–236 (2007).

    Google Scholar 

  58. 58.

    Hajage, D. et al. Closed-form variance estimator for weighted propensity score estimators with survival outcome. Biom. J. 60, 1151–1163 (2018).

    MathSciNet  PubMed  MATH  Google Scholar 

  59. 59.

    Imbens, G. W. Nonparametric estimation of average treatment effects under exogeneity: A review. Rev. Econ. Stat. 86, 4–29 (2004).

    Google Scholar 

  60. 60.

    Austin, P. C. Variance estimation when using inverse probability of treatment weighting (IPTW) with survival analysis. Stat. Med. 35, 5642–5655 (2016).

    MathSciNet  PubMed  PubMed Central  Google Scholar 

  61. 61.

    Benjamini, Y. & Hochberg, Y. Controlling the false discovery rate: A practical and powerful approach to multiple testing. J. R. Stat. Soc. Ser. B 57, 289–300 (1995).

    MathSciNet  MATH  Google Scholar 

  62. 62.

    Liao, J. J., Liu, G. F. & Wu, W.-C. Dynamic RMST curves for survival analysis in clinical trials. BMC Med. Res. Methodol. 20, 1–10 (2020).

    ADS  Google Scholar 

  63. 63.

    Stuart, E. A., King, G., Imai, K. & Ho, D. MatchIt: Nonparametric preprocessing for parametric causal inference. J. Stat. Softw. 42, 8 (2011).

    Google Scholar 

  64. 64.

    Hajage, D. hrIPW: Hazard ratio estimation using Cox model weighted by the estimated propensity score. (2020).

  65. 65.

    Uno, H. et al. survRM2: Comparing restricted mean survival time. (2020).

  66. 66.

    Therneau, T. A package for survival analysis in R. (2020).

  67. 67.

    Kassambara, A., Kosinski, M., Biecek, P. & Fabian, S. Package ‘survminer’. (2017).

Download references


This work is supported by grants PID2020-117979RB-I00 from the Spanish Ministry of Science and Innovation, IMP/0019, ACCI2018/29 from CIBERER-ISCIII; COV20/00788 from the Instituto de Salud Carlos III (ISCIII), co-funded with European Regional Development Funds (ERDF); grant G999088Q from the Fundación BBVA; grant H2020 Programme of the European Union grants Marie Curie Innovative Training Network "Machine Learning Frontiers in Precision Medicine" (MLFPM) (GA 813533); P18-RT-3471 from Consejería de Salud y Familias de la Junta de Andalucía; CB16/10/00245, CB16/10/00501 from CIBERFES-ISCIII; PI19/00033 from the ISCIII, co-funded with ERDF; COVID-011-2020 from Consejería de Salud y Familia. The authors also acknowledge Junta de Andalucía for the postdoctoral contract of Carlos Loucera (PAIDI2020- DOC_00350) co-funded by the European Social Fund (FSE) 2014-2020.

Author information




C.L.: Data curation, Formal Analysis, Investigation, Visualization; M.P.C.: Formal Analysis; M.E.M.: Formal Analysis; D.M.M.: Resources; R.V.: Resources; J.L.M.: Writing—review and editing; J.R.B.: Writing—review and editing; I.T.: Writing—review and editing; R.B.: Writing—review and editing; J.D.: Supervision, Project administration, Writing—original draft; J.M.Q.G.: Supervision, Writing—original draft. All authors reviewed the manuscript.

Corresponding authors

Correspondence to Joaquin Dopazo or Jose Manuel Quesada Gomez.

Ethics declarations

Competing interests

RB declares payment of honoraria for lectures by FAES (Spain), Abiogen (Italy) and Fresenius (Germany). JMQ declares small consulting fees and small lecture fees from Amgen and FESE Farma (Spain). The rest of authors declare no competing interests.

Additional information

Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Loucera, C., Peña-Chilet, M., Esteban-Medina, M. et al. Real world evidence of calcifediol or vitamin D prescription and mortality rate of COVID-19 in a retrospective cohort of hospitalized Andalusian patients. Sci Rep 11, 23380 (2021).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:


By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing