public KeyObjectSelectionDocumentIod(IDicomElementProvider dicomElementProvider)
 {
     _dicomElementProvider          = dicomElementProvider;
     _patientModule                 = new PatientModuleIod(_dicomElementProvider);
     _specimenIdentificationModule  = new SpecimenIdentificationModuleIod(_dicomElementProvider);
     _clinicalTrialSubjectModule    = new ClinicalTrialSubjectModuleIod(_dicomElementProvider);
     _generalStudyModule            = new GeneralStudyModuleIod(_dicomElementProvider);
     _patientStudyModule            = new PatientStudyModuleIod(_dicomElementProvider);
     _clinicalTrialStudyModule      = new ClinicalTrialStudyModuleIod(_dicomElementProvider);
     _keyObjectDocumentSeriesModule = new KeyObjectDocumentSeriesModuleIod(_dicomElementProvider);
     _clinicalTrialSeriesModule     = new ClinicalTrialSeriesModuleIod(_dicomElementProvider);
     _generalEquipmentModule        = new GeneralEquipmentModuleIod(_dicomElementProvider);
     _keyObjectDocumentModule       = new KeyObjectDocumentModuleIod(_dicomElementProvider);
     _srDocumentContentModule       = new SrDocumentContentModuleIod(_dicomElementProvider);
     _sopCommonModule               = new SopCommonModuleIod(_dicomElementProvider);
 }
Ejemplo n.º 2
0
        private static KeyObjectSelectionDocumentIod CreatePrototypeDocument(IDicomAttributeProvider source, DicomAttributeCollection target, string specificCharacterSet)
        {
            KeyObjectSelectionDocumentIod iod = new KeyObjectSelectionDocumentIod(target);

            specificCharacterSet        = specificCharacterSet ?? string.Empty;
            target.SpecificCharacterSet = specificCharacterSet;
            target[DicomTags.SpecificCharacterSet].SetStringValue(specificCharacterSet);

            PatientModuleIod sourcePatient = new PatientModuleIod(source);

            if (true)             // patient module is always required
            {
                iod.Patient.BreedRegistrationSequence          = sourcePatient.BreedRegistrationSequence;
                iod.Patient.DeIdentificationMethod             = sourcePatient.DeIdentificationMethod;
                iod.Patient.DeIdentificationMethodCodeSequence = sourcePatient.DeIdentificationMethodCodeSequence;
                iod.Patient.EthnicGroup              = sourcePatient.EthnicGroup;
                iod.Patient.IssuerOfPatientId        = sourcePatient.IssuerOfPatientId;
                iod.Patient.OtherPatientIds          = sourcePatient.OtherPatientIds;
                iod.Patient.OtherPatientIdsSequence  = sourcePatient.OtherPatientIdsSequence;
                iod.Patient.OtherPatientNames        = sourcePatient.OtherPatientNames;
                iod.Patient.PatientBreedCodeSequence = sourcePatient.PatientBreedCodeSequence;
                iod.Patient.PatientBreedDescription  = sourcePatient.PatientBreedDescription;
                iod.Patient.PatientComments          = sourcePatient.PatientComments;
                iod.Patient.PatientId = sourcePatient.PatientId;
                iod.Patient.PatientIdentityRemoved     = sourcePatient.PatientIdentityRemoved;
                iod.Patient.PatientsBirthDateTime      = sourcePatient.PatientsBirthDateTime;
                iod.Patient.PatientsName               = sourcePatient.PatientsName;
                iod.Patient.PatientSpeciesCodeSequence = sourcePatient.PatientSpeciesCodeSequence;
                iod.Patient.PatientSpeciesDescription  = sourcePatient.PatientSpeciesDescription;
                iod.Patient.PatientsSex = sourcePatient.PatientsSex;
                iod.Patient.ReferencedPatientSequence = sourcePatient.ReferencedPatientSequence;
                iod.Patient.ResponsibleOrganization   = sourcePatient.ResponsibleOrganization;
                iod.Patient.ResponsiblePerson         = sourcePatient.ResponsiblePerson;
                iod.Patient.ResponsiblePersonRole     = sourcePatient.ResponsiblePersonRole;
            }

            SpecimenIdentificationModuleIod sourceSpecimen = new SpecimenIdentificationModuleIod(source);

            if (sourceSpecimen.HasValues())             // specimen module is required only if subject is a specimen
            {
                iod.SpecimenIdentification.SpecimenAccessionNumber = sourceSpecimen.SpecimenAccessionNumber;
                iod.SpecimenIdentification.SpecimenSequence        = sourceSpecimen.SpecimenSequence;
            }

            ClinicalTrialSubjectModuleIod sourceTrialSubject = new ClinicalTrialSubjectModuleIod(source);

            if (sourceTrialSubject.HasValues())             // clinical trial subkect module is user optional
            {
                iod.ClinicalTrialSubject.ClinicalTrialProtocolId       = sourceTrialSubject.ClinicalTrialProtocolId;
                iod.ClinicalTrialSubject.ClinicalTrialProtocolName     = sourceTrialSubject.ClinicalTrialProtocolName;
                iod.ClinicalTrialSubject.ClinicalTrialSiteId           = sourceTrialSubject.ClinicalTrialSiteId;
                iod.ClinicalTrialSubject.ClinicalTrialSiteName         = sourceTrialSubject.ClinicalTrialSiteName;
                iod.ClinicalTrialSubject.ClinicalTrialSponsorName      = sourceTrialSubject.ClinicalTrialSponsorName;
                iod.ClinicalTrialSubject.ClinicalTrialSubjectId        = sourceTrialSubject.ClinicalTrialSubjectId;
                iod.ClinicalTrialSubject.ClinicalTrialSubjectReadingId = sourceTrialSubject.ClinicalTrialSubjectReadingId;
            }

            GeneralStudyModuleIod sourceGeneralStudy = new GeneralStudyModuleIod(source);

            if (true)             // general study module is always required
            {
                iod.GeneralStudy.AccessionNumber = sourceGeneralStudy.AccessionNumber;
                iod.GeneralStudy.NameOfPhysiciansReadingStudy                 = sourceGeneralStudy.NameOfPhysiciansReadingStudy;
                iod.GeneralStudy.PhysiciansOfRecord                           = sourceGeneralStudy.PhysiciansOfRecord;
                iod.GeneralStudy.PhysiciansOfRecordIdentificationSequence     = sourceGeneralStudy.PhysiciansOfRecordIdentificationSequence;
                iod.GeneralStudy.PhysiciansReadingStudyIdentificationSequence = sourceGeneralStudy.PhysiciansReadingStudyIdentificationSequence;
                iod.GeneralStudy.ProcedureCodeSequence                        = sourceGeneralStudy.ProcedureCodeSequence;
                iod.GeneralStudy.ReferencedStudySequence                      = sourceGeneralStudy.ReferencedStudySequence;
                iod.GeneralStudy.ReferringPhysicianIdentificationSequence     = sourceGeneralStudy.ReferringPhysicianIdentificationSequence;
                iod.GeneralStudy.ReferringPhysiciansName                      = sourceGeneralStudy.ReferringPhysiciansName;
                iod.GeneralStudy.StudyDateTime    = sourceGeneralStudy.StudyDateTime;
                iod.GeneralStudy.StudyDescription = sourceGeneralStudy.StudyDescription;
                iod.GeneralStudy.StudyId          = sourceGeneralStudy.StudyId;
                iod.GeneralStudy.StudyInstanceUid = sourceGeneralStudy.StudyInstanceUid;
            }

            PatientStudyModuleIod sourcePatientStudy = new PatientStudyModuleIod(source);

            if (sourcePatientStudy.HasValues())             // patient study module is user optional
            {
                iod.PatientStudy.AdditionalPatientHistory = sourcePatientStudy.AdditionalPatientHistory;
                iod.PatientStudy.AdmissionId = sourcePatientStudy.AdmissionId;
                iod.PatientStudy.AdmittingDiagnosesCodeSequence = sourcePatientStudy.AdmittingDiagnosesCodeSequence;
                iod.PatientStudy.AdmittingDiagnosesDescription  = sourcePatientStudy.AdmittingDiagnosesDescription;
                iod.PatientStudy.IssuerOfAdmissionId            = sourcePatientStudy.IssuerOfAdmissionId;
                iod.PatientStudy.IssuerOfServiceEpisodeId       = sourcePatientStudy.IssuerOfServiceEpisodeId;
                iod.PatientStudy.Occupation                = sourcePatientStudy.Occupation;
                iod.PatientStudy.PatientsAge               = sourcePatientStudy.PatientsAge;
                iod.PatientStudy.PatientsSexNeutered       = sourcePatientStudy.PatientsSexNeutered;
                iod.PatientStudy.PatientsSize              = sourcePatientStudy.PatientsSize;
                iod.PatientStudy.PatientsWeight            = sourcePatientStudy.PatientsWeight;
                iod.PatientStudy.ServiceEpisodeDescription = sourcePatientStudy.ServiceEpisodeDescription;
                iod.PatientStudy.ServiceEpisodeId          = sourcePatientStudy.ServiceEpisodeId;
            }

            ClinicalTrialStudyModuleIod sourceTrialStudy = new ClinicalTrialStudyModuleIod(source);

            if (sourceTrialStudy.HasValues())             // clinical trial study module is user optional
            {
                iod.ClinicalTrialStudy.ClinicalTrialTimePointDescription = sourceTrialStudy.ClinicalTrialTimePointDescription;
                iod.ClinicalTrialStudy.ClinicalTrialTimePointId          = sourceTrialStudy.ClinicalTrialTimePointId;
            }

            return(iod);
        }