The present invention relates to a medical capsule being equipped with a sensor device comprising light emitting and light receiving elements. The sensor device is adapted to detect blood especially gastrointestinal bleeding on the basis of light absorption properties of the blood, wherein the capsule is provided with a casing forming a recess or gap at its outer surface. The recess has a pre-selected width which represents a fixed measuring track between the light emitting and light receiving elements being arranged at opposing sides of the recess or gap when seen in its width direction. The medical capsule is provided with a shielding plate/layer/membrane being arranged at least at or near the bottom of the recess or gap and extending along the width direction of the recess or gap preferably to exceed the recess at its both sides into its width direction to prohibit emitted light from bypassing the recess via the casing material of the capsule.