A 32-year-old man has been charged with attempted murder after allegedly stabbing a paramedic grabbing a coffee.