Grease a roasting pan with coconut oil. Cut the aubergine slices lengthwise. Place the sliced aubergine in layers in a large sieve, sprinkling each layer with salt. Cover and leave for at least 30 minutes to allow the bitter juices to be extracted.
Place a few of the slices on a baking sheet and roast at 200 degrees for approx 10 minutes until it takes on a bit of color.
Repeat this until all the slices have been browned, heat the coconut oil in a large saucepan
Gently fry the onion and garlic for 4-5 minutes.
Stir the drained lentils, bay leaf, tomatoes, chick peas, mushrooms, tomato puree, herbs, stock and water into the onions. Bring to the boil and simmer covered for 10 minutes. Season to taste and remove the bay leaves.
Thinly slice the sweet potato and set aside.
Arrange a layer of very thinly sliced sweet potato on the bottom of a deep greased casserole dish, then place a layer of aubergines on the sweet potato, then spoon over a layer of lentil mixture. Continue the layers until all the mixture and aubergine slices are used up, finishing with the sweet potato layer.
Beat together the yogurt and egg, and season with black pepper, nutmeg and turmeric. Pour over the mixture in the casserole.
Sprinkle grated cheese on the top and bake for 45 minutes.