Abstract
Background:
Studies have suggested that patients with prior gastric bypass may be at increased risk for hypocalcemia following thyroidectomy. Unfortunately, most of these studies are limited to case reports and small series. This study represents the largest sample size to date to assess the incidence of post-thyroidectomy hypocalcemia in patients with a history of bariatric surgery.
Methods:
The TriNetX Research Network was queried to retrospectively identify patients with prior bariatric surgery who underwent total thyroidectomy between 2011 and 2021. The incidence of hypocalcemia following surgery was compared with patients who underwent total thyroidectomy, and hemithyroidectomy with no history of bariatric surgery.
Results:
We identified 446 patients with a history of bariatric surgery and subsequent thyroidectomy, 29,346 patients with total thyroidectomy, and 19,603 patients with hemithyroidectomy alone. The one-month incidence of hypocalcemia was 54.7% in those with a history of bariatric surgery who underwent thyroidectomy, 43.9% in those with thyroidectomy alone (relative risk, RR = 1.2 [confidence interval, CI 1.1–1.4], p < 0.001), and 8.1% in those with hemithyroidectomy only (RR = 6.8 [CI 6.1–7.4], p < 0.001). Permanent hypocalcemia was documented in 11.4% of patients with prior bariatric surgery who underwent thyroidectomy, 7.7% of those with thyroidectomy only (RR = 1.5 [CI 1.1–1.9], p = 0.003), and 2.9% of patients with hemithyroidectomy alone (RR = 3.9 [CI 3.0–5.2], p < 0.001). Significant differences persisted after matching demographics, prior need for supplementation, and risk factors for hypocalcemia after thyroidectomy. When stratified by bariatric procedure, patients with a history of Roux-en-Y gastric bypass (RYGB) (n = 35) had a greater, although not statistically significant, risk of short-term hypocalcemia (51.4%; RR = 1.2 [CI 0.8–1.6], p = 0.37), and a significantly increased risk of permanent hypocalcemia (20.0%; RR = 2.6 [CI 1.3–5.1], p = 0.005) compared with thyroidectomy alone. Sleeve gastrectomy (SG) (n = 40) was not associated with an increased risk of short-term (40.0%; RR = 0.9 [CI 0.6–1.3], p = 0.62) or permanent (7.5%; RR = 1.0 [CI 0.3–2.9], p = 0.96) hypocalcemia.
Conclusions:
Prior RYGB, but not SG, may increase the risk of permanent hypocalcemia after thyroidectomy. Additional research is necessary to determine optimal prevention and treatment strategies to reduce morbidity in this population.
Introduction
Obesity is associated with significant health risks, 1 and its prevalence continues to increase in the United States. 2 Bariatric surgery is an effective treatment option for morbid obesity and associated complications. 3,4 Bariatric procedures include Roux-en-Y gastric bypass (RYGB), sleeve gastrectomy (SG), biliopancreatic diversion (BPD), and laparoscopic adjustable gastric band (LAGB). The weight loss mechanisms of these procedures vary: RYGB and BPD result in weight loss through malabsorption, while SG and LAGB function through restrictive processes. These mechanisms are also responsible for some of the complications associated with bariatric surgery, including nutritional deficiencies such as vitamin D deficiency, secondary hyperparathyroidism, and hypocalcemia. 5 –7 The rate of vitamin D deficiency following bariatric surgery has been reported to range from 30% to 60%, whereas 15–48% of patients have hypocalcemia. 8,9
Hypocalcemia is a known complication of thyroidectomy, affecting up to 60% of patients. This hypocalcemia is transient in most cases, but may be permanent in up to 7%. 10 This deficiency occurs secondary to intraoperative trauma, gland devascularization, or erroneous excision of the parathyroid glands. 11 Iatrogenic hypocalcemia can lead to a prolonged hospital course, increased medical costs, 12 significant long-term morbidity, 13 and a decreased quality of life. 14
The number of patients undergoing bariatric surgery for obesity is on the rise. 4 A growing body of literature indicates that patients with previous bariatric surgery may be at an increased risk for post-thyroidectomy hypocalcemia due to compounding pathology. However, prior studies have relied on small sample sizes. 15,16 The current study represents the largest sample size to date to assess hypocalcemia incidence among patients with a history of bariatric surgery and subsequent thyroidectomy.
Materials and Methods
Data for this retrospective cohort study were collected on July 24, 2022, from the TriNetX Research Network (Cambridge, MA), which included electronic medical records from over 88 million individuals and more than 50 health care organizations (HCOs) across the United States. The TriNetX Research Network provides users with uniformly processed clinical data, including demographics, diagnoses, imaging, laboratory results, medications, procedures, and other interventions. 17 TriNetX is compliant with the Health Insurance Portability and Accountability Act (HIPAA). Any data displayed on the TriNetX platform in aggregate form, or any patient-level data provided in a data set generated by the TriNetX platform, only contain deidentified data as per the deidentification standard defined in Section §164.514(a) of the HIPAA Privacy Rule. The Penn State Institutional Review Board reviewed and approved STUDY00018629 as exempt according to institutional policies and applicable federal regulations and the need for informed consent was waived. The study was conducted following relevant guidelines and regulations.
The database was queried using International Classification of Diseases and Current Procedural Terminology codes to identify patients over 18 years of age who underwent total thyroidectomy between 2011 and 2021. Patients were grouped according to whether they had a history of bariatric surgery, which was defined by procedure codes for bariatric surgery (RYGB, SG, LAGB, BPD) or a diagnosis code indicating bariatric surgery status. Patients were excluded if they did not have a recorded calcium laboratory value within the first month following thyroidectomy. To ensure that patients were not lost to follow-up, they were additionally excluded if they did not have a medical visit six months or more after surgery. Hypocalcemia was defined as any serum calcium laboratory value <8.5 mg/dL or ionized calcium <4.7 mg/dL or <1.2 mmol/L. Although there may be variability in the definition of hypocalcemia among laboratories, these values are commonly accepted. 18 The diagnosis and procedure codes utilized to execute this search strategy are listed in Supplementary Data S1, and a participant flow chart is located in Figure 1.

Participant flow chart. BPD, biliopancreatic diversion; LAGB, laparoscopic adjustable gastric band; RYGB, Roux-en-Y gastric bypass; SG, sleeve gastrectomy.
Using the Compare Outcomes tool within the TriNetX database, the incidence of hypocalcemia was determined during three time frames: from the time of surgery through the first month, from one month to six months, and from six months to one year following surgery.
As a means of ensuring the accuracy of the data, the rate of hypocalcemia was also compared with a group who underwent hemithyroidectomy alone, as it was not expected that these patients would have hypocalcemia. Hypocalcemia that persisted beyond six months was defined as permanent. 19 For patient records with documentation regarding the specific bariatric surgery they underwent (RYGB, SG, LAGB, BPD) and subsequent thyroidectomy, additional analyses were performed to compare the risk of hypocalcemia in these patients to those who underwent thyroidectomy alone.
Statistical methods
Statistical analyses were performed within the TriNetX platform, which utilizes JAVA, R, and Python software. Relative risks and associated confidence intervals were used to calculate the risk of hypocalcemia related to thyroidectomy in patients with prior bariatric surgery compared with patients with total thyroidectomy or hemithyroidectomy alone. Furthermore, the risk of hypocalcemia after thyroidectomy in patients with a specified bariatric procedure type (RYGB or SG) was compared with patients who underwent total thyroidectomy alone. t-Tests were performed to determine whether there were differences in mean serum/ionized calcium, calcidiol, and parathyroid hormone (PTH) levels between each cohort during multiple ranges of time before and after surgery.
To balance potential confounding variables, additional similar analyses were conducted after matching the cohorts according to demographics (age, sex, race, and ethnicity) as well as the need for calcium, vitamin D, or magnesium supplementation before the date of thyroidectomy. Next, a sensitivity analysis was performed matching for demographics as well as other risk factors for hypocalcemia after thyroidectomy, which have been previously described (diagnoses of thyroid cancer, Graves' disease, or autoimmune thyroiditis, and surgical factors, including central/lateral neck dissection, parathyroid autotransplantation, vocal cord paralysis due to damage to the recurrent laryngeal nerve, and prior/concurrent parathyroidectomy). 20 Matching was conducted through 1:1 propensity score, nearest neighbor matching without replacement, with a caliper of 0.1 times the standard deviation. TriNetX utilizes matrices of covariates with rows in randomized order to obtain propensity scores through logistic regression. Statistical significance was defined as p < 0.05.
Results
There were 29,792 patients who underwent total thyroidectomy who met inclusion and exclusion criteria for analysis. The number of individuals at each stage of the study and reasons for exclusion are displayed in Figure 1. The average age was 50.7 at the time of thyroidectomy and there were 77% females and 23% males. The most common indication for thyroidectomy was thyroid cancer (50.0%, n = 14,912), followed by Graves' disease (14.1%, n = 4195), autoimmune thyroiditis (13.5%, n = 4018), and toxic multinodular goiter (6.3%, n = 1874). The remaining 16.1% (n = 4793) had another indication for thyroidectomy. Of the total cohort, 29,346 patients underwent total thyroidectomy with no history of bariatric surgery, whereas 446 had a history of bariatric surgery. Complete sample demographics and relevant clinical and surgical characteristics before and after matching are described in Table 1.
Demographic and Clinical Characteristics of the Study Population (n = 29,792)
Incidence of hypocalcemia after surgery
Patients with a history of bariatric surgery who underwent thyroidectomy had significantly increased hypocalcemia rates within 0–1 months, 1–6 months, and 6–12 months following surgery than those who received thyroidectomy alone. The rate was also significantly increased at all time points compared with an additional cohort of 19,603 patients who underwent hemithyroidectomy alone. The incidence of hypocalcemia following surgery in each cohort are listed in Table 2.
Incidence of Hypocalcemia After Surgery (Before Matching)
RRs, associated [CIs], and p-values compare rate of hypocalcemia in patients with bariatric surgery before total thyroidectomy to patients with total thyroidectomy or hemithyroidectomy alone.
CI, confidence interval; RR, relative risk.
Type of bariatric surgery performed before thyroidectomy
Three hundred fifty-eight patients who underwent thyroidectomy after bariatric surgery had no additional documentation regarding the type of bariatric surgery. Out of 88 patients with a known surgery type, 40 underwent SG, 35 underwent RYGB, <10 underwent LAGB, and <10 underwent BPD. The rates of hypocalcemia at different time points following surgery are displayed in Table 3. Among patients with a history of RYGB, the incidence of hypocalcemia within the first month following thyroidectomy was increased compared with thyroidectomy alone, although this did not achieve statistical significance. The rates of hypocalcemia between 1 and 6 months and permanent hypocalcemia recorded between 6 and 12 months were significantly increased compared with thyroidectomy alone. Conversely, there were no significant differences in the incidence of hypocalcemia after thyroidectomy during any of the time periods analyzed in patients with prior SG compared with thyroidectomy alone. LAGB and BPD procedures were unable to be analyzed due to small counts.
Incidence of Hypocalcemia After Surgery According to Bariatric Surgery Type
RRs, associated [CIs], and p-values compare rate of hypocalcemia in patients with a history of RYGB or SG before thyroidectomy to patients after total thyroidectomy alone.
RYGB, Roux-en-Y gastric bypass; SG, sleeve gastrectomy.
Biochemical values before and after surgery
A comparison of mean serum calcium, ionized calcium, calcidiol, and PTH levels at different time points before and after thyroidectomy between patients with and without a history of bariatric surgery is presented in Table 4. On average, both cohorts experienced a sudden drop in calcium and PTH following thyroidectomy, which subsequently recovered over time. Patients with a history of bariatric surgery had a lower pre- and postoperative serum calcium and increased PTH. A small percentage of patients obtained ionized calcium or calcidiol levels, therefore, these were difficult to analyze.
Pre- and Postoperative Biochemical Values
There are multiple laboratory codes indicating serum calcium and ionized calcium, however, these values represent the most commonly documented code for each.
PTH, parathyroid hormone.
When stratified by bariatric procedure type, patients with RYGB had a lower serum calcium level at all time points compared with the thyroidectomy alone cohort, although not always statistically significant. Conversely, patients with prior SG had no difference in serum calcium in the preoperative or immediate postoperative period compared with thyroidectomy alone, and actually had an increased calcium level at prolonged follow-up of 6–12 months.
Biochemical values of patients who had an instance of laboratory-defined hypocalcemia within the first month following thyroidectomy are presented in Table 5. Despite both groups experiencing hypocalcemia, the bariatric surgery group frequently had lower average serum calcium and increased PTH levels compared with those who underwent thyroidectomy alone. The mean calcium levels in both groups were below the normal range within the first week following surgery, however rose to within the normal range by the end of the first month.
Pre- and Postoperative Biochemical Values in Patients with Postoperative Hypocalcemia
There are multiple laboratory codes indicating serum calcium and ionized calcium, however, these values represent the most commonly documented code for each.
Propensity score matching and sensitivity analysis
After propensity score matching for age, sex, ethnicity, race, and prior need for calcium, vitamin D, or magnesium supplementation, patients who underwent thyroidectomy with prior bariatric surgery continued to have significantly increased rates of hypocalcemia at all time periods after surgery compared with the total thyroidectomy or hemithyroidectomy groups (Table 6). A sensitivity analysis was performed controlling for demographics as well as diagnoses of thyroid cancer, Graves' disease, and autoimmune thyroiditis, and surgical factors, including central/lateral neck dissection, parathyroid autotransplantation, vocal cord paralysis, and parathyroidectomy. This analysis demonstrated similar findings (Table 7).
Incidence of Hypocalcemia After Surgery (After Matching for Demographics and Prior Calcium, Vitamin D, and Magnesium Supplementation)
RRs, associated [CIs], and p-values compare rate of hypocalcemia in patients with bariatric surgery before total thyroidectomy to patients with total thyroidectomy or hemithyroidectomy alone.
Incidence of Hypocalcemia After Surgery (Sensitivity Analysis, Matched for Demographics, Clinical Diagnoses, and Surgical Factors)
Postoperative care
Among patients with a history of bariatric surgery who underwent thyroidectomy, 88% (n = 391) had a documented prescription for calcium, and 52% (n = 234) had a prescription for calcitriol postoperatively. Patients who underwent thyroidectomy alone were less likely to be prescribed calcium (82%, n = 24,061) or calcitriol (42%, n = 12,437) following surgery. For those with permanent hypocalcemia, 96% (n = 49) and 94% (n = 2120) of patients in the bariatric group and the total thyroidectomy alone group had a documented prescription for calcium, respectively. Furthermore, 88% (n = 45) and 81% (n = 1827) of these patients in each respective group had a prescription for calcitriol.
Discussion
A growing body of literature suggests that prior RYGB increases the risk of recalcitrant, symptomatic hypocalcemia after subsequent thyroidectomy. 15,16 With the largest sample size to date, our study found that over half of patients with prior bariatric surgery experienced hypocalcemia within the first month following thyroidectomy. In addition, just over 10% of patients in this cohort had permanent hypocalcemia beyond six months. A systematic review by Spartalis et al analyzed 17 case reports and small series describing this phenomenon, with 126 combined cases. 15 The largest of the studies in the review was 1 of 48 patients by Chereau et al, which found the rate of hypocalcemia in this patient population to be 40%, which was significantly greater than matched controls who underwent thyroidectomy alone. 21
While an increased risk of nutritional deficiencies has been described following all types of bariatric surgery, 22,23 procedure type may play a role in hypocalcemia risk determination after subsequent thyroidectomy. In the current study, the rate of permanent hypocalcemia after thyroidectomy in patients with a history of RYGB specifically was 20%, over 2.5 times the rate of those who underwent thyroidectomy alone. This finding is consistent with studies by Chereau et al and Cali et al, which reported the risk of hypocalcemia to be most significant in those with a history of RYGB. 21,24 On the contrary, we found that a history of SG did not impose additional hypocalcemia risk during any time frame compared with thyroidectomy alone.
Both Cali et al and a recent study by Tramontano et al also found no difference in the incidence of hypocalcemia between those with prior restrictive procedures compared with thyroidectomy alone. 24,25 Chereau et al noted an increased risk of hypocalcemia for restrictive procedures compared with controls; however, the risk was less than that imposed by malabsorptive procedures. 21 The potentiated risk of hypocalcemia following thyroidectomy in patients with a history of RYGB seen in our study and others may be explained by increased malabsorption compared with restrictive procedures such as SG and LAGB.
Although patients in the bariatric surgery and thyroidectomy group were more prone to hypocalcemia, they had increased postoperative PTH levels compared with individuals who underwent thyroidectomy alone. Elevated PTH in patients with prior bariatric surgery can be explained by secondary hyperparathyroidism, 26 and is an indication that the potentiated risk of hypocalcemia experienced by this group after thyroidectomy was not mediated by a deficiency of PTH. Rather, it is likely that these patients, specifically those with prior RYGB, had decreased absorption of supplemental calcium and vitamin D postoperatively that predisposed them to hypocalcemia. The risk of hypocalcemia may be compounded by the fact that many bariatric surgery patients develop a dietary intolerance to calcium-containing food products. 27
It is important to raise awareness of this complication among bariatric and thyroid surgeons for consideration in their evaluation of surgical candidates. It has been recommended that patients undergo precautionary thyroid screening before bariatric surgery, and any indications for thyroid surgery be addressed first. 16 While there is no standard of care for patients with a history of gastric bypass who undergo thyroidectomy, preventative and treatment strategies have been proposed. 15,16 Concerning the prevention of hypocalcemia, calcium and vitamin D supplementation four to six weeks before surgery, staged thyroidectomy, and immediate postoperative initiation of intravenous (IV) calcium gluconate have been successful in high-risk patients. 16,28,29 Some experts have suggested a prophylactic two-week regimen of calcium citrate followed by one to two weeks of calcium carbonate after surgery. 16 Management strategies for patients who develop hypocalcemia include prescription high doses of calcium citrate and calcitriol. 15
Repletion of magnesium is also recommended because hypomagnesemia can decrease the production of PTH. 30,31 If the maximum doses of calcium citrate and calcitriol are unsuccessful, a longer hospital stay may be warranted for the administration of IV calcium gluconate/acetate and vitamin D. 29 –37 Other options for hypocalcemia that is unresponsive to these measures are the PTH analog teriparatide, 38,39 thiazide diuretics, 40 or the combination of pancreatic lipase, calcium, magnesium, and vitamin D. 39,41,42 For patients with severe symptomatic hypocalcemia that cannot be resolved with medical management alone, surgical options have included elongation of the common limb of BPD or even bariatric reversal. 29,43,44
Our study represents the largest sample size to date of postbariatric surgery patients who underwent a subsequent thyroidectomy, and the use of a database that incorporated patients from over 50 HCOs increased the generalizability of the study. Capturing laboratory values directly from medical records gives TriNetX a distinct advantage over other databases, which commonly utilize a diagnosis code to identify hypocalcemia. The diagnosis code for hypocalcemia is likely to have a low specificity for biochemical hypocalcemia, while obtaining laboratory values increased our confidence that patients had active hypocalcemia.
Despite this, our study is not without limitations. As with any propensity score analysis, there is a possibility of incomplete or inexact matching, however, this is less likely given the large sample sizes of matched cohorts in our study. After matching, there was an imbalance of patients who underwent parathyroid autotransplantation, which may have slightly inflated the risk of hypocalcemia in the bariatric surgery cohort. Additionally, not all patients obtained laboratory values during each and every time window following surgery. This could not be expected given the retrospective nature of the study.
Therefore, it is possible that some patients may have had hypocalcemia but were not counted as such because they did not obtain laboratories. However, it is unlikely that patients were lost to follow-up, given that the data were obtained from large HCOs with multiple inpatient and outpatient facilities, and we required all patients to have a medical visit after six months. Therefore, it is much more likely that patients who did not have laboratories documented during the latter time periods truly did not have hypocalcemia. There may also be operator variability from surgeon to surgeon due to including records from 50 HCOs, which may have impacted reported rates of hypocalcemia. Finally, the specific type of bariatric surgery could only be obtained for a small group of patients. Therefore, future large-scale studies will be needed to test our initial conclusions regarding the risk of hypocalcemia following thyroidectomy in patients with a history of malabsorptive versus restrictive bariatric procedures. Additional research is also warranted comparing the effectiveness of proposed preventative and treatment approaches in this population.
In conclusion, previous RYGB may potentiate the risk of hypocalcemia after thyroidectomy, while SG may not be associated with any increased risk. Surgeons should communicate this with at-risk patients during the informed consent process. In addition, these patients require increased surveillance during the postoperative period. Further research is necessary to determine optimal prevention and treatment strategies to reduce morbidity in this patient population.
Footnotes
Authors' Contributions
F.J.L.: conceptualization (supporting), formal analysis (lead), methodology (equal), and writing—original draft (lead).
J.T.: conceptualization (supporting), formal analysis (supporting), methodology (equal), and writing—review and editing (equal).
E.N.M.: conceptualization (supporting), formal analysis (supporting), methodology (equal), and writing—review and editing (equal).
M.H.: conceptualization (supporting), formal analysis (supporting), methodology (equal), and writing—review and editing (equal).
T.S.K.: formal analysis (supporting) and methodology (equal).
D.G.: conceptualization (lead), formal analysis (supporting), methodology (equal), supervision (lead), and writing—review and editing (equal).
Author Disclosure Statement
No competing financial interests exist.
Funding Information
The project described was supported by the National Center for Advancing Translational Sciences, National Institutes of Health (NIH), through grant UL1 TR002014. The content is solely the responsibility of the authors and does not necessarily represent the official views of the NIH.
Supplementary Material
Supplementary Data S1
