A filter device for implantation in a gallbladder, comprising: a filtering portion configured to filter gallstones of a certain minimum size to prevent them from exiting the gallbladder through an opening of the gallbladder; a tail extending from the filtering portion away from the opening of the gallbladder and towards a distal wall of the gallbladder; and, a stopper located at a distal end of the tail, near the distal wall of the gallbladder when the filter device is implanted; wherein the filtering portion, stopper and the tail are configured to be of sufficient overall length within the gallbladder that they, when taken together, prevent migration of the filtering portion away from the opening of the gallbladder.