Preheat oven to 350 degrees
Shred potatoes. Rinse in a colander until the water runs clear. Press water out of potatoes, then wrap in a linen towel to remove as much moisture as possible
Place potatoes in a bowl, add onion, llour and egg. Season with salt and pepper to taste.
Fill frying pan with oil to 1/4 inch. Heat oil . Place potato mixture in oil and cook until brown, being careful to only turn once. Set aside
In a large bowl, combine the chicken, sour cream, half-and-half cream, onion, chiles, salt and pepper. Stir in the potatoes and 2 cups cheese.
Pour the mixture into a greased 13x9 inch or 3 qt baking dish. Bake, uncovered, until golden brown, about 1 1/4 hours. Sprinkle with remaining cheese. Sprinkle with chopped cilantro before serving.