A method of manufacturing a tubular or fibre-based medical device, a medical device which is, a stent, a catheter, a vascular graft, a nerve guide, a drainage tube, a wound dressing or a tissue engineering scaffold, or a medical device based on a mesh or a gauze, the method comprising the steps of synthetically preparing an N-acylchitosan by N-acylation of chitosan or by N-acylation or hydrolysis of an N-acylchitosan prepared by N-acylation of chitosan, forming an N-acylchitosan hydrogel from the thus prepared N-acylchitosan in a shape of the medical device or of a part of the medical device, and using the hydrogel in the manufacture of the medical device.