Coding Diagnosis Based on Procedure? Concussion vs Unspecified Intracranial Injury

Best answers
I'm coding a scenario in which the patient had a craniectomy due to a brain injury and the provider documented specifically that the patient had a diagnosis of "Concussion" (with loss of consciousness, 16 hrs). I'm being advised that I should be coding S06.9X4 for unspecified intracranial injury based on the type of procedure done, and that I'm to disregard the actual stated diagnosis of "Concussion." Is this permitted, to override the documented diagnosis and choose another based off the craniectomy? If so, can someone please direct me to where I can find the guidelines about this sort of situation.
Thank you!