In order for processing to be lawful, personal data should be processed on the basis of the consent of the data subject concerned or some other legitimate basis
Consent in GDPR must always but set apart from the notion of consent in clinical trials. Indeed, consent under GDPR is the consent for a patient to allow a sponsor to process his / her personal data. Whereas consent in clinical trials targets the specific consent to participate to a clinical trial.
Consent is one of the six legal bases outlined in Article 6 of the GDPR. Regarding the specific processing of sensitive data such as health data, please note that the consent is one of 10 options.