@@ -4476,6 +4476,38 @@ def test_find_content_items(self):
44764476 items = find_content_items (self ._sr_document )
44774477 assert len (items ) == 8
44784478
4479+ def test_find_content_items_with_URN_code_value (self ):
4480+ file_path = Path (__file__ )
4481+ data_dir = file_path .parent .parent .joinpath ('data' )
4482+ my_sr_document = dcmread (
4483+ str (data_dir .joinpath ('test_files' , 'sr_document.dcm' ))
4484+ )
4485+ content_sequence = my_sr_document .ContentSequence [0 ]
4486+ concept_name_code_sequence = content_sequence .ConceptNameCodeSequence [0 ]
4487+ # remove existing code value
4488+ del concept_name_code_sequence .CodeValue
4489+ # add URN Code Value
4490+ URN_code_value = "http://example.com/my_urn_value"
4491+ concept_name_code_sequence .URNCodeValue = URN_code_value
4492+ items = find_content_items (my_sr_document )
4493+ assert len (items ) == 8
4494+
4495+ def test_find_content_items_with_long_code_value (self ):
4496+ file_path = Path (__file__ )
4497+ data_dir = file_path .parent .parent .joinpath ('data' )
4498+ my_sr_document = dcmread (
4499+ str (data_dir .joinpath ('test_files' , 'sr_document.dcm' ))
4500+ )
4501+ content_sequence = my_sr_document .ContentSequence [0 ]
4502+ concept_name_code_sequence = content_sequence .ConceptNameCodeSequence [0 ]
4503+ # remove existing code value
4504+ del concept_name_code_sequence .CodeValue
4505+ # add Long Code Value
4506+ long_code_value = "Test_A_Long_Code_Value"
4507+ concept_name_code_sequence .LongCodeValue = long_code_value
4508+ items = find_content_items (my_sr_document )
4509+ assert len (items ) == 8
4510+
44794511 def test_find_content_items_filtered_by_name (self ):
44804512 items = find_content_items (
44814513 self ._sr_document ,
0 commit comments