A new AI method can train on medical records without revealing patient data