Preheat the oven to 200C/400F/Gas 6. Heat a large pan over a medium heat. Add a knob of butter and gently cook the onion until soft but not brown. Add the carrots and leek and continue cooking for five minutes until the carrots begin to soften. Cover with the cream and stock and simmer until the sauce starts to thicken. Add the turkey, ham, mushrooms, cayenne and herbs then season to taste with salt and freshly ground black pepper and remove the pan from the heat.
Pour the filling into a ceramic pie dish. Roll out the pastry to make a lid for the pie and strips to line the rim of the dish. Press the strips onto the rim, moistening them with a little water, then press down the lid firmly and brush with the beaten egg. Sprinkle with the parmesan and cook in the oven for 20 minutes until the pastry is golden-brown.
For a thicker pie filling, mix equal amounts of cornflour and water in a small bowl and stir this into the filling to thicken.