private void ParseAllQuestions(ChecklistViewModel checklistViewModel)
        {
            // For all questions template, put all questions in Compliance review items
            var questions = checklistViewModel.Questions.Where( x =>  !x.Question.Deleted );

            questions
               .OrderBy(x => x.CategoryNumber)
               .ThenBy(x => x.QuestionNumber)
               .ToList()
               .ForEach(questionAnswer =>
               {
                   var reviewItem = new ComplianceReviewItem();
                   reviewItem.QuestionText = questionAnswer.Question.Text;
                   reviewItem.CategoryName = questionAnswer.Question.Category == null ? String.Empty : questionAnswer.Question.Category.Title;
                   reviewItem.CategoryNumber = questionAnswer.CategoryNumber;
                   reviewItem.QuestionNumber = questionAnswer.QuestionNumber;

                   if (questionAnswer.Answer != null && GetSelectedResponse(questionAnswer) != null)
                   {
                       reviewItem.SupportingDocumentationStatus = questionAnswer.Answer.SupportingDocumentationStatus;
                       reviewItem.SupportingDocumentationDate = questionAnswer.Answer.SupportingDocumentationDate != null ? questionAnswer.Answer.SupportingDocumentationDate.Value.ToLocalTime().ToString("dd/MM/yyyy") : null;
                       reviewItem.SupportingEvidence = questionAnswer.Answer.SupportingEvidence;
                       reviewItem.ActionRequired = questionAnswer.Answer.ActionRequired;
                       reviewItem.Status = ComplianceReviewItemStatus(questionAnswer);
                   }

                   _model.ComplianceReviewItems.Add(reviewItem);
               });
        }
        private void AddComplianceReviewItems(ChecklistViewModel checklistViewModel)
        {
            checklistViewModel.Questions.Where(
                x =>
                ((x.Answer != null && GetSelectedResponse(x) != null &&
                    GetSelectedResponse(x).Title != "Not Applicable") || !IsQuestionAnswered(x))
                 )
                 .OrderBy(x=>x.CategoryNumber)
                 .ThenBy(x=>x.QuestionNumber)
                .ToList()
                .ForEach(questionAnswer =>
                             {
                                 ComplianceReviewItem reviewItem = new ComplianceReviewItem()
                                                                       {
                                                                           QuestionText = questionAnswer.Question.Text,
                                                                           CategoryName = questionAnswer.Question.Category == null
                                                                                            ? String.Empty : questionAnswer.Question.Category.Title,
                                                                           CategoryNumber = questionAnswer.CategoryNumber,
                                                                           QuestionNumber = questionAnswer.QuestionNumber,
                                                                       };

                                 if (questionAnswer.Answer != null && GetSelectedResponse(questionAnswer) != null)
                                 {
                                     reviewItem.SupportingEvidence = questionAnswer.Answer.SupportingEvidence;
                                     reviewItem.ActionRequired = questionAnswer.Answer.ActionRequired;
                                     reviewItem.Status = ComplianceReviewItemStatus(questionAnswer);

                                 }
                                 
                                 _model.ComplianceReviewItems.Add(reviewItem);
                             });
        }
        //private bool IsQuestionAnswered( QuestionAnswerViewModel model)
        //{
        //    return !(model.Answer == null || GetSelectedResponse(model) == null);
        //}
        private void AddComplianceReviewItems(ChecklistViewModel checklistViewModel)
        {
            GetQuestionsByResponseTitle(checklistViewModel,"Acceptable")
                .OrderBy(x => x.CategoryNumber)
                .ThenBy(x => x.QuestionNumber)
                .ToList()
                .ForEach(questionAnswer =>
                {
                    var reviewItem = new ComplianceReviewItem();
                    reviewItem.QuestionText = questionAnswer.Question.Text;
                    reviewItem.CategoryName = questionAnswer.Question.Category == null ? String.Empty: questionAnswer.Question.Category.Title;
                    reviewItem.CategoryNumber = questionAnswer.CategoryNumber;
                    reviewItem.QuestionNumber = questionAnswer.QuestionNumber;

                    if (questionAnswer.Answer != null && GetSelectedResponse(questionAnswer) != null)
                    {
                        reviewItem.SupportingDocumentationStatus = questionAnswer.Answer.SupportingDocumentationStatus;
                        reviewItem.SupportingDocumentationDate = questionAnswer.Answer.SupportingDocumentationDate !=null? questionAnswer.Answer.SupportingDocumentationDate.Value.ToLocalTime().ToString("dd/MM/yyyy"): null;
                        reviewItem.SupportingEvidence = questionAnswer.Answer.SupportingEvidence;
                        reviewItem.ActionRequired = questionAnswer.Answer.ActionRequired;
                        reviewItem.Status = ComplianceReviewItemStatus(questionAnswer);
                    }

                    _model.ComplianceReviewItems.Add(reviewItem);
                });
        }