From c71b85aa27bb4f458b2e25afa422a5bd5ec58e1f Mon Sep 17 00:00:00 2001 From: mrbean-bremen Date: Sun, 20 Aug 2023 19:57:10 +0200 Subject: [PATCH] Add handling of conditional includes - needed for validation of SR Document Content - closes #39 --- CHANGES.md | 3 + README.md | 9 +- dicom_validator/spec_reader/part3_reader.py | 23 +- .../tests/fixtures/2021d/docbook/part03.xml | 3049 +++++++++++++++++ .../tests/fixtures/2021d/json/iod_info.json | 61 + .../fixtures/2021d/json/module_info.json | 2049 +++++++++-- .../tests/spec_reader/test_part3_reader.py | 22 +- .../tests/validator/test_iod_validator.py | 29 + dicom_validator/validator/iod_validator.py | 6 +- 9 files changed, 4945 insertions(+), 306 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c542210..43a00d8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,9 @@ The released versions correspond to PyPi releases. ### Changes * removed official support for Python 3.7 which has reached end of life +### Features +* added handling of conditional includes (needed for SR documents) + (see [#39](../.. /issues/39)) ### Infrastructure * use `pyproject.toml` instead of `setup.py` diff --git a/README.md b/README.md index 93dc17d..8823afe 100644 --- a/README.md +++ b/README.md @@ -40,15 +40,16 @@ pip install dicom-validator ## Usage ``` +validate_iods.py [-h] [--standard-path STANDARD_PATH] + [--revision REVISION] [--force-read] [--recreate-json] + [--verbose] + dicomfiles [dicomfiles ...] + dump_dcm_info.py [-h] [--standard-path STANDARD_PATH] [--revision REVISION] [--max-value-len MAX_VALUE_LEN] [--show-tags [SHOW_TAGS [SHOW_TAGS ...]]] [--show-image-data] [--recreate-json] dicomfiles [dicomfiles ...] -validate_iods.py [-h] [--standard-path STANDARD_PATH] - [--revision REVISION] [--force-read] [--recreate-json] - [--verbose] - dicomfiles [dicomfiles ...] ``` Use the `--help` option for each script do get usage info. diff --git a/dicom_validator/spec_reader/part3_reader.py b/dicom_validator/spec_reader/part3_reader.py index 72555df..4c57722 100644 --- a/dicom_validator/spec_reader/part3_reader.py +++ b/dicom_validator/spec_reader/part3_reader.py @@ -183,13 +183,15 @@ def _parse_module_description(self, parent_node): columns, current_descriptions, last_tag_id, tag_name ) elif tag_name.startswith("Include"): - self._handle_included_attributes(columns, current_descriptions) + self._handle_included_attributes( + tag_name, columns, current_descriptions + ) else: # todo: other entries pass return current_descriptions[0] - def _handle_included_attributes(self, columns, current_descriptions): + def _handle_included_attributes(self, text, columns, current_descriptions): include_node = self._find(columns[0], ["para", "emphasis", "xref"]) if include_node is None: description = self._find_text(columns[0]) @@ -199,7 +201,9 @@ def _handle_included_attributes(self, columns, current_descriptions): ) if is_func_group: # add a placeholder - has to be evaluated at validation time - current_descriptions[-1].setdefault("include", []).append("FuncGroup") + current_descriptions[-1].setdefault("include", []).append( + {"ref": "FuncGroup"} + ) return include_ref = include_node.attrib["linkend"] if self._current_refs and include_ref == self._current_refs[-1]: @@ -216,7 +220,14 @@ def _handle_included_attributes(self, columns, current_descriptions): # it is allowed to have no attributes (example: Raw Data) ref_description = self._parse_module_description(ref_node) or {} self._module_descriptions[label] = ref_description - current_descriptions[-1].setdefault("include", []).append(label) + include_attr = {"ref": label} + # this is currently the only occurring condition for includes + cond_prefix = "if and only if " + cond_index = text.find(cond_prefix) + if cond_index > 0: + cond_text = text[cond_index:].replace(cond_prefix, "required if ") + include_attr["cond"] = self._condition_parser.parse(cond_text) + current_descriptions[-1].setdefault("include", []).append(include_attr) self._current_refs.pop() def _handle_regular_attribute( @@ -230,10 +241,6 @@ def _handle_regular_attribute( "type": tag_type, } if tag_type in ("1C", "2C"): - # cond = self._find_all_text(columns[3]) - # index = cond.find('Required if ') - # if index >= 0: - # current_descriptions[-1][tag_id]['desc'] = cond[index:] current_descriptions[-1][tag_id]["cond"] = self._condition_parser.parse( self._find_all_text(columns[3]) ) diff --git a/dicom_validator/tests/fixtures/2021d/docbook/part03.xml b/dicom_validator/tests/fixtures/2021d/docbook/part03.xml index 561e633..7fec027 100644 --- a/dicom_validator/tests/fixtures/2021d/docbook/part03.xml +++ b/dicom_validator/tests/fixtures/2021d/docbook/part03.xml @@ -34956,6 +34956,3055 @@ +
+ SR Document Content Module + This section specifies the Attributes contained in the . The Attributes in this Module convey the content of an SR Document. + + + + + + + + + + + + + + + + + + + + +
SR Document Content Module Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ + Include + + + + With a Value Type (0040,A040) of CONTAINER +
+ + Include + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Document Content Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Value Type + + (0040,A040) + + 1 + + The type of the value encoded in this Content Item. + + Enumerated Values: + + TEXT + + + + + + NUM + + + + + + CODE + + + + + + DATE + + + + + + TIME + + + + + + DATETIME + + + + + + UIDREF + + + + + + PNAME + + + + + + COMPOSITE + + + + + + IMAGE + + + + + + WAVEFORM + + + + + + SCOORD + + + + + + SCOORD3D + + + + + + TCOORD + + + + + + CONTAINER + + + + + + TABLE + + + + + + See for further explanation. +
+ Concept Name Code Sequence + + (0040,A043) + + 1C + + Code describing the concept represented by this Content Item. Also conveys the value of Document Title and section headings in documents. + Only a single Item shall be included in this Sequence. + Required if Value Type (0040,A040) is TEXT, NUM, CODE, DATETIME, DATE, TIME, UIDREF, TABLE or PNAME. + Required if Value Type (0040,A040) is CONTAINER and a heading is present, or this is the Root Content Item. + + That is, containers without headings do not require Concept Name Code Sequence + + Required if Value Type (0040,A040) is COMPOSITE, IMAGE, WAVEFORM, SCOORD, SCOORD3D or TCOORD, and the Purpose of Reference is conveyed in the Concept Name. + + Though many Templates in + do not require that the Purpose of Reference be conveyed in the Concept Name, + a generic Concept Name, such as + (260753009, SCT, "Source"), + may be used, since anonymous (unnamed) Content Items may be undesirable for some implementations (e.g., for which the name of a name-value pair is required). + UMLS (C0449416) + maps + (260753009, SCT, "Source") + to + (C25683, NCIt, "Source"). + NCIt defines it as "Where something is available or from where it originates". + + See for further explanation. +
+ + >Include + + + + + No Baseline CID is defined. + +
+ Text Value + + (0040,A160) + + 1C + + This is the value of the Content Item. + Required if Value Type (0040,A040) is TEXT. + Text data that is unformatted and whose manner of display is implementation dependent. + The text value may contain spaces, as well as multiple lines separated by CR LF, but otherwise no format control characters (such as horizontal or vertical tab and form feed) shall be present, even if permitted by the Value Representation of UT. + The text shall be interpreted as specified by Specific Character Set (0008,0005) if present in the . + + The text may contain single or multi-byte characters and use code extension techniques as described in if permitted by the values of Specific Character Set (0008,0005). + +
+ DateTime + + (0040,A120) + + 1C + + This is the value of the Content Item. + Required if Value Type (0040,A040) is DATETIME. +
+ Date + + (0040,A121) + + 1C + + This is the value of the Content Item. + Required if Value Type (0040,A040) is DATE. +
+ Time + + (0040,A122) + + 1C + + This is the value of the Content Item. + Required if Value Type (0040,A040) is TIME. +
+ Person Name + + (0040,A123) + + 1C + + This is the value of the Content Item. + Required if Value Type (0040,A040) is PNAME. +
+ UID + + (0040,A124) + + 1C + + This is the value of the Content Item. + Required if Value Type (0040,A040) is UIDREF. +
+ + Include if and only if Value Type (0040,A040) is NUM. + + + +
+ + Include if and only if Value Type (0040,A040) is CODE. + + + +
+ + Include if and only if Value Type (0040,A040) is COMPOSITE. + + + +
+ + Include if and only if Value Type (0040,A040) is IMAGE. + + + +
+ + Include if and only if Value Type (0040,A040) is WAVEFORM. + + + +
+ + Include if and only if Value Type (0040,A040) is SCOORD. + + + +
+ + Include if and only if Value Type (0040,A040) is SCOORD3D. + + + +
+ + Include if and only if Value Type (0040,A040) is TCOORD. + + + +
+ + Include if and only if Value Type (0040,A040) is CONTAINER. + + + +
+ + Include if and only if Value Type (0040,A040) is TABLE. + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Document Relationship Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Observation DateTime + + (0040,A032) + + 1C + + The date and time on which this Content Item was completed. For the purpose of recording measurements or logging events, completion time is defined as the ending time of data acquisition of the measurement, or the ending time of occurrence of the event. + Required if the date and time are different from Content Date (0008,0023) and Content Time (0008,0033) or Observation DateTime (0040,A032) defined in higher Items. May be present otherwise. + + When Content Items are copied into successor reports, Content Date (0008,0023) and Content Time (0008,0033) of the new report are likely to be different than the date and time of the original observation. Therefore this Attribute may need to be included in any copied Content Items to satisfy the condition. + +
+ Observation UID + + (0040,A171) + + 3 + + Unique identifier for the observation Content Item (and its subsidiary Content Items, if any). The UID represents the semantic content of the observation; an encoding of the same observation with the same context into another representation (e.g., a CDA Entry) may use the same UID. +
+ Content Sequence + + (0040,A730) + + 1C + + A potentially recursively nested Sequence of Items that conveys content that is the Target of Relationships with the enclosing Source Content Item. + One or more Items shall be included in this Sequence. + Required if the enclosing Content Item has relationships. + + + + If this Attribute is not present then the enclosing Item is a leaf. + + + The order of Items within this Sequence is semantically significant for presentation. + + + + See for further explanation. +
+ >Relationship Type + + (0040,A010) + + 1 + + The type of relationship between the (enclosing) Source Content Item and the Target Content Item. + IODs specify additional constraints on Relationships (including lists of Enumerated Values). + + Enumerated Values: + + CONTAINS + + + + + + HAS PROPERTIES + + + + + + HAS OBS CONTEXT + + + + + + HAS ACQ CONTEXT + + + + + + INFERRED FROM + + + + + + SELECTED FROM + + + + + + HAS CONCEPT MOD + + + + + + See for further explanation. +
+ + >Include if the Target Content Item is included by-value in the Source Content Item. The Macro shall not be present if the relationship is by-reference. + + + +
+ + >Include if the Target Content Item is included by-value in the Source Content Item. The Macro shall not be present if the relationship is by-reference. + + + +
+ >Referenced Content Item Identifier + + (0040,DB73) + + 1C + + An ordered set of one or more integers that uniquely identifies the Target Content Item of the relationship. + The root Content Item is referenced by a single value of 1. + Each subsequent integer represents an ordinal position of a Content Item in the Content Sequence (0040,A730) in which it belongs. The Referenced Content Item Identifier is the set of these ordinal positions along the by-value relationship path. The number of values in this Multi-Value Attribute is exactly the number of relationships traversed in the SR content tree plus one. + + + + See . + + + Content Items are ordered in a Content Sequence starting from 1 as defined in VR of SQ (see ). + + + + Required if the Target Content Item is denoted by-reference, i.e., the Document Relationship Macro and Document Content Macro are not included. +
+
+ SR Document Content Tree + The Module consists of a single root Content Item that is the root of the SR Document tree. The root Content Item is of type CONTAINER, and its Content Sequence conveys either directly or indirectly through further nested Content Sequences, all of the other Content Items in the document. This root Content Item shall have a heading in the Concept Name Code Sequence (0040,A043) that conveys the title of the SR Document, i.e., the Document Title. + + depicts the relationship of SR Documents to Content Items and the relationships of Content Items to other Content Items and to Observation Context. + +
+ SR Information Model + + + + + +
+
+ + Whether or not relationships by-reference are allowed to ancestor Content Items, is specified in the IOD. + + +
+ Example of an SR Content Tree (Informative) + + + + + +
+
+
+
+ Content Item Attributes + Each Content Item contains: + + + name/value pair, consisting of + + + a single Concept Name Code Sequence (0040,A043) that is the name of a name/value pair or a heading, + + + a value (text, codes, etc.), + + + references to images, waveforms or other composite objects, with or without coordinates, + + + relationships to other Items, either + + + by-value through nested Content Sequences, or + + + by-reference. + + +
+ Content Item Value Type + The value of the name/value pair is encoded with one of the Value Types defined in (the choice of which may be constrained by the IOD in which this Module is contained). Value Type (0040,A040) explicitly conveys the type of Content Item value encoding. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Value Type Definitions
+ Value Type + + Concept Name + + Concept Value + + Description +
+ TEXT + + Type of text, e.g., "Findings", or name of identifier, e.g., "Lesion ID" + + Textual expression of the concept + + Free text, narrative description of unlimited length. May also be used to provide a label or identifier value. +
+ NUM + + Type of numeric value or measurement, e.g., "BPD" + + Numeric value and associated Unit of Measurement + + Numeric value fully qualified by coded representation of the measurement name and unit of measurement. +
+ CODE + + Type of code, e.g., "Findings" + + Coded expression of the concept + + Categorical coded value. Representation of nominal or non-numeric ordinal values. +
+ DATETIME + + Type of DateTime, e.g., "Date/Time of onset" + + Concatenated date and time + + Date and time of occurrence of the type of event denoted by the Concept Name. +
+ DATE + + Type of Date, e.g., "Birth Date" + + Calendar date + + Date of occurrence of the type of event denoted by the Concept Name. +
+ TIME + + Type of Time, e.g "Start Time" + + Time of day + + Time of occurrence of the type of event denoted by the Concept Name. +
+ UIDREF + + Type of UID, e.g "Study Instance UID" + + Unique Identifier + + Unique Identifier (UID) of the entity identified by the Concept Name. +
+ PNAME + + Role of person, e.g., "Recording Observer" + + Name of person + + Person name of the person whose role is described by the Concept Name. +
+ COMPOSITE + + Purpose of Reference + + Reference to UIDs of Composite SOP Instances + + A reference to one Composite SOP Instance that is not an Image or Waveform. +
+ IMAGE + + Purpose of Reference + + Reference to UIDs of Image Composite SOP Instances + + A reference to one Image. IMAGE Content Item may convey a reference to a Softcopy Presentation State associated with the Image. +
+ WAVEFORM + + Purpose of Reference + + Reference to UIDs of Waveform Composite SOP Instances + + A reference to one Waveform. +
+ SCOORD + + Purpose of Reference + + Listing of spatial coordinates + + Spatial coordinates of a geometric region of interest in the DICOM image coordinate system. The IMAGE Content Item from which spatial coordinates are selected is denoted by a SELECTED FROM relationship. +
+ SCOORD3D + + Purpose of reference + + Listing of spatial 3D coordinates + + 3D spatial coordinates (x,y,z) of a geometric region of interest in a Reference Coordinate System. +
+ TCOORD + + Purpose of Reference + + Listing of temporal coordinates + + Temporal Coordinates (i.e., time or event-based coordinates) of a region of interest in the DICOM waveform coordinate system. The WAVEFORM or IMAGE or SCOORD Content Item from which Temporal Coordinates are selected is denoted by a SELECTED FROM relationship. +
+ CONTAINER + + Document Title or document section heading. Concept Name conveys the Document Title (if the CONTAINER is the Document Root Content Item) or the category of observation. + + The content of the CONTAINER. The value of a CONTAINER Content Item is the collection of Content Items that it contains. + + CONTAINER groups Content Items and defines the heading or category of observation that applies to that content. The heading describes the content of the CONTAINER Content Item and may map to a document section heading in a printed or displayed document. +
+ TABLE + + Purpose of the tabulated data. + + Two-dimensional tabulation of data. + + Table of text, numeric or datetime values. +
+ + It is recommended that drawings and sketches, sometimes used in reports, be represented by IMAGE Content Items that reference separate SOP Instances (e.g., 8-bit, MONOCHROME2, Secondary Capture, or Multi-frame Single Bit Secondary Capture). + +
+
+ Concept Name Code Sequence + Concept Name Code Sequence (0040,A043) conveys the name of the concept whose value is expressed by the value attribute or set of attributes. Depending on the Value Type (0040,A040), the meaning of the Concept Name Code Sequence may reflect specifics of the use of the particular data type (see ). +
+
+ Continuity of Content + See . +
+
+ Content Sequence and Relationship Type + Content Sequence (0040,A730) provides the hierarchical structuring of the Content Tree (see ) by recursively nesting Content Items. A parent (or source) Content Item has an explicit relationship to each child (or target) Content Item, conveyed by Relationship Type (0040,A010). + + describes the Relationship Types between Source Content Items and the Target Content Items. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Relationship Type Definitions
+ Relationship Type + + Description + + Definition and Example +
+ CONTAINS + + Contains + + Source Item contains Target Content Item. + E.g., CONTAINER "History" {CONTAINS: TEXT "mother had breast cancer", CONTAINS: IMAGE} +
+ HAS OBS CONTEXT + + Has Observation Context + + Target Content Items shall convey any specialization of Observation Context needed for unambiguous documentation of the Source Content Item. + E.g., CONTAINER "Report" {HAS OBS CONTEXT: PNAME "Recording Observer" = "Smith^John^^Dr^"} +
+ HAS CONCEPT MOD + + Has Concept Modifier + + Used to qualify or describe the Concept Name of the Source Content Item, such as to create a post-coordinated description of a concept, or to further describe a concept. + E.g., CODE "Chest X-Ray" {HAS CONCEPT MOD: CODE "View = PA and Lateral"} + E.g., CODE "Breast" {HAS CONCEPT MOD: TEXT "French Translation" = "Sein"} + E.g., CODE "2VCXRPALAT" {HAS CONCEPT MOD: TEXT "Further Explanation" = "Chest X-Ray, Two Views, Postero-anterior and Lateral"} +
+ HAS PROPERTIES + + Has Properties + + Description of properties of the Source Content Item. + E.g., CODE "Mass" {HAS PROPERTIES: CODE "anatomic location", HAS PROPERTIES: CODE "diameter", HAS PROPERTIES: CODE "margin", …}. +
+ HAS ACQ CONTEXT + + Has Acquisition Context + + The Target Content Item describes the conditions present during data acquisition of the Source Content Item. + E.g., IMAGE {HAS ACQ CONTEXT: CODE "contrast agent", HAS ACQ CONTEXT: CODE "position of imaging subject", …}. +
+ INFERRED FROM + + Inferred From + + Source Content Item conveys a measurement or other inference made from the Target Content Items. Denotes the supporting evidence for a measurement or judgment. + E.g., CODE "Malignancy" {INFERRED FROM: CODE "Mass", INFERRED FROM: CODE "Lymphadenopathy", …}. + E.g., NUM: "BPD" = "5mm" {INFERRED FROM: SCOORD}. +
+ SELECTED FROM + + Selected From + + Source Content Item conveys spatial or temporal coordinates selected from the Target Content Item(s). + E.g., SCOORD "POLYLINE1,1 5,10 5,10 1,10 1,1" {SELECTED FROM: IMAGE}. + E.g., TCOORD "SEGMENT 60-200mS" {SELECTED FROM: WAVEFORM}. +
+
+
+ Referenced Content Item Identifier + Content Items are identified by their position in the Content Item tree. They have an implicit order as defined by the order of the Sequence Items. When a Content Item is the target of a by-reference relationship, its position is specified in the Referenced Content Item Identifier (0040,DB73) in a Content Sequence Item subsidiary to the source Content Item. + + + illustrates an SR content tree and identifiers associated with each Content Item: + + +
+ Use of Position as SR Content Item Identifier (Informative) + + + + + +
+
+
+
+
+
+ Content Macros +
+ Numeric Measurement Macro + + specifies the Attributes that convey a NUM (numeric measurement) value. + + The Measured Value Sequence (0040,A300) may be empty to convey the concept of a measurement whose value is unknown or missing, or a measurement or calculation failure. + Whether or not an Item is required may be controlled by the Template that defines the use of this Content Item. + See PS3.16 . + If the Sequence is empty, neither the value nor the units will be sent. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Numeric Measurement Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Measured Value Sequence + + (0040,A300) + + 2 + + This is the value of the Content Item. + Shall consist of a Sequence of Items conveying the measured value(s), which represent integers or real numbers and units of measurement. + Zero or one Item shall be included in this Sequence. +
+ >Numeric Value + + (0040,A30A) + + 1 + + Numeric measurement value. + Only a single value shall be present. +
+ >Floating Point Value + + (0040,A161) + + 1C + + The floating point representation of Numeric Value (0040,A30A). Only a single value shall be present. + Required if Numeric Value (0040,A30A) has insufficient precision to represent the value as a string. May be present otherwise. +
+ >Rational Numerator Value + + (0040,A162) + + 1C + + The integer numerator of a rational representation of Numeric Value (0040,A30A). Encoded as a signed integer value. Only a single value shall be present. + Required if Numeric Value (0040,A30A) has insufficient precision to represent a rational value as a string. May be present otherwise. +
+ >Rational Denominator Value + + (0040,A163) + + 1C + + The integer denominator of a rational representation of Numeric Value (0040,A30A). Encoded as a non-zero unsigned integer value. Only a single value shall be present. + Required if Rational Numerator Value (0040,A162) is present. +
+ >Measurement Units Code Sequence + + (0040,08EA) + + 1 + + Units of measurement. + Only a single Item shall be included in this Sequence. +
+ + >>Include + + + + + D. + +
+ Numeric Value Qualifier Code Sequence + + (0040,A301) + + 1C + + Qualification of Numeric Value (0040,A30A) in Measured Value Sequence (0040,A300), or reason for absence of Measured Value Sequence (0040,A300) Item. + Only a single Item is permitted in this Sequence. + Required if Measured Value Sequence (0040,A300) is empty. +
+ + >Include + + + + + D. + +
+
+
+ Code Macro + + specifies the Attributes that convey a CODE value. + + + + + + + + + + + + + + + + + + + + + + +
Code Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Concept Code Sequence + + (0040,A168) + + 1 + + This is the value of the Content Item. + Only a single Item shall be included in this Sequence. +
+ + >Include + + + + + No Baseline CID is defined. + +
+
+
+ Composite Object Reference Macro + + specifies the Attributes that convey a reference to a DICOM Composite Object that is not a DICOM Image or Waveform (such as an SR Document), or to an HL7 Structured Document. + + + + If a Softcopy Presentation State is to be applied to an Image, it should be referenced by an Image Reference Macro. + + + Other SR Documents may be referenced by this Macro, but there is no facility to reference individual Content Items within those reports. + + + HL7 Structured Documents include, in particular, those conforming to the Clinical Document Architecture (CDA). See for further details about this type of referenced object. + + + + + + + + + + + + + + + + + + + + + + + + + +
Composite Object Reference Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Referenced SOP Sequence + + (0008,1199) + + 1 + + References to Composite Object SOP Class/SOP Instance pairs. + Only a single Item shall be included in this Sequence. +
+ + >Include + + + + +
+
+
+ Image Reference Macro + + specifies the Attributes that convey a reference to a DICOM image. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Image Reference Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ + Include + + + + +
+ >Referenced Frame Number + + (0008,1160) + + 1C + + Identifies the frame numbers within the Referenced SOP Instance to which the reference applies. The first frame shall be denoted as frame number 1. + + This Attribute may be multi-valued. + + Required if the Referenced SOP Instance is a multi-frame image and the reference does not apply to all frames, and Referenced Segment Number (0062,000B) is not present. +
+ >Referenced Segment Number + + (0062,000B) + + 1C + + Identifies the segments to which the reference applies identified by Segment Number (0062,0004). Required if the Referenced SOP Instance is a Segmentation and the reference does not apply to all segments and Referenced Frame Number (0008,1160) is not present. +
+ >Referenced SOP Sequence + + (0008,1199) + + 3 + + Reference to a Softcopy Presentation State SOP Class/SOP Instance pair. + Only a single Item is permitted in this Sequence. +
+ + >>Include + + + + +
+ >Referenced Real World Value Mapping Instance Sequence + + (0008,114B) + + 3 + + Reference to a Real World Value Mapping SOP Class/SOP Instance pair. + Only a single Item is permitted in this Sequence. +
+ + >>Include + + + + +
+ >Icon Image Sequence + + (0088,0200) + + 3 + + This Icon Image is representative of the Image. + Only a single Item is permitted in this Sequence. + The Icon Image shall be no greater than 128 rows by 128 columns. +
+ + >>Include + + + + + See + + +
+
+
+ Waveform Reference Macro + + specifies the Attributes that convey a reference to a DICOM waveform. + + + + + + + + + + + + + + + + + + + + + + +
Waveform Reference Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ + Include + + + + +
+ >Referenced Waveform Channels + + (0040,A0B0) + + 1C + + List of channels in Waveform to which the reference applies. See + + Required if the Referenced SOP Instance is a Waveform that contains multiple Channels and the reference does not apply to all Channels of all Multiplex Groups. +
+
+ Waveform Reference Macro Attribute Descriptions +
+ Referenced Waveform Channels + Referenced Waveform Channels (0040,A0B0) is a multi-value Attribute that lists the channels referenced. Each channel is specified as a pair of values (M,C), where the first value is the Item number of Waveform Sequence (5400,0100) in the referenced object (i.e., the Multiplex Group Number), and the second value is the Item number of Channel Definition Sequence (003A,0200) (i.e., the Channel Number) within the multiplex group. + If the specified channel number is 0, the annotation applies to all channels in the specified multiplex group. + + As an example, an annotation that applies to the entire first multiplex group and channels 2 and 3 of the third multiplex group would have Referenced Waveform Channels (0040,A0B0) value 0001 0000 0003 0002 0003 0003. + +
+
+
+
+ Spatial Coordinates Macro + + specifies the Attributes that convey Spatial Coordinates in an SCOORD Content Item. An SCOORD Content Item shall always be the Source Content Item of one or more SELECTED FROM Relationships with IMAGE Target Content Items. Each IMAGE Target Content Item shall contain a reference to one single-frame or multi-frame Image. + + The same set of spatial coordinates may be selected from more than one single-frame image, or more than one frame of a multi-frame image when the purpose of reference is applicable to multiple images. For example, the spatial coordinates may specify the outline of a sampling region at the same spatial location on multiple images acquired over time. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Spatial Coordinates Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Graphic Data + + (0070,0022) + + 1 + + An ordered set of (column,row) pairs that denote positions in an image specified with sub-pixel resolution such that the origin at the TLHC of the TLHC pixel is 0.0\0.0, the BRHC of the TLHC pixel is 1.0\1.0, and the BRHC of the BRHC pixel is Columns\Rows. The values must be within the range 0\0 to Columns\Rows. The maximum values are those contained in the referenced image in Attributes Columns (0028,0011) and Rows (0028,0010), or in the case of spatial coordinates with Pixel Origin Interpretation (0048,0301) value VOLUME, in Attributes Total Pixel Matrix Columns (0048,0006) and Total Pixel Matrix Rows (0048,0007). + See for further explanation. +
+ Graphic Type + + (0070,0023) + + 1 + + See for Enumerated Values. +
+ Pixel Origin Interpretation + + (0048,0301) + + 1C + + For a referenced multi-frame image, specifies whether the Graphic Data (0070,0022) values are to be interpreted relative to the individual frame pixel origins, or relative to the Total Pixel Matrix origin (see ). + Required if the value of Referenced SOP Class UID (0008,1150) of the referenced image is 1.2.840.10008.5.1.4.1.1.77.1.6 (VL Whole Slide Microscopy Image). May be present otherwise. + + Enumerated Values: + + FRAME + + relative to individual frame + + + + VOLUME + + relative to Total Image Matrix + + + + If not present, Graphic Data values are defined relative to the frame pixel origin. +
+ Fiducial UID + + (0070,031A) + + 3 + + The globally unique identifier for this fiducial Item. + + The fiducial UID can be used to associate this set of graphics with other Content Items. + +
+
+ Spatial Coordinates Macro Attribute Descriptions +
+ Graphic Data + Graphic Data may be used to associate an anatomic or spatial Concept with a defined subset of one or more images. Graphic Data may be explicitly defined as a single point (i.e., to denote the epicenter of an anatomic site or lesion) or more than one point (i.e., representing a set of points or an open or closed polygon). + + Spatial coordinates may be used to associate observational data with a set of Image features. Spatial coordinates also may be used to convey coordinates that are input data for a measurement. + +
+
+ Graphic Type + When annotation applies to an image, this Attribute defines the type of geometry of the annotated region of interest. + + Enumerated Values: + + POINT + + a single pixel denoted by a single (column,row) pair + + + + MULTIPOINT + + multiple pixels each denoted by an (column,row) pair + + + + POLYLINE + + a series of connected line segments with ordered vertices denoted by (column,row) pairs; if the first and last vertices are the same it is a closed polygon + + + + CIRCLE + + a circle defined by two (column,row) pairs. The first point is the central pixel. The second point is a pixel on the perimeter of the circle. + + + + ELLIPSE + + an ellipse defined by four pixel (column,row) pairs, the first two points specifying the endpoints of the major axis and the second two points specifying the endpoints of the minor axis of an ellipse + + + + + + + The order of encoding of successive points for any particular Graphic Type is significant, but its meaning is not specified. The meaning of the order may be defined by a particular Template that uses them. For example, a closed POLYLINE may be encoded with a clockwise (right) or counter-clockwise (left) winding order (when viewed from a specified direction). A two-point POLYLINE used to encode a vector with a direction might be expected to originate at the first encoded point and be directed towards the second encoded point, but that is not specified. + + + A Polygon encoded as a POLYLINE is not restricted to being a simple polygon, unless so specified by the Template that uses it. + + + +
+
+
+
+ Temporal Coordinates Macro + + specifies the Attributes that convey TCOORD Content Items. A TCOORD Content Item shall be the Source Content Item of one or more SELECTED FROM relationships with one or more SCOORD Content Items, one or more IMAGE Content Items, or one or more WAVEFORM Content Items. + + + + The same set of temporal coordinates may be selected from more than one single-frame image, or more than one frame of a multi-frame image, or from images and waveforms when the purpose of reference is applicable to multiple objects. For example, the definition of a sampling period at different spatial locations on multiple images and a synchronously acquired waveform. + + + Temporal coordinates may refer to spatial coordinates, which in turn refer to one or more frames or images, for example to indicate a region localized in both time and space. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Temporal Coordinates Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Temporal Range Type + + (0040,A130) + + 1 + + See for Enumerated Values. +
+ Referenced Sample Positions + + (0040,A132) + + 1C + + List of samples within a multiplex group specifying temporal points of the referenced data. Position of first sample is 1. + Required if the Referenced SOP Instance is a Waveform and Referenced Time Offsets (0040,A138) and Referenced DateTime (0040,A13A) are not present. + Shall only be used when Referenced Channels (0040,A0B0) refers to channels within a single multiplex group. +
+ Referenced Time Offsets + + (0040,A138) + + 1C + + Specifies temporal points for reference by number of seconds after start of data. + Required if Referenced Sample Positions (0040,A132) and Referenced DateTime (0040,A13A) are not present. +
+ Referenced DateTime + + (0040,A13A) + + 1C + + Specifies temporal points for reference by absolute time. + Required if Referenced Sample Positions (0040,A132) and Referenced Time Offsets (0040,A138) are not present. +
+
+ Temporal Coordinates Macro Attribute Descriptions +
+ Temporal Range Type + This Attribute defines the type of temporal extent of the region of interest. A temporal point (or instant of time) may be defined by a waveform sample offset (for a single waveform multiplex group only), time offset, or absolute time. + + Enumerated Values: + + POINT + + a single temporal point + + + + MULTIPOINT + + multiple temporal points + + + + SEGMENT + + a range between two temporal points + + + + MULTISEGMENT + + multiple segments, each denoted by two temporal points + + + + BEGIN + + a range beginning at one temporal point, and extending beyond the end of the acquired data + + + + END + + a range beginning before the start of the acquired data, and extending to (and including) the identified temporal point + + + +
+
+
+
+ Container Macro + + specifies the Attributes that convey a CONTAINER Content Item. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Container Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Continuity of Content + + (0040,A050) + + 1 + + This flag specifies for a CONTAINER whether or not its contained Content Items are logically linked in a continuous textual flow, or are separate Items. + + Enumerated Values: + + SEPARATE + + + + + + CONTINUOUS + + + + + + See for further explanation. +
+ Content Template Sequence + + (0040,A504) + + 1C + + Template that describes the content of this Content Item and its subsidiary Content Items. + Only a single Item shall be included in this Sequence. + Required if a template defined and known to the implementation at the time of encoding was used to define the content of this Item, and the template consists of a single CONTAINER with nested content, and it is the outermost invocation of a set of nested templates that start with the same CONTAINER (see ). +
+ >Mapping Resource + + (0008,0105) + + 1 + + Mapping Resource that defines the template. See . + + Defined Terms: + + DCMR + + DICOM Content Mapping Resource + + + +
+ >Mapping Resource UID + + (0008,0118) + + 3 + + Uniquely identifies the Mapping Resource that defines the template. + + The unique identifier for the DICOM Content Mapping Resource "DCMR" is defined in . + +
+ >Template Identifier + + (0040,DB00) + + 1 + + Template identifier. +
+
+ Container Macro Attribute Descriptions +
+ Continuity of Content + Continuity of Content (0040,A050) specifies whether or not all the Content Items contained in a CONTAINER are logically linked in a continuous textual flow, or are separate entities. It only applies to the children contained in the container, and not their children (which if containers themselves, will have the Attribute specified explicitly). + + + + This allows the interspersing of measurements, codes, and image references, amongst text. For example, the following: "A mass of diameter = 3 cm was detected." can be represented by the following Content Items in a CONTAINER with a Continuity of Content (0040,A050) of CONTINUOUS: + TEXT "A mass of" + NUM "Diameter" 3 "cm" + TEXT "was detected." + + + The Continuity of Content applies only to subsidiary Content Items with Relationship Type CONTAINS. Other subsidiary Content Items, e.g., with Relationship Type HAS CONCEPT MOD or HAS OBS CONTEXT, are not part of the Continuity of Content, but apply to the Container as a whole. + + + +
+
+ Content Template Sequence + A Template for SR Documents defines a set of constraints on the relationships and content (Value Types, Codes, etc.) of Content Items. Specific Templates for SR Documents are defined either by the DICOM Standard (see ) or by users of the Standard for particular purposes. Usage of Templates for SR Documents may improve comparability of essential data, facilitate data-entry and revisions, enable automatic processing and simplify presentation of information to the user. + + New subordinate templates may be factored out of existing Templates during revisions to the Standard or revisions to private Template definitions. It is permissible for Instances created by implementations made prior to such refactoring to omit identification of a Template of which they had no future knowledge. Receivers should be wary of depending on the presence of identification information for subordinate templates. + + An SR Document consists of a Root CONTAINER Content Item with nested content, and as such may be defined by a Template specifying a single CONTAINER with nested content. Sub-trees of an SR Document may similarly be defined by a Template specifying a single CONTAINER with nested content. If created using such a Template, the Root and/or sub-tree shall identify the Template in the CONTAINER Content Item. When a Template invokes (includes) another Template, the outermost invoking Template is the one identified as the defining Template for the CONTAINER in the Content Template Sequence (0040,A504). + The Content Template Sequence (0040,A504) identifies the Template that was used in the creation of the associated Content Item and its subsidiary Content Items. A Template is identified by a Mapping Resource (0008,0105) (the entity that manages or registers the Template), and an identifier of the Template. DICOM Standard Templates are identified in Template Identifier (0040,DB00) using the CS value representation. + The DICOM Template Identifier (0040,DB00) is a string of digits, without leading zeroes, and does not include the string "TID". +
+
+
+
+ 3D Spatial Coordinates Macro + + specifies the Attributes that convey 3D Spatial Coordinates in an SCOORD3D Content Item. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
3D Spatial Coordinates Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Referenced Frame of Reference UID + + (3006,0024) + + 1 + + Uniquely identifies the Frame of Reference within which the coordinates are defined. + + + + There is no requirement that the Frame of Reference be the same for all SCOORD3D Content Items in the same SR SOP Instance, nor is there any requirement that the be present. + + + The Frame of Reference may be any type of DICOM Reference Coordinate System, whether it be patient-relative (Patient Based Coordinate System), volume-relative (including acquired and presentation state volumes), or whole slide relative (Slide Coordinate System). + + + +
+ Graphic Data + + (0070,0022) + + 1 + + An ordered set of (x,y,z) triplets (in mm and may be negative) that define a region of interest in the patient-relative Reference Coordinate System defined by Referenced Frame of Reference UID (3006,0024). See . + See for further explanation. +
+ Graphic Type + + (0070,0023) + + 1 + + See for Enumerated Values. +
+ Fiducial UID + + (0070,031A) + + 3 + + The globally unique identifier for this fiducial Item. + + The fiducial UID can be used to associate this set of graphics with other Content Items. + +
+
+ 3D Spatial Coordinates Macro Attribute Descriptions +
+ Graphic Data + Graphic Data may be used to associate an anatomic or spatial Concept with a defined set of patient relative 3D locations in a defined Frame of Reference, independent of any image. Graphic Data may be defined explicitly as a single point (i.e., to denote the epicenter of an anatomic site or lesion) or more than one point (i.e., representing a set of points or an open or closed polygon). +
+
+ Graphic Type + This Attribute defines the type of geometry of the region of interest. + + Enumerated Values: + + POINT + + a single location denoted by a single (x,y,z) triplet + + + + MULTIPOINT + + multiple locations each denoted by an (x,y,z) triplet; the points need not be coplanar + + + + POLYLINE + + a series of connected line segments with ordered vertices denoted by (x,y,z) triplets; the points need not be coplanar + + + + POLYGON + + a series of connected line segments with ordered vertices denoted by (x,y,z) triplets, where the first and last vertices shall be the same forming a polygon; the points shall be coplanar + + + + ELLIPSE + + an ellipse defined by four (x,y,z) triplets, the first two triplets specifying the endpoints of the major axis and the second two triplets specifying the endpoints of the minor axis + + + + ELLIPSOID + + a three-dimensional geometric surface whose plane sections are either ellipses or circles and contains three intersecting orthogonal axes, "a", "b", and "c"; the ellipsoid is defined by six (x,y,z) triplets, the first and second triplets specifying the endpoints of axis "a", the third and fourth triplets specifying the endpoints of axis "b", and the fifth and sixth triplets specifying the endpoints of axis "c" + + + + + + + A circle is a special case of ELLIPSE where the major and minor axis points are equidistant from the center. + + + Coplanar is in the mathematical sense and is not necessarily related to a specific Image Instance. + + + The order of encoding of successive points for any particular Graphic Type is significant, but its meaning is not specified. The meaning of the order may be defined by a particular Template that uses them. For example, a closed POLYGON may be encoded with a clockwise (right) or counter-clockwise (left) winding order (when viewed from a specified direction). A two-point POLYLINE used to encode a vector with a direction might be expected to originate at the first encoded point and be directed towards the second encoded point, but that is not specified. + + + A POLYGON is not restricted to being a simple polygon, unless so specified by the Template that uses it. + + + +
+
+
+
+ Table Content Item Macro + + specifies the Attributes that convey a TABLE (two-dimensional tabulated data) Content Item value. + A TABLE consists of a rectangular array of row and column values, which may be of the same or different Value Representation, and be associated with coded row and column descriptions, and units for numeric values when required. + Cell values may be specified individually or as complete row or column lists of values in single Attributes. + The values may be described completely or sparsely (i.e., empty cells are permitted) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table Content Item Macro Attributes
+ Attribute Name + + Tag + + Type + + Attribute Description +
+ Tabulated Values Sequence + + (0040,A801) + + 1 + + This is the table that represents the value of the Content Item. + Shall consist of a single Item whose Attributes convey the cell value(s), which represent rows and columns consisting of text, codes, integers, real numbers or DateTimes. + Only a single Item shall be included in this Sequence. +
+ >Number of Table Rows + + (0040,A802) + + 1 + + The number of rows in this table. +
+ >Number of Table Columns + + (0040,A803) + + 1 + + The number of columns in this table. +
+ >Table Row Definition Sequence + + (0040,A806) + + 3 + + The concepts that define the meaning of the rows of the table. + One or more Items are permitted in this Sequence. + If a single Item is present, then the concept applies to all the rows. + Not all rows need to be described. + Items of this Sequence shall be sorted by Table Row Number. + See . +
+ >>Table Row Number + + (0040,A804) + + 1C + + The row, numbered from 1, of the table that this concept describes. + Required if the concept does not apply to all rows. +
+ >>Concept Name Code Sequence + + (0040,A043) + + 1 + + The concept that describes the meaning of the row(s). + Only a single Item shall be included in this Sequence. +
+ + >>>Include + + + + + No Baseline CID is defined. + +
+ >>Measurement Units Code Sequence + + (0040,08EA) + + 1C + + Units of measurement that apply to all the numeric values in this row. + Only a single Item shall be included in this Sequence. + Required if all the columns in this row are numeric values (Selector Attribute VR is DS, FD, FL, IS, SL, SS, UL, or US), have units (are not dimensionless), and have the same units. +
+ + >>>Include + + + + + D. + +
+ >Table Column Definition Sequence + + (0040,A807) + + 3 + + The concepts that define the meaning of the columns of the table. + One or more Items are permitted in this Sequence. + Not all columns need to be described. + If a single Item is present, then the concept applies to all the columns. + Items of this Sequence shall be sorted by Table Column Number. + See . +
+ >>Table Column Number + + (0040,A805) + + 1C + + The column, numbered from 1, of the table that this concept describes. + Required if the concept does not apply to all columns. +
+ >>Concept Name Code Sequence + + (0040,A043) + + 1 + + The concept that describes the meaning of the column(s). + Only a single Item shall be included in this Sequence. +
+ + >>>Include + + + + + No Baseline CID is defined. + +
+ >>Measurement Units Code Sequence + + (0040,08EA) + + 1C + + Units of measurement that apply to all the numeric values in this column. + Only a single Item shall be included in this Sequence. + Required if all the rows in this column are numeric values (Selector Attribute VR is DS, FD, FL, IS, SL, SS, UL, or US), have units (are not dimensionless), and have the same units. +
+ + >>>Include + + + + + D. + +
+ >Cell Values Sequence + + (0040,A808) + + 1 + + The values of each populated cell in the table, identified by row and column. + One or more Items shall be included in this Sequence. + The table may be sparse (i.e., not every cell is required to be populated). + Entire rows may be specified in a single Item if all the columns have the same VR. + Entire columns may be specified in a single Item if all the rows have the same VR. + Items of this Sequence shall be in row-major order, then sorted by column. + See . +
+ >>Table Row Number + + (0040,A804) + + 1C + + The row, numbered from 1, of the table. + Required if Table Column Number is absent, or all the rows for the column specified in Table Column Number are not encoded in a single Attribute (containing multiple values) in this Item (i.e., with a single VR). +
+ >>Table Column Number + + (0040,A805) + + 1C + + The column, numbered from 1, of the table. + Required if Table Row Number is absent, or all the columns for the row specified in Table Row Number are not encoded in a single Attribute (containing multiple values) in this Item (i.e., with a single VR). +
+ >>Referenced Content Item Identifier + + (0040,DB73) + + 1C + + An ordered set of one or more integers that uniquely identifies the Content Item that is the value for this cell. + See . + Required if Selector Attribute VR (0072,0050) is not present. +
+ >>Selector Attribute VR + + (0072,0050) + + 1C + + Value Representation of the value(s) of the cell(s) in this Item. + Required if Referenced Content Item Identifier (0040,DB73) is not present. + + Enumerated Values: + + DS + + + + + + DT + + + + + + FD + + + + + + FL + + + + + + IS + + + + + + SL + + + + + + SQ + + + + + + SS + + + + + + SV + + + + + + UC + + + + + + UL + + + + + + US + + + + + + UV + + + + + + + + + Only a subset of the possible VRs (value in the VR column of Table 6-1 in PS3.6) is permitted. + + + The value SQ is a special case, in that it is used to specify that the value is Code Sequence Attribute, rather than any other type of Sequence. + + + +
+ >>Selector DS Value + + (0072,0072) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is DS, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector DT Value + + (0072,0063) + + 1C + + The DateTime value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is DT. +
+ >>Selector FD Value + + (0072,0074) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is FD, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector FL Value + + (0072,0076) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is FL, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector IS Value + + (0072,0064) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is IS, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector SL Value + + (0072,007C) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is SL, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector SS Value + + (0072,007E) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is SS, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector SV Value + + (0072,0082) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is SV, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector UC Value + + (0072,006F) + + 1C + + The text value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is UC. +
+ >>Selector UL Value + + (0072,0078) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is UL, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector US Value + + (0072,007A) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is US, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Selector UV Value + + (0072,0083) + + 1C + + The numeric value(s) of the cell(s) in this Item. + Required if Selector Attribute VR (0072,0050) is present and the value is UV, and Numeric Value Qualifier Code Sequence (0040,A301) is not present. +
+ >>Concept Code Sequence + + (0040,A168) + + 1C + + The coded value(s) of the cell(s) in this Item. + One or more Items shall be included in this Sequence. + Required if Selector Attribute VR (0072,0050) is present and the value is SQ. +
+ + >>>Include + + + + + No Baseline CID is defined. + +
+ >>Measurement Units Code Sequence + + (0040,08EA) + + 1C + + Units of measurement that apply to all the numeric value in this cell. + Only a single Item shall be included in this Sequence. + Required if this cell is a numeric value (Selector Attribute VR is DS, FD, FL, IS, SL, SS, SV, UL, US or UV) has a unit (is not dimensionless), and the unit is not specified within the Table Row Definition Sequence for this row or Table Column Definition Sequence for this column. +
+ + >>>Include + + + + + D. + +
+ >>Numeric Value Qualifier Code Sequence + + (0040,A301) + + 1C + + The reason for the absence of the numeric value. + Only a single Item is permitted in this Sequence. + Required if this cell is a numeric value (Selector Attribute VR is DS, FD, FL, IS, SL, SS, SV, UL, US or UV), and the numeric value cannot be provided. +
+ + >>>Include + + + + + D. + +
+
+ Table Content Item Macro Attribute Descriptions +
+ Table Row and Column Definition Sequences + The meaning of the table rows and columns are described in Items of Table Row Definition Sequence (0040,A806) and Table Column Definition Sequence (0040,A807). + A coded concept name is provided in Concept Code Sequence (0040,A168) and units, if applicable, in Measurement Units Code Sequence (0040,08EA). + For example: + + Example 1. A two-column table, consisting of multiple rows describing forty values of datetime and X-Ray tube current, could be described as follows: + + Concept Name Code Sequence (0040,A043) = (113734, DCM, "X-Ray Tube Current") + Tabulated Values Sequence (0040,A801) + Item 1 + >Number of Table Rows (0040,A802) = 40 + >Number of Table Columns (0040,A803) = 2 + >Table Column Definition Sequence (0040,A807) + >Item 1 + >>Table Column Number (0040,A805) = 1 + >>Concept Name Code Sequence (0040,A043) = (111526, DCM, "DateTime Started") + >Item 2 + >>Table Column Number (0040,A805) = 2 + >>Concept Name Code Sequence (0040,A043) = (113734, DCM, "X-Ray Tube Current") + >>Measurement Units Code Sequence (0040,08EA) = (mA, UCUM, "mA") + + + + The same concept (113734, DCM, "X-Ray Tube Current") can be used to describe the entire table as the column of values that represent the actual values. + + + No Table Row Definition Sequence (0040,A806) is needed, since rows consist of unnamed observations. + + + No Measurement Units Code Sequence (0040,08EA) is needed for the first column, since it contains DateTimes, not numeric values. + + + + + + Example 2. A four by four matrix representing an affine transformation between two frames of reference could be described as: + + Concept Name Code Sequence (0040,A043) = (eRDSRX16, DCM, "X-Ray Source Transformation Matrix") + Tabulated Values Sequence (0040,A801) + Item 1 + >Number of Table Rows (0040,A802) = 4 + >Number of Table Columns (0040,A803) = 4 + + + + No Table Row Definition Sequence (0040,A806) or Table Column Definition Sequence (0040,A807) is needed, since the meaning of the rows and columns in a transformation matrix is implicit in the definition of the matrix (for example, the template using this Content Item might reference the behavior defined in ). + + + No Measurement Units Code Sequence (0040,08EA) is needed since the numeric values are dimensionless (have no units). + + + + + + Example 3. A four-column table, consisting of multiple (ten) measurements along an artery, could be described as follows: + + Concept Name Code Sequence (0040,A043) = (, , "Arterial Measurements") + Tabulated Values Sequence (0040,A801) + Item 1 + >Number of Table Rows (0040,A802) = 10 + >Number of Table Columns (0040,A803) = 4 + >Table Column Definition Sequence (0040,A807) + >Item 1 + >>Table Column Number (0040,A805) = 1 + >>Concept Name Code Sequence (0040,A043) = (, , " Distance from landmark ") + >>Measurement Units Code Sequence (0040,08EA) = (mm, UCUM, "mm") + >Item 2 + >>Table Column Number (0040,A805) = 2 + >>Concept Name Code Sequence (0040,A043) = (, , "X- Measured lumen diameter") + >>Measurement Units Code Sequence (0040,08EA) = (mm, UCUM, "mm") + >Item 3 + >>Table Column Number (0040,A805) = 3 + >>Concept Name Code Sequence (0040,A043) = (, , "Calculated lumen cross-section area") + >>Measurement Units Code Sequence (0040,08EA) = (mm2, UCUM, " mm2") + >Item 4 + >>Table Column Number (0040,A805) = 4 + >>Concept Name Code Sequence (0040,A043) = (, , "Stenosis") + >>Measurement Units Code Sequence (0040,08EA) = ([%], UCUM, " [%]") + + No Table Row Definition Sequence (0040,A806) is needed, since rows consist of unnamed observations. + +
+
+ Cell Values Sequence + The table cell values are encoded in Items of Cell Values Sequence (0040,A808) either: + + + in individual Items, one for each cell, as a single valued Attribute (and may be sparse and of different VR per cell) + + + in a single Item for entire columns, one for each column, as a multi-valued Attribute (and hence be of the same VR for all the cells in a particular column) + + + in a single Item for entire rows, one for each row, as a multi-valued Attribute (and hence be of the same VR for all the cells in a particular row) + + + For example, + + Example 1. A two-column table, consisting of multiple rows describing forty values of datetime and X-Ray tube current, as described in Example 1, could encode its values as follows: + + >Cell Values Sequence (0040,A808) + >Item 1 + >>Table Column Number (0040,A805) = 1 + >>Selector Attribute VR (0072,0050) = DT + >>Selector DT Value (0072,0063) = 20200401163901.01\20200401163901.02\...\20200401163901.40 (forty values) + >Item 2 + >>Table Column Number (0040,A805) = 2 + >>Selector Attribute VR (0072,0050) = FL + >>Selector FL Value (0072,0076) = 100.1, 90.2, ..., 60.5 (forty 32-bit binary floating-point values) + + Example 2. A four by four matrix representing an identity affine transformation between two frames of reference, as described in Example 2, could encode its values as follows: + + >Cell Values Sequence (0040,A808) + >Item 1 + >>Table Column Number (0040,A805) = 1 + >>Selector Attribute VR (0072,0050) = FD + >>Selector FD Value (0072,0074) = 1, 0, 0, 0 (four 64-bit binary floating-point values) + >Item 2 + >>Table Column Number (0040,A805) = 2 + >>Selector Attribute VR (0072,0050) = FD + >>Selector FD Value (0072,0074) = 0, 1, 0, 0 (four 64-bit binary floating-point values) + >Item 3 + >>Table Column Number (0040,A805) = 3 + >>Selector Attribute VR (0072,0050) = FD + >>Selector FD Value (0072,0074) = 0, 0, 1, 0 (four 64-bit binary floating-point values) + >Item 4 + >>Table Column Number (0040,A805) = 4 + >>Selector Attribute VR (0072,0050) = FD + >>Selector FD Value (0072,0074) = 0, 0, 0, 1 (four 64-bit binary floating-point values) + + Example 3. A four-column table, consisting of multiple (ten) measurements along an artery, as described in Example 3, could encode its values as follows: + + >Cell Values Sequence (0040,A808) + >Item 1 + >>Table Column Number (0040,A805) = 1 + >>Selector Attribute VR (0072,0050) = DS + >>Selector DS Value (0072,0072) = 0\1\2\3 ...\9 (ten decimal string values) + >Item 2 + >>Table Column Number (0040,A805) = 2 + >>Selector Attribute VR (0072,0050) = DS + >>Selector DS Value (0072,0072) = 1.4\1.5\1.5\1.4 ...\1.2 (ten decimal string values) + >Item 3 + >>Table Column Number (0040,A805) = 3 + >>Selector Attribute VR (0072,0050) = DS + >>Selector DS Value (0072,0072) = 1.54\1.77\1.77\1.54 ...\1.13 (ten decimal string values) + >Item 4 + >>Table Column Number (0040,A805) = 4 + >>Selector Attribute VR (0072,0050) = DS + >>Selector DS Value (0072,0072) = 10\0\0\10 ...\20 (ten decimal string values) +
+
+ Referenced Content Item Identifier + Instead of encoding a value for a cell or list of values for a row or column, a reference can be made to another Content Item. + For the structure and encoding of the Referenced Content Item Identifier (0040,DB73) Attribute, + see + and the definition of Referenced Content Item Identifier in . + The reference mechanism allows the context of a cell value to be preserved. + For example, if it is necessary to tabulate a list of measurements on regions of interest (ROIs), + then each ROI and its associated measurements, descriptive codes, segmentation references, coordinates and image references can be encoded in the Content Tree in the normal manner, + and references to the NUM Content Items that encode the measurements can be tabulated in a TABLE Content Item by using the Referenced Content Item Identifier (0040,DB73). + Other cells in the table might reference other Content Items associated with the measurements, such as a tracking identifier or target anatomy or time point identifier. + Frequently, the description of the row or column (as described in ), + will match the pre-coordinated concept name and units that describes a referenced Content Item. + E.g., the same code can be used for the Concept Name Code Sequence (0040,A043) and Measurement Units Code Sequence (0040,08EA) of the referenced NUM Content Item as for the corresponding Table Row Definition Sequence (0040,A806) or Table Column Definition Sequence (0040,A807). + However, it may be that a referenced Content Item has a relatively complex post-coordinated description defined by related parent, sibling or child Content Items, in which case a more specific code may need to be used for the Concept Name Code Sequence (0040,A043) in Table Row Definition Sequence (0040,A806) or Table Column Definition Sequence (0040,A807). +
+
+
+
diff --git a/dicom_validator/tests/fixtures/2021d/json/iod_info.json b/dicom_validator/tests/fixtures/2021d/json/iod_info.json index 45c8a36..15228ac 100644 --- a/dicom_validator/tests/fixtures/2021d/json/iod_info.json +++ b/dicom_validator/tests/fixtures/2021d/json/iod_info.json @@ -625,6 +625,67 @@ }, "title": "VL Whole Slide Microscopy Image IOD" }, + "1.2.840.10008.5.1.4.1.1.88.67": { + "group_macros": {}, + "modules": { + "Clinical Trial Series": { + "ref": "C.7.3.2", + "use": "U" + }, + "Clinical Trial Study": { + "ref": "C.7.2.3", + "use": "U" + }, + "Clinical Trial Subject": { + "ref": "C.7.1.3", + "use": "U" + }, + "Enhanced General Equipment": { + "ref": "C.7.5.2", + "use": "M" + }, + "General Equipment": { + "ref": "C.7.5.1", + "use": "M" + }, + "General Study": { + "ref": "C.7.2.1", + "use": "M" + }, + "Patient": { + "ref": "C.7.1.1", + "use": "M" + }, + "Patient Study": { + "ref": "C.7.2.2", + "use": "U" + }, + "SOP Common": { + "ref": "C.12.1", + "use": "M" + }, + "SR Document Content": { + "ref": "C.17.3", + "use": "M" + }, + "SR Document General": { + "ref": "C.17.2", + "use": "M" + }, + "SR Document Series": { + "ref": "C.17.1", + "use": "M" + }, + "Synchronization": { + "cond": { + "type": "U" + }, + "ref": "C.7.4.2", + "use": "C - shall be present if system time is synchronized to an external reference. May be present otherwise." + } + }, + "title": "X-Ray Radiation Dose SR IOD" + }, "1.2.840.10008.5.1.4.1.1.481.2": { "group_macros": {}, "modules": { diff --git a/dicom_validator/tests/fixtures/2021d/json/module_info.json b/dicom_validator/tests/fixtures/2021d/json/module_info.json index 9b916c6..218932c 100644 --- a/dicom_validator/tests/fixtures/2021d/json/module_info.json +++ b/dicom_validator/tests/fixtures/2021d/json/module_info.json @@ -23,7 +23,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Institution Code Sequence", @@ -32,7 +34,9 @@ "(0040,1101)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Person Identification Code Sequence", @@ -97,21 +101,27 @@ "(0040,0441)": { "items": { "include": [ - "10-2" + { + "ref": "10-2" + } ] }, "name": "Content Item Modifier Sequence", "type": "3" }, "include": [ - "10-2" + { + "ref": "10-2" + } ] }, "name": "Protocol Context Sequence", "type": "3" }, "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Performed Protocol Code Sequence", @@ -178,7 +188,9 @@ "(0040,0036)": { "items": { "include": [ - "10-17" + { + "ref": "10-17" + } ] }, "name": "Assigning Facility Sequence", @@ -187,7 +199,9 @@ "(0040,0039)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Assigning Jurisdiction Code Sequence", @@ -196,7 +210,9 @@ "(0040,003A)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Assigning Agency or Department Code Sequence", @@ -235,7 +251,9 @@ "type": "1C" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced SOP Sequence", @@ -253,7 +271,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Measurement Units Code Sequence", @@ -266,7 +286,9 @@ "(0040,A043)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Concept Name Code Sequence", @@ -386,7 +408,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Concept Code Sequence", @@ -412,7 +436,9 @@ "(0054,0222)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "View Modifier Code Sequence", @@ -423,7 +449,9 @@ "type": "3" }, "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "View Code Sequence", @@ -468,7 +496,9 @@ "type": "1C" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "10-3b": { @@ -733,7 +763,9 @@ "(0008,114A)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Instance Sequence", @@ -754,21 +786,27 @@ "(0008,2220)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Anatomic Region Modifier Sequence", "type": "3" }, "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Anatomic Region Sequence", "type": "1" }, "include": [ - "10-8" + { + "ref": "10-8" + } ] }, "10-7": { @@ -777,15 +815,21 @@ "(0008,2220)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Anatomic Region Modifier Sequence", "type": "3" }, "include": [ - "8.8-1", - "10-8" + { + "ref": "8.8-1" + }, + { + "ref": "10-8" + } ] }, "name": "Anatomic Region Sequence", @@ -798,14 +842,18 @@ "(0008,2230)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Primary Anatomic Structure Modifier Sequence", "type": "3" }, "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Primary Anatomic Structure Sequence", @@ -820,7 +868,9 @@ "(0008,0051)": { "items": { "include": [ - "10-17" + { + "ref": "10-17" + } ] }, "name": "Issuer of Accession Number Sequence", @@ -829,7 +879,9 @@ "(0008,1110)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Study Sequence", @@ -846,7 +898,9 @@ "(0032,1064)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Requested Procedure Code Sequence", @@ -863,21 +917,27 @@ "(0040,0441)": { "items": { "include": [ - "10-2" + { + "ref": "10-2" + } ] }, "name": "Content Item Modifier Sequence", "type": "3" }, "include": [ - "10-2" + { + "ref": "10-2" + } ] }, "name": "Protocol Context Sequence", "type": "3" }, "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Scheduled Protocol Code Sequence", @@ -904,7 +964,9 @@ "(0040,100A)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Reason for Requested Procedure Code Sequence", @@ -915,16 +977,24 @@ "(0008,0121)": { "items": { "include": [ - "8.8-1a", - "8.8-1b" + { + "ref": "8.8-1a" + }, + { + "ref": "8.8-1b" + } ] }, "name": "Equivalent Code Sequence", "type": "3" }, "include": [ - "8.8-1a", - "8.8-1b" + { + "ref": "8.8-1a" + }, + { + "ref": "8.8-1b" + } ] }, "8.8-1a": { @@ -1161,7 +1231,9 @@ }, "C.11.1": { "include": [ - "C.11-1b" + { + "ref": "C.11-1b" + } ] }, "C.11.15": { @@ -1176,7 +1248,9 @@ }, "C.11.2": { "include": [ - "C.11-2b" + { + "ref": "C.11-2b" + } ] }, "C.12-6": { @@ -1245,7 +1319,9 @@ "(0400,0401)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Digital Signature Purpose Code Sequence", @@ -1404,7 +1480,9 @@ "(0008,1072)": { "items": { "include": [ - "10-1" + { + "ref": "10-1" + } ] }, "name": "Operator Identification Sequence", @@ -1445,7 +1523,9 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", @@ -1556,7 +1636,9 @@ }, "items": { "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Conversion Source Attributes Sequence", @@ -1580,7 +1662,9 @@ "type": "3" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "HL7 Structured Document Reference Sequence", @@ -1612,7 +1696,9 @@ "type": "3" }, "include": [ - "C.12-6" + { + "ref": "C.12-6" + } ] }, "C.12.2": { @@ -1624,7 +1710,9 @@ "(0008,114A)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Instance Sequence", @@ -1640,7 +1728,9 @@ "type": "1" }, "include": [ - "10-4" + { + "ref": "10-4" + } ] }, "name": "Studies Containing Other Referenced Instances Sequence", @@ -1688,11 +1778,23 @@ "type": "1" } }, + "C.17.3": { + "include": [ + { + "ref": "C.17-5" + }, + { + "ref": "C.17-6" + } + ] + }, "C.17-3": { "(0008,1115)": { "items": { "include": [ - "C.17-3a" + { + "ref": "C.17-3a" + } ] }, "name": "Referenced Series Sequence", @@ -1717,7 +1819,9 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", @@ -1760,7 +1864,9 @@ "type": "3" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced SOP Sequence", @@ -1783,150 +1889,422 @@ "type": "3" } }, - "C.7-11b": { - "(0028,0002)": { - "name": "Samples per Pixel", - "type": "1" - }, - "(0028,0004)": { - "name": "Photometric Interpretation", + "C.17-5": { + "(0040,A040)": { + "name": "Value Type", "type": "1" }, - "(0028,0006)": { + "(0040,A043)": { "cond": { "index": 0, - "op": ">", - "tag": "(0028,0002)", - "type": "MN", + "op": "=", + "tag": "(0040,A040)", + "type": "MU", "values": [ - "1" + "TEXT", + "NUM", + "CODE", + "DATETIME", + "DATE", + "TIME", + "UIDREF", + "TABLE", + "PNAME" ] }, - "name": "Planar Configuration", + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Concept Name Code Sequence", "type": "1C" }, - "(0028,0010)": { - "name": "Rows", - "type": "1" - }, - "(0028,0011)": { - "name": "Columns", - "type": "1" - }, - "(0028,0034)": { + "(0040,A120)": { "cond": { - "type": "U" + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "DATETIME" + ] }, - "name": "Pixel Aspect Ratio", + "name": "DateTime", "type": "1C" }, - "(0028,0100)": { - "name": "Bits Allocated", - "type": "1" - }, - "(0028,0101)": { - "name": "Bits Stored", - "type": "1" - }, - "(0028,0102)": { - "name": "High Bit", - "type": "1" - }, - "(0028,0103)": { - "name": "Pixel Representation", - "type": "1" - }, - "(0028,0106)": { - "name": "Smallest Image Pixel Value", - "type": "3" - }, - "(0028,0107)": { - "name": "Largest Image Pixel Value", - "type": "3" - }, - "(0028,1101)": { + "(0040,A121)": { "cond": { - "or": [ - { - "index": 0, - "op": "=", - "tag": "(0028,0004)", - "values": [ - "PALETTE COLOR" - ] - }, - { - "index": 0, - "op": "=", - "tag": "(0008,9205)", - "values": [ - "COLOR", - "MIXED" - ] - } - ], - "type": "MN" + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "DATE" + ] }, - "name": "Red Palette Color Lookup Table Descriptor", + "name": "Date", "type": "1C" }, - "(0028,1102)": { + "(0040,A122)": { "cond": { - "or": [ - { - "index": 0, - "op": "=", - "tag": "(0028,0004)", - "values": [ - "PALETTE COLOR" - ] - }, - { - "index": 0, - "op": "=", - "tag": "(0008,9205)", - "values": [ - "COLOR", - "MIXED" - ] - } - ], - "type": "MN" + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TIME" + ] }, - "name": "Green Palette Color Lookup Table Descriptor", + "name": "Time", "type": "1C" }, - "(0028,1103)": { + "(0040,A123)": { "cond": { - "or": [ - { - "index": 0, - "op": "=", - "tag": "(0028,0004)", - "values": [ - "PALETTE COLOR" - ] - }, - { - "index": 0, - "op": "=", - "tag": "(0008,9205)", - "values": [ - "COLOR", - "MIXED" - ] - } - ], - "type": "MN" + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "PNAME" + ] }, - "name": "Blue Palette Color Lookup Table Descriptor", + "name": "Person Name", "type": "1C" }, - "(0028,1201)": { + "(0040,A124)": { "cond": { - "or": [ - { - "index": 0, + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "UIDREF" + ] + }, + "name": "UID", + "type": "1C" + }, + "(0040,A160)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TEXT" + ] + }, + "name": "Text Value", + "type": "1C" + }, + "include": [ + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "NUM" + ] + }, + "ref": "C.18.1-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "CODE" + ] + }, + "ref": "C.18.2-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "COMPOSITE" + ] + }, + "ref": "C.18.3-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "IMAGE" + ] + }, + "ref": "C.18.4-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "WAVEFORM" + ] + }, + "ref": "C.18.5-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "SCOORD" + ] + }, + "ref": "C.18.6-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "SCOORD3D" + ] + }, + "ref": "C.18.9-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TCOORD" + ] + }, + "ref": "C.18.7-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "CONTAINER" + ] + }, + "ref": "C.18.8-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TABLE" + ] + }, + "ref": "C.18.10-1" + } + ] + }, + "C.17-6": { + "(0040,A032)": { + "cond": { + "type": "U" + }, + "name": "Observation DateTime", + "type": "1C" + }, + "(0040,A171)": { + "name": "Observation UID", + "type": "3" + }, + "(0040,A730)": { + "cond": { + "type": "U" + }, + "items": { + "(0040,A010)": { + "name": "Relationship Type", + "type": "1" + }, + "(0040,DB73)": { + "cond": { + "type": "U" + }, + "name": "Referenced Content Item Identifier", + "type": "1C" + }, + "include": [ + { + "ref": "C.17-5" + } + ] + }, + "name": "Content Sequence", + "type": "1C" + } + }, + "C.7-11b": { + "(0028,0002)": { + "name": "Samples per Pixel", + "type": "1" + }, + "(0028,0004)": { + "name": "Photometric Interpretation", + "type": "1" + }, + "(0028,0006)": { + "cond": { + "index": 0, + "op": ">", + "tag": "(0028,0002)", + "type": "MN", + "values": [ + "1" + ] + }, + "name": "Planar Configuration", + "type": "1C" + }, + "(0028,0010)": { + "name": "Rows", + "type": "1" + }, + "(0028,0011)": { + "name": "Columns", + "type": "1" + }, + "(0028,0034)": { + "cond": { + "type": "U" + }, + "name": "Pixel Aspect Ratio", + "type": "1C" + }, + "(0028,0100)": { + "name": "Bits Allocated", + "type": "1" + }, + "(0028,0101)": { + "name": "Bits Stored", + "type": "1" + }, + "(0028,0102)": { + "name": "High Bit", + "type": "1" + }, + "(0028,0103)": { + "name": "Pixel Representation", + "type": "1" + }, + "(0028,0106)": { + "name": "Smallest Image Pixel Value", + "type": "3" + }, + "(0028,0107)": { + "name": "Largest Image Pixel Value", + "type": "3" + }, + "(0028,1101)": { + "cond": { + "or": [ + { + "index": 0, + "op": "=", + "tag": "(0028,0004)", + "values": [ + "PALETTE COLOR" + ] + }, + { + "index": 0, + "op": "=", + "tag": "(0008,9205)", + "values": [ + "COLOR", + "MIXED" + ] + } + ], + "type": "MN" + }, + "name": "Red Palette Color Lookup Table Descriptor", + "type": "1C" + }, + "(0028,1102)": { + "cond": { + "or": [ + { + "index": 0, + "op": "=", + "tag": "(0028,0004)", + "values": [ + "PALETTE COLOR" + ] + }, + { + "index": 0, + "op": "=", + "tag": "(0008,9205)", + "values": [ + "COLOR", + "MIXED" + ] + } + ], + "type": "MN" + }, + "name": "Green Palette Color Lookup Table Descriptor", + "type": "1C" + }, + "(0028,1103)": { + "cond": { + "or": [ + { + "index": 0, + "op": "=", + "tag": "(0028,0004)", + "values": [ + "PALETTE COLOR" + ] + }, + { + "index": 0, + "op": "=", + "tag": "(0008,9205)", + "values": [ + "COLOR", + "MIXED" + ] + } + ], + "type": "MN" + }, + "name": "Blue Palette Color Lookup Table Descriptor", + "type": "1C" + }, + "(0028,1201)": { + "cond": { + "or": [ + { + "index": 0, "op": "=", "tag": "(0028,0004)", "values": [ @@ -2023,7 +2401,9 @@ "(0008,1120)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Patient Sequence", @@ -2099,7 +2479,9 @@ "type": "1" }, "include": [ - "10-18" + { + "ref": "10-18" + } ] }, "name": "Other Patient IDs Sequence", @@ -2108,7 +2490,9 @@ "(0010,1100)": { "items": { "include": [ - "10-3b" + { + "ref": "10-3b" + } ] }, "name": "Referenced Patient Photo Sequence", @@ -2131,7 +2515,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Patient Species Code Sequence", @@ -2150,7 +2536,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Patient Breed Code Sequence", @@ -2178,7 +2566,9 @@ "(0010,0215)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Strain Source Registry Code Sequence", @@ -2259,14 +2649,18 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "De-identification Method Code Sequence", "type": "1C" }, "include": [ - "C.7.1.4-1" + { + "ref": "C.7.1.4-1" + } ] }, "name": "Strain Stock Sequence", @@ -2279,7 +2673,9 @@ "(0010,0219)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Strain Code Sequence", @@ -2292,7 +2688,9 @@ "(0010,2296)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Breed Registry Code Sequence", @@ -2307,7 +2705,9 @@ "type": "3" }, "include": [ - "10-18" + { + "ref": "10-18" + } ] }, "C.7.1.3": { @@ -2374,7 +2774,9 @@ "type": "1" }, "include": [ - "10-18" + { + "ref": "10-18" + } ] }, "name": "Source Patient Group Identification Sequence", @@ -2395,7 +2797,9 @@ "type": "3" }, "include": [ - "10-18" + { + "ref": "10-18" + } ] }, "name": "Group of Patients Identification Sequence", @@ -2418,7 +2822,9 @@ "(0008,0051)": { "items": { "include": [ - "10-17" + { + "ref": "10-17" + } ] }, "name": "Issuer of Accession Number Sequence", @@ -2431,7 +2837,9 @@ "(0008,0096)": { "items": { "include": [ - "10-1" + { + "ref": "10-1" + } ] }, "name": "Referring Physician Identification Sequence", @@ -2444,7 +2852,9 @@ "(0008,009D)": { "items": { "include": [ - "10-1" + { + "ref": "10-1" + } ] }, "name": "Consulting Physician Identification Sequence", @@ -2457,7 +2867,9 @@ "(0008,1032)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Procedure Code Sequence", @@ -2470,7 +2882,9 @@ "(0008,1049)": { "items": { "include": [ - "10-1" + { + "ref": "10-1" + } ] }, "name": "Physician(s) of Record Identification Sequence", @@ -2483,7 +2897,9 @@ "(0008,1062)": { "items": { "include": [ - "10-1" + { + "ref": "10-1" + } ] }, "name": "Physician(s) Reading Study Identification Sequence", @@ -2492,7 +2908,9 @@ "(0008,1110)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Study Sequence", @@ -2509,7 +2927,9 @@ "(0032,1034)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Requesting Service Code Sequence", @@ -2518,7 +2938,9 @@ "(0040,1012)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Reason For Performed Procedure Code Sequence", @@ -2533,7 +2955,9 @@ "(0008,1084)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Admitting Diagnoses Code Sequence", @@ -2550,7 +2974,9 @@ "(0010,1021)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Patient's Size Code Sequence", @@ -2582,7 +3008,9 @@ "(0038,0014)": { "items": { "include": [ - "10-17" + { + "ref": "10-17" + } ] }, "name": "Issuer of Admission ID Sequence", @@ -2599,7 +3027,9 @@ "(0038,0064)": { "items": { "include": [ - "10-17" + { + "ref": "10-17" + } ] }, "name": "Issuer of Service Episode ID Sequence", @@ -2673,7 +3103,9 @@ "(0008,103F)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Series Description Code Sequence", @@ -2686,7 +3118,9 @@ "(0008,1052)": { "items": { "include": [ - "10-1" + { + "ref": "10-1" + } ] }, "name": "Performing Physician Identification Sequence", @@ -2699,7 +3133,9 @@ "(0008,1072)": { "items": { "include": [ - "10-1" + { + "ref": "10-1" + } ] }, "name": "Operator Identification Sequence", @@ -2708,7 +3144,9 @@ "(0008,1111)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Performed Procedure Step Sequence", @@ -2753,7 +3191,9 @@ "(0040,0275)": { "items": { "include": [ - "10-9" + { + "ref": "10-9" + } ] }, "name": "Request Attributes Sequence", @@ -2762,14 +3202,18 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "2" }, "include": [ - "10-16" + { + "ref": "10-16" + } ] }, "name": "Related Series Sequence", @@ -3026,7 +3470,9 @@ "(0040,9096)": { "items": { "include": [ - "C.7.6.16-12b" + { + "ref": "C.7.6.16-12b" + } ] }, "name": "Real World Value Mapping Sequence", @@ -3035,7 +3481,9 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", @@ -3044,7 +3492,9 @@ "(0088,0200)": { "items": { "include": [ - "C.7-11b" + { + "ref": "C.7-11b" + } ] }, "name": "Icon Image Sequence", @@ -3055,7 +3505,9 @@ "type": "3" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Instance Sequence", @@ -3087,14 +3539,18 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "3" }, "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Source Image Sequence", @@ -3103,7 +3559,9 @@ "(0008,9215)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Derivation Code Sequence", @@ -3112,14 +3570,18 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "3" }, "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Referenced Image Sequence", @@ -3191,7 +3653,9 @@ "type": "3" }, "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Device Sequence", @@ -3214,7 +3678,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Measurement Units Code Sequence", @@ -3227,7 +3693,9 @@ "(0040,A043)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Concept Name Code Sequence", @@ -3330,7 +3798,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Concept Code Sequence", @@ -3417,7 +3887,9 @@ "(5200,9229)": { "items": { "include": [ - "FuncGroup" + { + "ref": "FuncGroup" + } ] }, "name": "Shared Functional Groups Sequence", @@ -3426,7 +3898,9 @@ "(5200,9230)": { "items": { "include": [ - "FuncGroup" + { + "ref": "FuncGroup" + } ] }, "name": "Per-frame Functional Groups Sequence", @@ -3441,7 +3915,9 @@ "(0040,08EA)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Measurement Units Code Sequence", @@ -3540,7 +4016,9 @@ "(0040,9220)": { "items": { "include": [ - "10-2" + { + "ref": "10-2" + } ] }, "name": "Quantity Definition Sequence", @@ -3713,14 +4191,18 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "1C" }, "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Referenced Image Sequence", @@ -3759,14 +4241,18 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "1C" }, "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Source Image Sequence", @@ -3778,7 +4264,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Derivation Code Sequence", @@ -3871,7 +4359,9 @@ "type": "1" }, "include": [ - "10-5" + { + "ref": "10-5" + } ] }, "name": "Frame Anatomy Sequence", @@ -3981,7 +4471,9 @@ "(0018,9472)": { "items": { "include": [ - "C.7-17a" + { + "ref": "C.7-17a" + } ] }, "name": "Frame Display Shutter Sequence", @@ -4681,7 +5173,9 @@ }, "C.7.6.22": { "include": [ - "C.7.6.22-2" + { + "ref": "C.7.6.22-2" + } ] }, "C.7.6.22-2": { @@ -4692,7 +5186,9 @@ "(0040,0513)": { "items": { "include": [ - "10-17" + { + "ref": "10-17" + } ] }, "name": "Issuer of the Container Identifier Sequence", @@ -4707,7 +5203,9 @@ "(0040,0513)": { "items": { "include": [ - "10-17" + { + "ref": "10-17" + } ] }, "name": "Issuer of the Container Identifier Sequence", @@ -4716,7 +5214,9 @@ "(0040,0518)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Container Type Code Sequence", @@ -4739,7 +5239,9 @@ "(0050,0012)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Container Component Type Code Sequence", @@ -4790,7 +5292,9 @@ "(0040,0562)": { "items": { "include": [ - "10-17" + { + "ref": "10-17" + } ] }, "name": "Issuer of the Specimen Identifier Sequence", @@ -4799,7 +5303,9 @@ "(0040,059A)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Specimen Type Code Sequence", @@ -4818,7 +5324,9 @@ "(0040,0612)": { "items": { "include": [ - "10-2" + { + "ref": "10-2" + } ] }, "name": "Specimen Preparation Step Content Item Sequence", @@ -4830,14 +5338,18 @@ }, "items": { "include": [ - "10-2" + { + "ref": "10-2" + } ] }, "name": "Specimen Localization Content Item Sequence", "type": "1C" }, "include": [ - "10-8" + { + "ref": "10-8" + } ] }, "name": "Specimen Preparation Sequence", @@ -4868,7 +5380,9 @@ "type": "1C" }, "include": [ - "C.7-11b" + { + "ref": "C.7-11b" + } ] }, "C.7.6.4": { @@ -4879,7 +5393,9 @@ "(0018,0012)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Contrast/Bolus Agent Sequence", @@ -4890,7 +5406,9 @@ "(0018,002A)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Additional Drug Sequence", @@ -4929,7 +5447,9 @@ "type": "3" }, "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Contrast/Bolus Administration Route Sequence", @@ -4950,7 +5470,9 @@ "(0018,0014)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Contrast/Bolus Administration Route Sequence", @@ -4971,7 +5493,9 @@ "(0018,9338)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Contrast/Bolus Ingredient Code Sequence", @@ -5012,7 +5536,9 @@ "type": "3" }, "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Contrast/Bolus Agent Sequence", @@ -5084,7 +5610,9 @@ "(0040,9096)": { "items": { "include": [ - "C.7.6.16-12b" + { + "ref": "C.7.6.16-12b" + } ] }, "name": "Real World Value Mapping Sequence", @@ -5326,7 +5854,9 @@ "(0022,0016)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Illumination Type Code Sequence", @@ -5335,7 +5865,9 @@ "(0022,0017)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Light Path Filter Type Stack Code Sequence", @@ -5344,7 +5876,9 @@ "(0022,0018)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Image Path Filter Type Stack Code Sequence", @@ -5353,7 +5887,9 @@ "(0022,0019)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Lenses Code Sequence", @@ -5365,7 +5901,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Channel Description Code Sequence", @@ -5410,7 +5948,9 @@ "(0048,0100)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Illuminator Type Code Sequence", @@ -5433,7 +5973,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Illumination Color Code Sequence", @@ -5454,7 +5996,9 @@ "(0048,0120)": { "items": { "include": [ - "C.7-22a" + { + "ref": "C.7-22a" + } ] }, "name": "Palette Color Lookup Table Sequence", @@ -5503,7 +6047,9 @@ }, "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Performed Procedure Step Sequence", @@ -5525,7 +6071,9 @@ "(0008,113A)": { "items": { "include": [ - "C.17-3" + { + "ref": "C.17-3" + } ] }, "name": "Referenced Waveform Sequence", @@ -5540,7 +6088,9 @@ }, "items": { "include": [ - "C.17-3" + { + "ref": "C.17-3" + } ] }, "name": "Referenced Image Evidence Sequence", @@ -5549,7 +6099,9 @@ "(0008,9121)": { "items": { "include": [ - "C.17-3" + { + "ref": "C.17-3" + } ] }, "name": "Referenced Raw Data Sequence", @@ -5564,7 +6116,9 @@ }, "items": { "include": [ - "C.17-3" + { + "ref": "C.17-3" + } ] }, "name": "Source Image Evidence Sequence", @@ -5576,7 +6130,9 @@ }, "items": { "include": [ - "C.17-3" + { + "ref": "C.17-3" + } ] }, "name": "Referenced Presentation State Sequence", @@ -5689,7 +6245,9 @@ "(0088,0200)": { "items": { "include": [ - "C.7-11b" + { + "ref": "C.7-11b" + } ] }, "name": "Icon Image Sequence", @@ -5704,9 +6262,15 @@ "type": "3" }, "include": [ - "C.8-131", - "10-25", - "10-27" + { + "ref": "C.8-131" + }, + { + "ref": "10-25" + }, + { + "ref": "10-27" + } ] }, "C.8.2.1": { @@ -5795,7 +6359,9 @@ }, "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Water Equivalent Diameter Method Code Sequence", @@ -5848,7 +6414,9 @@ "(0018,9346)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "CTDI Phantom Type Code Sequence", @@ -5954,9 +6522,15 @@ "type": "3" }, "include": [ - "10-7", - "10-25", - "10-27" + { + "ref": "10-7" + }, + { + "ref": "10-25" + }, + { + "ref": "10-27" + } ] }, "C.8.8.1": { @@ -5979,7 +6553,9 @@ "(0008,103F)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Series Description Code Sequence", @@ -5992,7 +6568,9 @@ "(0008,1072)": { "items": { "include": [ - "10-1" + { + "ref": "10-1" + } ] }, "name": "Operator Identification Sequence", @@ -6001,7 +6579,9 @@ "(0008,1111)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Performed Procedure Step Sequence", @@ -6018,14 +6598,18 @@ "(0040,0275)": { "items": { "include": [ - "10-9" + { + "ref": "10-9" + } ] }, "name": "Request Attributes Sequence", "type": "3" }, "include": [ - "10-16" + { + "ref": "10-16" + } ] }, "C.8.8.3": { @@ -6093,7 +6677,9 @@ }, "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Spatial Registration Sequence", @@ -6188,14 +6774,18 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "1" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Instance Sequence", @@ -6204,7 +6794,9 @@ "(0008,9215)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Derivation Code Sequence", @@ -6245,7 +6837,9 @@ "type": "1C" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Treatment Record Sequence", @@ -6311,7 +6905,9 @@ "type": "1C" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced RT Plan Sequence", @@ -6390,7 +6986,9 @@ "(300C,0060)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Structure Set Sequence", @@ -6439,7 +7037,9 @@ "(3006,0016)": { "items": { "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Contour Image Sequence", @@ -6450,7 +7050,9 @@ "(0008,9215)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Derivation Code Sequence", @@ -6459,7 +7061,9 @@ "(3006,0018)": { "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Predecessor Structure Set Sequence", @@ -6502,7 +7106,9 @@ "type": "1" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "RT Referenced Study Sequence", @@ -6533,7 +7139,9 @@ "(3006,0016)": { "items": { "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Contour Image Sequence", @@ -6611,7 +7219,9 @@ }, "items": { "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Performed Procedure Step Sequence", @@ -6968,7 +7578,9 @@ "(0008,9215)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Derivation Code Sequence", @@ -7606,14 +8218,18 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "3" }, "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Referenced Image Sequence", @@ -7624,14 +8240,18 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "1" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Referenced Instance Sequence", @@ -7663,14 +8283,18 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "3" }, "include": [ - "10-3" + { + "ref": "10-3" + } ] }, "name": "Source Image Sequence", @@ -7679,7 +8303,9 @@ "(0008,9215)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Derivation Code Sequence", @@ -7690,18 +8316,857 @@ "(0040,A170)": { "items": { "include": [ - "8.8-1" + { + "ref": "8.8-1" + } ] }, "name": "Purpose of Reference Code Sequence", "type": "3" }, "include": [ - "10-11" + { + "ref": "10-11" + } ] }, "name": "Source Instance Sequence", "type": "3" } + }, + "C.18.1-1": { + "(0040,A300)": { + "items": { + "(0040,08EA)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Measurement Units Code Sequence", + "type": "1" + }, + "(0040,A161)": { + "cond": { + "type": "U" + }, + "name": "Floating Point Value", + "type": "1C" + }, + "(0040,A162)": { + "cond": { + "type": "U" + }, + "name": "Rational Numerator Value", + "type": "1C" + }, + "(0040,A163)": { + "cond": { + "index": 0, + "op": "+", + "tag": "(0040,A162)", + "type": "MU" + }, + "name": "Rational Denominator Value", + "type": "1C" + }, + "(0040,A30A)": { + "name": "Numeric Value", + "type": "1" + } + }, + "name": "Measured Value Sequence", + "type": "2" + }, + "(0040,A301)": { + "cond": { + "type": "U" + }, + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Numeric Value Qualifier Code Sequence", + "type": "1C" + } + }, + "C.17.1": { + "(0008,0021)": { + "name": "Series Date", + "type": "3" + }, + "(0008,0031)": { + "name": "Series Time", + "type": "3" + }, + "(0008,0060)": { + "name": "Modality", + "type": "1" + }, + "(0008,103E)": { + "name": "Series Description", + "type": "3" + }, + "(0008,103F)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Series Description Code Sequence", + "type": "3" + }, + "(0008,1111)": { + "items": { + "include": [ + { + "ref": "10-11" + } + ] + }, + "name": "Referenced Performed Procedure Step Sequence", + "type": "2" + }, + "(0018,1030)": { + "name": "Protocol Name", + "type": "3" + }, + "(0020,000E)": { + "name": "Series Instance UID", + "type": "1" + }, + "(0020,0011)": { + "name": "Series Number", + "type": "1" + }, + "(300A,0700)": { + "name": "Treatment Session UID", + "type": "3" + } + }, + "C.17.2": { + "(0008,0023)": { + "name": "Content Date", + "type": "1" + }, + "(0008,0033)": { + "name": "Content Time", + "type": "1" + }, + "(0008,114A)": { + "cond": { + "type": "U" + }, + "items": { + "(0040,A170)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Purpose of Reference Code Sequence", + "type": "1" + }, + "include": [ + { + "ref": "10-11" + } + ] + }, + "name": "Referenced Instance Sequence", + "type": "1C" + }, + "(0020,0013)": { + "name": "Instance Number", + "type": "1" + }, + "(0040,A073)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A493)", + "type": "MU", + "values": [ + "VERIFIED" + ] + }, + "items": { + "(0040,A027)": { + "name": "Verifying Organization", + "type": "1" + }, + "(0040,A030)": { + "name": "Verification DateTime", + "type": "1" + }, + "(0040,A075)": { + "name": "Verifying Observer Name", + "type": "1" + }, + "(0040,A088)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Verifying Observer Identification Code Sequence", + "type": "2" + } + }, + "name": "Verifying Observer Sequence", + "type": "1C" + }, + "(0040,A078)": { + "items": { + "include": [ + { + "ref": "C.17-3b" + } + ] + }, + "name": "Author Observer Sequence", + "type": "3" + }, + "(0040,A07A)": { + "items": { + "(0040,A080)": { + "name": "Participation Type", + "type": "1" + }, + "(0040,A082)": { + "name": "Participation DateTime", + "type": "2" + }, + "include": [ + { + "ref": "C.17-3b" + } + ] + }, + "name": "Participant Sequence", + "type": "3" + }, + "(0040,A07C)": { + "items": { + "(0008,0080)": { + "name": "Institution Name", + "type": "2" + }, + "(0008,0082)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Institution Code Sequence", + "type": "2" + }, + "(0008,0220)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Responsible Group Code Sequence", + "type": "3" + } + }, + "name": "Custodial Organization Sequence", + "type": "3" + }, + "(0040,A360)": { + "cond": { + "type": "U" + }, + "items": { + "include": [ + { + "ref": "C.17-3" + } + ] + }, + "name": "Predecessor Documents Sequence", + "type": "1C" + }, + "(0040,A370)": { + "cond": { + "type": "U" + }, + "items": { + "include": [ + { + "ref": "C.17-3c" + } + ] + }, + "name": "Referenced Request Sequence", + "type": "1C" + }, + "(0040,A372)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Performed Procedure Code Sequence", + "type": "2" + }, + "(0040,A375)": { + "cond": { + "type": "U" + }, + "items": { + "include": [ + { + "ref": "C.17-3" + } + ] + }, + "name": "Current Requested Procedure Evidence Sequence", + "type": "1C" + }, + "(0040,A385)": { + "cond": { + "type": "U" + }, + "items": { + "include": [ + { + "ref": "C.17-3" + } + ] + }, + "name": "Pertinent Other Evidence Sequence", + "type": "1C" + }, + "(0040,A491)": { + "name": "Completion Flag", + "type": "1" + }, + "(0040,A492)": { + "name": "Completion Flag Description", + "type": "3" + }, + "(0040,A493)": { + "name": "Verification Flag", + "type": "1" + }, + "(0040,A496)": { + "name": "Preliminary Flag", + "type": "3" + }, + "(0040,A525)": { + "cond": { + "type": "U" + }, + "items": { + "include": [ + { + "ref": "C.17-3" + } + ] + }, + "name": "Identical Documents Sequence", + "type": "1C" + } + }, + "C.17-3b": { + "(0008,0055)": { + "name": "Station AE Title", + "type": "3" + }, + "(0008,0070)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A084)", + "type": "MU", + "values": [ + "DEV" + ] + }, + "name": "Manufacturer", + "type": "1C" + }, + "(0008,0080)": { + "name": "Institution Name", + "type": "2" + }, + "(0008,0082)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Institution Code Sequence", + "type": "2" + }, + "(0008,1010)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A084)", + "type": "MU", + "values": [ + "DEV" + ] + }, + "name": "Station Name", + "type": "2C" + }, + "(0008,1040)": { + "name": "Institutional Department Name", + "type": "3" + }, + "(0008,1041)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Institutional Department Type Code Sequence", + "type": "3" + }, + "(0008,1090)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A084)", + "type": "MU", + "values": [ + "DEV" + ] + }, + "name": "Manufacturer's Model Name", + "type": "1C" + }, + "(0018,1000)": { + "name": "Device Serial Number", + "type": "3" + }, + "(0018,1002)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A084)", + "type": "MU", + "values": [ + "DEV" + ] + }, + "name": "Device UID", + "type": "1C" + }, + "(0018,1020)": { + "name": "Software Versions", + "type": "3" + }, + "(0018,1204)": { + "name": "Date of Manufacture", + "type": "3" + }, + "(0018,1205)": { + "name": "Date of Installation", + "type": "3" + }, + "(0040,1101)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A084)", + "type": "MU", + "values": [ + "PSN" + ] + }, + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Person Identification Code Sequence", + "type": "2C" + }, + "(0040,A084)": { + "name": "Observer Type", + "type": "1" + }, + "(0040,A123)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A084)", + "type": "MU", + "values": [ + "PSN" + ] + }, + "name": "Person Name", + "type": "1C" + }, + "(0044,010A)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Organizational Role Code Sequence", + "type": "3" + } + }, + "C.17-3c": { + "(0008,0050)": { + "name": "Accession Number", + "type": "2" + }, + "(0008,0051)": { + "items": { + "include": [ + { + "ref": "10-17" + } + ] + }, + "name": "Issuer of Accession Number Sequence", + "type": "3" + }, + "(0008,1110)": { + "items": { + "include": [ + { + "ref": "10-11" + } + ] + }, + "name": "Referenced Study Sequence", + "type": "2" + }, + "(0020,000D)": { + "name": "Study Instance UID", + "type": "1" + }, + "(0032,1060)": { + "name": "Requested Procedure Description", + "type": "2" + }, + "(0032,1064)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Requested Procedure Code Sequence", + "type": "2" + }, + "(0040,0026)": { + "items": { + "include": [ + { + "ref": "10-17" + } + ] + }, + "name": "Order Placer Identifier Sequence", + "type": "3" + }, + "(0040,0027)": { + "items": { + "include": [ + { + "ref": "10-17" + } + ] + }, + "name": "Order Filler Identifier Sequence", + "type": "3" + }, + "(0040,1001)": { + "name": "Requested Procedure ID", + "type": "2" + }, + "(0040,1002)": { + "name": "Reason for the Requested Procedure", + "type": "3" + }, + "(0040,100A)": { + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Reason for Requested Procedure Code Sequence", + "type": "3" + }, + "(0040,2016)": { + "name": "Placer Order Number / Imaging Service Request", + "type": "2" + }, + "(0040,2017)": { + "name": "Filler Order Number / Imaging Service Request", + "type": "2" + } + }, + "C.17-5": { + "(0040,A040)": { + "name": "Value Type", + "type": "1" + }, + "(0040,A043)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TEXT", + "NUM", + "CODE", + "DATETIME", + "DATE", + "TIME", + "UIDREF", + "TABLE", + "PNAME" + ] + }, + "items": { + "include": [ + { + "ref": "8.8-1" + } + ] + }, + "name": "Concept Name Code Sequence", + "type": "1C" + }, + "(0040,A120)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "DATETIME" + ] + }, + "name": "DateTime", + "type": "1C" + }, + "(0040,A121)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "DATE" + ] + }, + "name": "Date", + "type": "1C" + }, + "(0040,A122)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TIME" + ] + }, + "name": "Time", + "type": "1C" + }, + "(0040,A123)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "PNAME" + ] + }, + "name": "Person Name", + "type": "1C" + }, + "(0040,A124)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "UIDREF" + ] + }, + "name": "UID", + "type": "1C" + }, + "(0040,A160)": { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TEXT" + ] + }, + "name": "Text Value", + "type": "1C" + }, + "include": [ + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "NUM" + ] + }, + "ref": "C.18.1-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "CODE" + ] + }, + "ref": "C.18.2-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "COMPOSITE" + ] + }, + "ref": "C.18.3-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "IMAGE" + ] + }, + "ref": "C.18.4-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "WAVEFORM" + ] + }, + "ref": "C.18.5-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "SCOORD" + ] + }, + "ref": "C.18.6-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "SCOORD3D" + ] + }, + "ref": "C.18.9-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TCOORD" + ] + }, + "ref": "C.18.7-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "CONTAINER" + ] + }, + "ref": "C.18.8-1" + }, + { + "cond": { + "index": 0, + "op": "=", + "tag": "(0040,A040)", + "type": "MU", + "values": [ + "TABLE" + ] + }, + "ref": "C.18.10-1" + } + ] } } diff --git a/dicom_validator/tests/spec_reader/test_part3_reader.py b/dicom_validator/tests/spec_reader/test_part3_reader.py index 007bc5f..cc7df5a 100644 --- a/dicom_validator/tests/spec_reader/test_part3_reader.py +++ b/dicom_validator/tests/spec_reader/test_part3_reader.py @@ -133,7 +133,7 @@ def test_referenced_macro(self, reader): assert len(description) == 3 assert "(0028,7FE0)" in description assert "include" in description - assert "C.7-11b" in description["include"] + assert "C.7-11b" in [d["ref"] for d in description["include"]] description = reader.module_description("C.7-11b") assert len(description) == 21 assert "(7FE0,0010)" in description @@ -141,3 +141,23 @@ def test_referenced_macro(self, reader): def test_module_descriptions(self, reader): descriptions = reader.module_descriptions() assert len(descriptions) == 113 + + def test_conditional_include_in_sr_module(self, reader): + description = reader.module_description("C.17.3") + assert "include" in description + assert "C.17-5" in [d["ref"] for d in description["include"]] + description = reader.module_description("C.17-5") + assert "include" in description + assert len(description["include"]) == 10 + # all macros are included conditionally + assert all("cond" in d for d in description["include"]) + + # check numeric measurement macro: + # Include Table C.18.1-1 “Numeric Measurement Macro Attributes” + # if and only if Value Type (0040,A040) is NUM. + assert "C.18.1-1" in [d["ref"] for d in description["include"]] + include = [d for d in description["include"] if d["ref"] == "C.18.1-1"][0] + condition = include["cond"] + assert condition.operator == "=" + assert condition.tag == "(0040,A040)" + assert condition.values == ["NUM"] diff --git a/dicom_validator/tests/validator/test_iod_validator.py b/dicom_validator/tests/validator/test_iod_validator.py index f11d0f4..5af7230 100644 --- a/dicom_validator/tests/validator/test_iod_validator.py +++ b/dicom_validator/tests/validator/test_iod_validator.py @@ -406,3 +406,32 @@ def test_condition_for_not_required_tag_cond2_fulfilled_not_present( assert not has_tag_error( result, "Cardiac Synchronization", "(0018,9085)", "missing" ) # Cardiac signal source + + @pytest.mark.tag_set( + { + # X-Ray Radiation Dose SR Storage + "SOPClassUID": "1.2.840.10008.5.1.4.1.1.88.67", + "PatientName": "XXX", + "PatientID": "ZZZ", + "ImageType": "DERIVED", + "ValueType": "NUM", + } + ) + def test_conditional_includes(self, validator): + result = validator.validate() + + # condition met (ValueType is NUM) - error because of missing tag + assert has_tag_error( + result, "SR Document Content", "(0040,A300)", "missing" + ) # Measured Value Sequence + + # condition not met for other macros - no tags expected + assert not has_tag_error( + result, "SR Document Content", "(0040,A168)", "missing" + ) # Concept Code Sequence + assert not has_tag_error( + result, "SR Document Content", "(0008,1199)", "missing" + ) # Referenced SOP Sequence + assert not has_tag_error( + result, "SR Document Content", "(0070,0022)", "missing" + ) # Graphic Data diff --git a/dicom_validator/validator/iod_validator.py b/dicom_validator/validator/iod_validator.py index 8702bfd..ec4750e 100644 --- a/dicom_validator/validator/iod_validator.py +++ b/dicom_validator/validator/iod_validator.py @@ -573,12 +573,16 @@ def _expanded_module_info(self, module_info, group_macros): expanded_mod_info = {} for k, v in module_info.items(): if k == "include": - for ref in module_info["include"]: + for info in module_info["include"]: + ref = info["ref"] if ref == "FuncGroup": if group_macros is None: continue expanded_mod_info["modules"] = group_macros else: + if "cond" in info: + if not self._object_is_required_or_allowed(info["cond"])[0]: + continue expanded_mod_info.update( self._get_module_info(ref, group_macros) )