item.setString(Tag.ReferencedSOPInstanceUID, VR.UI, iuid);
return item;
}
private Attributes createKOS(Attributes inst) {
Attributes attrs = new Attributes(inst, PATIENT_AND_STUDY_ATTRS);
attrs.setString(Tag.SOPClassUID, VR.UI, UID.KeyObjectSelectionDocumentStorage);
attrs.setString(Tag.SOPInstanceUID, VR.UI, UIDUtils.createUID());
attrs.setDate(Tag.ContentDateAndTime, new Date());
attrs.setString(Tag.Modality, VR.CS, "KO");
attrs.setNull(Tag.ReferencedPerformedProcedureStepSequence, VR.SQ);
attrs.setString(Tag.SeriesInstanceUID, VR.UI, UIDUtils.createUID());
attrs.setString(Tag.SeriesNumber, VR.IS, seriesNumber);
attrs.setString(Tag.InstanceNumber, VR.IS, instanceNumber);
attrs.setString(Tag.ValueType, VR.CS, "CONTAINER");
attrs.setString(Tag.ContinuityOfContent, VR.CS, "SEPARATE");
attrs.newSequence(Tag.ConceptNameCodeSequence, 1).add(documentTitle);
evidenceSeq = attrs.newSequence(Tag.CurrentRequestedProcedureEvidenceSequence, 1);
attrs.newSequence(Tag.ContentTemplateSequence, 1).add(templateIdentifier());
contentSeq = attrs.newSequence(Tag.ContentSequence, 1);
if (documentTitleModifier != null)
contentSeq.add(documentTitleModifier());
if (keyObjectDescription != null)
contentSeq.add(keyObjectDescription());
return attrs;