Synthesis and processing of hydrogels for medical applications