A method for setting up a microservice (MS) of a plurality of microservices (MS), wherein each microservice (MS) stores a medical dataset (DS) related to a patient (PAT), comprising the following steps: - receiving a medical dataset (DS), - receiving accessing entity information (AEI.1, AEI.2) describing an accessing entity (AE), wherein the medical dataset (DS) relates to the patient (PAT), and wherein the accessing entity (AE) is different from the patient (PAT), - setting up the microservice (MS) based on the accessing entity information (AEI.1, AEI.2), wherein the microservice (MS) is an independently deployable service which can be used in a modular form, wherein the microservice (MS) contains the medical dataset (DS) in an encrypted form, wherein the microservice (MS) comprises an access logic (AL.1, AL.2) based on the accessing entity information (AEI.1, AEI.2), and wherein the access logic (AL.1, AL.2) defines access conditions to the medical dataset (DS) and is configured to grant access to the medical dataset (DS) to a requesting entity (RE) if the access conditions are fulfilled, wherein the accessing entity information (AEI.1, AEI.2) comprises access credentials (ACR.1, ACR.2), which are stored related to the microservice (MS), wherein the access logic (AL.1, AL.2) defines the access conditions based on the access credentials (ACR.1, ACR.2), and wherein the access conditions are fulfilled if the access credentials (ACR.1, ACR.2) are related to the requesting entity (RE) which requests access to the medical dataset (DS). - receiving a medical dataset (DS), - receiving accessing entity information (AEI.1, AEI.2) describing an accessing entity (AE), wherein the medical dataset (DS) relates to the patient (PAT), and wherein the accessing entity (AE) is different from the patient (PAT), - setting up the microservice (MS) based on the accessing entity information (AEI.1, AEI.2), wherein the microservice (MS) is an independently deployable service which can be used in a modular form, wherein the microservice (MS) contains the medical dataset (DS) in an encrypted form, wherein the microservice (MS) comprises an access logic (AL.1, AL.2) based on the accessing entity information (AEI.1, AEI.2), and wherein the access logic (AL.1, AL.2) defines access conditions to the medical dataset (DS) and is configured to grant access to the medical dataset (DS) to a requesting entity (RE) if the access conditions are fulfilled, wherein the accessing entity information (AEI.1, AEI.2) comprises access credentials (ACR.1, ACR.2), which are stored related to the microservice (MS), wherein the access logic (AL.1, AL.2) defines the access conditions based on the access credentials (ACR.1, ACR.2), and wherein the access conditions are fulfilled if the access credentials (ACR.1, ACR.2) are related to the requesting entity (RE) which requests access to the medical dataset (DS). wherein the microservice (MS) is an independently deployable service which can be used in a modular form, wherein the microservice (MS) contains the medical dataset (DS) in an encrypted form, wherein the microservice (MS) comprises an access logic (AL.1, AL.2) based on the accessing entity information (AEI.1, AEI.2), and wherein the access logic (AL.1, AL.2) defines access conditions to the medical dataset (DS) and is configured to grant access to the medical dataset (DS) to a requesting entity (RE) if the access conditions are fulfilled, wherein the accessing entity information (AEI.1, AEI.2) comprises access credentials (ACR.1, ACR.2), which are stored related to the microservice (MS), wherein the access logic (AL.1, AL.2) defines the access conditions based on the access credentials (ACR.1, ACR.2), and wherein the access conditions are fulfilled if the access credentials (ACR.1, ACR.2) are related to the requesting entity (RE) which requests access to the medical dataset (DS). <EOS>