Life-entity transfer
A life-entity transfer was a technique invented by the extinct natives of the planet Camus II to swap the minds and personalities of two subjects with one other.

Doctor Janice Lester discovered the device used for this procedure in 2269, and used it to switch her mind with that of James T. Kirk. Prior to this, Spock was unaware of such a procedure being successfully accomplished anywhere in the galaxy. 

Later, while attempting to prove Lester's actions during his court martial, Spock felt that the only relevant question to ask was whether such a procedure was possible, taking into consideration the fact that many things previously thought to be impossible were found by the crew of the  to have indeed occurred. ()

See also
 Synaptic pattern displacement
Medical procedures