NHS Lothian faces a repair bill of almost £200 million to fix its ageing buildings.
The health board owns or leases around 300 properties across the area, many of which are not fit for purpose.
Now bosses have revealed the £188m cost of addressing the backlog, which includes repairing roofs, improving wards and making buildings more energy efficient.
They won’t even be able to use money raised from the sale of buildings to do this – as the Scottish Government ruled last year that all receipts from such sales would go straight back to Holyrood.
NHS sources said the state of some hospitals was affecting the quality of patient care and staff morale, but the health board said it was working hard to improve the situation.
The problem largely lies with the high number of Victorian and Georgian buildings.
The Royal Edinburgh, the city’s psychiatric hospital, is among the worst, with a range of buildings dating back around 200 years.
The cost has come at the wrong time for an organisation already having to make tens of millions of pounds of cuts.
Acting director of facilities George Curley said reducing the number of properties on the health board’s books was a priority. He said: “NHS Lothian has a substantial estate and we are responsible for the maintenance of more than 300 properties of varying age.
“Significant investment has been made in new buildings to allow us to reduce the size and age of our estate.
“We have also completed a comprehensive review of our buildings, maintenance needs and the investment required.”
Among the moves made is the sale of Deaconess House, a former hospital that latterly served as the administrative headquarters.
It is an approach the board is keen to build on, with the new offices at Waverley Gate – donated to it by the Scottish Government – presenting it with no maintenance cost.
Lothians Conservative MSP Gavin Brown said: “It’s certainly a worryingly high figure, especially when you think that is money which could be spent on the frontline.”
The breakdown of the buildings includes 96 properties owned outright by the health board, 108 leased – including the Edinburgh Royal Infirmary – and 100 GP-owned practices in which NHS Lothian has a “maintenance and legislative compliance role”.
One NHS Lothian source said: “Certainly the most pressing issue is at the Royal Edinburgh, which is a situation that really affects patients and the staff who work there.
“But there are parts of the Western General and some of the other older fleet which must be addressed.”