Answer: yes it can.
The principle of individualization of the sentence means the Court can take into account the illness of an individual convicted of an offence when the time comes to impose a sentence.
In a recent judgment by the Quebec Court, an individual was convicted of a series of charges related to driving a vehicle while his faculties were impaired. This individual had similar records going back over ten years. He had been sentenced to two years for his last conviction in a case of driving under the influence. Taking into account among other things the fact that the defendant was in the terminal stage of cancer, the judge sentenced him to the minimum sentence of 90 days of imprisonment, which was equal to a five month sentence, if you added his custody pending trial.
A criminal defense lawyer is aware of the principles of determining the sentence recognized by the Criminal Code and jurisprudence.