Generating psychotropic drug exposure data from computer-based medical records