A framework for the quality assurance of clinical data