예제 #1
0
        //this method returns a list of objects which can be plotted on a map
        public List<MappableObject> GetMappableObjects(SearchCriteria searchQuery)
        {
            List<MappableObject> myList = new List<MappableObject>();
            MappableObject pobj;
            var diseaseTotals = dbContext.sp_AverageSpecificDiseaseInNHSTrust(searchQuery.gp, searchQuery.disease.Code.ToString());
            var result = dbContext.sp_plot();
            foreach (var r in result)
            {
                pobj = new MappableObject(r.Parent_Name, (double)r.Latitude, (double)r.Longitude);
                myList.Add(pobj);

            }

            foreach(var v in diseaseTotals)
            {

            }

            return myList ;
        }
        //this method returns a list of objects which can be plotted on a map
        public List<MappableObject> GetMappableObjects(string gp, string question, string diseaseName = "Asthma")
        {
            SearchCriteria searchQuery = new SearchCriteria(gp, question, diseaseName);
            List<MappableObject> myList = new List<MappableObject>();
            MappableObject pobj;
            var diseaseTotals = dbContext.sp_AverageSpecificDiseaseInNHSTrust(gp, searchQuery.disease.Code);
            
            var result = dbContext.sp_plot();
            foreach (var r in result)
            {
                pobj = new MappableObject(r.Parent_Name, (double)r.Latitude, (double)r.Longitude);
                myList.Add(pobj);

            }
            int i = 0;
            foreach(var v in diseaseTotals)
            {
                myList.ElementAt(i).Information +=searchQuery.disease.Name+": "+ v.Value;
            }
            
            
            return myList ;
            
        }
예제 #3
0
        //this method returns a list of objects which can be plotted on a map
        public List <MappableObject> GetMappableObjects(string gp, string question, string diseaseName = "Asthma")
        {
            SearchCriteria        searchQuery = new SearchCriteria(gp, question, diseaseName);
            List <MappableObject> myList      = new List <MappableObject>();
            MappableObject        pobj;
            var diseaseTotals = dbContext.sp_AverageSpecificDiseaseInNHSTrust(gp, searchQuery.disease.Code);

            var result = dbContext.sp_plot();

            foreach (var r in result)
            {
                pobj = new MappableObject(r.Parent_Name, (double)r.Latitude, (double)r.Longitude);
                myList.Add(pobj);
            }
            int i = 0;

            foreach (var v in diseaseTotals)
            {
                myList.ElementAt(i).Information += searchQuery.disease.Name + ": " + v.Value;
            }


            return(myList);
        }