public IEnumerable <ExtractImageCollection> GetAllMatchingFiles(ExtractionRequestMessage message, IAuditExtractions auditor) { var queries = new List <QueryToExecute>(); foreach (var c in GetCataloguesFor(message)) { var query = GetQueryToExecute(c, message); if (query != null) { queries.Add(query); auditor.AuditCatalogueUse(message, c.Catalogue); } } Logger.Debug($"Found {queries.Count} Catalogues which support extracting based on '{message.KeyTag}'"); if (queries.Count == 0) { throw new Exception($"Couldn't find any compatible Catalogues to run extraction queries against for query {message}"); } List <IRejector> rejectorsToUse = message.IsNoFilterExtraction ? new List <IRejector>() : Rejectors; foreach (string valueToLookup in message.ExtractionIdentifiers) { var results = new ExtractImageCollection(valueToLookup); foreach (QueryToExecute query in queries) { foreach (QueryToExecuteResult result in query.Execute(valueToLookup, rejectorsToUse)) { if (!results.ContainsKey(result.SeriesTagValue)) { results.Add(result.SeriesTagValue, new HashSet <QueryToExecuteResult>()); } results[result.SeriesTagValue].Add(result); } } yield return(results); } }
public IEnumerable <ExtractImageCollection> GetAllMatchingFiles(ExtractionRequestMessage message, IAuditExtractions auditor) { Logger.Debug("Found " + message.KeyTag); foreach (string valueToLookup in message.ExtractionIdentifiers) { var results = new ExtractImageCollection(valueToLookup); string filePathValue = valueToLookup; // "img001.dcm"; string studyTagValue = "2"; string seriesTagValue = "3"; string instanceTagValue = "4"; bool rejection = false; string rejectionReason = ""; var result = new QueryToExecuteResult(filePathValue, studyTagValue, seriesTagValue, instanceTagValue, rejection, rejectionReason); if (!results.ContainsKey(result.SeriesTagValue)) { results.Add(result.SeriesTagValue, new HashSet <QueryToExecuteResult>()); } results[result.SeriesTagValue].Add(result); yield return(results); } }
/// <inheritdoc/> public void AuditExtractFiles(ExtractionRequestMessage request, ExtractImageCollection answers) { return; }