Beispiel #1
0
        public List <SectionVo> GetHtmlToDisplay()
        {
            var SectionVos = new List <SectionVo>();

            using (var context = new DefaulDataContext())
            {
                var sections = context.Sections.ToList();
                foreach (var section in sections)
                {
                    var obj = new SectionVo
                    {
                        Id               = section.Id,
                        Content          = section.Content,
                        Name             = section.Name,
                        Order            = section.Order,
                        SectionQuestions = new List <SectionQuestionVo>(),
                    };
                    foreach (var question in section.SectionQuestions)
                    {
                        var objSectionQuestionVo = new SectionQuestionVo
                        {
                            Id                    = question.Id,
                            Content               = question.Content,
                            Order                 = question.Order,
                            Parameters            = question.Parameters,
                            Calculator            = question.Calculator,
                            Name                  = question.Name,
                            IsSignature           = question.IsSignature.GetValueOrDefault(),
                            IsSignatureDate       = question.IsSignatureDate.GetValueOrDefault(),
                            IsBathing             = question.IsBathing.GetValueOrDefault(),
                            IsADLsCal             = question.IsADLsCal.GetValueOrDefault(),
                            IsMOT                 = question.IsMOT.GetValueOrDefault(),
                            IsMedicalAppointments = question.IsMedicalAppointments.GetValueOrDefault(),
                            IsServicesIncidental  = question.IsServicesIncidental.GetValueOrDefault(),
                            IsBehaviorsMedicalConditionsSeizures =
                                question.IsBehaviorsMedicalConditionsSeizures.GetValueOrDefault(),
                            IsDiagnoses            = question.IsDiagnoses.GetValueOrDefault(),
                            IsMedications          = question.IsMedications.GetValueOrDefault(),
                            IsDME                  = question.IsDME.GetValueOrDefault(),
                            IsAllergies            = question.IsAllergies.GetValueOrDefault(),
                            IsFunctionalLimitation = question.IsFunctionalLimitation.GetValueOrDefault(),
                            IsActivitiesPermitted  = question.IsActivitiesPermitted.GetValueOrDefault(),
                            IsMentalStatus         = question.IsMentalStatus.GetValueOrDefault(),
                            IsReassessmentDue      = question.IsReassessmentDue.GetValueOrDefault(),
                            IsCheckZeroMinutesPCST = question.IsCheckZeroMinutesPCST.GetValueOrDefault(),
                            IsMid                  = question.IsMid,
                            SectionId              = question.SectionId
                        };

                        obj.SectionQuestions.Add(objSectionQuestionVo);
                        //SectionQuestionVos.Add(objSectionQuestionVo);
                    }
                    SectionVos.Add(obj);
                }
            }
            return(SectionVos);
        }
Beispiel #2
0
        private RequestAssessmentPcsVo GetNewAssessment(string fileName = null, int id = 0)
        {
            var result     = new RequestAssessmentPcsVo();
            var SectionVos = new List <SectionVo>();

            using (var context = new DefaulDataContext())
            {
                var sections = context.Sections.ToList();
                foreach (var section in sections)
                {
                    var obj = new SectionVo
                    {
                        Id               = section.Id,
                        Content          = section.Content,
                        Name             = section.Name,
                        Order            = section.Order,
                        SectionQuestions = new List <SectionQuestionVo>(),
                    };
                    foreach (var question in section.SectionQuestions)
                    {
                        var objSectionQuestionVo = new SectionQuestionVo
                        {
                            Id                    = question.Id,
                            Content               = question.Content,
                            Order                 = question.Order,
                            Parameters            = question.Parameters,
                            Calculator            = question.Calculator,
                            Name                  = question.Name,
                            IsSignature           = question.IsSignature.GetValueOrDefault(),
                            IsSignatureDate       = question.IsSignatureDate.GetValueOrDefault(),
                            IsBathing             = question.IsBathing.GetValueOrDefault(),
                            IsADLsCal             = question.IsADLsCal.GetValueOrDefault(),
                            IsMOT                 = question.IsMOT.GetValueOrDefault(),
                            IsMedicalAppointments = question.IsMedicalAppointments.GetValueOrDefault(),
                            IsServicesIncidental  = question.IsServicesIncidental.GetValueOrDefault(),
                            IsBehaviorsMedicalConditionsSeizures =
                                question.IsBehaviorsMedicalConditionsSeizures.GetValueOrDefault(),
                            IsDiagnoses            = question.IsDiagnoses.GetValueOrDefault(),
                            IsMedications          = question.IsMedications.GetValueOrDefault(),
                            IsDME                  = question.IsDME.GetValueOrDefault(),
                            IsAllergies            = question.IsAllergies.GetValueOrDefault(),
                            IsFunctionalLimitation = question.IsFunctionalLimitation.GetValueOrDefault(),
                            IsActivitiesPermitted  = question.IsActivitiesPermitted.GetValueOrDefault(),
                            IsMentalStatus         = question.IsMentalStatus.GetValueOrDefault(),
                            IsReassessmentDue      = question.IsReassessmentDue.GetValueOrDefault(),
                            IsCheckZeroMinutesPCST = question.IsCheckZeroMinutesPCST.GetValueOrDefault(),
                            IsMid                  = question.IsMid,
                            SectionId              = question.SectionId
                        };

                        obj.SectionQuestions.Add(objSectionQuestionVo);
                        //SectionQuestionVos.Add(objSectionQuestionVo);
                    }
                    SectionVos.Add(obj);
                }
            }
            result.Sections = SectionVos;
            result.AssessmentSectionQuestions = GetAssessmentSectionQuestion(result.Sections, result);
            result.AssessmentPcsId            = id;
            result.AssessmentName             = !string.IsNullOrEmpty(fileName) ? fileName : "";
            result.DisclosureFormVo           = new DisclosureFormVo();
            return(result);
        }