Amid all that’s being done to fight prescription painkiller abuse, the most effective measure might be a computer algorithm, the Wall Street Journal reports.