Wal-Mart ordered to pay $31.22m to NH pharmacist