R v Hughes  EWCA Crim 841
The court's power to entertain an appeal against sentence is not, as a matter purely of jurisdiction, removed by the fact that there has been an earlier reference of the sentence by the Attorney-General; however, in all but the wholly exceptional case, the applications for extension of time and for leave to appeal would be refused.
The defendant's determinate sentence had, following a reference by the A-G, been quashed as being too lenient and substituted with a discretionary life sentence; six years later, having been transferred to hospital, he appealed against sentence, arguing that a hospital order with restrictions should be imposed.
On this occasion only the jurisdiction issue was considered.
The other issues are to be considered at a future hearing, including: (i) the application for extension of time (ii) the application for leave to appeal (iii) any application to adduce fresh evidence and, if those hurdles are successfully negotiated, (iv) the appeal. It will need to address (a) the medical condition of the defendant at the time of original sentencing, (b) his treatability, (c) the danger he presents, (d) the relationship between a hospital order and a discretionary life sentence, as to which see, inter alia, R v Drew  UKHL 25, R v IA  EWCA Crim 2077 and R v Beatty  EWCA Crim 2349, and (e) if a hospital order be appropriate, a restriction order, which requires two doctors.