Dr. James Patrick Scanlon, 64, a Washington psychiatrist and consultant to federal agencies, died Monday at Sibley Memorial Hospital after a heart attack.

He came to Washington in 1948 as an assistant clinical professor of psychiatry at Georgetown University Medical School. He continued to serve as a consultant to the school after establishing a private practice in 1953.

Dr. Scanlon also was a consultant to the state Department's Foreign Service, the Veterans Administration, the Department of Health, Education, and Welfare and the Labor Department.

Born in Philadelphia, Dr. Scanlon was a graduate of St. Joseph's College and Jefferson Medical College there. He studied psychiatry under a fellowship at the Austin Riggs Foundation in Stockbridge, Mass.

During World War II, he was a major in the Army Air Forces, heading a psychiatric unit at Pratt General Hospital in Coral Gables, Fla.

Dr. Scanlon was a charter member of the Washington Psychiartic Society and a fellow of the American Psychiatric Association. He belonged to the D.C. Medical Society and the American Medical Association. He was a member of the Eastern Psychoanslytical Association.

He belonged to the University Club and the Congressional Country Club.

He is survived by his wife, Kay, and two daughters, Joan Patricia and Katherine Ellen, all of the home in Washington; two brothers, Richard J. and Joseph, both of Philadelphia, and a sister, Moira O'Connell, of Upper Montclair, N.J.

The family suggests that expressions of sympathy may be in the form of contributions to the American Heart Association.