Scottish Ministers are under a duty to prepare, publish and revise a Code of Practice under the 2003 Act. The Code sets out guidance to professionals on their duties, therefore doctors, mental health officers and others exercising statutory functions under the Act are under a duty to have regard to the Code.