A hierarchical modular design for treatment protocols.