Section 87A: Conditions of probation
Section 87A. The conditions of probation imposed by a court upon a person pursuant to section eighty-seven of this chapter, section fifty-eight of chapter one hundred and nineteen or section one or section one A of chapter two hundred and seventy-nine, may include, but shall not be limited to, participation by said person in specified rehabilitative programs or performance by said person of specified community service work for a stated period of time. If the court requires as a condition of probation that the defendant reside in alcohol and drug free housing within the commonwealth, the judge issuing the order shall require the probation officer to refer the defendant only to alcohol and drug free housing certified under section 18A of chapter 17 and the probation officer shall require the defendant to reside in such certified housing in order to satisfy such condition. If accredited alcohol and drug free housing is not available, the judge issuing the order may permit the probation officer to refer the person placed on supervised probation to alcohol and substance free housing that is available and that, in the judge's discretion, appropriately supports the recovery goals of the person. If the court imposes as a condition of probation that the person reside in alcohol and drug free housing in another state, the judge issuing the order may permit the probation officer to refer the person to alcohol and drug free housing that, in the judge's discretion, appropriately supports the recovery goals of the person. No person placed on probation shall be found to have violated a condition of probation: (i) solely on the basis of possession or use of a controlled substance that has been lawfully dispensed pursuant to a valid prescription to that person by a health professional registered to prescribe a controlled substance pursuant to chapter 94C and acting within the lawful scope of the health professional's practice; or (ii) solely on the basis of possession or use of medical marijuana obtained in compliance with and in quantities consistent with applicable state regulations if that person received a written certification from a healthcare professional for the use of medical marijuana to treat a debilitating medical condition and the person possesses a valid medical marijuana registration card and if the quantity in the person's possession is not greater than the amount recommended in the healthcare professional's written certification. If a person is required to submit a DNA sample pursuant to chapter 22E, such submittal and compliance with chapter 22E shall be required as a condition of probation.