Exemple #1
0
        /// <summary>
        /// Time UPDRS
        /// </summary>
        /// <returns></returns>
        public static AggrConfig CreateFLUCTAggregation()
        {
            AggrConfig def = new AggrConfig()
            {
                AggregationType     = "time",
                Name                = "Fluctuations",
                Code                = "STFLUCT",
                Description         = "UPDRS Fluctuation Score based on MFI",
                Version             = "1.0",
                MetaScale           = 1.0,
                MetaAggregationType = "mfi",
                Beta                = 3.5621,
                Variables           = new List <AggrVariable>()
                {
                    new AggrVariable()
                    {
                        Weight = 8.2422,
                        Code   = "STBRAD30",
                        Source = "observation"
                    },
                    new AggrVariable()
                    {
                        Weight = 4.763,
                        Code   = "STUPDRSG",
                        Source = "observation"
                    },

                    new AggrVariable()
                    {
                        Weight = 4.0556,
                        Code   = "STFOG",
                        Source = "observation"
                    },
                    new AggrVariable()
                    {
                        Weight = 1.4900,
                        Code   = "STTRMA30",
                        Source = "observation"
                    },

                    new AggrVariable()
                    {
                        Weight = 2.5942,
                        Code   = "STTRMC30",
                        Source = "observation"
                    },


                    new AggrVariable()
                    {
                        Weight = 2.7079,
                        Code   = "STDYS30",
                        Source = "observation"
                    },
                }
            };

            return(def);
        }
Exemple #2
0
        /// <summary>
        /// Day UPDRS
        /// </summary>
        /// <returns></returns>

        public static AggrConfig CreateUPDRSDAYAggregation()
        {
            AggrConfig def = new AggrConfig()
            {
                AggregationType = "day",
                Name            = "UPDRS Total",
                Code            = "UPDRSDAY",
                Description     = "UPDRS PDManager Score",
                Version         = "1.0",
                Beta            = 3.5621,
                MetaScale       = 1.0,
                Variables       = new List <AggrVariable>()
                {
                    new AggrVariable()
                    {
                        Weight = 8.2422,
                        Code   = "STBRAD30",
                        Source = "observation"
                    },
                    new AggrVariable()
                    {
                        Weight = 4.763,
                        Code   = "STUPDRSG",
                        Source = "observation"
                    },

                    new AggrVariable()
                    {
                        Weight = 4.0556,
                        Code   = "STFOG",
                        Source = "observation"
                    },
                    new AggrVariable()
                    {
                        Weight = 1.4900,
                        Code   = "STTRMA30",
                        Source = "observation"
                    },

                    new AggrVariable()
                    {
                        Weight = 2.5942,
                        Code   = "STTRMC30",
                        Source = "observation"
                    },


                    new AggrVariable()
                    {
                        Weight = 2.7079,
                        Code   = "STDYS30",
                        Source = "observation"
                    },
                }
            };

            return(def);
        }
Exemple #3
0
        public void SaveAggregation()
        {
            DummyAggrDefinitionProvider aggrProvider = new DummyAggrDefinitionProvider();
            var def = aggrProvider.GetConfigFromCode("UPDRS");

            AggrConfig.SaveToFile(def, "updrs.json");

            var defTarget = AggrConfig.LoadFromFile("updrs.json");

            Assert.AreEqual(def.AggregationType, defTarget.AggregationType);
        }
Exemple #4
0
        /// <summary>
        /// Off Time Aggregation
        /// </summary>
        /// <returns></returns>
        public static AggrConfig CreateOffTimeAggregation()
        {
            AggrConfig def = new AggrConfig()
            {
                AggregationType     = "time",
                Name                = "OFFTIME",
                Code                = "STOFFDUR",
                Description         = "UPDRS PDManager Score",
                Version             = "1.0",
                MetaAggregationType = "average",
                ThresholdType       = "fixed",
                Threshold           = true,
                ThresholdValue      = 15,
                Beta                = 3.5621,
                MetaScale           = 4.0,
                Variables           = new List <AggrVariable>()
                {
                    new AggrVariable()
                    {
                        Weight = 8.2422,
                        Code   = "STBRAD30",
                        Source = "observation"
                    },
                    new AggrVariable()
                    {
                        Weight = 4.763,
                        Code   = "STUPDRSG",
                        Source = "observation"
                    },

                    new AggrVariable()
                    {
                        Weight = 4.0556,
                        Code   = "STFOG",
                        Source = "observation"
                    },
                    new AggrVariable()
                    {
                        Weight = 1.4900,
                        Code   = "STTRMA30",
                        Source = "observation"
                    },

                    new AggrVariable()
                    {
                        Weight = 2.5942,
                        Code   = "STTRMC30",
                        Source = "observation"
                    },


                    new AggrVariable()
                    {
                        Weight = 2.7079,
                        Code   = "STDYS30",
                        Source = "observation"
                    },
                }
            };

            return(def);
        }
Exemple #5
0
        /// <summary>
        /// Get Config from file
        /// </summary>
        /// <param name="aggrConfigFile"></param>
        /// <returns></returns>
        public static AggrConfig GetAggrConfig(string aggrConfigFile)
        {
            var config = AggrConfig.LoadFromFile(aggrConfigFile);

            return(config);
        }