[OE-3957] fixed inconsistent behaviour of "last event in episode" link on patient summary