A state-based systemic view of behaviour for safe medical computer applications