The invention relates to an apparatus (2, 3), comprising a mating unit (20-1, 20-2; 31) for releasably attaching the apparatus (2) to a medical device for ejecting a medicament (1) or for releasably receiving at least a part of said medical device (1), one or more optical sensors (25, 26) for determining information related to a condition and/or use of said medical device (1), and a wireless unit (28) configured for transmitting the determined information to a device (42, 42').