It can be done. Unfortunately psilocybin is an unstable compound and it degrades rapidly. I have read about how to make a fine dust from either the mushroom or the mycelium, which can then be put in gel caps on www.shroomery.org (?).
Yeah, it can be done, although once the process has completed you will have most likely lost large amounts of Psilocybin and Psilocin due to oxidization, and you would have to keep the finished product free from air.