Tiny chemical sensors implanted into patients could help diagnose disease and track its progress, following a development by scientists.