Integrable hierarchies: Painlevé indices and compatibility conditions