major refactor of clinical trials to conform with xsd