private void ProcessResultRecordForRecall(SearchResultItem data, Dictionary<string, SearchResultMapData> list)
        {
            var check = data.DistributionPattern;
            var states = Enum.GetNames(typeof (States)).
                              ToList();
            var nationwide = check.ToLower().
                                   Contains("nationwide");

            foreach (var state in states)
            {
                var stateEnum = Enum.Parse(typeof (States), state);
                var stateName = Utilities.GetEnumDescription(stateEnum);
                var stateCoords = Utilities.GetEnumCoordinates(stateEnum);

                if (check.Contains(state) || check.ToUpper().
                                                   Contains(stateName.ToUpper()) || nationwide)
                {
                    SearchResultMapData listCheck = null;

                    if (list.ContainsKey(state))
                    {
                        listCheck = list[state];
                    }
                    else
                    {
                        listCheck = new SearchResultMapData
                                    {
                                        State = state,
                                        Latitude = stateCoords.Latitude.ToString(),
                                        Longitude = stateCoords.Longitude.ToString()
                                    };

                        list.Add(state, listCheck);
                    }

                    var tooltip = string.Concat(data.Classification, " {0}");

                    switch (data.Classification.ToLower())
                    {
                        case "class i":

                            tooltip = string.Format(tooltip, " Class-1");
                            listCheck.IconSet = listCheck.IconSet | IconSet.Class1;
                            break;

                        case "class ii":

                            tooltip = string.Format(tooltip, " Class-2");
                            listCheck.IconSet = listCheck.IconSet | IconSet.Class2;
                            break;

                        case "class iii":

                            tooltip = string.Format(tooltip, " Class-3");
                            listCheck.IconSet = listCheck.IconSet | IconSet.Class3;
                            break;
                    }

                    if (!listCheck.Tooltip.Contains(tooltip))
                    {
                        if (listCheck.Tooltip.Length > 0)
                        {
                            listCheck.Tooltip += ", ";
                        }

                        listCheck.Tooltip += tooltip;
                    }

                    // Get the Rank
                    var rank = 9;
                    switch (data.Rank.ToLower())
                    {
                        case "classi":
                            rank = 1;
                            break;
                        case "classii":
                            rank = 2;
                            break;
                        case "classiii":
                            rank = 3;
                            break;
                        case "events":
                            rank = 4;
                            break;
                        case "device event":
                            rank = 5;
                            break;
                        default:
                            rank = 5;
                            break;
                    }

                    if (listCheck.Rank > rank)
                    {
                        listCheck.Rank = rank;
                    }

                    list[state] = listCheck;
                }
            }
        }
        private void ProcessResultRecordForDrugEvent(SearchResultDrugEvent data, Dictionary<string, SearchResultMapData> list)
        {
            const string check = "nationwide"; // add state field data.
            var states = Enum.GetNames(typeof (States)).
                              ToList();
            var nationwide = false;

            if (check.ToLower().
                      Contains("nationwide"))
            {
                nationwide = true;
            }

            foreach (var state in states)
            {
                var stateEnum = Enum.Parse(typeof (States), state);
                var stateName = Utilities.GetEnumDescription(stateEnum);
                var stateCoords = Utilities.GetEnumCoordinates(stateEnum);

                if (check.Contains(state) || check.ToUpper().
                                                   Contains(stateName.ToUpper()) || nationwide)
                {
                    SearchResultMapData listCheck = null;

                    if (list.ContainsKey(state))
                    {
                        listCheck = list[state];
                    }
                    else
                    {
                        listCheck = new SearchResultMapData
                                    {
                                        State = state,
                                        Latitude = stateCoords.Latitude.ToString(),
                                        Longitude = stateCoords.Longitude.ToString()
                                    };
                        list.Add(state, listCheck);
                    }

                    var tooltip = string.Concat(data.Rank);

                    listCheck.IconSet = listCheck.IconSet | IconSet.Event;

                    if (!listCheck.Tooltip.Contains(tooltip))
                    {
                        if (listCheck.Tooltip.Length > 0)
                        {
                            listCheck.Tooltip += ", ";
                        }

                        listCheck.Tooltip += tooltip;
                    }

                    // Get the Rank
                    var rank = 9;
                    switch (data.Rank.ToLower())
                    {
                        case "classi":
                            rank = 1;
                            break;
                        case "classii":
                            rank = 2;
                            break;
                        case "classiii":
                            rank = 3;
                            break;
                        case "events":
                            rank = 4;
                            break;
                        case "device event":
                            rank = 5;
                            break;
                        default:
                            rank = 5;
                            break;
                    }

                    if (listCheck.Rank > rank)
                    {
                        listCheck.Rank = rank;
                    }

                    list[state] = listCheck;

                    list[state] = listCheck;
                }
            }
        }