Mining electronic health record data to detect drug-repurposing signals for cancers