Patient flow analysis in pain rehabilitation care