private List <FormResponseDetail> FlattenChildHierarchy(FormResponseDetail childFormResponseDetail, List <FormResponseDetail> flattenedHierarchy)
 {
     flattenedHierarchy.Add(childFormResponseDetail);
     foreach (var child in childFormResponseDetail.ChildFormResponseDetailList)
     {
         FlattenChildHierarchy(child, flattenedHierarchy);
     }
     return(flattenedHierarchy);
 }
        /// <summary>
        /// FindParentFormResponseDetail
        /// </summary>
        /// <param name="parentResponsId"></param>
        /// <returns></returns>
        public FormResponseDetail FindFormResponseDetail(string responseId)
        {
            FormResponseDetail response = this;

            if (responseId != this.ResponseId)
            {
                var flattenedResponses = FlattenHierarchy();
                response = flattenedResponses.SingleOrDefault(f => f.ResponseId == responseId);
            }
            return(response);
        }