Some cases of diarrhea require medical attention. Diarrhea can quickly deplete the body's supply of water and electrolytes (such as sodium and potassium) that tissues need to function. People who are very young, old, or sick may have difficulty replacing lost fluids. Also, when diarrhea lasts for several weeks or contains blood, a serious illness may be the cause. In these cases, you should contact your doctor immediately.