Patients will be able to rate the treatment they receive in hospitals to ensure that people are treated with dignity and respect on wards, it will be announced on Friday.

The simple "friends and family test" will ask whether patients would recommend their hospital to loved ones.

The results will be published and hospital leaders who fail the test will be held to account.

Later on Friday David Cameron will announce that the test will be rolled out across wards in England from April 2013.

The PM said the data will give patients a clear idea of where to get the best care.

The Nursing and Care Quality Forum, which was announced in January to address concerns about the way some patients are treated, wrote to Cameron recommending the simple test.

The letter said: "It is critical that the NHS takes far greater notice of what people think about the quality of care they receive.

"An important way of doing this is asking people whether they would recommend the organisation where they have received care, should a loved one require treatment.

"We need to go further and faster with the friends and family test. We would like to see immediate roll out across the NHS with a view to developing a national measure as soon as practicable."

Cameron said: "To really make sure that patients get the right care, we're moving ahead quickly on one of their (Nursing Care and Quality Forum's) main recommendations - the friends and family test.

"In every hospital, patients are going to be able to answer a simple question, whether they'd want a friend or relative to be treated there in their hour of need.

"By making those answers public we're going to give everyone a really clear idea of where to get the best care - and drive other hospitals to raise their game."

Staff across the NHS are already asked if they would be happy for their friends and family to be treated at the place they work.

Forum chair Sally Brearley said: "The friends and family test is a useful way for staff to look at their place of work, and for patients to look at the quality of care they receive, and for them to judge whether they would be content for a loved one to use that service, should they need treatment.

"Our initial recommendations to the Prime Minister highlight the good work which many are already doing to ensure that nursing and care is of the best quality, and we want others to benefit from these lessons."

The Royal College of Nursing (RCN) welcomed the new test. RCN chief executive and general secretary Dr Peter Carter said: "We endorse the friends and family test of NHS services which is an important measure of how people perceive the care they are provided by their organisation.

"We look forward to contributing to this work as it develops and there must be a focus on acting on these results to ensure that continuous improvements are made.

"Giving nurses the time and resources to care - for example freeing them up to guarantee that they spend dedicated time with their patients and get the right administrative support - is crucial in ensuring confidence in care providers."

The Forum also recommended that nurses are recruited for their caring nature and compassion as well as their knowledge and skills.

Dr Carter added: "We are pleased to have been part of this important Forum which recognises that the vast majority of nurses provide excellent care.

"We welcome the recommendations which will build on this and improve the ability of nurses, by giving them the right resources and skills, to provide dignified and compassionate care across the board.

"It is important to note that this report wholeheartedly supports degree-level entry to nursing. Patient need is increasingly complex and requires staff with both academic knowledge and values of compassion, empathy and dignity.

"We support the idea that all these elements can be tested at an individual level. We also agree with the Forum that these are areas that everyone should focus on - not just nurses - and that leaders set the organisational tone for the values that their staff take on."

Shadow health secretary Andy Burnham said: "David Cameron now wants to hear the views of patients but it's a shame he wouldn't listen to them when they were pleading with him in their thousands to drop his bitterly contested NHS reorganisation.

"Today's announcement is good as far as it goes but it is no substitute for getting a grip on what matters to patients.

"On Cameron's watch, people are waiting longer in A&E and on trolleys in corridors. Wards are closing and almost 4,000 nursing posts are being lost.

"David Cameron needs to focus a bit less on headline-grabbing announcements and a bit more on dealing with the chaos that his reorganisation has inflicted on the NHS."