Legal and ethical framework and analysis