public static void SetupTest(TestContext ctx) { _import = new ExampleImporter(); _import.ImportZip("examples.zip"); _stockPatients = _import.ImportedEntries["patient"]; _stockOrgs = _import.ImportedEntries["organization"]; _stockPatient = (ResourceEntry)_stockPatients[0]; _stockOrg = (ResourceEntry)_stockOrgs[0]; _store = new MongoFhirStore(); _store.EraseData(); }
public void FullExampleImport() { ExampleImporter examples = new ExampleImporter(); examples.ImportZip("examples.zip"); var importer = new ResourceImporter(new Uri("http://hl7.org/fhir/")); foreach (var resourceName in ModelInfo.SupportedResources) { var key = resourceName.ToLower(); if (examples.ImportedEntries.ContainsKey(key)) { var exampleEntries = examples.ImportedEntries[key]; foreach (var exampleEntry in exampleEntries) { importer.QueueNewEntry(exampleEntry); } } } var importedEntries = importer.ImportQueued(); }