if lovastatin completely entrapped in your designed hydrogels, by one of the following methods you can exchange DMSO with a suitable buffer but you should consider the final solubility of DDS and lovastatin.
1-Centrifuge filter tubes
2- Dialysis
3- Millipore filter
if lovastatin has a leaky form in your designed hydrogels the following methods may help you