When a person convicted in the circumstances mentioned in the second paragraph of Article 122-1 of the Penal Code has not been sentenced to socio-judicial supervision, the sentence enforcement judge may order, on the release of this person, if his condition justifies it and after medical advice, an obligation of care for a period that he fixes and which may not exceed five years in criminal matters or ten years if the acts committed constitute a crime or an offence punishable by ten years imprisonment. The last paragraph of Article 706-136 of this Code shall apply.