Write a function to validate if a given string representing a clinical code format is structured correctly.