Skip to content

Commit

Permalink
test_missing_word_in_table_b_5_1 is not needed in 2024e
Browse files Browse the repository at this point in the history
  • Loading branch information
celeron533 committed Jan 28, 2025
1 parent 870f23a commit 4d5ba82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 0 additions & 4 deletions dicom_standard/extract_sops.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@

def generate_ciod_id(name: str) -> str:
cleaned_name = name.split('IOD')[0].strip()
# Standard workaround: Table B.5-1 is missing part of the IOD name ("Confocal Microscopy Tiled Pyramidal" instead of "Confocal Microscopy Tiled Pyramidal Image")
# https://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_B.5.html#table_B.5-1
if cleaned_name == 'Confocal Microscopy Tiled Pyramidal':
cleaned_name = 'Confocal Microscopy Tiled Pyramidal Image'
# Standard workaround: Table B.5-1 has a miscapitalized word in an IOD Specification
# https://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_B.5.html#table_B.5-1
if cleaned_name == 'Pseudo-color Softcopy Presentation State':
Expand Down
11 changes: 6 additions & 5 deletions tests/standard_workarounds_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ def get_table_title_from_id(standard, table_id):
# assert 'Photoacoustic Image' not in table_title, 'Table title now contains full macro name ("Photoacoustic Image Functional Group Macros")'


# def test_missing_word_in_table_b_5_1(part04):
# table = get_table_rows_from_ids(part04, ['table_B.5-1'], ['name', 'id', 'ciod'])
# row = next(row for row in table if 'Confocal Microscopy Tiled' in row['ciod'])
# assert row['ciod'] != 'Confocal Microscopy Tiled Pyramidal Image IOD', 'Row now contains full IOD name'


def test_sect_tid_1004_invalid_url():
test_url = 'http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_TID_1004.html#sect_TID_1004'
status_code = requests.get(test_url).status_code
Expand Down Expand Up @@ -149,11 +155,6 @@ def test_missing_module_type_in_section_a_90_2_5_description(part03):
# # assert table_description_text == table_title, f'{attr} no longer has a retirement value mismatch in tables 6-1 and E.1-1'
# assert False

def test_missing_word_in_table_b_5_1(part04):
table = get_table_rows_from_ids(part04, ['table_B.5-1'], ['name', 'id', 'ciod'])
row = next(row for row in table if 'Confocal Microscopy Tiled' in row['ciod'])
assert row['ciod'] != 'Confocal Microscopy Tiled Pyramidal Image IOD', 'Row now contains full IOD name'


def test_miscapitalized_word_in_table_b_5_1(part04):
table = get_table_rows_from_ids(part04, ['table_B.5-1'], ['name', 'id', 'ciod'])
Expand Down

0 comments on commit 4d5ba82

Please sign in to comment.