Drug Testing

What are laws on work related drug-testing? Does the doctor recommendation hold strong or is it a fight?