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.