A doctor has developed a model to predict when people will die and hopes to create a bedside test so that families can say a proper goodbye.
Dr Séamus Coyle, 53, from Liverpool, says he has developed a model to predict the time when lung cancer patients will die.
Dr Coyle, a consultant in palliative medicine at The Clatterbridge Cancer Centre, originally specialised in oncology - cancer care.
But he soon found he enjoyed sharing his knowledge with patients and families and helping their symptoms.
He now wants to help families with dying patients to allow them to say goodbye to loved ones before it's too late.
"They don't get a chance to say goodbye and that's really important. People live with that kind of guilt for the rest of their life", he said.
"But imagine you had something that says, 'Actually, you're shutting down, your family needs to be here'."
Dr Coyle has worked for years with cancer patients but he has never quite been able to figure out accurately when patients would die.
He said: "Despite decades of cancer research and 5,000 years of medicine, we do not know how cancer kills and predicting when someone dies of lung cancer is largely down to the judgement of a clinician as there is no accurate test available to determine this.
"What happens is people become unwell, the GP says 'It might be an infection, we'll give them antibiotics'.
"They're brought in, they're really unwell, their symptoms are worse, and there's that period of uncertainty."
"You go, 'It might be an infection, we don't know what's going on, we think they're unwell, they could be dying, they could be in the last weeks of life'. It's that vague if you're lucky."
Together Dr Coyle and other researchers have released a paper in the International Journal of Molecular Sciences which shows urine may be the key to predicting death.
In the paper, they said there is possible evidence of chemical changes in patients' urine in the final weeks before they die.
Co-author Professor Chris Probert, a consultant gastroenterologist at the Royal Liverpool Hospital, said it was the first study of its kind to use a study of biofluids to investigate the dying process.
He said: "Nearly 10 million people worldwide died from cancer in 2020 and lung cancer, with the highest mortality, was responsible for 1.8million deaths.
"Predicting when patients with advanced cancer are likely to die is challenging and no accurate test is available to determine this.
"However, early recognition that a person may be dying is central to all the priorities for improving people’s experience of care in the last days and hours of life."
In the study, 144 samples of advanced lung cancer patients were tested for any metabolic changes.
Dr Coyle said the smell of the urine is very important during the investigation.
He said: "We look at the components of smell. Basically, when you take urine and boil it to 60 degrees, everything that boils off is what's called the volatile organic compound - things you smell."
In the compound, the researchers found evidence of changes associated with the dying process in cancer.
From this, they were able to create a model to essentially predict the deaths of patients within the four weeks leading up to their death.
Dr Coyle said knowing the time of death of loved ones can help people decide whether they want to die at home, in a hospice or a hospital.
He also believes believes the same approach can be used to predict death from other causes.