Ejemplo n.º 1
0
        private IQueryable <Study> GetStudies(Query query)
        {
            var studies = StudyDatabase.Instance().GetStudies().Values.AsQueryable();

            // apply filters
            studies = ApplyStudyDateFilter(studies, query.FindQueryAttribute(0x0008, 0x0020));
            studies = ApplyStudyTimeFilter(studies, query.FindQueryAttribute(0x0008, 0x0030));
            studies = ApplyAccessionNumberFilter(studies, query.FindQueryAttribute(0x0008, 0x0050));
            studies = ApplyModalitiesInStudyFilter(studies, query.FindQueryAttribute(0x0008, 0x0061));
            studies = ApplyReferringPhysiciansNameFilter(studies, query.FindQueryAttribute(0x0008, 0x0090));
            studies = ApplyStudyDescriptionFilter(studies, query.FindQueryAttribute(0x0008, 0x1030));
            studies = ApplyPatientNameFilter(studies, query.FindQueryAttribute(0x0010, 0x0010));
            studies = ApplyPatientIdFilter(studies, query.FindQueryAttribute(0x0010, 0x0020));
            studies = ApplyStudyUidFilter(studies, query.FindQueryAttribute(0x0020, 0x000D));
            studies = ApplyStudyIdFilter(studies, query.FindQueryAttribute(0x0020, 0x0010));
            studies = ApplyInstanceAvailabilityFilter(studies, query.FindQueryAttribute(0x0008, 0x0056));

            studies = studies.Take(query.Limit);
            studies = studies.Skip(query.Offset);
            return(studies);
        }
Ejemplo n.º 2
0
        private IQueryable <Instance> GetInstances(string studyUid, string seriesUid, Query query)
        {
            Study study = StudyDatabase.Instance().FindByStudyUid(studyUid);

            if (study == null)
            {
                return(new List <Instance>().AsQueryable());
            }

            var instances = GetInstances(study, seriesUid);

            // apply filters
            instances = ApplySOPClassUidFilter(instances, query.FindQueryAttribute(0x0008, 0x0016));
            instances = ApplySOPInstanceUidFilter(instances, query.FindQueryAttribute(0x0008, 0x0018));
            instances = ApplyInstanceNumberFilter(instances, query.FindQueryAttribute(0x0020, 0x0013));
            instances = ApplyInstanceAvailabilityFilter(instances, query.FindQueryAttribute(0x0008, 0x0056));

            instances = instances.Take(query.Limit);
            instances = instances.Skip(query.Offset);
            return(instances);
        }
Ejemplo n.º 3
0
        private IQueryable <Series> GetSeries(string studyUid, Query query)
        {
            Study study = StudyDatabase.Instance().FindByStudyUid(studyUid);

            if (study == null)
            {
                return(new List <Series>().AsQueryable());
            }

            var series = study.Series.Values.AsQueryable();

            // apply filters
            series = ApplyModalityFilter(series, query.FindQueryAttribute(0x0008, 0x0060));
            series = ApplySeriesDescriptionFilter(series, query.FindQueryAttribute(0x0008, 0x103E));
            series = ApplySeriesUidFilter(series, query.FindQueryAttribute(0x0020, 0x000E));
            series = ApplySeriesNumberFilter(series, query.FindQueryAttribute(0x0020, 0x0011));
            series = ApplyPerformedProcedureStepStartDateFilter(series, query.FindQueryAttribute(0x0040, 0x0244));
            series = ApplyPerformedProcedureStepStartTimeFilter(series, query.FindQueryAttribute(0x0040, 0x0245));
            series = ApplyInstanceAvailabilityFilter(series, query.FindQueryAttribute(0x0008, 0x0056));

            series = series.Take(query.Limit);
            series = series.Skip(query.Offset);
            return(series);
        }