Pyonephrosis is the accumulation of pus within the cavities of the kidney, especially within the renal pelvis. This leads to loss of parenchymal mass.