Employee was in the process of exiting a parked locomotive cab when EE's left knee contacted the door hinge. EE stated while attempting to walk off the pain from bumping knee, EE also twisted the left knee. Seen by site medic, referred to ER, then to a occupational specialist where restrictions were issued.