The doctor allowed the patient to have sex for the sake of research