Prepare food. You can take the meat broth ready-made, or you can cook it immediately before cooking the casserole. I cooked chicken leg broth (400 g). To do this, poured the leg into a saucepan with 1 liter of water and put it on high heat. After boiling, she removed the foam with a slotted spoon, added half of the peeled onion, a quarter of peeled carrots, bay leaf, two black peppercorns and 1/4 teaspoon of salt. Reduced fire to a minimum and cooked for 40 minutes. Strain the finished broth, cool and freeze in portions of 200 ml. Thawed the broth in the refrigerator before use, but this is not necessary. You can use water instead of broth. Wash potato tubers thoroughly.
Pour potatoes with cold water, salt at the rate of 1 teaspoon per 1 liter of water and boil until tender (25-30 minutes, depending on the size of the tubers).
Cut the ham into strips.
Cut the champignons into strips too.
Peel the onion and cut into quarters.
Melt half the butter in a skillet over high heat. Fry the onions for 5 minutes, stirring constantly.
Add ham and mushrooms to the onion.
Fry the ham with mushrooms and onions for 5 minutes, stirring constantly.
Then add flour, cream (or sour cream) and broth.
Simmer mushrooms in sauce for 10-15 minutes.
Turn on the oven to heat up to 190 degrees. Grease a baking dish (or ovenproof pan) with the remaining butter. Peel boiled potatoes, cut into large cubes and place in a prepared greased container.
Pour the ham and champignon sauce over the potatoes.
Grate cheese on a coarse grater.
Sprinkle the potatoes with ham and mushrooms with grated cheese.
Bake potatoes with mushroom sauce and ham in the oven for 10 minutes, until the cheese melts.