Image copyright Getty Images Image caption A report describes a "fragmented approach" being taken around Wales with no national policy

Patients are being put at risk because of a lack of staff awareness about discharging them from hospital, a report has said.

Terminally ill patients with days left to live are among those this has impacted on, it said.

The Healthcare Inspectorate Wales (HIW) report said "significant attention" was needed at hospitals.

A Welsh Government spokesman said systems were being rolled out to improve the situation.

HIW deputy chief executive Alun Jones said the inspectorate had come across examples where GPs were left to chase hospital staff for information on terminally ill patients who had been discharged.

"We saw a case where a patient had been discharged from hospital and they were terminally ill with cancer, and sadly only had a couple of days left to live," said Mr Jones.

"During that period of time - the last two days of their life - the GP spent a considerable amount of time seeking further information from the hospital on the kind of medication that patient should receive and providing the best care for them."

HIW called for more discussions between professionals and families about how and when discharge will take place, and said poor IT systems were stopping GPs getting enough relevant information.

Without a national approach for addressing so-called "bed blocking", health board policies were "fragmented", chief executive Dr Kate Chamberlain said.

Dr David Bailey, chairman of the British Medical Association's council for Wales, explained that some problems stemmed from transferring patients' large files between physical and electronic formats.

"The problem is transferring electronically between systems and there are still a couple of glitches there which mean large files can't be transferred properly," he said.

"It is boring stuff but important for patients, especially patients who have these large files."

Image copyright PA Image caption Calls have been made for more talking between professionals in hospitals and the community

The report said the way a patient was discharged from hospital was "critical to the effectiveness of their ongoing care in the community".

It made 13 recommendations and observations, including:

The process is more efficient where ward-based pharmacy staff are used

Using an electronic discharge system was found to give better and quicker information to GPs

Insufficient engagement with patients and families on how and when discharge will occur

Calls for greater clarity of the professionals involved in the process, with stronger relationships between GPs and hospitals

While describing the quality and timeliness of discharge across Wales as "variable", the report said progress was being made.

But it said professionals needed to take "greater responsibility", adding: "We found that all health boards had appropriate policies in relation to discharge.

"However, there appears to be a lack of awareness and understanding of these processes from staff on some wards and this lack of clarity, combined with poor IT infrastructure and a failure amongst professionals to take responsibility for effective communication, can put patients at risk."

Dr Chamberlain said: "Addressing this requires each professional involved in a patient's care to take responsibility for their part in effective discharge."

A Welsh Government spokesman said a number of IT methods were either being implemented or reviewed.

"The Medicines Transcribing and e-Discharge system is currently being rolled out to all hospitals in Wales, providing GPs with immediate access to high quality electronic discharge information," he said.

"We are also increasingly sharing this information with patients' nominated community pharmacists to ensure that any changes to medicines made in hospital are continued in the community."

He added that the systems used by NHS Wales were being reviewed.

The Royal College of Nursing in Wales said it particularly identified with the needs to strengthen relationships between hospitals and those in community care roles.

"Discharge liaison nurses would be ideally placed to do this," said associate director Helen Whyley.

"The NHS needs to increase their numbers and develop their roles if it wants to deliver the Welsh Government's prudent healthcare principles in this area."

Ms Whyley called for improved electronic discharge planning "as a matter of urgency", adding: "Nurses understand how patients need to be at the centre of their care and by ensuring adequate numbers of nurses, research shows outcomes are improved, including discharge planning."