Esempio n. 1
0
        public async Task GivenRetrieveRequestForSeries_WhenResourceIsFound_ThenAuditLogEntriesShouldBeCreated()
        {
            InstanceIdentifier dicomInstance = await CreateDicomFileAndGetInstanceIdentifierAsync();

            await ExecuteAndValidate(
                () => _client.RetrieveSeriesAsync(dicomInstance.StudyInstanceUid, dicomInstance.SeriesInstanceUid),
                AuditEventSubType.Retrieve,
                $"studies/{dicomInstance.StudyInstanceUid}/series/{dicomInstance.SeriesInstanceUid}",
                HttpStatusCode.OK);
        }
Esempio n. 2
0
        private static async Task Wado(Message message, CancellationToken token)
        {
            (string studyInstanceUid, string seriesInstanceUid, string sopInstanceUid) = ParseMessageForUids(message);

            if (sopInstanceUid != null)
            {
                await client.RetrieveInstanceAsync(studyInstanceUid, seriesInstanceUid, sopInstanceUid, cancellationToken : token);
            }
            else if (seriesInstanceUid != null)
            {
                await client.RetrieveSeriesAsync(studyInstanceUid, seriesInstanceUid, cancellationToken : token);
            }
            else
            {
                await client.RetrieveStudyAsync(studyInstanceUid, cancellationToken : token);
            }

            return;
        }
Esempio n. 3
0
        private async Task VerifySeriesRemoval(string studyInstanceUid, string seriesInstanceUid)
        {
            DicomWebException exception = await Assert.ThrowsAsync <DicomWebException>(() => _client.RetrieveSeriesAsync(studyInstanceUid, seriesInstanceUid));

            Assert.Equal(HttpStatusCode.NotFound, exception.StatusCode);
        }
        public async Task GivenNoStoredInstances_WhenRetrieveRequestForSeries_ThenServerShouldReturnNotFound()
        {
            DicomWebException exception = await Assert.ThrowsAsync <DicomWebException>(() => _client.RetrieveSeriesAsync(TestUidGenerator.Generate(), TestUidGenerator.Generate()));

            Assert.Equal(HttpStatusCode.NotFound, exception.StatusCode);
        }