Beispiel #1
0
        public string Get(string patientid)
        {
            var dataset = m_WorklistRepository.WorklistItems.FirstOrDefault(i => i.Get <string>(DicomTag.PatientID) == patientid);

            var log = new StringBuilder();
            IDicomDatasetWalker walkerTexasRanger = new DicomDatasetDumper(log);
            var a = new DicomDatasetWalker(dataset);

            a.Walk(walkerTexasRanger);


            return(log.ToString());
        }
Beispiel #2
0
        public string Get()
        {
            var datasets = m_WorklistRepository.WorklistItems.ToList();

            var log = new StringBuilder();

            foreach (var dataset in datasets)
            {
                log.AppendLine("-------------------------------------------------------------------------------------------------");
                IDicomDatasetWalker walkerTexasRanger = new DicomDatasetDumper(log);

                var a = new DicomDatasetWalker(dataset);
                a.Walk(walkerTexasRanger);
            }

            return(log.ToString());
        }
Beispiel #3
0
        public void DicomDatasetDumper_ShallNotThrow_OnLongPrivateTags()
        {
            var dataSet = new DicomDataset(new List <DicomItem>
            {
                new DicomUniqueIdentifier(
                    new DicomTag(0x0029, 0x1009, "A VERY LONG PRIVATE CREATOR THAT SHOULD WORK BUT IT DOESN'T"),
                    "123456789.123456789.123456789")
            });

            var stringBuilder = new StringBuilder();
            var dumper        = new DicomDatasetDumper(stringBuilder, 128, 64);
            var walker        = new DicomDatasetWalker(dataSet);

            walker.Walk(dumper);

            var expected = "(0029,1009:A VERY LONG PRIVATE CREATOR THAT SHOULD WORK BUT IT DOESN'T) UI [123456789.123456789.123456789]#    30, Unknown" + Environment.NewLine;
            var actual   = stringBuilder.ToString();

            Assert.Equal(expected, actual);
        }
        public IEnumerable <DicomCFindResponse> OnCFindRequest(DicomCFindRequest request)
        {
            var log = new StringBuilder();
            IDicomDatasetWalker walkerTexasRanger = new DicomDatasetDumper(log);

            new DicomDatasetWalker(request.Dataset).Walk(walkerTexasRanger);

            //var description = string.Format("C-FIND -> {0}", request.Dataset.Get<DicomSequence>(DicomTag.ScheduledProcedureStepSequence).First().Get(DicomTag.ScheduledProcedureStepStartDate, "NONE"));

            List <DicomCFindResponse> responses = new List <DicomCFindResponse>();
            var results = m_WorklistRepository.WorklistItems;

            foreach (DicomDataset result in results)
            {
                //result.Add(DicomTag.RetrieveAETitle, "meeeeh");
                var response = new DicomCFindResponse(request, DicomStatus.Pending)
                {
                    Dataset = result
                };
                responses.Add(response);
            }
            responses.Add(new DicomCFindResponse(request, DicomStatus.Success));
            return(responses);
        }