Mental health diagnoses are not associated with indicators of lower quality pain care in electronic health records of a national sample of Veterans treated in Veterans Health Administration primary care settings.