public string GetDicomJSON(string authenticationCookie, string studyInstanceUID, string seriesInstanceUID, string sopInstanceUID, string userData) { var user = ServiceUtils.Authorize(authenticationCookie, PermissionsTable.Instance.CanRetrieve); ExtraOptions extraOptions = new ExtraOptions(); ObjectUID uid = new ObjectUID(); extraOptions.UserData = userData; uid.StudyInstanceUID = studyInstanceUID; uid.SeriesInstanceUID = seriesInstanceUID; if (string.IsNullOrEmpty(sopInstanceUID)) { var options = new QueryOptions(); options.StudiesOptions = new StudiesQueryOptions(); options.StudiesOptions.StudyInstanceUID = studyInstanceUID; options.SeriesOptions = new SeriesQueryOptions(); options.SeriesOptions.SeriesInstanceUID = seriesInstanceUID; var objectsFound = AddinsFactory.CreateQueryAddin().FindInstances(user, options, 1, true); if (objectsFound.Length > 0) { var objects = objectsFound.Where(o => o != null).ToArray(); if (objects.Length > 0) { sopInstanceUID = objects[0].SOPInstanceUID; } } } uid.SOPInstanceUID = sopInstanceUID; return(AddinsFactory.CreateObjectRetrieveAddin().GetDicomJSON(uid)); }
public PatientService() { try { _storeAddin = AddinsFactory.CreateStoreAddin(); _queryAddin = AddinsFactory.CreateQueryAddin(); } catch (Exception ex) { WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.InternalServerError; WebOperationContext.Current.OutgoingResponse.StatusDescription = ex.Message; WebOperationContext.Current.OutgoingResponse.ContentType = "application/json"; throw; } }
public ObjectQueryService( ) { _queryAddin = AddinsFactory.CreateQueryAddin(); }
public ThreeDService( ) { _queryAddin = AddinsFactory.CreateQueryAddin(); }