<?xml version="1.0"?>
<!--
######################################################################
# Copyright (c) 2001-2005 Kalamazoo Community Mental Health Services,
#   John Holland <jholland@kazoocmh.org> <john@zoner.org>
# All rights reserved.
#
# This software is licensed as described in the file LICENSE.txt, which
# you should have received as part of this distribution.
#
######################################################################

#    $Id: 997.4010.xml,v 1.11 2004/12/12 20:58:08 johnholland Exp $
-->
<transaction>
  <id>997</id>
  <name>HIPAA Functional Acknowledgment 997</name>
  <loop xid="ISA_LOOP" type="explicit">
    <name>Interchange Control Header</name>
    <usage>R</usage>
    <pos>001</pos>
    <repeat>&gt;1</repeat>
    <segment xid="ISA">
      <name>Interchange Control Header</name>
      <usage>R</usage>
      <pos>010</pos>
      <max_use>1</max_use>
      <element xid="ISA01">
        <data_ele>I01</data_ele>
        <name>Authorization Information Qualifier</name>
        <usage>R</usage>
        <seq>01</seq>
        <data_type>ID</data_type>
        <min_len>2</min_len>
        <max_len>2</max_len>
        <valid_codes>
          <code>00</code>
          <code>03</code>
        </valid_codes>
      </element>
      <element xid="ISA02">
        <data_ele>I02</data_ele>
        <name>Authorization Information</name>
        <usage>R</usage>
        <seq>02</seq>
        <data_type>AN</data_type>
        <min_len>10</min_len>
        <max_len>10</max_len>
      </element>
      <element xid="ISA03">
        <data_ele>I03</data_ele>
        <name>Security Information Qualifier</name>
        <usage>R</usage>
        <seq>03</seq>
        <data_type>ID</data_type>
        <min_len>2</min_len>
        <max_len>2</max_len>
        <valid_codes>
          <code>00</code>
          <code>01</code>
        </valid_codes>
      </element>
      <element xid="ISA04">
        <data_ele>I04</data_ele>
        <name>Security Information</name>
        <usage>R</usage>
        <seq>04</seq>
        <data_type>AN</data_type>
        <min_len>10</min_len>
        <max_len>10</max_len>
      </element>
      <element xid="ISA05">
        <data_ele>I05</data_ele>
        <name>Interchange ID Qualifier</name>
        <usage>R</usage>
        <seq>05</seq>
        <data_type>ID</data_type>
        <min_len>2</min_len>
        <max_len>2</max_len>
        <valid_codes>
          <code>01</code>
          <code>14</code>
          <code>20</code>
          <code>27</code>
          <code>28</code>
          <code>29</code>
          <code>30</code>
          <code>33</code>
          <code>ZZ</code>
        </valid_codes>
      </element>
      <element xid="ISA06">
        <data_ele>I06</data_ele>
        <name>Interchange Sender ID</name>
        <usage>R</usage>
        <seq>06</seq>
        <data_type>AN</data_type>
        <min_len>15</min_len>
        <max_len>15</max_len>
      </element>
      <element xid="ISA07">
        <data_ele>I05</data_ele>
        <name>Interchange ID Qualifier</name>
        <usage>R</usage>
        <seq>07</seq>
        <data_type>ID</data_type>
        <min_len>2</min_len>
        <max_len>2</max_len>
        <valid_codes>
          <code>01</code>
          <code>14</code>
          <code>20</code>
          <code>27</code>
          <code>28</code>
          <code>29</code>
          <code>30</code>
          <code>33</code>
          <code>ZZ</code>
        </valid_codes>
      </element>
      <element xid="ISA08">
        <data_ele>I07</data_ele>
        <name>Interchange Receiver ID</name>
        <usage>R</usage>
        <seq>08</seq>
        <data_type>AN</data_type>
        <min_len>15</min_len>
        <max_len>15</max_len>
      </element>
      <element xid="ISA09">
        <data_ele>I08</data_ele>
        <name>Interchange Date</name>
        <usage>R</usage>
        <seq>09</seq>
        <data_type>DT</data_type>
        <min_len>6</min_len>
        <max_len>6</max_len>
      </element>
      <element xid="ISA10">
        <data_ele>I09</data_ele>
        <name>Interchange Time</name>
        <usage>R</usage>
        <seq>10</seq>
        <data_type>TM</data_type>
        <min_len>4</min_len>
        <max_len>4</max_len>
      </element>
      <element xid="ISA11">
        <data_ele>I10</data_ele>
        <name>Interchange Control Standards Identifier</name>
        <usage>R</usage>
        <seq>11</seq>
        <data_type>ID</data_type>
        <min_len>1</min_len>
        <max_len>1</max_len>
        <valid_codes>
          <code>U</code>
        </valid_codes>
      </element>
      <element xid="ISA12">
        <data_ele>I11</data_ele>
        <name>Interchange Control Version Number</name>
        <usage>R</usage>
        <seq>12</seq>
        <data_type>ID</data_type>
        <min_len>5</min_len>
        <max_len>5</max_len>
        <valid_codes>
          <code>00401</code>
        </valid_codes>
      </element>
      <element xid="ISA13">
        <data_ele>I12</data_ele>
        <name>Interchange Control Number</name>
        <usage>R</usage>
        <seq>13</seq>
        <data_type>N0</data_type>
        <min_len>9</min_len>
        <max_len>9</max_len>
      </element>
      <element xid="ISA14">
        <data_ele>I13</data_ele>
        <name>Acknowledgment Requested</name>
        <usage>R</usage>
        <seq>14</seq>
        <data_type>ID</data_type>
        <min_len>1</min_len>
        <max_len>1</max_len>
        <valid_codes>
          <code>0</code>
          <code>1</code>
        </valid_codes>
      </element>
      <element xid="ISA15">
        <data_ele>I14</data_ele>
        <name>Usage Indicator</name>
        <usage>R</usage>
        <seq>15</seq>
        <data_type>ID</data_type>
        <min_len>1</min_len>
        <max_len>1</max_len>
        <valid_codes>
          <code>P</code>
          <code>T</code>
        </valid_codes>
      </element>
      <element xid="ISA16">
        <data_ele>I15</data_ele>
        <name>Component Element Separator</name>
        <usage>R</usage>
        <seq>16</seq>
        <data_type>AN</data_type>
        <min_len>1</min_len>
        <max_len>1</max_len>
      </element>
    </segment>
<!--End of ISA segment-->
    <loop xid="GS_LOOP" type="explicit">
      <name>Functional Group Header</name>
      <usage>R</usage>
      <pos>020</pos>
      <repeat>&gt;1</repeat>
      <segment xid="GS">
        <name>Functional Group Header</name>
        <usage>R</usage>
        <pos>010</pos>
        <max_use>1</max_use>
        <element xid="GS01">
          <data_ele>479</data_ele>
          <name>Functional Identifier Code</name>
          <usage>R</usage>
          <seq>01</seq>
          <data_type>ID</data_type>
          <min_len>2</min_len>
          <max_len>2</max_len>
          <valid_codes>
            <code>HI</code>
            <code>HC</code>
            <code>BE</code>
            <code>HP</code>
            <code>HB</code>
            <code>HS</code>
            <code>RA</code>
            <code>HN</code>
            <code>HR</code>
            <code>FA</code>
          </valid_codes>
        </element>
        <element xid="GS02">
          <data_ele>142</data_ele>
          <name>Application Sender's Code</name>
          <usage>R</usage>
          <seq>02</seq>
          <data_type>AN</data_type>
          <min_len>2</min_len>
          <max_len>15</max_len>
        </element>
        <element xid="GS03">
          <data_ele>124</data_ele>
          <name>Application Receiver's Code</name>
          <usage>R</usage>
          <seq>03</seq>
          <data_type>AN</data_type>
          <min_len>2</min_len>
          <max_len>15</max_len>
        </element>
        <element xid="GS04">
          <data_ele>373</data_ele>
          <name>Date</name>
          <usage>R</usage>
          <seq>04</seq>
          <data_type>DT</data_type>
          <min_len>8</min_len>
          <max_len>8</max_len>
        </element>
        <element xid="GS05">
          <data_ele>337</data_ele>
          <name>Time</name>
          <usage>R</usage>
          <seq>05</seq>
          <data_type>TM</data_type>
          <min_len>4</min_len>
          <max_len>8</max_len>
        </element>
        <element xid="GS06">
          <data_ele>28</data_ele>
          <name>Group Control Number</name>
          <usage>R</usage>
          <seq>06</seq>
          <data_type>N0</data_type>
          <min_len>1</min_len>
          <max_len>9</max_len>
        </element>
        <element xid="GS07">
          <data_ele>455</data_ele>
          <name>Responsible Agency Code</name>
          <usage>R</usage>
          <seq>07</seq>
          <data_type>ID</data_type>
          <min_len>1</min_len>
          <max_len>2</max_len>
          <valid_codes>
            <code>X</code>
          </valid_codes>
        </element>
        <element xid="GS08">
          <data_ele>480</data_ele>
          <name>Version / Release / Industry Identifier Code</name>
          <usage>R</usage>
          <seq>08</seq>
          <data_type>AN</data_type>
          <min_len>1</min_len>
          <max_len>12</max_len>
          <valid_codes>
            <code>004010</code>
            <code>004010X061</code>
            <code>004010X091</code>
            <code>004010X092</code>
            <code>004010X093</code>
            <code>004010X094</code>
            <code>004010X095</code>
            <code>004010X096</code>
            <code>004010X097</code>
            <code>004010X098</code>
          </valid_codes>
        </element>
      </segment>
<!--End of GS segment-->
      <loop xid="ST_LOOP" type="explicit">
        <name>Transaction Set Header</name>
        <usage>R</usage>
        <pos>020</pos>
        <repeat>&gt;1</repeat>
        <segment xid="ST">
          <name>Transaction Set Header</name>
          <usage>R</usage>
          <pos>005</pos>
          <max_use>1</max_use>
          <element xid="ST01">
            <data_ele>143</data_ele>
            <name>Transaction Set Identifier Code</name>
            <usage>R</usage>
            <seq>01</seq>
            <data_type>ID</data_type>
            <min_len>3</min_len>
            <max_len>3</max_len>
            <valid_codes>
              <code>997</code>
            </valid_codes>
          </element>
          <element xid="ST02">
            <data_ele>329</data_ele>
            <name>Transaction Set Control Number</name>
            <usage>R</usage>
            <seq>02</seq>
            <data_type>AN</data_type>
            <min_len>4</min_len>
            <max_len>9</max_len>
          </element>
        </segment>
<!--End of ST segment-->
        <loop xid="HEADER" type="wrapper">
          <name>Table 1 - Header</name>
          <usage>R</usage>
          <pos>010</pos>
          <repeat>1</repeat>
          <segment xid="AK1">
            <name>Functional Group Response Header</name>
            <usage>R</usage>
            <pos>020</pos>
            <max_use>1</max_use>
            <element xid="AK101">
              <data_ele>479</data_ele>
              <name>Functional Identifier Code</name>
              <usage>R</usage>
              <seq>01</seq>
              <data_type>ID</data_type>
              <min_len>2</min_len>
              <max_len>2</max_len>
              <valid_codes>
                <code>BE</code>
                <code>HB</code>
                <code>HC</code>
                <code>HI</code>
                <code>HN</code>
                <code>HP</code>
                <code>HR</code>
                <code>HS</code>
                <code>RA</code>
              </valid_codes>
            </element>
            <element xid="AK102">
              <data_ele>28</data_ele>
              <name>Group Control Number</name>
              <usage>R</usage>
              <seq>02</seq>
              <data_type>N0</data_type>
              <min_len>1</min_len>
              <max_len>9</max_len>
            </element>
          </segment>
<!--End of AK1 segment-->
          <loop xid="AK2">
            <name>Transaction Set Response Header</name>
            <usage>S</usage>
            <pos>030</pos>
            <repeat>999999</repeat>
            <segment xid="AK2">
              <name>Transaction Set Response Header</name>
              <usage>R</usage>
              <pos>030</pos>
              <max_use>1</max_use>
              <element xid="AK201">
                <data_ele>143</data_ele>
                <name>Transaction Set Identifier Code</name>
                <usage>R</usage>
                <seq>01</seq>
                <data_type>ID</data_type>
                <min_len>3</min_len>
                <max_len>3</max_len>
                <valid_codes>
                  <code>270</code>
                  <code>271</code>
                  <code>276</code>
                  <code>277</code>
                  <code>278</code>
                  <code>820</code>
                  <code>834</code>
                  <code>835</code>
                  <code>837</code>
                </valid_codes>
              </element>
              <element xid="AK202">
                <data_ele>329</data_ele>
                <name>Transaction Set Control Number</name>
                <usage>R</usage>
                <seq>02</seq>
                <data_type>AN</data_type>
                <min_len>4</min_len>
                <max_len>9</max_len>
              </element>
            </segment>
<!--End of AK2 segment-->
            <loop xid="AK2/AK3">
              <name>Data Segment Note</name>
              <usage>S</usage>
              <pos>040</pos>
              <repeat>999999</repeat>
              <segment xid="AK3">
                <name>Data Segment Note</name>
                <usage>R</usage>
                <pos>040</pos>
                <max_use>1</max_use>
                <element xid="AK301">
                  <data_ele>721</data_ele>
                  <name>Segment ID Code</name>
                  <usage>R</usage>
                  <seq>01</seq>
                  <data_type>ID</data_type>
                  <min_len>2</min_len>
                  <max_len>3</max_len>
                </element>
                <element xid="AK302">
                  <data_ele>719</data_ele>
                  <name>Segment Position in Transaction Set</name>
                  <usage>R</usage>
                  <seq>02</seq>
                  <data_type>N0</data_type>
                  <min_len>1</min_len>
                  <max_len>6</max_len>
                </element>
                <element xid="AK303">
                  <data_ele>447</data_ele>
                  <name>Loop Identifier Code</name>
                  <usage>S</usage>
                  <seq>03</seq>
                  <data_type>AN</data_type>
                  <min_len>1</min_len>
                  <max_len>6</max_len>
                </element>
                <element xid="AK304">
                  <data_ele>720</data_ele>
                  <name>Segment Syntax Error Code</name>
                  <usage>S</usage>
                  <seq>04</seq>
                  <data_type>ID</data_type>
                  <min_len>1</min_len>
                  <max_len>3</max_len>
                  <valid_codes>
                    <code>1</code>
                    <code>2</code>
                    <code>3</code>
                    <code>4</code>
                    <code>5</code>
                    <code>6</code>
                    <code>7</code>
                    <code>8</code>
                  </valid_codes>
                </element>
              </segment>
<!--End of AK3 segment-->
              <segment xid="AK4">
                <name>Data Element Note</name>
                <usage>S</usage>
                <pos>050</pos>
                <max_use>99</max_use>
                <composite>
                  <data_ele>C030</data_ele>
                  <name>Position in Segment</name>
                  <usage>R</usage>
                  <seq>01</seq>
                  <element xid="AK401-01">
                    <data_ele>722</data_ele>
                    <name>Element Position in Segment</name>
                    <usage>R</usage>
                    <seq>01</seq>
                    <data_type>N0</data_type>
                    <min_len>1</min_len>
                    <max_len>2</max_len>
                  </element>
                  <element xid="AK401-02">
                    <data_ele>1528</data_ele>
                    <name>Component Data Element Position in Composite</name>
                    <usage>S</usage>
                    <seq>02</seq>
                    <data_type>N0</data_type>
                    <min_len>1</min_len>
                    <max_len>2</max_len>
                  </element>
                </composite>
                <element xid="AK402">
                  <data_ele>725</data_ele>
                  <name>Data Element Reference Number</name>
                  <usage>S</usage>
                  <seq>02</seq>
                  <data_type>N0</data_type>
                  <min_len>1</min_len>
                  <max_len>4</max_len>
                </element>
                <element xid="AK403">
                  <data_ele>723</data_ele>
                  <name>Data Element Syntax Error Code</name>
                  <usage>R</usage>
                  <seq>03</seq>
                  <data_type>ID</data_type>
                  <min_len>1</min_len>
                  <max_len>3</max_len>
                  <valid_codes>
                    <code>1</code>
                    <code>2</code>
                    <code>3</code>
                    <code>4</code>
                    <code>5</code>
                    <code>6</code>
                    <code>7</code>
                    <code>8</code>
                    <code>9</code>
                    <code>10</code>
                  </valid_codes>
                </element>
                <element xid="AK404">
                  <data_ele>724</data_ele>
                  <name>Copy of Bad Data Element</name>
                  <usage>S</usage>
                  <seq>04</seq>
                  <data_type>AN</data_type>
                  <min_len>1</min_len>
                  <max_len>99</max_len>
                </element>
              </segment>
<!--End of AK4 segment-->
            </loop>
<!--End of AK2/AK3 loop-->
            <segment xid="AK5">
              <name>Transaction Set Response Trailer</name>
              <usage>R</usage>
              <pos>060</pos>
              <max_use>1</max_use>
              <element xid="AK501">
                <data_ele>717</data_ele>
                <name>Transaction Set Acknowledgment Code</name>
                <usage>R</usage>
                <seq>01</seq>
                <data_type>ID</data_type>
                <min_len>1</min_len>
                <max_len>1</max_len>
                <valid_codes>
                  <code>A</code>
                  <code>E</code>
                  <code>M</code>
                  <code>R</code>
                  <code>W</code>
                  <code>X</code>
                </valid_codes>
              </element>
              <element xid="AK502">
                <data_ele>718</data_ele>
                <name>Transaction Set Syntax Error Code</name>
                <usage>S</usage>
                <seq>02</seq>
                <data_type>ID</data_type>
                <min_len>1</min_len>
                <max_len>3</max_len>
                <valid_codes>
                  <code>1</code>
                  <code>2</code>
                  <code>3</code>
                  <code>4</code>
                  <code>5</code>
                  <code>6</code>
                  <code>7</code>
                  <code>8</code>
                  <code>9</code>
                  <code>10</code>
                  <code>11</code>
                  <code>12</code>
                  <code>13</code>
                  <code>15</code>
                  <code>16</code>
                  <code>17</code>
                  <code>23</code>
                  <code>24</code>
                  <code>25</code>
                  <code>26</code>
                  <code>27</code>
                </valid_codes>
              </element>
              <element xid="AK503">
                <data_ele>718</data_ele>
                <name>Transaction Set Syntax Error Code</name>
                <usage>S</usage>
                <seq>03</seq>
                <data_type>ID</data_type>
                <min_len>1</min_len>
                <max_len>3</max_len>
                <valid_codes>
                  <code>1</code>
                  <code>2</code>
                  <code>3</code>
                  <code>4</code>
                  <code>5</code>
                  <code>6</code>
                  <code>7</code>
                  <code>8</code>
                  <code>9</code>
                  <code>10</code>
                  <code>11</code>
                  <code>12</code>
                  <code>13</code>
                  <code>15</code>
                  <code>16</code>
                  <code>17</code>
                  <code>23</code>
                  <code>24</code>
                  <code>25</code>
                  <code>26</code>
                  <code>27</code>
                </valid_codes>
              </element>
              <element xid="AK504">
                <data_ele>718</data_ele>
                <name>Transaction Set Syntax Error Code</name>
                <usage>S</usage>
                <seq>04</seq>
                <data_type>ID</data_type>
                <min_len>1</min_len>
                <max_len>3</max_len>
                <valid_codes>
                  <code>1</code>
                  <code>2</code>
                  <code>3</code>
                  <code>4</code>
                  <code>5</code>
                  <code>6</code>
                  <code>7</code>
                  <code>8</code>
                  <code>9</code>
                  <code>10</code>
                  <code>11</code>
                  <code>12</code>
                  <code>13</code>
                  <code>15</code>
                  <code>16</code>
                  <code>17</code>
                  <code>23</code>
                  <code>24</code>
                  <code>25</code>
                  <code>26</code>
                  <code>27</code>
                </valid_codes>
              </element>
              <element xid="AK505">
                <data_ele>718</data_ele>
                <name>Transaction Set Syntax Error Code</name>
                <usage>S</usage>
                <seq>05</seq>
                <data_type>ID</data_type>
                <min_len>1</min_len>
                <max_len>3</max_len>
                <valid_codes>
                  <code>1</code>
                  <code>2</code>
                  <code>3</code>
                  <code>4</code>
                  <code>5</code>
                  <code>6</code>
                  <code>7</code>
                  <code>8</code>
                  <code>9</code>
                  <code>10</code>
                  <code>11</code>
                  <code>12</code>
                  <code>13</code>
                  <code>15</code>
                  <code>16</code>
                  <code>17</code>
                  <code>23</code>
                  <code>24</code>
                  <code>25</code>
                  <code>26</code>
                  <code>27</code>
                </valid_codes>
              </element>
              <element xid="AK506">
                <data_ele>718</data_ele>
                <name>Transaction Set Syntax Error Code</name>
                <usage>S</usage>
                <seq>06</seq>
                <data_type>ID</data_type>
                <min_len>1</min_len>
                <max_len>3</max_len>
                <valid_codes>
                  <code>1</code>
                  <code>2</code>
                  <code>3</code>
                  <code>4</code>
                  <code>5</code>
                  <code>6</code>
                  <code>7</code>
                  <code>8</code>
                  <code>9</code>
                  <code>10</code>
                  <code>11</code>
                  <code>12</code>
                  <code>13</code>
                  <code>15</code>
                  <code>16</code>
                  <code>17</code>
                  <code>23</code>
                  <code>24</code>
                  <code>25</code>
                  <code>26</code>
                  <code>27</code>
                </valid_codes>
              </element>
            </segment>
<!--End of AK5 segment-->
          </loop>
<!--End of AK2 loop-->
          <segment xid="AK9">
            <name>Functional Group Response Trailer</name>
            <usage>R</usage>
            <pos>070</pos>
            <max_use>1</max_use>
            <element xid="AK901">
              <data_ele>715</data_ele>
              <name>Functional Group Acknowledge Code</name>
              <usage>R</usage>
              <seq>01</seq>
              <data_type>ID</data_type>
              <min_len>1</min_len>
              <max_len>1</max_len>
              <valid_codes>
                <code>A</code>
                <code>E</code>
                <code>M</code>
                <code>P</code>
                <code>R</code>
                <code>W</code>
                <code>X</code>
              </valid_codes>
            </element>
            <element xid="AK902">
              <data_ele>97</data_ele>
              <name>Number of Transaction Sets Included</name>
              <usage>R</usage>
              <seq>02</seq>
              <data_type>N0</data_type>
              <min_len>1</min_len>
              <max_len>6</max_len>
            </element>
            <element xid="AK903">
              <data_ele>123</data_ele>
              <name>Number of Received Transaction Sets</name>
              <usage>R</usage>
              <seq>03</seq>
              <data_type>N0</data_type>
              <min_len>1</min_len>
              <max_len>6</max_len>
            </element>
            <element xid="AK904">
              <data_ele>2</data_ele>
              <name>Number of Accepted Transaction Sets</name>
              <usage>R</usage>
              <seq>04</seq>
              <data_type>N0</data_type>
              <min_len>1</min_len>
              <max_len>6</max_len>
            </element>
            <element xid="AK905">
              <data_ele>716</data_ele>
              <name>Functional Group Syntax Error Code</name>
              <usage>S</usage>
              <seq>05</seq>
              <data_type>ID</data_type>
              <min_len>1</min_len>
              <max_len>3</max_len>
              <valid_codes>
                <code>1</code>
                <code>2</code>
                <code>3</code>
                <code>4</code>
                <code>5</code>
                <code>6</code>
                <code>10</code>
                <code>11</code>
                <code>12</code>
                <code>13</code>
                <code>14</code>
                <code>15</code>
                <code>16</code>
                <code>17</code>
                <code>18</code>
                <code>23</code>
                <code>24</code>
                <code>25</code>
                <code>26</code>
              </valid_codes>
            </element>
            <element xid="AK906">
              <data_ele>716</data_ele>
              <name>Functional Group Syntax Error Code</name>
              <usage>S</usage>
              <seq>06</seq>
              <data_type>ID</data_type>
              <min_len>1</min_len>
              <max_len>3</max_len>
              <valid_codes>
                <code>1</code>
                <code>2</code>
                <code>3</code>
                <code>4</code>
                <code>5</code>
                <code>6</code>
                <code>10</code>
                <code>11</code>
                <code>12</code>
                <code>13</code>
                <code>14</code>
                <code>15</code>
                <code>16</code>
                <code>17</code>
                <code>18</code>
                <code>23</code>
                <code>24</code>
                <code>25</code>
                <code>26</code>
              </valid_codes>
            </element>
            <element xid="AK907">
              <data_ele>716</data_ele>
              <name>Functional Group Syntax Error Code</name>
              <usage>S</usage>
              <seq>07</seq>
              <data_type>ID</data_type>
              <min_len>1</min_len>
              <max_len>3</max_len>
              <valid_codes>
                <code>1</code>
                <code>2</code>
                <code>3</code>
                <code>4</code>
                <code>5</code>
                <code>6</code>
                <code>10</code>
                <code>11</code>
                <code>12</code>
                <code>13</code>
                <code>14</code>
                <code>15</code>
                <code>16</code>
                <code>17</code>
                <code>18</code>
                <code>23</code>
                <code>24</code>
                <code>25</code>
                <code>26</code>
              </valid_codes>
            </element>
            <element xid="AK908">
              <data_ele>716</data_ele>
              <name>Functional Group Syntax Error Code</name>
              <usage>S</usage>
              <seq>08</seq>
              <data_type>ID</data_type>
              <min_len>1</min_len>
              <max_len>3</max_len>
              <valid_codes>
                <code>1</code>
                <code>2</code>
                <code>3</code>
                <code>4</code>
                <code>5</code>
                <code>6</code>
                <code>10</code>
                <code>11</code>
                <code>12</code>
                <code>13</code>
                <code>14</code>
                <code>15</code>
                <code>16</code>
                <code>17</code>
                <code>18</code>
                <code>23</code>
                <code>24</code>
                <code>25</code>
                <code>26</code>
              </valid_codes>
            </element>
            <element xid="AK909">
              <data_ele>716</data_ele>
              <name>Functional Group Syntax Error Code</name>
              <usage>S</usage>
              <seq>09</seq>
              <data_type>ID</data_type>
              <min_len>1</min_len>
              <max_len>3</max_len>
              <valid_codes>
                <code>1</code>
                <code>2</code>
                <code>3</code>
                <code>4</code>
                <code>5</code>
                <code>6</code>
                <code>10</code>
                <code>11</code>
                <code>12</code>
                <code>13</code>
                <code>14</code>
                <code>15</code>
                <code>16</code>
                <code>17</code>
                <code>18</code>
                <code>23</code>
                <code>24</code>
                <code>25</code>
                <code>26</code>
              </valid_codes>
            </element>
          </segment>
<!--End of AK9 segment-->
        </loop>
<!--End of HEADER loop-->
        <loop xid="DETAIL" type="wrapper">
          <name>Table 2 - Detail</name>
          <usage>N</usage>
          <pos>020</pos>
          <repeat>&gt;1</repeat>
        </loop>
<!--End of DETAIL loop-->
        <loop xid="FOOTER" type="wrapper">
          <name>Table 3 - Footer</name>
          <usage>N</usage>
          <pos>030</pos>
          <repeat>1</repeat>
        </loop>
<!--End of FOOTER loop-->
        <segment xid="SE">
          <name>Transaction Set Trailer</name>
          <usage>R</usage>
          <pos>080</pos>
          <max_use>1</max_use>
          <element xid="SE01">
            <data_ele>96</data_ele>
            <name>Number of Included Segments</name>
            <usage>R</usage>
            <seq>01</seq>
            <data_type>N0</data_type>
            <min_len>1</min_len>
            <max_len>10</max_len>
          </element>
          <element xid="SE02">
            <data_ele>329</data_ele>
            <name>Transaction Set Control Number</name>
            <usage>R</usage>
            <seq>02</seq>
            <data_type>AN</data_type>
            <min_len>4</min_len>
            <max_len>9</max_len>
          </element>
        </segment>
<!--End of SE segment-->
      </loop>
<!--End of ST loop-->
      <segment xid="GE">
        <name>Functional Group Trailer</name>
        <usage>R</usage>
        <pos>030</pos>
        <max_use>1</max_use>
        <element xid="GE01">
          <data_ele>97</data_ele>
          <name>Number of Transaction Sets Included</name>
          <usage>R</usage>
          <seq>01</seq>
          <data_type>N0</data_type>
          <min_len>1</min_len>
          <max_len>6</max_len>
        </element>
        <element xid="GE02">
          <data_ele>28</data_ele>
          <name>Group Control Number</name>
          <usage>R</usage>
          <seq>02</seq>
          <data_type>N0</data_type>
          <min_len>1</min_len>
          <max_len>9</max_len>
        </element>
      </segment>
<!--End of GE segment-->
    </loop>
<!--End of GS loop-->
    <segment xid="TA1">
      <name>Interchange Achnowledgement</name>
      <usage>S</usage>
      <pos>020</pos>
      <element xid="TA101">
        <data_ele>I12</data_ele>
        <name>Interchange Control Number</name>
        <usage>R</usage>
        <seq>01</seq>
        <data_type>N0</data_type>
        <min_len>9</min_len>
        <max_len>9</max_len>
      </element>
      <element xid="TA102">
        <data_ele>I08</data_ele>
        <name>Interchange Date</name>
        <usage>R</usage>
        <seq>02</seq>
        <data_type>DT</data_type>
        <min_len>6</min_len>
        <max_len>6</max_len>
      </element>
      <element xid="TA103">
        <data_ele>I09</data_ele>
        <name>Interchange Time</name>
        <usage>R</usage>
        <seq>03</seq>
        <data_type>TM</data_type>
        <min_len>4</min_len>
        <max_len>4</max_len>
      </element>
      <element xid="TA104">
        <data_ele>I17</data_ele>
        <name>Interchange Achnowledgement Code</name>
        <usage>R</usage>
        <seq>04</seq>
        <data_type>ID</data_type>
        <min_len>1</min_len>
        <max_len>1</max_len>
        <valid_codes>
          <code>A</code>
          <code>E</code>
          <code>R</code>
        </valid_codes>
      </element>
      <element xid="TA105">
        <data_ele>I18</data_ele>
        <name>Interchange Note Code</name>
        <usage>R</usage>
        <seq>05</seq>
        <data_type>ID</data_type>
        <min_len>3</min_len>
        <max_len>3</max_len>
        <valid_codes>
          <code>000</code>
          <code>001</code>
          <code>002</code>
          <code>003</code>
          <code>004</code>
          <code>005</code>
          <code>006</code>
          <code>007</code>
          <code>008</code>
          <code>009</code>
          <code>010</code>
          <code>011</code>
          <code>012</code>
          <code>013</code>
          <code>014</code>
          <code>015</code>
          <code>016</code>
          <code>017</code>
          <code>018</code>
          <code>019</code>
          <code>020</code>
          <code>021</code>
          <code>022</code>
          <code>023</code>
          <code>024</code>
          <code>025</code>
          <code>026</code>
          <code>027</code>
          <code>028</code>
          <code>029</code>
          <code>030</code>
          <code>031</code>
        </valid_codes>
      </element>
    </segment>
<!--End of TA1 segment-->
    <segment xid="IEA">
      <name>Interchange Control Trailer</name>
      <usage>R</usage>
      <pos>030</pos>
      <max_use>1</max_use>
      <element xid="IEA01">
        <data_ele>I16</data_ele>
        <name>Number of Included Functional Groups</name>
        <usage>R</usage>
        <seq>01</seq>
        <data_type>N0</data_type>
        <min_len>1</min_len>
        <max_len>5</max_len>
      </element>
      <element xid="IEA02">
        <data_ele>I12</data_ele>
        <name>Interchange Control Number</name>
        <usage>R</usage>
        <seq>02</seq>
        <data_type>N0</data_type>
        <min_len>9</min_len>
        <max_len>9</max_len>
      </element>
    </segment>
<!--End of IEA segment-->
  </loop>
<!--End of ISA loop-->
</transaction>
