/// <summary>
        /// Produces a summarized version of a NeurologyFormTotals object which can be used to be displayed in an interface or be stored in a database.
        /// The values in the summary return will have ranges instead of lists of values.
        /// </summary>
        /// <param name="totals">The form totals object to be used to generate the summary.</param>
        /// <returns>
        /// Summarized version of the totals where the enumerations get replaced by ranges.
        /// </returns>
        public static NeurologyFormTotalsSummary GetTotalsSummaryFor(NeurologyFormTotals totals)
        {
            var ais = totals.GetAsiaImpairmentScaleValues();
            var isAsiaA = ais.Contains("A");
            var couldBeOtherThanAsiaA = !isAsiaA || ais.Length > 1;

            var summary = new NeurologyFormTotalsSummary
                {
                    AsiaImpairmentScale = ais,
                    Completeness = isAsiaA ? (couldBeOtherThanAsiaA ? "C,I" : "C") : "I",
                    LeftLowerMotorTotal = GetSummaryStringFor(totals.LeftLowerMotorTotal, totals.LeftLowerMotorTotalHasImpairmentNotDueToSci, totals.LeftLowerMotorContainsNt),
                    LeftMotor = GetLevelsRange(totals.GetLeftMotorValues(), false),
                    LeftMotorZpp = isAsiaA ? GetLevelsRange(totals.GetLeftMotorZppValues(), couldBeOtherThanAsiaA) : NotApplicable,
                    LeftMotorTotal = GetSummaryStringFor(totals.LeftUpperMotorTotal + totals.LeftLowerMotorTotal,
                                                            totals.LeftUpperMotorTotalHasImpairmentNotDueToSci || totals.LeftLowerMotorTotalHasImpairmentNotDueToSci,
                                                            totals.LeftUpperMotorContainsNt || totals.LeftLowerMotorContainsNt),
                    LeftPrickTotal = GetSummaryStringFor(totals.LeftPrickTotal, totals.LeftPrickTotalHasImpairmentNotDueToSci, totals.LeftPrickContainsNt),
                    LeftSensory = GetLevelsRange(totals.GetLeftSensoryValues(), false),
                    LeftSensoryZpp = isAsiaA ? GetLevelsRange(totals.GetLeftSensoryZppValues(), couldBeOtherThanAsiaA) : NotApplicable,
                    LeftTouchTotal = GetSummaryStringFor(totals.LeftTouchTotal, totals.LeftTouchTotalHasImpairmentNotDueToSci, totals.LeftTouchContainsNt),
                    LeftUpperMotorTotal = GetSummaryStringFor(totals.LeftUpperMotorTotal, totals.LeftUpperMotorTotalHasImpairmentNotDueToSci, totals.LeftUpperMotorContainsNt),
                    LowerMotorTotal = GetSummaryStringFor(totals.LowerMotorTotal,
                                                        totals.RightLowerMotorTotalHasImpairmentNotDueToSci || totals.LeftLowerMotorTotalHasImpairmentNotDueToSci,
                                                        totals.RightLowerMotorContainsNt || totals.LeftLowerMotorContainsNt),
                    NeurologicalLevelOfInjury = GetLevelsRange(totals.GetNeurologicalLevelsOfInjury(), false),
                    PrickTotal = GetSummaryStringFor(totals.RightPrickTotal + totals.LeftPrickTotal,
                                                        totals.RightPrickTotalHasImpairmentNotDueToSci || totals.LeftPrickTotalHasImpairmentNotDueToSci,
                                                        totals.RightPrickContainsNt || totals.LeftPrickContainsNt),
                    RightLowerMotorTotal = GetSummaryStringFor(totals.RightLowerMotorTotal, totals.RightLowerMotorTotalHasImpairmentNotDueToSci, totals.RightLowerMotorContainsNt),
                    RightMotor = GetLevelsRange(totals.GetRightMotorValues(), false),
                    RightMotorZpp = isAsiaA ? GetLevelsRange(totals.GetRightMotorZppValues(), couldBeOtherThanAsiaA) : NotApplicable,
                    RightMotorTotal = GetSummaryStringFor(totals.RightUpperMotorTotal + totals.RightLowerMotorTotal,
                                                            totals.RightUpperMotorTotalHasImpairmentNotDueToSci || totals.RightLowerMotorTotalHasImpairmentNotDueToSci,
                                                            totals.RightUpperMotorContainsNt || totals.RightLowerMotorContainsNt),
                    RightPrickTotal = GetSummaryStringFor(totals.RightPrickTotal, totals.RightPrickTotalHasImpairmentNotDueToSci, totals.RightPrickContainsNt),
                    RightSensory = GetLevelsRange(totals.GetRightSensoryValues(), false),
                    RightSensoryZpp = isAsiaA ? GetLevelsRange(totals.GetRightSensoryZppValues(), couldBeOtherThanAsiaA) : NotApplicable,
                    RightTouchTotal = GetSummaryStringFor(totals.RightTouchTotal, totals.RightTouchTotalHasImpairmentNotDueToSci, totals.RightTouchContainsNt),
                    RightUpperMotorTotal = GetSummaryStringFor(totals.RightUpperMotorTotal, totals.RightUpperMotorTotalHasImpairmentNotDueToSci, totals.RightUpperMotorContainsNt),
                    TouchTotal = GetSummaryStringFor(totals.RightTouchTotal + totals.LeftTouchTotal,
                                                        totals.RightTouchTotalHasImpairmentNotDueToSci || totals.LeftTouchTotalHasImpairmentNotDueToSci,
                                                        totals.RightTouchContainsNt || totals.LeftTouchContainsNt),
                    UpperMotorTotal = GetSummaryStringFor(totals.UpperMotorTotal,
                                                            totals.RightUpperMotorTotalHasImpairmentNotDueToSci || totals.LeftUpperMotorTotalHasImpairmentNotDueToSci,
                                                            totals.RightUpperMotorContainsNt || totals.LeftUpperMotorContainsNt)
                };

            return summary;
        }