Quote from : The Interpretation of Dreams Book

Accordingly, identification, or the formation of composite figures, serves different purposes: first, to represent a feature both persons have in common; secondly, to represent a common feature; but thirdly, to find expression for a common feature that is merely . Since wishing it to be the case that two people have something in common is often the same as them, this relation too is expressed in the dream by identification. In the dream of Irma's injection, I wish to exchange this patient for another, that is, I wish that the other were my patient, as Irma is; the dream takes account of the wish in showing me a figure who is called Irma, but who is examined in a posture in which I have only had occasion to see the other.