示例#1
0
        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));
        }
示例#2
0
        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;
            }
        }
示例#3
0
 public ObjectQueryService( )
 {
     _queryAddin = AddinsFactory.CreateQueryAddin();
 }
示例#4
0
 public ThreeDService( )
 {
     _queryAddin = AddinsFactory.CreateQueryAddin();
 }