CHF and HTN, he/she was most likely on some form of diuretics or dialisys
Just being in a health care facility alone puts the patient at risk of hypernatremia absent of any other causes (most likely because it's harder to get proper hydration, be it from lack of physical ability or having to ask for water). Also, the CHF most likely explains the edema/apparent hypervolemic state. This is a good example of having to bring multiple disease processes together to make a proper diagnosis, as the reasons for hypervolemic hypernatremic states are very limited, but that only applies if hypernatremia is considered in isolation of other conditions.
Also, to reiterate because it's critical to understanding sodium balance disorders, hypernatremic/hyponatremic are
most likely due to changes in water volume than changes in total body sodium. Hyper/hyponatremia? Think water problems first. I know people who failed renal (we covered sodium, potassium, and metabolic acid/base disorders in renal) simply because they couldn't understand that point.
On a similar point, potassium disorders are often either due to potassium wasting diuretics (thiazides and loop diuretics like furosemide (lasix) are the common ones) or disorders that cause potassium to move into/out of the cells (e.g. acidosis* causes hyperkalemia through moving potassium out of the cell, beta-agonists like albuterol can cause hypokalemia by moving potassium into a cell).
*pH and potassium concentrations move in opposite directions. pH goes down, [K] goes up. pH goes up, [K] goes down.