Legal basis for sharing personal information are found in Articles 6 & 9 GDPR.
Processing shall be lawful only if and to the extent that at least one of the following applies:
a) the data subject has given consent to the processing of his or her personal data for one or more specific purposes;
b) processing is necessary for the performance of a contract to which the data subject is party or in order to take steps at the request of the data subject prior to entering into a contract;
c) processing is necessary for compliance with a legal obligation to which the controller is subject;
d) processing is necessary in order to protect the vital interests of the data subject or of another natural person;
e) processing is necessary for the performance of a task carried out in the public interest or in the exercise of official authority vested in the controller; Includes
f) processing is necessary for the purposes of the legitimate interests pursued by the controller or by a third party, except where such interests are overridden by the interests or fundamental rights and freedoms of the data subject which require protection of personal data, in particular where the data subject is a child. (This basis is not available for public authorities performing their tasks) Where processing involves special category data one of the following will also apply:
Article 9 Basis
a) the data subject has given explicit consent to the processing of those personal data for one or more specified purposes, except where Union or Member State law provide that the prohibition referred to in paragraph 1 may not be lifted by the data subject;
b) processing is necessary for the purposes of carrying out the obligations and exercising specific rights of the controller or of the data subject in the field of employment and social security and social protection law in so far as it is authorised by Union or Member State law or a collective agreement pursuant to Member State law providing for appropriate safeguards for the fundamental rights and the interests of the data subject;
c) processing is necessary to protect the vital interests of the data subject or of another natural person where the data subject is physically or legally incapable of giving consent;
d) processing is carried out in the course of its legitimate activities with appropriate safeguards by a foundation, association or any other not-for-profit body with a political, philosophical, religious or trade union aim and on condition that the processing relates solely to the members or to former members of the body or to persons who have regular
contact with it in connection with its purposes and that the personal data are not
disclosed outside that body without the consent of the data subjects;
e) processing relates to personal data which are manifestly made public by the data
subject;
f) processing is necessary for the establishment, exercise or defence of legal claims or
whenever courts are acting in their judicial capacity;
g) processing is necessary for reasons of substantial public interest, on the basis of Union or
Member State law which shall be proportionate to the aim pursued, respect the essence
of the right to data protection and provide for suitable and specific measures to
safeguard the fundamental rights and the interests of the data subject;
h) processing is necessary for the purposes of preventive or occupational medicine, for the
assessment of the working capacity of the employee, medical diagnosis, the provision of
health or social care or treatment or the management of health or social care systems
and services on the basis of Union or Member State law or pursuant to contract with a
health professional and subject to professional confidentiality obligations;
i) processing is necessary for reasons of public interest in the area of public health, such as
protecting against serious cross-border threats to health or ensuring high standards of
quality and safety of health care and of medicinal products or medical devices, on the
basis of Union or Member State law which provides for suitable and specific measures to
safeguard the rights and freedoms of the data subject, in particular professional secrecy;
j) processing is necessary for archiving purposes in the public interest, scientific or
historical research purposes or statistical purposes in accordance with Article 89(1) based
on Union or Member State law which shall be proportionate to the aim pursued, respect
the essence of the right to data protection and provide for suitable and specific measures
to safeguard the fundamental rights and the interests of the data subject