A method for setting up a microservice of a plurality of microservices, wherein each microservice stores a medical dataset related to a patient, comprising the following steps: - receiving a medical dataset, - receiving accessing entity information (AEI.1, AEI.2) describing an accessing entity, wherein the medical dataset relates to the patient, and wherein the accessing entity is different from the patient, - setting up the microservice based on the accessing entity information (AEI.1, AEI.2), wherein the microservice is an independently deployable service which can be used in a modular form, wherein the microservice contains the medical dataset in an encrypted form, wherein the microservice 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 and is configured to grant access to the medical dataset to a requesting entity 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, 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 which requests access to the medical dataset. - receiving a medical dataset, - receiving accessing entity information (AEI.1, AEI.2) describing an accessing entity, wherein the medical dataset relates to the patient, and wherein the accessing entity is different from the patient, - setting up the microservice based on the accessing entity information (AEI.1, AEI.2), wherein the microservice is an independently deployable service which can be used in a modular form, wherein the microservice contains the medical dataset in an encrypted form, wherein the microservice 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 and is configured to grant access to the medical dataset to a requesting entity 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, 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 which requests access to the medical dataset. wherein the microservice is an independently deployable service which can be used in a modular form, wherein the microservice contains the medical dataset in an encrypted form, wherein the microservice 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 and is configured to grant access to the medical dataset to a requesting entity 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, 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 which requests access to the medical dataset.