Man avoids conviction for filming patient in sex act