A medical device (20) includes a device housing (24), which contains a lumen (26) having first and second ends and is configured to be implanted in a bone (34) of a subject so that the first end opens into a body cavity (30) in proximity to the bone and the second end opens into a medulla (32) of the bone. A valve (28) is contained in the device housing and is configured to control a flow of a body fluid from the body cavity into the medulla. The device may include an evacuation mechanism (37) coupled to the device housing for evacuating particulate matter from the lumen.