Cannabis-based products for medicinal use will be available for specialist doctors to prescribe legally.