private static void ExtractExamplesFromResource(Dictionary <string, int> exampleSearchValues, Resource resource, ModelInfo.SearchParamDefinition index, string key)
        {
            var resourceModel = new FhirPath.PocoNavigator(resource);
            var navigator     = new FhirPath.PocoNavigator(resource);

            try
            {
                var results = resourceModel.Select(index.Expression, navigator);
                if (results.Count() > 0)
                {
                    foreach (var t2 in results)
                    {
                        if (t2 != null)
                        {
                            if (t2 is FhirPath.PocoNavigator && (t2 as FhirPath.PocoNavigator).FhirValue != null)
                            {
                                // Validate the type of data returned against the type of search parameter
                                //    Debug.Write(index.Resource + "." + index.Name + ": ");
                                //    Debug.WriteLine((t2 as FhirPath.ModelNavigator).FhirValue.ToString());// + "\r\n";
                                exampleSearchValues[key]++;
                            }
                            else if (t2.Value is Hl7.FhirPath.ConstantValue)
                            {
                                //    Debug.Write(index.Resource + "." + index.Name + ": ");
                                //    Debug.WriteLine((t2.Value as Hl7.FhirPath.ConstantValue).Value);
                                exampleSearchValues[key]++;
                            }
                            else if (t2.Value is bool)
                            {
                                //    Debug.Write(index.Resource + "." + index.Name + ": ");
                                //    Debug.WriteLine((bool)t2.Value);
                                exampleSearchValues[key]++;
                            }
                            else
                            {
                                Debug.Write(index.Resource + "." + index.Name + ": ");
                                Debug.WriteLine(t2.Value);
                                exampleSearchValues[key]++;
                            }
                        }
                    }
                }
            }
            catch (ArgumentException ex)
            {
                Debug.WriteLine("FATAL: Error parsing expression in search index {0}.{1} {2}\r\n\t{3}", index.Resource, index.Name, index.Expression, ex.Message);
            }
        }