As a result, we provided care for approximately 15,000 inpatient COVID admissions or 13% of our total admissions, which was our highest quarterly case count to date.
This compared to more than 3,000 inpatient COVID cases during the second quarter and 9,500 during the first quarter.
On a same store and year over year basis, net revenue increased 7.1%.
Same store admissions increased 2.8% and adjusted admissions were up 4.7%.
Surgeries increased 1.5%, while ER visits were up 24.2%.
Looking at our third quarter volumes compared to the pre-pandemic third quarter of 2019, same store admissions decreased 3%, while surgeries declined 4%.
ER visits further improved and were up 1% versus 2019 due in large part to our freestanding ED expansion strategy as well as elevated levels of COVID visits and testing.
On a consolidated basis, adjusted EBITDA was $482 million.
Excluding pandemic relief funds, adjusted EBITDA was $463 million, which was up 7% year over year, with an adjusted EBITDA margin of 14.8%.
Compared to the third quarter of 2019 and excluding release pandemic relief fund, adjusted EBITDA increased 19%, and our adjusted EBITDA margin was up 280 basis points despite operating 19 fewer hospitals, which further validates our underlying confidence in the renewed core portfolio.
In terms of expense management, for more than 1.5 years now, the pandemic has created a continuously changing operating environment, requiring flexibility on a daily basis.
The recent completion of an OB and neonatal intensive care expansion at Grandview Medical Center in Birmingham, Alabama, where we have now added more than 70 beds over the past three years.
This includes the construction of 100 new beds at our two existing hospital campuses in that market and the early 2022 addition of a third hospital campus in North Naples, which will specialize primarily in orthopedic surgery and rehabilitation.
Net operating revenues came in at $3.115 billion on a consolidated basis.
On a same store basis, net revenue was up 7.1% from the prior year.
This was the net result of a 4.7% increase in adjusted admissions and a 2.3% increase in net revenue per adjusted admission, which faced a difficult comp from the prior year.
Excluding nonpatient revenue, which was lower year over year, net patient revenue per adjusted admission was up 3% compared to the prior year.
Adjusted EBITDA was $482 million.
During the third quarter, we recorded approximately $19 million of pandemic relief funds with no relief funds recognized in the prior year period.
Excluding those pandemic relief funds, adjusted EBITDA was $463 million, with an adjusted EBITDA margin of 14.8%.
Cash flows provided by operations were $400 million for the first nine months of 2021.
This compares to cash flows from operations of $2.1 billion during the first nine months of 2020.
The comparison versus the prior year is difficult as the $2.1 billion in cash flow from operations during the first nine months of 2020 included $1.159 billion of accelerated Medicare payments received and $715 million of pandemic relief funds received.
Excluding repaid Medicare payments, cash flows provided by operations were $667 million for the first nine months of 2020.
For the first nine months of 2021, our capex was $334 million compared to $317 million in the prior period.
Our capex was up 5% in the first nine months of this year despite operating fewer hospitals than a year ago.
In terms of liquidity, we continue to have no outstanding borrowings and approximately $728 million of borrowing base capacity under the ABL with the ability for that to increase up to $1 billion.
Also at the end of the quarter, we had $1.3 billion of cash on the balance sheet.
As of September 30, 2021, the company had $814 million of Medicare accelerated payments remaining to be repaid, which were recorded as a current liability on the balance sheet.
The updated full year 2021 guidance for net revenues is now anticipated to be $12.150 billion to $12.350 billion.
And adjusted EBITDA is anticipated to be $1.780 billion to $1.820 billion as we've increased our full year range.
Cash flow from operations is anticipated to be $800 million to $900 million, an increase of $75 million at the midpoint.
capex is now expected to be $450 million to $500 million, and net income per share is anticipated to be $1 to $1.20 based on a weighted average diluted shares outstanding of 129 million to 131 million shares.
Lastly, at the beginning of this year, we introduced our medium term financial goals, which included achieving 15% plus adjusted EBITDA margins, delivering positive free cash flow annually and reducing financial leverage below six times.
Looking at the past three quarters, we've made significant progress on these goals as we've expanded our EBITDA margin, driven strong positive free cash flow year to date and further reduced our leverage, which is 5.9 times as of September 30.

Summary:
Net operating revenues came in at $3.115 billion on a consolidated basis.