/** * @param list * @return a single String value, null if cannot be obtained */ private static String getView(AttributeList list) { String view = null; CodedSequenceItem csiViewCodeSequence = CodedSequenceItem.getSingleCodedSequenceItemOrNull(list, TagFromName.ViewCodeSequence); if (csiViewCodeSequence != null) { // view = decipherSNOMEDCodeSequence(csiViewCodeSequence,standardViewCodes); view = MammoDemographicAndTechniqueAnnotations.getViewAbbreviationFromViewCodeSequenceAttributes( csiViewCodeSequence.getAttributeList()); } // System.err.println("getView(): view="+view); return view; }
/** * Construct a content item of a specified type and relationship, creating a new {@link * com.pixelmed.dicom.AttributeList AttributeList}, and add it as a child of the specified parent. * * <p>The constructor is protected. Instances of specific types of content items should normally * be created by using the {@link com.pixelmed.dicom.ContentItemFactory ContentItemFactory}. * * @param p the parent * @param valueType * @param relationshipType added only if not null or zero length * @param conceptName * @throws DicomException */ protected ContentItemWithValue( ContentItem p, String valueType, String relationshipType, CodedSequenceItem conceptName) throws DicomException { super(p, relationshipType); this.valueType = valueType; { Attribute a = new CodeStringAttribute(TagFromName.ValueType); a.addValue(valueType); list.put(a); } this.conceptName = conceptName; if (conceptName != null) { SequenceAttribute a = new SequenceAttribute(TagFromName.ConceptNameCodeSequence); a.addItem(conceptName.getAttributeList()); list.put(a); } }