After designing and building devices capable of generating an electromagnetic field for this study , their safety was confirmed and the electromagnetic therapy was randomly allocated and compared to placebo in patients with fracture of the femoral diaphysis .