We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d55e3c commit 8a16445Copy full SHA for 8a16445
1 file changed
src/highdicom/sr/utils.py
@@ -90,10 +90,17 @@ def search_tree(
90
matched_content_items = []
91
for content_item in node.ContentSequence:
92
name_code = content_item.ConceptNameCodeSequence[0]
93
+ if hasattr(name_code, "CodeValue"):
94
+ code_value = name_code.CodeValue
95
+ elif hasattr(name_code, "LongCodeValue"):
96
+ code_value = name_code.LongCodeValue
97
+ else:
98
+ code_value = name_code.URNCodeValue
99
+
100
item = ContentItem(
101
value_type=content_item.ValueType,
102
name=CodedConcept(
- value=name_code.CodeValue,
103
+ value=code_value,
104
scheme_designator=name_code.CodingSchemeDesignator,
105
meaning=name_code.CodeMeaning
106
),
0 commit comments