A drug delivery device includes a housing, a primary container, a cannula, a delivery mechanism, an electrode, and a controller. The housing defines an interior cavity and a distal surface for contacting a patient during use of the drug delivery device. The primary container is disposed in the interior cavity of the housing and adapted to contain a drug. At least a portion of the cannula is electrically conductive, with the cannula being disposed in fluid communication with the primary container. The drug delivery device is adapted to occupy a storage state where a terminal end of the cannula is inside the housing and a delivery state where the terminal end of the cannula extends out through an opening in the distal surface of the housing. The delivery mechanism is disposed in the housing for selectively forcing the drug out of the primary container and through the cannula for delivery to a patient when the cannula occupies the delivery state. The electrode is disposed on the distal surface of the housing. Finally, the controller is carried by the housing and electrically connected to the delivery cannula and the electrode such that upon application of the distal surface of the housing onto a patients skin and insertion of the delivery cannula into the patient the controller recognizes a closed electrical circuit including the cannula and the electrode.Un dispositif dadministration de médicament comprend un boîtier, un récipient primaire, une canule, un mécanisme de distribution, une électrode et un contrôleur. Le boîtier définit une cavité intérieure et une surface distale destinée à entrer en contact avec un patient pendant lutilisation du dispositif dadministration de médicament. Le récipient primaire est disposé dans la cavité intérieure du boîtier et est conçu pour contenir un médicament. Au moins une partie de la canule est électroconductrice, la canule étant placée en communication fluidique avec le récipient primaire. Le dispositif dadministration de médicam