public static DicomSequenceItem CreateOriginalAttributesSequence(IEnumerable<DicomAttribute> originalValues, string originalAttributesSource, string modifyingSystem, string reasonForModification) { DicomSequenceItem item = new DicomSequenceItem(); item[DicomTags.AttributeModificationDatetime] .SetDateTime(0, DateTime.Now); if (!string.IsNullOrEmpty(originalAttributesSource)) { item[DicomTags.SourceOfPreviousValues] .SetStringValue(originalAttributesSource); } if (!string.IsNullOrEmpty(modifyingSystem)) { item[DicomTags.ModifyingSystem] .SetStringValue(modifyingSystem); } if (!string.IsNullOrEmpty(reasonForModification)) { item[DicomTags.ReasonForTheAttributeModification] .SetStringValue(reasonForModification); } DicomAttributeSQ sq = new DicomAttributeSQ(DicomTags.ModifiedAttributesSequence); item[sq.Tag] = sq; DicomSequenceItem modified = new DicomSequenceItem(); sq.AddSequenceItem(modified); foreach (DicomAttribute value in originalValues) { modified[value.Tag] = value; } return item; }
private void PopulateScheduledProcedureStepSequence(DicomAttributeSQ dicomAttribute, ExamsScheduled row) { DicomSequenceItem item; item = new DicomSequenceItem(); item[DicomTags.ScheduledStationAeTitle].SetStringValue(row.ScheduledAET); item[DicomTags.ScheduledProcedureStepStartDate].SetStringValue(GetDateStringOnly(row.ExamScheduledDateAndTime)); item[DicomTags.ScheduledProcedureStepStartTime].SetStringValue(GetTimeStringOnly(row.ExamScheduledDateAndTime)); item[DicomTags.Modality].SetStringValue(row.Modality); item[DicomTags.PerformedProcedureStepId].SetStringValue(string.Format("{0}",row.ProcedureStepID));//O M K supported item[DicomTags.ScheduledProcedureStepLocation].SetStringValue(row.ExamRoom);//return type 2 -O M K supported item[DicomTags.ScheduledProcedureStepDescription].SetStringValue(row.ExamDescription);//return type 2 -O M K supported dicomAttribute.AddSequenceItem(item); }