Example #1
0
        /// <summary>
        /// Initializes a new instance of <see cref="StudyItem"/>.
        /// </summary>
        public StudyItem(IPatientData patient, IStudyData study, IDicomServiceNode server)
            : base(patient, study, null)
        {
            Platform.CheckForNullReference(server, "server");
            Platform.CheckForNullReference(study, "study");
            Platform.CheckForEmptyString(study.StudyInstanceUid, "study.StudyInstanceUid");

            Server = server;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of <see cref="StudyItem"/>.
        /// </summary>
        public StudyItem(IPatientData patient, IStudyData study, IDicomServiceNode server)
        // TODO (CR Nov 2012) - null is passed to the base class (Macro.Dicom.ServiceModel.Query.Identifier) causing
        // some of the properties in the base such as SpecificCharacterSet, InstanceAvailability, RetrieveAE not being copied as one would expect
            : base(patient, study, null)
        {
            Platform.CheckForNullReference(server, "server");
            Platform.CheckForNullReference(study, "study");
            Platform.CheckForEmptyString(study.StudyInstanceUid, "study.StudyInstanceUid");

            Server = server;
        }
Example #3
0
		private void CopyFrom(IStudyData other)
		{
			ReferringPhysiciansName = other.ReferringPhysiciansName;
			AccessionNumber = other.AccessionNumber;
			StudyDescription = other.StudyDescription;
			StudyId = other.StudyId;
			StudyDate = other.StudyDate;
			StudyTime = other.StudyTime;
			ModalitiesInStudy = other.ModalitiesInStudy;
			StudyInstanceUid = other.StudyInstanceUid;
			NumberOfStudyRelatedSeries = other.NumberOfStudyRelatedSeries;
			NumberOfStudyRelatedInstances = other.NumberOfStudyRelatedInstances;
		}
Example #4
0
 private void CopyFrom(IStudyData other)
 {
     ReferringPhysiciansName = other.ReferringPhysiciansName;
     AccessionNumber         = other.AccessionNumber;
     StudyDescription        = other.StudyDescription;
     StudyId                       = other.StudyId;
     StudyDate                     = other.StudyDate;
     StudyTime                     = other.StudyTime;
     ModalitiesInStudy             = other.ModalitiesInStudy;
     StudyInstanceUid              = other.StudyInstanceUid;
     NumberOfStudyRelatedSeries    = other.NumberOfStudyRelatedSeries;
     NumberOfStudyRelatedInstances = other.NumberOfStudyRelatedInstances;
 }
Example #5
0
        private void CopyFrom(IStudyData other)
        {
            if (other == null)
                return;

            ReferringPhysiciansName = other.ReferringPhysiciansName;
            AccessionNumber = other.AccessionNumber;
            StudyDescription = other.StudyDescription;
            StudyId = other.StudyId;
            StudyDate = other.StudyDate;
            StudyTime = other.StudyTime;
            /// TODO (CR Jun 2012): Technically, should copy the buffers.
            ModalitiesInStudy = other.ModalitiesInStudy;
            SopClassesInStudy = other.SopClassesInStudy;
            StudyInstanceUid = other.StudyInstanceUid;
            NumberOfStudyRelatedSeries = other.NumberOfStudyRelatedSeries;
            NumberOfStudyRelatedInstances = other.NumberOfStudyRelatedInstances;
        }
Example #6
0
        private void CopyFrom(IStudyData other)
        {
            if (other == null)
            {
                return;
            }

            ReferringPhysiciansName = other.ReferringPhysiciansName;
            AccessionNumber         = other.AccessionNumber;
            StudyDescription        = other.StudyDescription;
            StudyId   = other.StudyId;
            StudyDate = other.StudyDate;
            StudyTime = other.StudyTime;
            /// TODO (CR Jun 2012): Technically, should copy the buffers.
            ModalitiesInStudy             = other.ModalitiesInStudy;
            SopClassesInStudy             = other.SopClassesInStudy;
            StudyInstanceUid              = other.StudyInstanceUid;
            NumberOfStudyRelatedSeries    = other.NumberOfStudyRelatedSeries;
            NumberOfStudyRelatedInstances = other.NumberOfStudyRelatedInstances;
        }
 public PatientRootStudyIdentifier(IStudyData other, IIdentifier identifier)
     : base(other, identifier)
 {
 }
Example #8
0
 public IndexModel(IStudyData studyData, IHubContext <WorkHub> workHub)
 {
     this.studyData = studyData;
     this.workHub   = workHub;
 }
Example #9
0
        private void PopulatePatient(DicomMessageBase response, IEnumerable <DicomTag> tagList, IPatientData row)
        {
            DicomDataset dataSet = response.DataSet;

            dataSet[DicomTags.RetrieveAeTitle].SetStringValue(Partition.AeTitle);

            var characterSet = GetPreferredCharacterSet();

            if (!string.IsNullOrEmpty(characterSet))
            {
                dataSet[DicomTags.SpecificCharacterSet].SetStringValue(characterSet);
                dataSet.SpecificCharacterSet = characterSet;
            }

            IList <IStudyData> relatedStudies = row.LoadRelatedStudies();
            IStudyData         studyData      = null;

            if (relatedStudies.Count > 0)
            {
                studyData = relatedStudies.First();
            }

            foreach (DicomTag tag in tagList)
            {
                try
                {
                    switch (tag.TagValue)
                    {
                    case DicomTags.PatientsName:
                        dataSet[DicomTags.PatientsName].SetStringValue(row.PatientName);
                        break;

                    case DicomTags.PatientId:
                        dataSet[DicomTags.PatientId].SetStringValue(row.PatientId);
                        break;

                    case DicomTags.IssuerOfPatientId:
                        dataSet[DicomTags.IssuerOfPatientId].SetStringValue(row.IssuerOfPatientId);
                        break;

                    case DicomTags.NumberOfPatientRelatedStudies:
                        dataSet[DicomTags.NumberOfPatientRelatedStudies].AppendInt32(row.NumberOfRelatedStudies);
                        break;

                    case DicomTags.NumberOfPatientRelatedSeries:
                        dataSet[DicomTags.NumberOfPatientRelatedSeries].AppendInt32(row.NumberOfRelatedSeries);
                        break;

                    case DicomTags.NumberOfPatientRelatedInstances:
                        dataSet[DicomTags.NumberOfPatientRelatedInstances].AppendInt32(
                            row.NumberOfRelatedInstances);
                        break;

                    case DicomTags.QueryRetrieveLevel:
                        dataSet[DicomTags.QueryRetrieveLevel].SetStringValue("PATIENT");
                        break;

                    case DicomTags.PatientsSex:
                        if (studyData == null)
                        {
                            dataSet[DicomTags.PatientsSex].SetNullValue();
                        }
                        else
                        {
                            dataSet[DicomTags.PatientsSex].SetStringValue(studyData.PatientSex);
                        }
                        break;

                    case DicomTags.PatientsBirthDate:
                        if (studyData == null)
                        {
                            dataSet[DicomTags.PatientsBirthDate].SetNullValue();
                        }
                        else
                        {
                            dataSet[DicomTags.PatientsBirthDate].SetDateTime(0, studyData.PatientBirthday);
                        }
                        break;

                    // Meta tags that should have not been in the RQ, but we've already set
                    case DicomTags.RetrieveAeTitle:
                    case DicomTags.InstanceAvailability:
                    case DicomTags.SpecificCharacterSet:
                        break;

                    default:
                        if (!tag.IsPrivate)
                        {
                            dataSet[tag].SetNullValue();
                        }

                        break;
                    }
                }
                catch (Exception e)
                {
                    Log.Logger.Error(e, "Unexpected error setting tag {0} in C-FIND-RSP", dataSet[tag].Tag.ToString());
                    if (!tag.IsPrivate)
                    {
                        dataSet[tag].SetNullValue();
                    }
                }
            }
        }
Example #10
0
        private void PopulateStudy(DicomMessageBase response, IEnumerable <DicomTag> tagList, IStudyData row)
        {
            DicomDataset dataSet = response.DataSet;

            dataSet[DicomTags.RetrieveAeTitle].SetStringValue(Partition.AeTitle);

            dataSet[DicomTags.InstanceAvailability].SetStringValue("ONLINE");

            var characterSet = GetPreferredCharacterSet();

            if (!string.IsNullOrEmpty(characterSet))
            {
                dataSet[DicomTags.SpecificCharacterSet].SetStringValue(characterSet);
                dataSet.SpecificCharacterSet = characterSet;
            }

            foreach (DicomTag tag in tagList)
            {
                try
                {
                    switch (tag.TagValue)
                    {
                    case DicomTags.StudyInstanceUid:
                        dataSet[DicomTags.StudyInstanceUid].SetStringValue(row.StudyUid);
                        break;

                    case DicomTags.PatientsName:
                        dataSet[DicomTags.PatientsName].SetStringValue(row.PatientName);
                        break;

                    case DicomTags.PatientId:
                        dataSet[DicomTags.PatientId].SetStringValue(row.PatientId);
                        break;

                    case DicomTags.PatientsBirthDate:
                        dataSet[DicomTags.PatientsBirthDate].SetDateTime(0, row.PatientBirthday);
                        break;

                    case DicomTags.PatientsAge:
                        dataSet[DicomTags.PatientsAge].SetStringValue(row.PatientAge);
                        break;

                    case DicomTags.PatientsSex:
                        dataSet[DicomTags.PatientsSex].SetStringValue(row.PatientSex);
                        break;

                    case DicomTags.StudyDate:
                        dataSet[DicomTags.StudyDate].SetDateTime(0, row.StudyDate);
                        break;

                    case DicomTags.StudyTime:
                        dataSet[DicomTags.StudyTime].SetDateTime(0, row.StudyTime);
                        break;

                    case DicomTags.AccessionNumber:
                        dataSet[DicomTags.AccessionNumber].SetStringValue(row.AccessionNumber);
                        break;

                    case DicomTags.StudyId:
                        dataSet[DicomTags.StudyId].SetStringValue(row.StudyId);
                        break;

                    case DicomTags.StudyDescription:
                        dataSet[DicomTags.StudyDescription].SetStringValue(row.StudyDescription);
                        break;

                    case DicomTags.ReferringPhysiciansName:
                        dataSet[DicomTags.ReferringPhysiciansName].SetStringValue(row.RefPhysician);
                        break;

                    case DicomTags.NumberOfStudyRelatedSeries:
                        dataSet[DicomTags.NumberOfStudyRelatedSeries].AppendInt32(row.NumberOfRelatedSeries);
                        break;

                    case DicomTags.NumberOfStudyRelatedInstances:
                        dataSet[DicomTags.NumberOfStudyRelatedInstances].AppendInt32(
                            row.NumberOfRelatedImage);
                        break;

                    case DicomTags.ModalitiesInStudy:
                        //LoadModalitiesInStudy(read, response, row.Key);
                        break;

                    case DicomTags.QueryRetrieveLevel:
                        dataSet[DicomTags.QueryRetrieveLevel].SetStringValue("STUDY");
                        break;

                    // Meta tags that should have not been in the RQ, but we've already set
                    case DicomTags.RetrieveAeTitle:
                    case DicomTags.InstanceAvailability:
                    case DicomTags.SpecificCharacterSet:
                        break;

                    default:
                        if (!tag.IsPrivate)
                        {
                            dataSet[tag].SetNullValue();
                        }

                        break;
                    }
                }
                catch (Exception e)
                {
                    Log.Logger.Warn("Unexpected error setting tag {0} in C-FIND-RSP",
                                    dataSet[tag].Tag.ToString());
                    if (!tag.IsPrivate)
                    {
                        dataSet[tag].SetNullValue();
                    }
                }
            }
        }
Example #11
0
		public StudyIdentifier(IStudyData other, IIdentifier identifier)
			: base(identifier)
		{
			CopyFrom(other);
		}
Example #12
0
		public StudyIdentifier(IStudyData other)
		{
			CopyFrom(other);
		}
Example #13
0
 public static bool HasAttachments(this IStudyData study)
 {
     return(study.ModalitiesInStudy.Any(m => m.Equals("DOC", StringComparison.InvariantCultureIgnoreCase)));
 }
 public NotificationStudy(IStudyData s)
     : base(s)
 {
 }
 public StudyRootStudyIdentifier(IPatientData patientData, IStudyData studyData, IIdentifier identifier)
     : base(studyData, identifier)
 {
     CopyFrom(patientData);
 }
Example #16
0
 public WorkItemStudy(IStudyData s) 
     : base(s)
 {}
		public PatientRootStudyIdentifier(IStudyData other, IIdentifier identifier)
			: base(other, identifier)
		{
		}
Example #18
0
 public IndexModel(ILogger <IndexModel> logger, IStudyData studyData)
 {
     this.logger    = logger;
     this.studyData = studyData;
 }
Example #19
0
 public StudiesController(IStudyData studyData, IHubContext <WorkHub> workHub)
 {
     this.studyData = studyData;
     this.workHub   = workHub;
 }
 public StudyRootStudyIdentifier(IPatientData patientData, IStudyData studyData, IIdentifier identifier)
     : base(studyData, identifier)
 {
     CopyFrom(patientData);
 }
Example #21
0
 public StudyIdentifier(IStudyData other, IIdentifier identifier)
     : base(identifier)
 {
     CopyFrom(other);
 }
Example #22
0
 /// <summary>
 /// Initializes a new instance of <see cref="StudyItem"/>.
 /// </summary>
 public StudyItem(IPatientData patient, IStudyData study, IIdentifier identifier)
     : base(patient, study, identifier)
 {
     Platform.CheckForNullReference(study, "study");
     Platform.CheckForEmptyString(study.StudyInstanceUid, "study.StudyInstanceUid");
 }
Example #23
0
 public StudyIdentifier(IStudyData other)
 {
     CopyFrom(other);
 }
Example #24
0
 public WorkItemStudy(IStudyData s)
     : base(s)
 {
 }
 public NotificationStudy(IStudyData s)
     : base(s)
 { }