The invention relates to a system (1) for handling drugs. The system comprises a drug delivery control device (1b) being arranged to have access to information (1f) for handling medication of a particular patient, characterized in that the device (1 b) comprises a risk identification unit (9) arranged to automatically identify risks for the medication of the patient and in that the control device (1b) is furthermore arranged to contribute to providing a cartridge with an unique composition of drugs and/or drug doses for the medication of a particular patient and arranged to contribute to provide the cartridge (2) with machine readable marking means (3) having patient specific information. The invention is also related to a method and a computer program product. By means of the present invention, risks are automatically identified for medication of a patient and in an absolute secure way medication is secured for the patient since the cartridge of the patient is marked with machine readable information concerning medication. Since the marking is achieved in a controlled and secure way, the marking will always be correct.L'invention porte sur un système (1) pour gérer des médicaments. Le système comprend un dispositif de commande d'administration de médicament (1b) qui est conçu pour avoir accès à des informations (1f) pour gérer la médication d'un patient particulier, le système étant caractérisé en ce que le dispositif (1b) comprend une unité d'identification de risque (9) conçue pour identifier automatiquement des risques concernant la médication du patient et en ce que le dispositif de commande (1b) est en outre conçu pour contribuer à fournir une cartouche avec une composition unique de médicaments et/ou de doses de médicament pour la médication d'un patient particulier et conçu pour contribuer à doter la cartouche (2) de moyens (3) de marquage lisibles par une machine, ayant des informations spécifiques au patient. L'invention porte également sur un procédé et s