예제 #1
0
        private async Task <List <string> > QueryInstances(RemoteConnection server, string PatientID, string StudyInstanceUID, string SeriesInstanceUID)
        {
            //study/series should be provided
            if (string.IsNullOrEmpty(StudyInstanceUID) || string.IsNullOrEmpty(SeriesInstanceUID))
            {
                throw new ArgumentNullException("StudyInstanceUID or SeriesInstanceUID");
            }

            var query = new QueryOptions()
            {
                SeriesOptions = new SeriesQueryOptions()
                {
                    SeriesInstanceUID = SeriesInstanceUID
                },
                StudiesOptions = new StudiesQueryOptions()
                {
                    StudyInstanceUID = StudyInstanceUID
                },
                PatientsOptions = new PatientsQueryOptions()
                {
                    PatientID = PatientID
                }
            };

            var instances = await _query.FindInstances(RemoteConnectionFactory.Config(server as WadoConnection), query);

            var SOPInstanceUIDList = new List <string>();

            foreach (var instance in instances)
            {
                SOPInstanceUIDList.Add(instance.SOPInstanceUID);
            }

            return(SOPInstanceUIDList);
        }
예제 #2
0
        public async Task <InstanceData[]> FindInstances(string authenticationCookie, RemoteConnection server, ClientConnection client, QueryOptions options)
        {
            AuthHandler.Authorize(authenticationCookie, PermissionsTable.Instance.CanQueryPACS);

            var instances = await _query.FindInstances(RemoteConnectionFactory.Config(server as WadoConnection), options);

            return(instances);
        }