When a psychological or medical condition occurs as a direct result of some other pathologized condition, the condition that is caused is called "secondary" and the condition that causes it is called "primary." For example, If a person suffers decreased mental capacity because he drinks constantly, you would diagnose him with alcohol dependence with secondary dementia. In another example, agoraphobia is very often secondary to panic disorder because the terror of experiencing a panic attack away from known sources of safety or assistance conditions the subject to dislike being away from home.