DM, R. v  EWCA Crim 203, February 11, 2021, at paragraph 28:
…The fact that an offender had a reduced life expectancy was not generally a reason that should affect sentence. A serious medical condition, even when this was difficult to treat in prison, would not automatically entitle an offender to a lesser sentence than would otherwise be appropriate. An offender’s serious medical condition might enable a court as an act of mercy, and in the exceptional circumstances of a particular case, rather than by virtue of any general principle, to impose a lesser sentence than would otherwise be appropriate. It was also held, applying established authority, that the sentencing court is fully entitled to take account of a medical condition by way of mitigation as a reason for reducing the length of the sentence, either on the ground of the greater impact which imprisonment will have on the appellant or as a matter of generally expressed mercy in the individual circumstances of the case. Those who are gravely ill or severely disabled, or both, may well have to be imprisoned if they commit serious offences. Their condition cannot be a passport to absence of punishment.