Many men start with their primary care physician. This is usually their family doctor and is familiar with their health history. They can perform a physical examination and order tests to determine the cause of ED. If needed, they will refer you to a specialist. For example, if laboratory tests indicate diabetes or prediabetes, you might be referred to an endocrinologist. Some family doctors choose to treat ED initially with oral medications, and if those don’t work, refer you to a specialist.