The diagnosis of OCD is most commonly made by a healthcare professional on the basis of a history.
In some cases, the diagnosis is made from the findings of a brain scan; however, since scans are considered experimental at this point for the diagnosis of OCD, your insurance company will most likely not pay for them.
If you suspect that someone you love has OCD, your first step is checking in with your own doctor for the name of a healthcare professional in your area with a special interest in OCD.
Please be aware that most healthcare professionals do not get special training in the diagnosis and treatment of OCD. Many things about OCD are paradoxical and counter-intuitive.