Exemplo n.º 1
0
        public async Task SearchStudyAsync()
        {
            var client = new DicomClient();

            client.NegotiateAsyncOps();

            // Find a list of Studies.
            var request = CreateStudyRequest(new QueryConditionModel());

            var studies = new List <DicomDataset>();

            request.OnResponseReceived += (req, response) =>
            {
                DebugStudyResponse(response);
                if (response.Status == DicomStatus.Pending)
                {
                    _studies.OnNext(StudyViewHelper.CreateFrom(response.Dataset));
                }
            };
            client.AddRequest(request);
            await client.SendAsync(_pacsNode.Host, _pacsNode.Port, false, LocalAET, _pacsNode.AET);
        }
Exemplo n.º 2
0
        public static StudyViewHelper CreateFrom(DicomDataset dataset)
        {
            StudyViewHelper stuTemp = new StudyViewHelper();

            stuTemp.AccessionNumber    = dataset.Get <string>(DicomTag.AccessionNumber, null);
            stuTemp.Age                = dataset.Get <string>(DicomTag.PatientAge, null);
            stuTemp.BodyPartExamined   = dataset.Get <string>(DicomTag.PatientAge, null);
            stuTemp.StudyDate          = dataset.Get <string>(DicomTag.StudyDate, null);
            stuTemp.StudyDescription   = dataset.Get <string>(DicomTag.StudyDescription, null);
            stuTemp.StudyID            = dataset.Get <string>(DicomTag.StudyID, null);
            stuTemp.StudyInstanceUID   = dataset.Get <string>(DicomTag.StudyInstanceUID, null);
            stuTemp.StudyTime          = dataset.Get <string>(DicomTag.StudyTime, null);
            stuTemp.PatientID          = dataset.Get <string>(DicomTag.PatientID, null);
            stuTemp.referringPhysician = dataset.Get <string>(DicomTag.ReferringPhysicianName, null);
            stuTemp.OperatorName       = dataset.Get <string>(DicomTag.OperatorsName, null);
            stuTemp.Modality           = dataset.Get <string>(DicomTag.Modality, null);
            stuTemp._lockedState       = "1";
            stuTemp.IsFilmed           = "false";
            stuTemp.ProtocolName       = dataset.Get <string>(DicomTag.ProtocolName, null);
            stuTemp.PatientName        = dataset.Get <string>(DicomTag.PatientName, null);
            stuTemp.Sex                = dataset.Get <string>(DicomTag.PatientSex, null);

            return(stuTemp);
        }