Which GMC code should be used if a patient is admitted as an emergency and undergoes emergency or urgent surgery before being transferred to a colorectal consultant for the rest of their care?

It should be the consultant whom the patient was under at the time of the operation.