Introduction

Primary hyperparathyroidism (PHPT) is an endocrine disorder characterized by hypercalcemia with elevated or inappropriately normal parathyroid hormone (PTH) levels. It is observed approximately three times more frequently in women than in men. Its prevalence is thought to be 0.1–0.4% [1]. In the course of the disease, hypercalciuria, nephrolithiasis, decrease in glomerular filtration rate (GFR), gastrointestinal symptoms, decrease in bone mineral density, osteoporosis, bone pain, and fractures may develop. PHPT can present with symptoms related to high calcium (Ca) levels or be seen as asymptomatic or normocalcemic [2].

Biochemically, serum phosphorus (P) level is generally low or in the lower half of the normal range, together with elevated serum Ca. In addition, an increase in alkaline phosphatase (ALP) levels may be observed [3]. One of the biochemical renal findings of PHPT is hypercalciuria, which is used to predict the risk of developing nephrolithiasis [4].

Besides Ca and P, a relationship exists between PTH and magnesium (Mg) levels. Severe hypermagnesemia may suppress PTH secretion by activating Ca-sensing receptors in the parathyroid glands [5]. In hypomagnesemia, on the other hand, defective cyclic adenosine monophosphate production occurs in the parathyroid glands and PTH target organs. The latter state disrupts PTH secretion and creates PTH resistance in these organs [6]. Both conditions predispose to hypocalcemia.

High PTH levels in PHPT increase renal Mg reabsorption [5]. However, hypercalcemia can cause decreased reabsorption of Mg due to an increased load of filtered calcium in the loop of Henle [7]. Therefore, Mg levels may be observed at normal or slightly low levels in PHPT patients [8].

In studies examining the relationship between Mg levels and the severity of PHPT and Ca levels, Mg was lower in cases with more severe PHPT and higher Ca levels [9,10,11]. Na et al. examined 307 PHPT patients, 77 of whom had hypomagnesemia, and reported that mean calcium and PTH levels were higher in hypomagnesemic patients. Bone pain, fractures, polyuria, and polydipsia symptoms were also observed more frequently in these patients. The prevalence of osteoporosis, nephrolithiasis, and anemia was also higher in the hypomagnesemic group [5].

These studies have shown that the serum Mg level might be valuable in demonstrating the severity of PHPT in hypomagnesemic patients. However, there has been to date, to the best of our knowledge, no study on the usability of serum Mg levels in normomagnesemic patients. The current study aimed to evaluate the relationship between serum Mg and serum Ca and P levels and their utility in predicting osteoporosis and nephrolithiasis, which constitute indications for treatment in PHPT [12].

Methods

Patients who were followed up with PHPT in our center between March 2019 and March 2023 were analyzed retrospectively. Exclusion criteria were less than 18 years of age, renal failure (GFR < 60 mL/min), secondary (including vitamin D deficiency or chronic kidney disease) or tertiary causes of hyperparathyroidism, metabolic bone disease (such as Paget’s disease and osteomalacia), known malignancy of any kind, familial hypocalciuric hypercalcemia (FHH), receiving Ca, P, or Mg therapy during the last month, taking bisphosphonate therapy for hypercalcemia in the previous 1 year, receiving intravenous fluid therapy due to hypercalcemia during the last month, and drugs that interfere with Ca or bone metabolism (steroids, calcitriol, cholecalciferol, thiazides, lithium, cinacalcet, bisphosphonates, and denosumab). Appropriate replacements were made in patients with vitamin D deficiency and the possibility of secondary hyperparathyroidism was excluded. The values of these patients were taken at least 1 month after vitamin D replacement was stopped.

Biochemical data, including serum Ca (mg/dL), P (mg/dL), Mg (mg/dL), albumin (g/dL), PTH (ng/L), 24 h urinary Ca (mg/day), ALP (U/L) and creatinine (Cr) (mg/dL) were obtained from medical records. Serum Ca was corrected according to the following formula: corrected calcium (cCa) = total Ca + [0.8 × (4.0 − albumin)]. The reference range for Ca, albumin, P, Mg, PTH, Cr, and 24-h urinary Ca were 8.5–10.3 mg/dL, 3.5–5.2 g/dL, 2.5–4.5 mg/dL, 1.7 to 2.4 mg/dL, 18.4–80.1 ng/L, 0.5–1.1 mg/dL, 100–300 mg/day respectively. Serum Ca, P, and Mg were determined in a clinical chemistry laboratory (Roche Diagnostics). Plasma intact PTH was measured using the Allegro IRMA (Roche Diagnostics) with a detection limit of 1 pg/mL and a 2 and 10% intra- and inter-assay coefficient of variation, respectively.

Renal ultrasonography (US) or computed tomography reports were obtained from patient records to detect nephrolithiasis. Lumbar vertebra, femur, and radius bone mineral density (BMD) t and z scores were recorded from the patient’s dual-energy x-ray absorptiometry (DEXA) reports. The World Health Organization’s criteria were used when interpreting DEXA-BMD results [13].

The number of sonographically detectable parathyroid adenomas and adenoma volumes were determined from the neck US reports. The genetic test results of the patients who had genetic testing within the indication were recorded. Localization status by technetium 99 m sestamibi parathyroid scintigraphy was obtained from patient records. Histological diagnosis and adenoma volumes were obtained from the pathology reports of the patients who underwent surgery. Sonographic volume and surgical material volumes were calculated according to the ellipsoid volume formula (width × height × length × π/6).

MgxP, Mg/P, Ca/P, and cCa/P values were calculated. The relationships between biochemical parameters (MgxP, Mg/P, Ca/P, cCa/P, PTH, Ca, P, Mg, cCa, ALP, 24-h urinary Ca) and clinical outcomes (nephrolithiasis status, bone mineral density, sonographic adenoma volume, and surgically removed adenoma volume) were evaluated statistically.

Statistical analysis

The SPSS 25.0 software package (IBM Corp., Armonk, NY, USA) was used for statistical analysis. We present the descriptive statistics as median (minimum–maximum) for non-normally distributed variables and mean ± standard deviation for normally distributed variables, while qualitative variables are presented as absolute and relative (%) frequencies. A comparison between categorical variables was made using the chi-square test. The Mann–Whitney U test was used for nonparametric variables to compare the differences between groups. The Kruskal–Wallis test was used for nonparametric variables to compare the differences between more than two groups. P < 0.05 was considered statistically significant. The cut-off points of MgxP, Mg/P, Ca/P, and cCa/P values that can be used to predict nephrolithiasis and osteoporosis were investigated using receiver operating characteristic (ROC) curves. Spearman’s test was used for non-normally distributed data in the correlation analysis.

Variables found to be associated with the presence of nephrolithiasis in previous analyses were examined by logistic regression analysis. The enter method was used when performing logistic regression analysis. The Hosmer–Lemeshow test was used to determine the fit of the model obtained as a result of further analysis. Nagelkerge R2 test results, significance values in the model, and odds ratios (OR) with 95% confidence interval are provided to explain the model.

Results

A total of 543 patients, 441 women and 102 men, were included in the study. Median age and laboratory findings are summarized in Table 1. Thirty-three of the 543 patients (6.0%) had hypomagnesemia. Serum Ca levels of 55 patients (10.1%) were within the normal range. There were 146 patients (26.9%) with and 397 patients (73.1%) without nephrolithiasis. Osteoporosis was detected in 253 patients (46.6%). Of the patients included in the study, 276 (50.8%) underwent surgery in our center. Surgery was not recommended in 93 patients with asymptomatic PHPT and 55 patients with normocalcemic PHPT. Other patients who did not undergo surgery consisted of patients who did not prefer surgery or did not continue to follow-up. Median follow-up time of the patients was 11.2 (3.0–39.0) months.

Table 1 Age and laboratory findings of patients*

Correlation analyses were performed between Mg/P, MgxP, Ca/Mg, cCa/Mg values and PTH, ultrasonographic adenoma volume, surgical material volume. The Mg/P ratio showed a positive correlation with PTH (rs = 0.382, p < 0.001), ultrasonographic adenoma volume (rs = 0.156, p = 0.001), and surgical material volume (rs = 0.159, p = 0.036). MgxP value showed a negative correlation with PTH (rs = −0.256, p < 0.001), ultrasonographic adenoma volume (rs = −0.155, p = 0.001), and surgical material volume (rs = −0.153, p = 0.043). Ca/Mg and cCa/Mg ratios did not correlate with PTH level or ultrasonographic adenoma volume. However, both parameters showed a positive correlation with the volume of surgical material (Ca/Mg: rs = 0.192, p = 0.011, and cCa/Mg: rs = 0.191, p = 0.012).

The biochemical profile of patients with and without nephrolithiasis is compared in Table 2. Serum Ca, cCa, Ca/Mg, and cCa/Mg were significantly higher, while serum Mg, Mg/P, and MgxP were significantly lower in patients with nephrolithiasis. ROC analysis was performed for Mg/P, MgxP, cCa/Mg, and Ca/Mg values. For the Mg/P, the area under the curve (AUC) was 0.55 (0.497–0.614) (p = 0.047). When the cut-off value of 0.7538 was taken for Mg/P, sensitivity and specificity for identifying the presence of nephrolithiasis were 52.1% and 50.8%, respectively. For MgxP, AUC was 0.63 (0.583–0.690) (p < 0.001). With a cut-off value of 5.55 for MgxP, sensitivity was 58.9%, and specificity was 59.1% for identifying the presence of urinary stones. Concerning Ca/Mg and cCa/Mg, ROC analysis results are summarized in Figs. 1 and 2. For Ca/Mg, a cut-off value of 5.47 had a sensitivity of 74% and a specificity of 73% for identifying the presence of nephrolithiasis. The cut-off value for cCa/Mg that can be used to identify nephrolithiasis was 5.24, with a sensitivity of 73.3% and a specificity of 73%. ROC analysis was performed for the usability of Ca, cCa, and Mg alone in identifying the presence of nephrolithiasis. For Ca, it was observed that there was a cut-off value of 11.05 with a sensitivity of 63% and a specificity of 58%. When the cut-off value for cCa was 10.65, 58% sensitivity and 62% specificity were observed. A cut-off value of 2.05 was found to have 69% sensitivity and 61% specificity for Mg.

Table 2 Biochemical findings in patients with and without nephrolithiasis*
Fig. 1
figure 1

ROC analysis for Ca/Mg with cutoff, sensitivity, specificity, AUC, standard error, and 95% confidence interval values

Fig. 2
figure 2

ROC analysis for cCa/Mg with cutoff, sensitivity, specificity, AUC, standard error, and 95% confidence interval values

Two separate logistic regression analyses were performed with the enter method. In Model 1, the patients’ age, gender, Cr, P, ALP, PTH, 24-h urinary Ca, and Ca/Mg data were included. In Model 2, age, gender, Cr, P, ALP, PTH, 24-h urinary Ca, and cCa/Mg data were included, and the effect of these data on kidney stone formation was revealed. The independent variables in Model 1 correctly predicted the occurrence of kidney stones with an accuracy of 76.6% and in Model 2 with an accuracy of 76.8%. The fit of both models was evaluated with the p-value of the Hosmer–Lemeshow Test. The p-value of Model 1 is 0.155, and the p-value of Model 2 is 0.188. Since p > 0.05 was observed in both models, the fit of the model was considered good. As a result of logistic regression analysis, the significance values in the models of the variables was found to be associated with the presence of nephrolithiasis in previous analyses: the odds ratios (OR) with 95% confidence interval are presented in Table 3. According to Model 1, a high Ca/Mg ratio increases the possibiltiy of detecting nephrolithiasis (OR: 4.145 [CI: 2.763–6.219], p < 0.001). According to Model 2, a high cCa/Mg ratio similarly increases the possibility of detecting nephrolithiasis (OR: 4.035 [CI: 2.711–6.005], p < 0.001). Other variables in both models do not affect the possibility of detecting nephrolithiasis.

Table 3 Logistic regression analysis results for nephrolithiasis detection status

The relation between DEXA-BMD results and biochemical profiles was statistically evaluated (Table 4). A similar result was observed when the relationship was evaluated separately for each DEXA-BMD measurement localization (lumbar total, femoral neck, femur total, radius 1/3, and radius total). No statistically significant correlation existed between the Mg/P, MgxP, cCa/Mg, Ca/Mg values, and DEXA-BMD results. We found a significant relationship between DEXA-BMD results and Ca, cCA, PTH, and ALP levels.

Table 4 Biochemical findings in patients with normal bone mineral density, osteopenia, and osteoporosis*

Discussion

This study showed that Mg/P, MgxP, Ca/Mg, and cCa/Mg values can be used to screen for nephrolithiasis in PHPT patients. These parameters are easily applicable and inexpensive since they can be performed within routine biochemical analysis without additional examination.

It is known that patients with PHPT are prone to hypomagnesemia [8]. Studies conducted to determine the relationship between Mg levels and the clinical course of PHPT have shown that hypomagnesemia is associated with a more severe course of PHPT [5, 9,10,11]. In one of these studies, including 307 patients with PHPT, 25% of the patients had hypomagnesemia [5]. In our study, the rate of patients with hypomagnesemia was 6%. Although hypomagnesemia has been demonstrated to be associated with more serious clinical outcomes, since the patient group with hypomagnesemia constituted a minority in previous studies and our study, Mg values cannot be used alone in evaluating all patients. Therefore, the current study was planned considering that the relationship of Mg with Ca and P may be a guide for clinical findings. To the best of our knowledge, there is no other study in the literature investigating these relationships and their utility in managing PHPT.

The prevalence of nephrolithiasis in PHPT was observed at rates varying between 7.8 and 40.5% in studies where all patients were radiologically screened [14,15,16]. In our study, nephrolithiasis was present in 26.9% of the patients. Osteoporosis was detected in 46.6% of the patients. This was similar to previous studies reporting the prevalence of osteoporosis in PHPT as 39–62.9% [2]. The statistics in our study are also compatible with these data. Osteoporosis was diagnosed more frequently in DEXA-BMD measurements made from the radius in the present study.

Patients with nephrolithiasis had higher serum Ca and cCa, and lower Mg levels. Although PTH and 24-h urinary Ca levels were higher and P was lower in patients with nephrolithiasis, the differences did not reach statistical significance. Since serum Ca, cCa, and PTH values are already expected to be high in patients with PHPT [2] and Mg levels are often within the normal range [5], it would not be correct to predict the risk of nephrolithiasis by looking at these values alone. Hypercalciuria is thought to increase the risk of nephrolithiasis. Thus, a 24-h urinary Ca > 400 mg/day measurement was considered a stand-alone indication for parathyroidectomy [17, 18]. However, in some subsequent studies, it was observed that there was no significant relationship between hypercalciuria and nephrolithiasis [19]. Until the last update guide, hypercalciuria was not considered as a surgical indication alone and biochemical stone risk analysis is recommended for patients with hypercalciuria [20]. In the last guideline published in 2022, a 24-h urinary Ca excretion of >300 mg in men and of >250 mg in women was considered as an indication for surgery [21]. In our study, no significant relationship was found between the 24-h urinary Ca level and the presence of nephrolithiasis.

The Mg/P and MgxP values established within the study were significantly lower, while Ca/Mg and cCa/Mg values were significantly higher in patients with nephrolithiasis. The ability of Ca, cCa, Mg, Mg/P, and MgxP parameters to identify the presence of nephrolithiasis with the specified cutoff values was weaker than the Ca/Mg and cCa/Mg parameters. From this point of view, it may be hypothesized that the relationship between serum Mg and serum Ca is more valuable in evaluating nephrolithiasis than the relationship between serum Mg and serum P. The sensitivity and specificity values calculated for Ca/Mg (74%/73%) and cCa/Mg (73.3%/73%) in detecting nephrolithiasis show that these parameters can be used instead of urinary calcium excretion. While Ca/Mg and cCa/Mg values can be calculated simply, patients must collect urine for 1 while following an appropriate diet for 24-h urinary Ca excretion. In addition, because Ca is today checked more frequently in routine laboratory tests today, patients can be diagnosed with PHPT at an earlier period and before disease complications develop. Since some of the patients included in the study may have been diagnosed early in this way, it should be considered that such complications as nephrolithiasis may not yet have developed.

When patients were evaluated according to DEXA-BMD results, statistically significantly higher serum Ca, cCa, ALP, and PTH values were observed in patients with osteoporosis. Serum P and Mg values were not significantly different between the groups. None of the Mg/P, MgxP, Ca/Mg, and cCa/Mg values showed a statistically significant difference when the patients were grouped according to DEXA-BMD results. Similar results were obtained when osteoporosis and osteopenia subgroups were combined and compared with patients with normal BMD. In 2007, Song et al. investigated the effects of Ca and Mg levels and the Ca/Mg ratio on DEXA-BMD in healthy premenopausal women. As a result of this study, it was concluded that the Ca/Mg ratio has a positive relationship with spine DEXA-BMD results [22]. Due to the relationship detected in this study, the relationship we expected between the high Ca/Mg ratio and lower DEXA-BMD results may not have emerged in our patient group. Additionally, since our population consisted of patients diagnosed with PHPT, a positive correlation was not detected between Ca/Mg and DEXA-BMD results as in this previous study. According to these results, serum Mg evaluated alone or in relation to serum Ca and serum P can not be a guide for development of osteoporosis in PHPT.

According to the correlation analysis, as the volume of surgical material increases, it is expected that Ca/Mg, cCa/Mg, and Mg/P values will increase, and MgxP values will decrease. Considering that lower MgxP and higher Ca/Mg and cCa/Mg values are observed in patients with nephrolithiasis, it can be indirectly concluded that as the volume of surgical material increases, the probability of nephrolithiasis development increases.

As PTH levels increase in PHPT patients, higher serum Ca values and lower serum Mg values are expected [2, 11]. From this point of view, it can be expected that Ca/Mg and cCa/Mg values will increase as the PTH value increases. However, in our study, neither parameter correlated with PTH levels. This may be due to the fact that the main reason for the changes in serum Ca levels in PHPT patients is PTH, while the changes in serum Mg levels occur due to the effects of both PTH and hypercalcemia [5, 7].

Limitations of the study include the fact that a direct causal relationship cannot be established between the mentioned parameters and nephrolithiasis. However, these data can be confirmed with large prospective studies.

Conclusion

While the relationship of serum Mg with serum Ca and serum P could be used to determine the presence of nephrolithiasis in PHPT patients, it was not found helpful in the evaluation of osteoporosis. Ca/Mg and cCa/Mg ratios in particular seem more valuable in identifying nephrolithiasis than the currently used 24-h urine Ca measurement. In addition, unlike urinary Ca measurements, they are cheaper, more practical, and more accessible. Confirmation of these data with large prospective studies will strengthen the findings.