Fry the onions and chorizo together in a big frying pan until the onion is soft and the chorizo starting to crisp up. Stir in the chicken chunks for a few minutes to seal, then stir in the chopped tomatoes, stock and rosemary. Simmer for 10 minutes until the chicken is cooked through and the tomato sauce reduced.
Stir in the beans and season with pepper, then divide the pie filling between 4 individual pie dishes. Leave to cool.
When the filling has cooled, brush the edge of each pie dish with a little egg. Unroll the pastry sheet and cut it into 4 quarters (roll the pastry out a little thinner if you need them bigger). Put a pastry lid on each pie, then trim the excess by running a sharp knife along the edge of the dishes and crimp the edges of the pie with a fork. Brush the top with beaten egg, then scatter over a little paprika. Chill until needed or bake straight away.
Preheat the oven to 200°C (180°C fan oven) Gas Mark 6. Poke a steam hole in the center of each pie and then bake for 25 minutes, or until the pastry is golden.