A toilet-bowl mounted sensor, comprising: a receptacle adapted to be mounted within a toilet bowl and to receive excrement therein, said receptacle including: a first side wall, a second side wall, a third side wall, and a fourth side wall, said first and fourth side walls being generally opposite one another, said second and third side walls being generally opposite one another, and said third side wall including a side wall ingress; and a floor surface attached to said first, second, third, and fourth side walls, said floor surface comprising a wire frame or a mesh including openings suitable for removal of excrement from said receptacle; a pushing mechanism, movable relative to said receptacle and adapted to push content of said receptacle, said pushing mechanism including a movable ingress; a capsule measuring and/or identification mechanism (350, 358), adapted to at least one of measure dimensions of an ingestible capsule included in said excrement and uniquely identify said ingestible capsule; a capsule releasing mechanism for releasing said ingestible capsule from said receptacle; and a controller for controlling operation of said pushing mechanism, said capsule releasing mechanism, and said capsule measuring and/or identification mechanism, wherein said capsule measuring and/or identification mechanism includes a hollow formed between said side wall ingress and said movable ingress when said pushing mechanism is adjacent said third side wall, said hollow being suitable for enclosing said ingestible capsule. a receptacle adapted to be mounted within a toilet bowl and to receive excrement therein, said receptacle including: a first side wall, a second side wall, a third side wall, and a fourth side wall, said first and fourth side walls being generally opposite one another, said second and third side walls being generally opposite one another, and said third side wall including a side wall ingress; and a floor surface attached to said first, second, third, and fourth side walls, said floor surface comprising a wire frame or a mesh including openings suitable for removal of excrement from said receptacle; a first side wall, a second side wall, a third side wall, and a fourth side wall, said first and fourth side walls being generally opposite one another, said second and third side walls being generally opposite one another, and said third side wall including a side wall ingress; and a floor surface attached to said first, second, third, and fourth side walls, said floor surface comprising a wire frame or a mesh including openings suitable for removal of excrement from said receptacle; a pushing mechanism, movable relative to said receptacle and adapted to push content of said receptacle, said pushing mechanism including a movable ingress; a capsule measuring and/or identification mechanism (350, 358), adapted to at least one of measure dimensions of an ingestible capsule included in said excrement and uniquely identify said ingestible capsule; a capsule releasing mechanism for releasing said ingestible capsule from said receptacle; and a controller for controlling operation of said pushing mechanism, said capsule releasing mechanism, and said capsule measuring and/or identification mechanism, wherein said capsule measuring and/or identification mechanism includes a hollow formed between said side wall ingress and said movable ingress when said pushing mechanism is adjacent said third side wall, said hollow being suitable for enclosing said ingestible capsule.