Drugmakers are trying to win drug approvals by parsing vast data sets of electronic medical records, shifting away from lengthy, and costly, clinical trials in patients.

Pfizer Inc., Johnson & Johnson and Amgen Inc. are among the drugmakers that have submitted the data-mining analyses to the U.S. Food and Drug Administration in seeking approval to sell new medicines or for new uses for older ones. The FDA has approved new uses for breast cancer, bladder cancer and leukemia drugs in part based on the data.

For...