The way hospitals record deaths could be covering up poor treatment and costing lives, according to a new report.

Figures show a dramatic rise in the number of people recorded as needing "palliative care" at the end of their lives, with some hospitals saying more than 35% of their patients die this way.

Experts fear hospitals could actually be hiding the fact patients were admitted for treatment which then failed.

Some hospitals may also be "fiddling" the figures to make their death rates appear better than they actually are, they said.

Data from health analysts Dr Foster shows that, across England in 2012/13, 36,425 deaths were coded as palliative - meaning people received some sort of care to relieve suffering at the end of their lives.

This was 17.3% of the total number of deaths and is almost double the 9.1% (2,1130) recorded as needing palliative care in 2008. In 2006, just 3.3% of deaths were palliative.

Some hospital t rusts have massively outstripped this national rise. Out of 142 hospital trusts in the report, almost half (60) recorded the number of people needing palliative care in 2012 as higher than the national average.

At East and North Hertfordshire NHS Trust, 43.18% (785 deaths) were recorded as palliative in 2012. In 2008, just 9.92% of deaths recorded by the trust were for palliative care.

At King's College Hospital NHS Foundation Trust, 38.41% (472 deaths) were coded the same way in 2012 (compared with just 8.71% of deaths in 2008).

Meanwhile, 38.03% (610 deaths) at Aintree University Hospital NHS Foundation Trust were palliative in 2012 - almost double the 19.24% in 2008.

Guy's and St Thomas' NHS Foundation Trust in London jumped from having 1.18% of deaths recorded as palliative in 2008 to 31.65% in 2012 - a 27-fold rise.

The Royal Liverpool and Broadgreen University Hospitals NHS Trust also jumped from 1.35% palliative deaths in 2008 to 29.23% in 2012.

Most of the 20 trusts with the biggest leaps in their palliative care coding have also significantly improved their performance on death rates between 2008 and 2012.

Palliative care deaths are taken into account when calculating the hospital standardised mortality ratio (HSMR), which compares the expected rate of death in a hospital with the actual rate of death.

Professor Sir Brian Jarman, from Imperial College London, developed the HSMR. He told the inquiry into the scandal at Mid Staffordshire that some trusts increased their coding of palliative care deaths to reduce overall death rates.

He said Mid Staffs was one of them - but such huge leaps could only occur if trusts suddenly became terminal care hospitals overnight.

Of the latest Dr Foster figures, he said: "I can't read their minds but when you see these really dramatic shifts you have to ask, did they become a palliative care hospice overnight?

"I am concerned that trusts know that increasing their palliative care rates assists their HSMR and am concerned that this could be the reason they are doing it."

Roger Taylor, director of research at Dr Foster, said some trusts had changed the way they recorded deaths as a means of improving monitoring of palliative care.

But he said there were "real concerns around the gaming of indicators", adding: "Whether or not you are doing it deliberately, the end result is that the variation in coding may disguise poor outcomes."

He said "imprecise rules" governing how hospitals code deaths was harming patient care, may distort death rates and needed urgent review.

"The rules are too vague," he said. "Poor quality data is harming patients because you can't see where things are going wrong and you can't see where there are issues.

"If the data is not being recorded consistently and, moreover, if that isn't picked up because of a lack of auditing there is a risk that poor patient care is being disguised, and the public misled.

"We're worried this issue is not being given sufficient priority. The bottom line is it could increase the possibility of failing to identify another Mid Staffs and potentially cost lives."

Mr Taylor said there had been little will at government level to deal with the issue, even though the Department of Health, NHS England and the Health and Social Care Information Centre were aware of it.

"There seems to be remarkably little desire to grapple with this problem," he said. "It does need to be dealt with much more urgently."

He added: "The trends we are seeing are troubling - they are deeply concerning."

Tory MP Charlotte Leslie, a member of the House of Commons health committee, said: "This is very worrying data.

"We already know that at the time of the Mid Staffs scandals, hospitals were fiddling the figures to massage their mortality rates.

"These figures suggest that hospitals are still fiddling the figures to put their own reputation and that of their managers ahead of patient safety.

"We need strict scrutiny of this and we should hold anyone deliberately fixing the figures to account. Deliberately hiding the truth must be a punishable offence in our NHS."

Joyce Robins, from Patient Concern, said: " Hospitals are clearly fiddling these figures and that frightens me. Hospitals are just not open enough to admit what is happening - instead they dream new ways to disguise it. All the talk of transparency is just that - talk."

Whistleblower Gary Walker, the former head of United Lincolnshire Hospitals Trust, said: "In the NHS, if it looks like a trust is fiddling the numbers it probably is."

He claims he was sacked because of a row over a waiting times target when he tried to flag up problems.

He said: "Between 2008 and 2012, many consultancies advised NHS trusts to increase the rate of palliative care coding in order to 'more accurately reflect their particular death rate'.

"But with most NHS trusts reporting one in 10 palliative care deaths and some here reporting almost one in two, there is something very suspicious going on.

"The Department of Health should investigate whether this is gaming to make death rates look better than they really are."

A Department of Health spokesman said: "The NHS needs high-quality mortality data. We would expect that all NHS Trusts have robust auditing systems in place."

An NHS England spokeswoman said: "It is important that data recording about patient admissions is consistent and accurate so that providers and commissioners of healthcare as well as patients and the public have reliable information about the quality of care.

"The Dr Foster report raises serious concerns which should give providers cause for reflection. Organisations have a responsibility to submit accurate and honest data, while the Health and Social Care Information Centre has a statutory duty to fully and publicly assess NHS data quality, giving national advice and guidance to help resolve problems and issues."