Free swelling and confined smart hydrogels for applications in chemomechanical sensors for physiological monitoring