A system and method for detecting the presence of a medicament reservoir within the housing of an infusion pump. A medicament reservoir, affixed to a reservoir cap is removably inserted within the housing of an infusion pump. A magnet is affixed to or embedded in one or both of the reservoir or the reservoir cap. Alternately, the cap or the reservoir can be made of magnetic material. A sensing device embedded or otherwise affixed to the pump housing senses the presence or absence of the magnetic field created by the magnet. The presence of the magnetic field indicates that the reservoir is inserted properly within the housing and the absence of the magnetic field indicates that the reservoir has been at least partially withdrawn from the pumps housing.La présente invention concerne un système et un procédé pour détecter la présence dun réservoir de médicament à lintérieur du boîtier dune pompe à perfusion. Un réservoir à médicament fixé au bouchon dun réservoir est inséré amovible à lintérieur du boîtier dune pompe à perfusion. Un aimant est associé par fixation ou inclusion, voire les deux, sur ou dans le réservoir ou le bouchon du réservoir. Selon un autre mode de réalisation, le bouchon ou le réservoir peuvent être faits en matériau magnétique. Un dispositif de détection, inclus dans le boîtier de la pompe, ou autrement fixé sur ce boîtier, détecte la présence ou labsence du champ magnétique créé par laimant. La présence du champ magnétique indique que le réservoir est correctement inséré à lintérieur du boîtier, labsence du champ magnétique indiquant par contre que le réservoir a été au moins en partie retiré du boîtier de la pompe.