Exemple #1
0
        public void AddSeveralUIDsToQuery()
        {
            var e = Record.Exception(() =>
            {
                var request = new DicomCFindRequest(DicomQueryRetrieveLevel.Series);
                request.Dataset.Add(DicomTag.SeriesInstanceUID, "1.2.3\\3.4.5");
                Assert.Equal(2, request.Dataset.GetValueCount(DicomTag.SeriesInstanceUID));
            });

            Assert.Null(e);

            e = Record.Exception(() =>
            {
                var request = new DicomCFindRequest(DicomQueryRetrieveLevel.Series);
                request.Dataset.Add(DicomTag.SeriesInstanceUID, "1.2.3", "2.3.4");
                Assert.Equal(2, request.Dataset.GetValueCount(DicomTag.SeriesInstanceUID));
            });
            Assert.Null(e);

            e = Record.Exception(() =>
            {
                var request = new DicomCFindRequest(DicomQueryRetrieveLevel.Series);
                request.Dataset.Add(new DicomUniqueIdentifier(DicomTag.SeriesInstanceUID, "1.2.3", "3.4.5"));
                Assert.Equal(2, request.Dataset.GetValueCount(DicomTag.SeriesInstanceUID));
            });
            Assert.Null(e);
        }
 public static DicomCFindRequest CreateStudyQuery(
     string patientId = null,
     string patientName = null,
     DicomDateRange studyDateTime = null,
     string accession = null,
     string studyId = null,
     string modalitiesInStudy = null,
     string studyInstanceUid = null)
 {
     var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Study);
     dimse.SOPClassUID = DicomUID.StudyRootQueryRetrieveInformationModelFIND;
     dimse.Dataset.Add(DicomTag.PatientID, patientId);
     dimse.Dataset.Add(DicomTag.PatientName, patientName);
     dimse.Dataset.Add(DicomTag.OtherPatientIDs, String.Empty);
     dimse.Dataset.Add(DicomTag.IssuerOfPatientID, String.Empty);
     dimse.Dataset.Add(DicomTag.PatientSex, String.Empty);
     dimse.Dataset.Add(DicomTag.PatientBirthDate, String.Empty);
     dimse.Dataset.Add(DicomTag.StudyInstanceUID, studyInstanceUid);
     dimse.Dataset.Add(DicomTag.ModalitiesInStudy, modalitiesInStudy);
     dimse.Dataset.Add(DicomTag.StudyID, studyId);
     dimse.Dataset.Add(DicomTag.AccessionNumber, accession);
     dimse.Dataset.Add(DicomTag.StudyDate, studyDateTime);
     dimse.Dataset.Add(DicomTag.StudyTime, studyDateTime);
     dimse.Dataset.Add(DicomTag.StudyDescription, String.Empty);
     dimse.Dataset.Add(DicomTag.NumberOfStudyRelatedSeries, String.Empty);
     dimse.Dataset.Add(DicomTag.NumberOfStudyRelatedInstances, String.Empty);
     return dimse;
 }
Exemple #3
0
        public async Task OnCFindRequestAsync_Pending_ShouldRespond()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <PendingAsyncDicomCFindProvider>(port, logger: _logger.IncludePrefix("DicomServer")))
            {
                var client = new Client.DicomClient("127.0.0.1", port, false, "SCU", "ANY-SCP")
                {
                    Logger = _logger.IncludePrefix(typeof(DicomClient).Name)
                };

                var responses = new ConcurrentQueue <DicomCFindResponse>();
                DicomRequest.OnTimeoutEventArgs timeout = null;
                var request = new DicomCFindRequest(DicomQueryRetrieveLevel.Study)
                {
                    OnResponseReceived = (req, res) => responses.Enqueue(res),
                    OnTimeout          = (sender, args) => timeout = args
                };

                await client.AddRequestAsync(request).ConfigureAwait(false);

                await client.SendAsync().ConfigureAwait(false);

                Assert.Collection(
                    responses,
                    response1 => Assert.Equal(DicomStatus.Pending, response1.Status),
                    response2 => Assert.Equal(DicomStatus.Pending, response2.Status),
                    response3 => Assert.Equal(DicomStatus.Success, response3.Status)
                    );
                Assert.Null(timeout);
            }
        }
Exemple #4
0
        public virtual IEnumerable<DicomCFindResponse> OnCFindRequest(DicomCFindRequest request)
        {
            DicomStatus status = DicomStatus.Success;
            IList<DicomDataset> queries;
            List<DicomCFindResponse> responses = new List<DicomCFindResponse>();
            if (OnZSCFindRequest != null)
            {
                //此处通过代理来返回在服务端本机进行的操作结果,也就是DICOM协议中说的匹配查询结果
                queries = OnZSCFindRequest(request);
                if (queries != null)
                {
                    Logger.Info("查询到{0}个数据", queries.Count);

                    foreach (var item in queries)
                    {
                        //对于每一个查询匹配的结果,都需要有一个单独的C-FIND-RSP消息来返回到请求端
                        //【注】:每次发送的状态都必须是Pending,表明后续还会继续发送查询结果
                        DicomCFindResponse rsp = new DicomCFindResponse(request, DicomStatus.Pending);
                        rsp.Dataset = item;
                        responses.Add(rsp);
                    }
                }
                else
                {
                    status = DicomStatus.QueryRetrieveOutOfResources;
                }
            }
            //随后需要发送查询结束的状态,即Success到C-FIND SCU端
            responses.Add(new DicomCFindResponse(request, DicomStatus.Success));
            
            //这里貌似是一起将多个response发送出去的?需要后续在研究一下DicomService中的实现代码
            //搞清楚具体的发送机制
            return responses;
        }
Exemple #5
0
        public async Task OnCFindRequestAsync_ImmediateSuccess_ShouldRespond()
        {
            var port = Ports.GetNext();

            using (DicomServer.Create <ImmediateSuccessAsyncDicomCFindProvider>(port, logger: _logger.IncludePrefix("DicomServer")))
            {
                var client = new Client.DicomClient("127.0.0.1", port, false, "SCU", "ANY-SCP")
                {
                    Logger = _logger.IncludePrefix(typeof(DicomClient).Name)
                };

                DicomCFindResponse response             = null;
                DicomRequest.OnTimeoutEventArgs timeout = null;
                var request = new DicomCFindRequest(DicomQueryRetrieveLevel.Study)
                {
                    OnResponseReceived = (req, res) => response = res,
                    OnTimeout          = (sender, args) => timeout = args
                };

                await client.AddRequestAsync(request).ConfigureAwait(false);

                await client.SendAsync().ConfigureAwait(false);

                Assert.NotNull(response);
                Assert.Equal(DicomStatus.Success, response.Status);
                Assert.Null(timeout);
            }
        }
Exemple #6
0
        public static DicomCFindRequest CreateStudyQuery(
            string patientId             = null,
            string patientName           = null,
            DicomDateRange studyDateTime = null,
            string accession             = null,
            string studyId           = null,
            string modalitiesInStudy = null,
            string studyInstanceUid  = null)
        {
            var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Study);

            dimse.SOPClassUID = DicomUID.StudyRootQueryRetrieveInformationModelFIND;
            dimse.Dataset.Add(DicomTag.PatientID, patientId);
            dimse.Dataset.Add(DicomTag.PatientName, patientName);
            dimse.Dataset.Add(DicomTag.OtherPatientIDs, String.Empty);
            dimse.Dataset.Add(DicomTag.IssuerOfPatientID, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientSex, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientBirthDate, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyInstanceUID, studyInstanceUid);
            dimse.Dataset.Add(DicomTag.ModalitiesInStudy, modalitiesInStudy);
            dimse.Dataset.Add(DicomTag.StudyID, studyId);
            dimse.Dataset.Add(DicomTag.AccessionNumber, accession);
            dimse.Dataset.Add(DicomTag.StudyDate, studyDateTime);
            dimse.Dataset.Add(DicomTag.StudyTime, studyDateTime);
            dimse.Dataset.Add(DicomTag.StudyDescription, String.Empty);
            dimse.Dataset.Add(DicomTag.NumberOfStudyRelatedSeries, String.Empty);
            dimse.Dataset.Add(DicomTag.NumberOfStudyRelatedInstances, String.Empty);
            return(dimse);
        }
        public void Constructor_CreatesPatientRootQuery()
        {
            var query = new DicomCFindRequest(DicomUID.PatientRootQueryRetrieveInformationModelFind, DicomQueryRetrieveLevel.Patient);

            Assert.Equal(DicomQueryRetrieveLevel.Patient, query.Level);
            Assert.Equal(DicomUID.PatientRootQueryRetrieveInformationModelFind, query.SOPClassUID);
        }
Exemple #8
0
        public void Constructor_CreatesStudyRootQuery()
        {
            var query = new DicomCFindRequest(DicomUID.StudyRootQueryRetrieveInformationModelFIND, DicomQueryRetrieveLevel.Study);

            Assert.Equal(DicomQueryRetrieveLevel.Study, query.Level);
            Assert.Equal(DicomUID.StudyRootQueryRetrieveInformationModelFIND, query.SOPClassUID);
        }
Exemple #9
0
        public void Constructor_ParamatersAreSet()
        {
            var cfind = new DicomCFindRequest(DicomUID.UnifiedProcedureStepEventSOPClass, DicomQueryRetrieveLevel.NotApplicable, DicomPriority.High);

            Assert.Equal(DicomPriority.High, cfind.Priority);
            Assert.Equal(DicomQueryRetrieveLevel.NotApplicable, cfind.Level);
            Assert.Equal(DicomUID.UnifiedProcedureStepEventSOPClass, cfind.SOPClassUID);
        }
Exemple #10
0
        public void CreateQueryWithInvalidUID()
        {
            var invalidStudyUID = "1.2.0004";
            var e = Record.Exception(() =>
            {
                var request = DicomCFindRequest.CreateSeriesQuery(invalidStudyUID);
                Assert.Equal(invalidStudyUID, request.Dataset.GetSingleValue <string>(DicomTag.StudyInstanceUID));
            });

            Assert.Null(e);
        }
		public static DicomCFindRequest CreatePatientQuery(string patientId = null, string patientName = null) {
			var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Patient);
			dimse.SOPClassUID = DicomUID.PatientRootQueryRetrieveInformationModelFIND;
			dimse.Dataset.Add(DicomTag.PatientID, patientId);
			dimse.Dataset.Add(DicomTag.PatientName, patientName);
			dimse.Dataset.Add(DicomTag.OtherPatientIDs, String.Empty);
			dimse.Dataset.Add(DicomTag.IssuerOfPatientID, String.Empty);
			dimse.Dataset.Add(DicomTag.PatientSex, String.Empty);
			dimse.Dataset.Add(DicomTag.PatientBirthDate, String.Empty);
			return dimse;
		}
Exemple #12
0
        /// <summary>
        /// Convenience method for creating a C-FIND patient query.
        /// </summary>
        /// <param name="patientId">Patient ID</param>
        /// <param name="patientName">Patient name.</param>
        /// <returns>C-FIND patient query object.</returns>
        public static DicomCFindRequest CreatePatientQuery(string patientId = null, string patientName = null)
        {
            var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Patient);

            dimse.Dataset.Add(DicomTag.PatientID, patientId);
            dimse.Dataset.Add(DicomTag.PatientName, patientName);
            dimse.Dataset.Add(DicomTag.IssuerOfPatientID, string.Empty);
            dimse.Dataset.Add(DicomTag.PatientSex, string.Empty);
            dimse.Dataset.Add(DicomTag.PatientBirthDate, string.Empty);
            return(dimse);
        }
Exemple #13
0
        public void AddInvalidUIDToQuery()
        {
            var invalidStudyUID = "1.2.0004";
            var e = Record.Exception(() =>
            {
                var request = new DicomCFindRequest(DicomQueryRetrieveLevel.Study);
                request.Dataset.AddOrUpdate(DicomTag.StudyInstanceUID, invalidStudyUID);
                Assert.Equal(invalidStudyUID, request.Dataset.GetSingleValue <string>(DicomTag.StudyInstanceUID));
            });

            Assert.Null(e);
        }
		public static DicomCFindRequest CreateSeriesQuery(string studyInstanceUid, string modality = null) {
			var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Series);
			dimse.SOPClassUID = DicomUID.StudyRootQueryRetrieveInformationModelFIND;
			dimse.Dataset.Add(DicomTag.StudyInstanceUID, studyInstanceUid);
			dimse.Dataset.Add(DicomTag.SeriesInstanceUID, String.Empty);
			dimse.Dataset.Add(DicomTag.SeriesNumber, String.Empty);
			dimse.Dataset.Add(DicomTag.SeriesDescription, String.Empty);
			dimse.Dataset.Add(DicomTag.Modality, modality);
			dimse.Dataset.Add(DicomTag.SeriesDate, String.Empty);
			dimse.Dataset.Add(DicomTag.SeriesTime, String.Empty);
			dimse.Dataset.Add(DicomTag.NumberOfSeriesRelatedInstances, String.Empty);
			return dimse;
		}
Exemple #15
0
        public static DicomCFindRequest CreatePatientQuery(string patientId = null, string patientName = null)
        {
            var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Patient);

            dimse.AffectedSOPClassUID = DicomUID.PatientRootQueryRetrieveInformationModelFIND;
            dimse.Dataset.Add(DicomTag.PatientID, patientId);
            dimse.Dataset.Add(DicomTag.PatientName, patientName);
            dimse.Dataset.Add(DicomTag.OtherPatientIDs, String.Empty);
            dimse.Dataset.Add(DicomTag.IssuerOfPatientID, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientSex, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientBirthDate, String.Empty);
            return(dimse);
        }
Exemple #16
0
        /// <summary>
        /// Convenience method for creating a C-FIND series query.
        /// </summary>
        /// <param name="studyInstanceUid">Study instance UID.</param>
        /// <param name="modality">Modality.</param>
        /// <returns>C-FIND series query object.</returns>
        public static DicomCFindRequest CreateSeriesQuery(string studyInstanceUid, string modality = null)
        {
            var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Series);

            dimse.Dataset.Add(DicomTag.StudyInstanceUID, studyInstanceUid);
            dimse.Dataset.Add(DicomTag.SeriesInstanceUID, string.Empty);
            dimse.Dataset.Add(DicomTag.SeriesNumber, string.Empty);
            dimse.Dataset.Add(DicomTag.SeriesDescription, string.Empty);
            dimse.Dataset.Add(DicomTag.Modality, modality);
            dimse.Dataset.Add(DicomTag.SeriesDate, string.Empty);
            dimse.Dataset.Add(DicomTag.SeriesTime, string.Empty);
            dimse.Dataset.Add(DicomTag.NumberOfSeriesRelatedInstances, string.Empty);
            return(dimse);
        }
Exemple #17
0
        /// <summary>
        /// Convenience method for creating a C-FIND image query.
        /// </summary>
        /// <param name="studyInstanceUid">Study instance UID.</param>
        /// <param name="seriesInstanceUid">Series instance UID.</param>
        /// <param name="modality">Modality.</param>
        /// <returns>C-FIND image query object.</returns>
        public static DicomCFindRequest CreateImageQuery(
            string studyInstanceUid,
            string seriesInstanceUid,
            string modality = null)
        {
            var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Image);

            dimse.Dataset.Add(DicomTag.StudyInstanceUID, studyInstanceUid);
            dimse.Dataset.Add(DicomTag.SeriesInstanceUID, seriesInstanceUid);
            dimse.Dataset.Add(DicomTag.SOPInstanceUID, string.Empty);
            dimse.Dataset.Add(DicomTag.InstanceNumber, string.Empty);
            dimse.Dataset.Add(DicomTag.Modality, modality);
            return(dimse);
        }
Exemple #18
0
 public IEnumerable<DicomCFindResponse> OnCFindRequest(DicomCFindRequest request)
 {
     IList<DicomCFindResponse> responses=new List<DicomCFindResponse>();
     //固定返回C-FIND-RSP给客户端
     for (int i = 0; i < 2; ++i)
     {
         DicomCFindResponse response = new DicomCFindResponse(request, DicomStatus.Pending) { Dataset = request.Dataset };
         response.Completed = i+100;
         responses.Add(response);
     }
     DicomCFindResponse rsp = new DicomCFindResponse(request, DicomStatus.Success) { Dataset = request.Dataset };
     rsp.Completed = 2234;
     responses.Add(rsp);
     return responses;
 }
Exemple #19
0
        public static DicomCFindRequest CreateSeriesQuery(string studyInstanceUid, string modality = null)
        {
            var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Series);

            dimse.AffectedSOPClassUID = DicomUID.StudyRootQueryRetrieveInformationModelFIND;
            dimse.Dataset.Add(DicomTag.StudyInstanceUID, studyInstanceUid);
            dimse.Dataset.Add(DicomTag.SeriesInstanceUID, String.Empty);
            dimse.Dataset.Add(DicomTag.SeriesNumber, String.Empty);
            dimse.Dataset.Add(DicomTag.SeriesDescription, String.Empty);
            dimse.Dataset.Add(DicomTag.Modality, modality);
            dimse.Dataset.Add(DicomTag.SeriesDate, String.Empty);
            dimse.Dataset.Add(DicomTag.SeriesTime, String.Empty);
            dimse.Dataset.Add(DicomTag.NumberOfSeriesRelatedInstances, String.Empty);
            return(dimse);
        }
Exemple #20
0
 /// <summary>
 /// Initializes an instance of the <see cref="DicomCFindResponse"/> class.
 /// </summary>
 /// <param name="request">C-FIND request for which the response should be made.</param>
 /// <param name="status">Response status.</param>
 public DicomCFindResponse(DicomCFindRequest request, DicomStatus status)
     : base(request, status)
 {
 }
Exemple #21
0
        public async Task <IEnumerable <Task <DicomCFindResponse> > > OnCFindRequestAsync(DicomCFindRequest request)
        {
            return(InnerOnCFindRequestAsync());

            IEnumerable <Task <DicomCFindResponse> > InnerOnCFindRequestAsync()
            {
                yield return(Task.FromResult(new DicomCFindResponse(request, DicomStatus.Pending)));

                yield return(Task.FromResult(new DicomCFindResponse(request, DicomStatus.Pending)));

                yield return(Task.FromResult(new DicomCFindResponse(request, DicomStatus.Success)));
            }
        }
        public static DicomCFindRequest CreateWorklistQuery(
            string patientId = null,
            string patientName = null,
            string stationAE = null,
            string stationName = null,
            string modality = null,
            DicomDateRange scheduledDateTime = null)
        {
            var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Worklist);
            dimse.SOPClassUID = DicomUID.ModalityWorklistInformationModelFIND;
            dimse.Dataset.Add(DicomTag.PatientID, patientId);
            dimse.Dataset.Add(DicomTag.PatientName, patientName);
            dimse.Dataset.Add(DicomTag.OtherPatientIDs, String.Empty);
            dimse.Dataset.Add(DicomTag.IssuerOfPatientID, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientSex, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientWeight, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientBirthDate, String.Empty);
            dimse.Dataset.Add(DicomTag.MedicalAlerts, String.Empty);
            dimse.Dataset.Add(DicomTag.PregnancyStatus, new ushort[0]);
            dimse.Dataset.Add(DicomTag.Allergies, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientComments, String.Empty);
            dimse.Dataset.Add(DicomTag.SpecialNeeds, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientState, String.Empty);
            dimse.Dataset.Add(DicomTag.CurrentPatientLocation, String.Empty);
            dimse.Dataset.Add(DicomTag.InstitutionName, String.Empty);
            dimse.Dataset.Add(DicomTag.AdmissionID, String.Empty);
            dimse.Dataset.Add(DicomTag.AccessionNumber, String.Empty);
            dimse.Dataset.Add(DicomTag.ReferringPhysicianName, String.Empty);
            dimse.Dataset.Add(DicomTag.AdmittingDiagnosesDescription, String.Empty);
            dimse.Dataset.Add(DicomTag.RequestingPhysician, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyInstanceUID, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyDescription, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyID, String.Empty);
            dimse.Dataset.Add(DicomTag.ReasonForTheRequestedProcedure, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyDate, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyTime, String.Empty);

            dimse.Dataset.Add(DicomTag.RequestedProcedureID, String.Empty);
            dimse.Dataset.Add(DicomTag.RequestedProcedureDescription, String.Empty);
            dimse.Dataset.Add(DicomTag.RequestedProcedurePriority, String.Empty);
            dimse.Dataset.Add(new DicomSequence(DicomTag.RequestedProcedureCodeSequence));
            dimse.Dataset.Add(new DicomSequence(DicomTag.ReferencedStudySequence));

            dimse.Dataset.Add(new DicomSequence(DicomTag.ProcedureCodeSequence));

            var sps = new DicomDataset();
            sps.Add(DicomTag.ScheduledStationAETitle, stationAE);
            sps.Add(DicomTag.ScheduledStationName, stationName);
            sps.Add(DicomTag.ScheduledProcedureStepStartDate, scheduledDateTime);
            sps.Add(DicomTag.ScheduledProcedureStepStartTime, scheduledDateTime);
            sps.Add(DicomTag.Modality, modality);
            sps.Add(DicomTag.ScheduledPerformingPhysicianName, String.Empty);
            sps.Add(DicomTag.ScheduledProcedureStepDescription, String.Empty);
            sps.Add(new DicomSequence(DicomTag.ScheduledProtocolCodeSequence));
            sps.Add(DicomTag.ScheduledProcedureStepLocation, String.Empty);
            sps.Add(DicomTag.ScheduledProcedureStepID, String.Empty);
            sps.Add(DicomTag.RequestedContrastAgent, String.Empty);
            sps.Add(DicomTag.PreMedication, String.Empty);
            sps.Add(DicomTag.AnatomicalOrientationType, String.Empty);
            dimse.Dataset.Add(new DicomSequence(DicomTag.ScheduledProcedureStepSequence, sps));

            return dimse;
        }
Exemple #23
0
        public void Level_Getter_ReturnsCorrectQueryRetrieveLevel(DicomCFindRequest request, DicomQueryRetrieveLevel expected)
        {
            var actual = request.Level;

            Assert.Equal(expected, actual);
        }
Exemple #24
0
        public static DicomCFindRequest CreateWorklistQuery(string patientId = null, string patientName = null,
                                                            string stationAE = null, string stationName = null, string modality = null,
                                                            DicomDateRange scheduledDateTime = null)
        {
            var dimse = new DicomCFindRequest(DicomQueryRetrieveLevel.Worklist);

            dimse.AffectedSOPClassUID = DicomUID.ModalityWorklistInformationModelFIND;
            dimse.Dataset.Add(DicomTag.PatientID, patientId);
            dimse.Dataset.Add(DicomTag.PatientName, patientName);
            dimse.Dataset.Add(DicomTag.OtherPatientIDs, String.Empty);
            dimse.Dataset.Add(DicomTag.IssuerOfPatientID, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientSex, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientWeight, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientBirthDate, String.Empty);
            dimse.Dataset.Add(DicomTag.MedicalAlerts, String.Empty);
            dimse.Dataset.Add(DicomTag.PregnancyStatus, String.Empty);
            dimse.Dataset.Add(DicomTag.Allergies, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientComments, String.Empty);
            dimse.Dataset.Add(DicomTag.SpecialNeeds, String.Empty);
            dimse.Dataset.Add(DicomTag.PregnancyStatus, String.Empty);
            dimse.Dataset.Add(DicomTag.PatientState, String.Empty);
            dimse.Dataset.Add(DicomTag.CurrentPatientLocation, String.Empty);
            dimse.Dataset.Add(DicomTag.InstitutionName, String.Empty);
            dimse.Dataset.Add(DicomTag.AdmissionID, String.Empty);
            dimse.Dataset.Add(DicomTag.AccessionNumber, String.Empty);
            dimse.Dataset.Add(DicomTag.ReferringPhysicianName, String.Empty);
            dimse.Dataset.Add(DicomTag.AdmittingDiagnosesDescription, String.Empty);
            dimse.Dataset.Add(DicomTag.RequestingPhysician, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyInstanceUID, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyDescription, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyID, String.Empty);
            dimse.Dataset.Add(DicomTag.ReasonForTheRequestedProcedure, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyDate, String.Empty);
            dimse.Dataset.Add(DicomTag.StudyTime, String.Empty);

            dimse.Dataset.Add(DicomTag.RequestedProcedureID, String.Empty);
            dimse.Dataset.Add(DicomTag.RequestedProcedureDescription, String.Empty);
            dimse.Dataset.Add(DicomTag.RequestedProcedurePriority, String.Empty);
            dimse.Dataset.Add(new DicomSequence(DicomTag.RequestedProcedureCodeSequence));
            dimse.Dataset.Add(new DicomSequence(DicomTag.ReferencedStudySequence));

            dimse.Dataset.Add(new DicomSequence(DicomTag.ProcedureCodeSequence));

            var sps = new DicomDataset();

            sps.Add(DicomTag.ScheduledStationAETitle, stationAE);
            sps.Add(DicomTag.ScheduledStationName, stationName);
            sps.Add(DicomTag.ScheduledProcedureStepStartDate, scheduledDateTime);
            sps.Add(DicomTag.ScheduledProcedureStepStartTime, scheduledDateTime);
            sps.Add(DicomTag.Modality, modality);
            sps.Add(DicomTag.ScheduledPerformingPhysicianName, String.Empty);
            sps.Add(DicomTag.ScheduledProcedureStepDescription, String.Empty);
            sps.Add(new DicomSequence(DicomTag.ScheduledProtocolCodeSequence));
            sps.Add(DicomTag.ScheduledProcedureStepLocation, String.Empty);
            sps.Add(DicomTag.ScheduledProcedureStepID, String.Empty);
            sps.Add(DicomTag.RequestedContrastAgent, String.Empty);
            sps.Add(DicomTag.PreMedication, String.Empty);
            sps.Add(DicomTag.AnatomicalOrientationType, String.Empty);
            dimse.Dataset.Add(new DicomSequence(DicomTag.ScheduledProcedureStepSequence, sps));

            return(dimse);
        }
Exemple #25
0
 public DicomCFindResponse(DicomCFindRequest request, DicomStatus status)
     : base(request, status)
 {
 }