Put the chicken in a large pan with the carrots, potatoes, celery, half the thyme and seasoning. Add stock and bring to the boil.
Reduce heat, cover and cook gently for 15 minutes. Set a colander over a large bowl, pour in the pan contents and remove thyme. Reserve 600ml/1 pint stock (rest can be frozen).
Rinse the pan, return to heat and melt the butter. Stir in the gluten free flour, then the reserved stock a little at a time, to make a smooth thick sauce.
Add the lactose free milk and simmer for 2 minutes. Off the heat, stir in the remaining thyme, chives lemon juice, lactose free cream and parsley. Season lightly as the ham may be salty.
Mix together the chicken, vegetables and ham in a deep 2.2litre/4 pint ovenproof dish, preferably with a rim or lip. Pour over the sauce and leave to cool slightly. Preheat the oven to 200C/gas 6/fan 180C.
Roll out the gluten free pastry to about 5cm/2in larger than the top of the dish. Cut a 2.5cm/1in strip from all round the pastry.
Brush the rim of the dish with egg and press the strip all round. Brush with egg and lift the pastry on to it, pressing the edges to seal thoroughly.
Trim off excess, then mark the pastry edge all round with a fork. Make 4 small slits in the centre. Brush with egg and bake for 25–30 minutes until crisp and golden.