Click the right mouse button and select the left hand icon. Click on Spock for all techie things then click on the chess boards to play chess. After checkmate, select the use icon again, and select the blue bag in the upper-left corner of the screen. Select Spock's science tricorder (it's right after the kill phaser) & click on a computer terminal on the left side of the screen. Repeat using McCoy's medical tricorder on the same terminal. I just learned you must "use" Spock on the computer to get the code & again to open the door.
In case you're stuck again, hints are available at
http://www.uhs-hints.com/uhsweb/stjr.php