The mental health pressure group, MIND, believes that if the action of the doctor and hospital managers is upheld, it will open a loophole in the law.
Lawyers for the woman, Eleanor Mulcahy, 39, of Clapham, south London, were asking for a writ of habeas corpus (the right, enshrined in Magna Carta, not to be detained without trial) arguing that the doctor and hospital managers at the South Western Hospital in Clapham had to abide by the findings of the Mental Health Review Tribunal.
Miss Mulcahy, who has four children aged between two and eight, had first applied for a writ of habeas corpus on 21 December, hoping to spend Christmas at home with her family. The judge then ordered yesterday's hearing before Mr Justice Laws to be at the earliest possible date. Only emergency courts sit in the legal vacation between Christmas and new year.
Patients can be detained under the Act if two doctors and a social worker think they may be a danger to themselves or others, or if they refuse proper treatment outside hospital.
Robert Buchan, for Miss Mulcahy, said she had first been detained under section 4 of the 1982 Mental Health Act on 30 November for three days, after lighting fires inside her flat.
The court heard she had taken tiles off the bathroom wall to make a base for the fires, because all the power to the block of flats had been cut off by a flood. She had also been cooking over a fire in a bucket.
On 3 December she was detained for a further 28 days under section 2 of the Act. She had then absconded from 4-7 December, after complaining of side effects from drugs she was being treated with.
The next day Dr Robin Lawrence had examined her and noted that she needed to be treated with a new drug, and to be in hospital for some weeks. He described her in a report to the hospital's managers as 'totally lacking in insight'.
The patient wrote to Dr Lawrence saying she had no confidence in him, and saying she would be prepared to be treated by another doctor, and appealed to a Mental Health Review Tribunal. The Mental Health Act says tribunals must be held within seven days, and Miss Mulcahy's case was heard on 16 December.
The tribunal, heard by a panel of three, a doctor, a lawyer and a lay member, had heard evidence from witnesses including Dr Lawrence, and ordered that Miss Mulcahy should be released three days later.
Mr Buchan told the judge yesterday that Dr Lawrence had then arranged for the patient to be detained again under a different part of the Act, section 3. Mr Buchan argued that this was an abuse of powers, because there had been no deterioration in Mis Mulcahy's condition between the two events.
Parliament had intended to remove the power to detain patients from medical personnel and give it to statutory tribunals, he argued. 'The status of a tribunal is not one which can be ignored by medical personnel,' he said.
Richard Gordon, for Dr Lawrence and the hospital managers, said the Mental Health Act intended it to be possible for section 3 to be used for a new detention if a tribunal had ordered release on a section 2 hearing.
The case is expected to end today.