The invention relates to a medical apparatus including a device used in the treatment of weight loss, obesity and potentially other associated health problems, e.g. type II diabetes. The device is used to impede absorption of nutrients within the gastrointestinal tract, i.e. bypassing a portion of the gastrointestinal tract. The medical apparatus enables implantation of the device using minimally invasive techniques, such a transesophageal approach under visualization. The device may be implanted via a working channel of a medical scope, e.g. an endoscope or in combination with a medical scope.