Very simply put:
If you are under a contractual duty or hold a position of office that requires you to act in the circumstances (e.g.: policeman) then you may be prosecuted (as I recall a case of a policeman). I'll be honest and say I don't know whether your job requirement falls into this category.
You can also be held liable for failing to act when under a duty of care: e.g.: parent/child, assumed carers/family members (I'm using examples from cases here)
In the everyday scenario, you are indeed correct in saying that you can walk by an accident and do nothing. You could even wave and watch a person drown if you're weird enough. The only exception to this scenario is if you, for example, pushed the person in- in which case you're under a duty to do what you can to improve the consequences of your actions- call police/coastguard, throw a lifebelt: it's situation dependent and a question of fact. Under the principles of medical law, every man has the right to judge what shall be done with his own body. If he's conscious, you could be sued by the injured for 'helping' him, however unfair this may be.