Mysql updates

Two changes:
1) Added index to Accession Number in ExamMeta - this makes it easier to check for duplicates without having to remember what the InternalCode is.
2) I had horrible bugs that took me hours to track down that all lead back to NULL values in ExamCodeDefinitions, so it seems like we should be validating that these fields are not null on insertion.