In any case in which an individual is sentenced to a period of imprisonment as a result of a conviction for violating a provision of this chapter, the judicial officer imposing the sentence shall consider assigning that individual to a daytime work release program. Any work release program permitted under this section shall be certified by the Drug and Alcohol Treatment program administration as being consistent with any drug and alcohol treatment requirements imposed under section 3814 (relating to drug and alcohol assessments).