private void UpdateSegment(ILookup <string, ChromosomeSegment> segmentMap, Kit kit)
        {
            var kitSegments = segmentMap[NormalizeName(kit.Name)];

            if (!kitSegments.Any())
            {
                _logger.LogInfo($"Warning: No segments could be found for {kit.Name}, falling back to fetching details...");
                var details = _service.GetMatchDetails(kit).Result;
                kitSegments = details.FFCMData.Select(s => new ChromosomeSegment
                {
                    Chromosome    = s.Chromosome,
                    StartLocation = s.P1,
                    EndLocation   = s.P2,
                    Centimorgans  = s.Cm,
                    MatchingSnps  = s.Snps
                });
                _logger.LogInfo($"Fetching {kitSegments.Count()} segments from details");
            }

            foreach (var kitSegment in kitSegments)
            {
                kit.AddSegmentMatch(kitSegment.Chromosome,
                                    kitSegment.StartLocation,
                                    kitSegment.EndLocation,
                                    kitSegment.MatchingSnps);
            }
        }
        public async Task <MatchDetails> GetMatchDetails(IKitIdentity match)
        {
            if (TryGetStoredResult("GetMatchDetails", out MatchDetails cached, match.ResultId2))
            {
                return(cached);
            }

            var result = await _service.GetMatchDetails(match);

            StoreResult("GetMatchDetails", result, match.ResultId2);

            return(result);
        }