Lay the hash browns in a single layer in the base of baking dishes, cutting to fit if necessary. Cook hash browns for 15 minutes. While they are cooking, prepare the filling.
Heat a little oil in a pan. Add the onion and bacon and cook until the onions have softened, and bacon cooked.
Add mushrooms and continue cooking a further minute.
Add baked beans and stir while heating. Spoon the hot bean mixture over the cooked hash browns. Make indentations in the beans with the back of a spoon and break in the eggs.
Scatter over grated cheese. Cover dish lightly with foil, avoiding it touching the eggs.
Return dish to the oven and cook a further 10-15 minutes, until the eggs are set to your liking. Garnish with chopped parsley before serving.