private static void FillStudyRelatedSeriesParameters ( IQueryResponseBuilder responseBuilder, Dictionary <string, StudyAdditionalParams> studyKeyValuePairs ) { var series = responseBuilder.GetResults(ObjectQueryLevelConstants.Series); foreach (var seriesDs in series) { var studyKey = seriesDs.GetSingleValueOrDefault(DicomTag.StudyInstanceUID, ""); var seriesKey = seriesDs.GetSingleValueOrDefault(DicomTag.SeriesInstanceUID, ""); var modality = seriesDs.GetSingleValueOrDefault(DicomTag.Modality, ""); StudyAdditionalParams studyParams = null; if (!studyKeyValuePairs.TryGetValue(studyKey, out studyParams)) { studyParams = new StudyAdditionalParams(); studyKeyValuePairs.Add(studyKey, studyParams); } studyParams.NumberOfSeries++; if (!string.IsNullOrEmpty(modality) && !studyParams.Modality.Contains(modality)) { studyParams.Modality.Add(modality); } } }
private static void FillStudyRelatedInstancesParameters ( IQueryResponseBuilder responseBuilder, Dictionary <string, StudyAdditionalParams> studyKeyValuePairs ) { var instances = responseBuilder.GetResults(ObjectQueryLevelConstants.Instance); foreach (var instanceDs in instances) { var studyKey = instanceDs.GetSingleValueOrDefault(DicomTag.StudyInstanceUID, ""); StudyAdditionalParams studyParams = null; if (!studyKeyValuePairs.TryGetValue(studyKey, out studyParams)) { studyParams = new StudyAdditionalParams(); studyKeyValuePairs.Add(studyKey, studyParams); } studyParams.NumberOfInstances++; } }