public virtual HttpResponseMessage SearchForSeries(IQidoRequestModel request) { return(SearchForDicomEntity(request, DefaultDicomQueryElements.GetDefaultSeriesQuery( ), delegate ( IObjectArchieveQueryService queryService, DicomDataset dicomRequest, IQidoRequestModel qidoResult ) { return queryService.FindSeriesPaged(dicomRequest, GetQueryOptions(qidoResult)); })); }
public HttpResponseMessage SearchForInstances(IQidoRequestModel request) { return(SearchForDicomEntity(request, DefaultDicomQueryElements.GetDefaultInstanceQuery( ), delegate ( IObjectArchieveQueryService queryService, fo.DicomDataset dicomRequest, IQidoRequestModel qidoResult ) { return queryService.FindObjectInstances(dicomRequest, GetQueryOptions(qidoResult)); })); }
public HttpResponseMessage SearchForStudies ( IQidoRequestModel request ) { return(SearchForDicomEntity(request, DefaultDicomQueryElements.GetDefaultStudyQuery(), delegate ( IObjectArchieveQueryService queryService, fo.DicomDataset dicomRequest, IQidoRequestModel qidoRequest ) { IQueryOptions queryOptions = GetQueryOptions(qidoRequest); return queryService.FindStudies(dicomRequest, queryOptions); })); }
private void AddPreviewInstanceHeader(IEnumerable <DicomDataset> results, HttpResponseMessage response) { response.Headers.Add("Access-Control-Expose-Headers", Instance_Header_Name); foreach (var result in results) { var queryDs = DefaultDicomQueryElements.GetDefaultInstanceQuery(); string studyUid = result.Get <string> (DicomTag.StudyInstanceUID, ""); string seriesUid = result.Get <string> (DicomTag.SeriesInstanceUID, ""); var queryOptions = CreateNewQueryOptions( ); queryDs.AddOrUpdate(DicomTag.StudyInstanceUID, studyUid); queryDs.AddOrUpdate(DicomTag.SeriesInstanceUID, seriesUid); queryOptions.Limit = 1; queryOptions.Offset = 0; var instances = QueryService.FindObjectInstances(queryDs, queryOptions); string queryStudyUid = null, querySeriesUid = null, queryInstanceUid = null; foreach (var instance in instances) { queryStudyUid = instance.Get <string> (DicomTag.StudyInstanceUID, ""); querySeriesUid = instance.Get <string> (DicomTag.SeriesInstanceUID, ""); queryInstanceUid = instance.Get <string> (DicomTag.SOPInstanceUID, ""); break; } if (string.IsNullOrWhiteSpace(queryStudyUid) || string.IsNullOrWhiteSpace(querySeriesUid) || string.IsNullOrWhiteSpace(queryInstanceUid)) { response.Headers.Add(Instance_Header_Name, ""); } else { response.Headers.Add(Instance_Header_Name, string.Format("{0}:{1}:{2}", queryStudyUid, querySeriesUid, queryInstanceUid)); } } }