<book xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0">
  <title>CP-1425</title>
  <subtitle>Tab character should be permitted be in text VRs (ST, LT, UT)</subtitle>
  <chapter>
    <title></title>
    <informaltable rules="all" frame="box">
    <tr>
      <td rowspan="1" colspan="1" valign="top"><para>Status</para></td>
      <td rowspan="1" colspan="1" valign="top"><para>Final Text</para></td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1" valign="top"><para>Date of Last Update</para></td>
      <td rowspan="1" colspan="1" valign="top"><para>2015/03/18</para></td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1" valign="top"><para>Person Assigned</para></td>
      <td rowspan="1" colspan="1" valign="top"><para>David Clunie</para><para><link
        xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="mailto:dclunie@dclunie.com"/></para></td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1" valign="top"><para>Submitter Name</para></td>
      <td rowspan="1" colspan="1" valign="top"><para>David Clunie</para><para><link
        xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="mailto:dclunie@dclunie.com"/></para></td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1" valign="top"><para>Submission Date</para></td>
      <td rowspan="1" colspan="1" valign="top"><para>2014/07/29</para></td>
    </tr>
  </informaltable>
    <informaltable rules="all" frame="box">
    <tr>
      <td rowspan="1" colspan="1" valign="top"><para>Correction Number CP-1425</para></td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1" valign="top"><para>Log Summary: Tab character should be permitted be in text VRs (ST, LT, UT)</para></td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1" valign="top">
        <para>Name of Standard</para>
        <para>PS3.5 2015a</para>
      </td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1" valign="top">
        <para>Rationale for Correction:</para>
        <para>Text VRs explicitly permit several control characters but not TAB, which is surprising given
          that they are intended to be (primitively) "formatted". Since increasingly such VRs are used to encode XML text, this
          is a significant limitation and an unnecessary restriction.</para>
        <para>Also, the Character Repertoire column for these and other VRs needs to be cleaned up
            to be consistent with any restrictions specified in the Definition column, and the
            general definition of control characters needs to be uodated to mention TAB, and the
            behavior when ISO 2022 escape sequences are used needs to be addressed (in a manner
            consistent with IETF RFC 1554 ISO-2022-JP-2).</para>
      </td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1" valign="top">Correction Wording:</td>
    </tr>
  </informaltable>
  </chapter>
  <chapter>
    <title></title>
    <section>
      <title></title>
      <informaltable rules="all" frame="box">
        <tr><td><para><emphasis role="italic">Amend DICOM PS3.5 as follows:</emphasis></para></td></tr>
      </informaltable>
    </section>
    <section xml:id="sect_6.1.2.5.3" label="6.1.2.5.3" status="5">
      <title>Requirements</title>
      <para>The character set specified by value 1 of the Attribute Specific Character Set (0008,0005), or the default character repertoire if value 1 is missing, shall be active at the beginning of each textual Data Element value, and at the beginning of each line (i.e., after a CR and/or LF) or page (i.e., after an FF).</para>
      <para>If within a textual value a character set other than the one specified in value 1 of the Attribute Specific Character Set (0008,0005), or the default character repertoire if value 1 is missing, has been invoked, the character set specified in the value 1, or the default character repertoire if value 1 is missing, shall be active in the following instances:</para>
      <itemizedlist>
        <listitem>
          <para>before the end of line (i.e., before the CR and/or LF)</para>
        </listitem>
        <listitem>
          <para>before the end of a page (i.e., before the FF)</para>
        </listitem>
        <listitem>
          <para><emphasis role="bold"><emphasis role="underline">before any other Control Character
                other than ESC (e.g., before any TAB)</emphasis></emphasis></para>
        </listitem>
        <listitem>
          <para>before the end of a Data Element value (e.g., before the 05/12 character code that separates multiple textual Data Element Values - 05/12 corresponds to "\" (BACKSLASH) in the case of default repertoire IR-6 or "¥" (YEN SIGN) in the case of IR-14).</para>
        </listitem>
        <listitem>
          <para>before the "^" and "=" delimiters separating name components and name component groups in Data Elements with a VR of PN.</para>
        </listitem>
      </itemizedlist>
      <para>If within a textual value a character set other than the one specified in value 1 of the Attribute Specific Character Set (0008,0005), or the default character repertoire if value 1 is missing, is used, the Escape Sequence of this character set must be inserted explicitly in the following instances:</para>
      <itemizedlist>
        <listitem>
          <para>before the first use of the character set in the line</para>
        </listitem>
        <listitem>
          <para>before the first use of the character set in the page</para>
        </listitem>
        <listitem>
          <para>before the first use of the character set in the Data Element value</para>
        </listitem>
        <listitem>
          <para>before the first use of the character set in the name component and name component group in Data Element with a VR of PN</para>
        </listitem>
      </itemizedlist>
      <note>
        <para>These requirements allow an application to skip lines, values, or components in a textual data element and start the new line with a defined character set without the need to track the character set changes in the text skipped. A similar restriction appears in the RFCs describing the use of multi-byte character sets over the Internet. An Escape Sequence switching to the value 1 or default Specific Character Set is not needed within a line, value, or component if no Code Extensions are present. Nor is a switch needed to the value 1 or default Specific Character Set if this character set has only the G0 Code Element defined, and the G0 Code Element is still active.</para>
      </note>
    </section>
    
    <section xml:id="sect_6.1.3" label="6.1.3" status="3">
      <title>Control Characters</title>
      <para>Textual data that is interchanged may require some formatting information. Control
        Characters are used to indicate formatting, but their use in DICOM is kept to a minimum
        since some machines may handle them inappropriately. ISO 646:1990 and ISO 6429:1990 define
        Control Characters. As shown in <xref linkend="table_6.1-1" xrefstyle="select: label"/>
        below, only a subset of <emphasis role="bold"><emphasis role="strikethrough">four</emphasis></emphasis>
        <emphasis role="bold"><emphasis role="underline">five</emphasis></emphasis> Control
        Characters from the C0 set shall be used in DICOM for the encoding of Control Characters in
        text strings.</para>
      <table frame="box" rules="all" xml:id="table_6.1-1" label="6.1-1">
        <caption>DICOM Control Characters and Their Encoding</caption>
        <thead>
          <tr valign="top">
            <th align="center" colspan="1" rowspan="1">
              <para>
                <emphasis role="bold">Acronym</emphasis>
              </para>
            </th>
            <th align="center" colspan="1" rowspan="1">
              <para>
                <emphasis role="bold">Name</emphasis>
              </para>
            </th>
            <th align="center" colspan="1" rowspan="1">
              <para>
                <emphasis role="bold">Coded Value</emphasis>
              </para>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr valign="top">
            <td align="center" colspan="1" rowspan="1">
              <para>LF</para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para>Line Feed</para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para>00/10</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="center" colspan="1" rowspan="1">
              <para>FF</para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para>Form Feed</para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para>00/12</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="center" colspan="1" rowspan="1">
              <para>CR</para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para>Carriage Return</para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para>00/13</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="center" colspan="1" rowspan="1">
              <para>ESC</para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para>Escape</para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para>01/11</para>
            </td>
          </tr>
          <tr>
            <td align="center" colspan="1" rowspan="1">
              <para><emphasis role="bold"><emphasis role="underline">TAB</emphasis></emphasis></para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para><emphasis role="bold"><emphasis role="underline">Horizontal Tab</emphasis></emphasis></para>
            </td>
            <td align="center" colspan="1" rowspan="1">
              <para><emphasis role="bold"><emphasis role="underline">00/09</emphasis></emphasis></para>
            </td>
          </tr>
        </tbody>
      </table>
      <para>The ESC character shall be used only for ISO 2022 character set control sequences, in accordance with <xref linkend="sect_6.1.2.5" xrefstyle="select: label"/>.</para>
      <para>In text strings (value representation ST, LT, or UT) a new line shall be represented as CR LF.</para>
      
      <note>
        <orderedlist numeration="arabic">
          <listitem>
            <para>Some machines (such as UNIX based machines) may interpret LF (00/10) as a new line. In such cases, it is expected that the DICOM format is converted to the correct internal representation for that machine.</para>
          </listitem>
          <listitem>
            <para><emphasis role="bold"><emphasis role="underline">In previous editions of the
                  standard (see PS3.5 2015a), the TAB character was not listed as a Control
                  Character.</emphasis></emphasis></para>
          </listitem>
        </orderedlist>
       </note>
    </section>
    <section>
      <title></title>
            <table frame="box" rules="all" xml:id="table_6.2-1" label="6.2-1">
        <caption>DICOM Value Representations</caption>
        <thead>
          <tr valign="top">
            <th align="center" colspan="1" rowspan="1">
              <para>
                <emphasis role="bold">VR Name</emphasis>
              </para>
            </th>
            <th align="center" colspan="1" rowspan="1">
              <para>
                <emphasis role="bold">Definition</emphasis>
              </para>
            </th>
            <th align="center" colspan="1" rowspan="1">
              <para>
                <emphasis role="bold">Character Repertoire</emphasis>
              </para>
            </th>
            <th align="center" colspan="1" rowspan="1">
              <para>
                <emphasis role="bold">Length of Value</emphasis>
              </para>
            </th>
          </tr>
        </thead>
        <tbody>
          <tr valign="top">
            <td align="left" colspan="1" rowspan="1">
              <para>AE</para>
              <para>Application Entity</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>A string of characters that identifies an Application Entity with leading and trailing spaces (20H) being non-significant. A value consisting solely of spaces shall not be used.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>Default Character Repertoire excluding character code 5CH (the BACKSLASH "\" in ISO-IR 6), and <emphasis role="bold"><emphasis role="underline">all </emphasis></emphasis>control characters<emphasis role="bold"><emphasis role="strikethrough"> LF, FF, CR and ESC</emphasis></emphasis>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>16 bytes maximum</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="left" colspan="1" rowspan="1">
              <para>LO</para>
              <para>Long String</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>A character string that may be padded with leading and/or trailing spaces. The character code 5CH (the BACKSLASH "\" in ISO-IR 6) shall not be present, as it is used as the delimiter between values in multiple valued data elements. The string shall not have Control Characters except for ESC.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>Default Character Repertoire and/or as defined by (0008,0005)<emphasis
                  role="bold"><emphasis role="underline"> excluding character code 5CH (the
                    BACKSLASH "\" in ISO-IR 6), and all Control Characters except ESC when used for
                    ISO 2022 escape sequences</emphasis></emphasis>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>64 chars maximum (see <xref linkend="note_6.1-2-1" xrefstyle="template: Note in Section 6.2"/>)</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="left" colspan="1" rowspan="1">
              <para>LT</para>
              <para>Long Text</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>A character string that may contain one or more paragraphs. It may contain the
                Graphic Character set and the Control Characters, <emphasis role="bold"><emphasis
                  role="underline">TAB (see <xref linkend="note_6.2-3-3" xrefstyle="template: Note 3"/>), </emphasis></emphasis>CR, LF, FF, and ESC. It may be
                padded with trailing spaces, which may be ignored, but leading spaces are considered
                to be significant. Data Elements with this VR shall not be multi-valued and
                therefore character code 5CH (the BACKSLASH "\" in ISO-IR 6) may be used.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>Default Character Repertoire and/or as defined by (0008,0005)<emphasis
                  role="bold"><emphasis role="underline"> excluding Control Characters except TAB,
                    LF, FF, CR (and ESC when used for ISO 2022 escape
                  sequences)</emphasis></emphasis>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>10240 chars maximum (see <xref linkend="note_6.1-2-1" xrefstyle="template: Note in Section 6.2"/>)</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="left" colspan="1" rowspan="1">
              <para>PN</para>
              <para>Person Name</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>A character string encoded using a 5 component convention. The character code 5CH (the BACKSLASH "\" in ISO-IR 6) shall not be present, as it is used as the delimiter between values in multiple valued data elements. The string may be padded with trailing spaces. For human use, the five components in their order of occurrence are: family name complex, given name complex, middle name, name prefix, name suffix.</para>
              <note>
                <para>HL7 prohibits leading spaces within a component; DICOM allows leading and trailing spaces and considers them insignificant.</para>
              </note>
              <para>Any of the five components may be an empty string. The component delimiter shall be the caret "^" character (5EH). Delimiters are required for interior null components. Trailing null components and their delimiters may be omitted. Multiple entries are permitted in each component and are encoded as natural text strings, in the format preferred by the named person.</para>
              <para>For veterinary use, the first two of the five components in their order of occurrence are: responsible party family name or responsible organization name, patient name. The remaining components are not used and shall not be present.</para>
              <para>This group of five components is referred to as a Person Name component group.</para>
              <para>For the purpose of writing names in ideographic characters and in phonetic characters, up to 3 groups of components (see Annexes H, I and J) may be used. The delimiter for component groups shall be the equals character "=" (3DH). The three component groups of components in their order of occurrence are: an alphabetic representation, an ideographic representation, and a phonetic representation.</para>
              <para>Any component group may be absent, including the first component group. In this case, the person name may start with one or more "=" delimiters. Delimiters are required for interior null component groups. Trailing null component groups and their delimiters may be omitted.</para>
              <para>Precise semantics are defined for each component group. See <xref linkend="sect_6.2.1.2" xrefstyle="select: label"/>.</para>
              <para>For examples and notes, see <xref linkend="sect_6.2.1.1" xrefstyle="select: label"/>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>Default Character Repertoire and/or as defined by (0008,0005) excluding
                  <emphasis role="bold"><emphasis role="underline">character code 5CH (the BACKSLASH
                    "\" in ISO-IR 6), and all</emphasis></emphasis> Control Characters <emphasis
                  role="bold"><emphasis role="strikethrough">LF, FF, and CR</emphasis></emphasis>
                <emphasis role="bold"><emphasis role="strikethrough">but allowing Control
                  Character</emphasis><emphasis role="underline">except</emphasis></emphasis> ESC <emphasis role="bold"><emphasis
                    role="underline">when used for ISO 2022 escape
                sequences</emphasis></emphasis>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>64 chars maximum per component group</para>
              <para>(see <xref linkend="note_6.1-2-1" xrefstyle="template: Note in Section 6.2"/>)</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="left" colspan="1" rowspan="1">
              <para>SH</para>
              <para>Short String</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>A character string that may be padded with leading and/or trailing spaces. The character code 05CH (the BACKSLASH "\" in ISO-IR 6) shall not be present, as it is used as the delimiter between values for multiple data elements. The string shall not have Control Characters except ESC.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>Default Character Repertoire and/or as defined by (0008,0005)<emphasis
                  role="bold"><emphasis role="underline"> excluding character code 5CH (the
                    BACKSLASH "\" in ISO-IR 6), and all Control Characters except ESC when used for
                    ISO 2022 escape sequences</emphasis></emphasis>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>16 chars maximum (see <xref linkend="note_6.1-2-1" xrefstyle="template: Note in Section 6.2"/>)</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="left" colspan="1" rowspan="1">
              <para>ST</para>
              <para>Short Text</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>A character string that may contain one or more paragraphs. It may contain the
                Graphic Character set and the Control Characters, <emphasis role="bold"><emphasis
                  role="underline">TAB (see <xref linkend="note_6.2-3-3" xrefstyle="template: Note 3"/>), </emphasis></emphasis>CR, LF, FF, and ESC. It may be
                padded with trailing spaces, which may be ignored, but leading spaces are considered
                to be significant. Data Elements with this VR shall not be multi-valued and
                therefore character code 5CH (the BACKSLASH "\" in ISO-IR 6) may be used.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>Default Character Repertoire and/or as defined by (0008,0005)<emphasis
                  role="bold"><emphasis role="underline"> excluding Control Characters except TAB,
                    LF, FF, CR (and ESC when used for ISO 2022 escape
                  sequences)</emphasis></emphasis>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>1024 chars maximum (see <xref linkend="note_6.1-2-1" xrefstyle="template: Note in Section 6.2"/>)</para>
            </td>
          </tr>
          <tr valign="top">
            <td align="left" colspan="1" rowspan="1">
              <para>UC</para>
              <para>Unlimited Characters</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>A character string that may be of unlimited length that may be padded with trailing spaces. The character code 5CH (the BACKSLASH "\" in ISO-IR 6) shall not be present, as it is used as the delimiter between values in multiple valued data elements. The string shall not have Control Characters except for ESC.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>Default Character Repertoire and/or as defined by (0008,0005)<emphasis role="bold"><emphasis role="underline"> excluding character code 5CH (the BACKSLASH "\" in ISO-IR 6), and all Control Characters except ESC when used for ISO 2022 escape sequences</emphasis></emphasis>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>2<superscript>32</superscript>-2 bytes maximum</para>
              <para>See <xref linkend="note_6.2-3-2" xrefstyle="template:Note 2"/></para>
            </td>
          </tr>
          <tr valign="top">
            <td align="left" colspan="1" rowspan="1">
              <para>UT</para>
              <para>Unlimited Text</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>A character string that may contain one or more paragraphs. It may contain the
                Graphic Character set and the Control Characters, <emphasis role="bold"><emphasis
                  role="underline">TAB (see <xref linkend="note_6.2-3-3" xrefstyle="template: Note 3"/>), </emphasis></emphasis>CR, LF, FF, and ESC. It may be
                padded with trailing spaces, which may be ignored, but leading spaces are considered
                to be significant. Data Elements with this VR shall not be multi-valued and
                therefore character code 5CH (the BACKSLASH "\" in ISO-IR 6) may be used.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>Default Character Repertoire and/or as defined by (0008,0005)<emphasis
                  role="bold"><emphasis role="underline"> excluding Control Characters except TAB,
                    LF, FF, CR (and ESC when used for ISO 2022 escape
                  sequences)</emphasis></emphasis>.</para>
            </td>
            <td align="left" colspan="1" rowspan="1">
              <para>2<superscript>32</superscript>-2 bytes maximum</para>
              <para>See <xref linkend="note_6.2-3-2" xrefstyle="template: Note 2"/></para>
            </td>
          </tr>
        </tbody>
      </table>
      <note>
        <orderedlist numeration="arabic">
          <listitem>
            <para>For attributes that were present in ACR-NEMA 1.0 and 2.0 and that have been retired, the specifications of Value Representation and Value Multiplicity provided are recommendations for the purpose of interpreting their values in objects created in accordance with earlier versions of this standard. These recommendations are suggested as most appropriate for a particular attribute; however, there is no guarantee that historical objects will not violate some requirements or specified VR and/or VM.</para>
          </listitem>
          <listitem>
            <para xml:id="note_6.2-3-2">The length of the value of the UT VR is limited only by the size of the maximum unsigned integer representable in a 32 bit VL field minus one, since FFFFFFFFH is reserved.</para>
          </listitem>
          <listitem>
            <para xml:id="note_6.2-3-3"><emphasis role="bold"><emphasis role="underline">In previous editions of the standard (see PS3.5 2015a), the TAB character was not listed as permitted for the ST, LT and UT VRs. It has been added for the convenience of formatting and the encoding of XML text.</emphasis></emphasis></para>
          </listitem>
        </orderedlist>
      </note>
      

    </section>
  </chapter>
</book>
