The study of the structure and function of the urinary system, including the kidneys, ureters, bladder, and urethra.