Give clinical_codes table fk reference to detail tables and remove reference to clinical_codes from those tables
Give clinical_codes table fk reference to detail tables and remove reference to clinical_codes from those tables

outcomesinsights/generalized_data_model,outcomesinsights/generalized_data_model