Esempio n. 1
0
        public List <Resource> GetExampleData()
        {
            var    list        = new List <Resource>();
            string examplePath = Path.Combine(_hostingEnvironment.ContentRootPath, _examplesSettings.FilePath);

            Bundle data;

            data = FhirFileImport.ImportEmbeddedZip(examplePath).ToBundle(_localhost.DefaultBase);

            if (data.Entry != null && data.Entry.Count() != 0)
            {
                foreach (var entry in data.Entry)
                {
                    if (entry.Resource != null)
                    {
                        list.Add((Resource)entry.Resource);
                    }
                }
            }
            return(list);
        }
Esempio n. 2
0
        public List <Resource> GetExampleData()
        {
            var    list        = new List <Resource>();
            string examplePath = Path.Combine(AppContext.BaseDirectory, _examplesSettings.FilePath);

            Bundle data;

            data = FhirFileImport.ImportEmbeddedZip(examplePath).ToBundle();

            if (data.Entry != null && data.Entry.Count != 0)
            {
                foreach (var entry in data.Entry)
                {
                    if (entry.Resource != null)
                    {
                        list.Add((Resource)entry.Resource);
                    }
                }
            }
            return(list);
        }