Create a time index definition

Time index definitions are used to identify the elements that will be searched for time metadata in your docbase documents.

To create a time index definition:

  1. Open the Index Definition document for the docbase using a text editor or the TEXTML Server Administration Console. (See Open the Index Definition document for a docbase).
  2. Under the <indexes> element, add a new time index, and give it a unique name:
    <index NAME="Time of birth"> 
    </index>
  3. Optionally, add an <admindescription> element to describe the index:
    <index NAME="Time of birth">
       <admindescription>
          Recorded birth time for hospital records docbase.
       </admindescription>
    </index>
  4. Specify the type of index you are defining, <timeindex>:
    <index NAME="Time of birth">
       <admindescription>
          Recorded birth time for hospital records docbase.
       </admindescription>
       <timeindex>
       </timeindex>
    </index>
  5. Create a <timeindexproperties> element:
    <index NAME="Time of birth">
      <admindescription>
          Recorded birth time for hospital records docbase.
       </admindescription>
       <timeindex>
          <timeindexproperties>
          </timeindexproperties>
       </timeindex>
    </index>
  6. To specify the time format that TEXTML Server will search for, add a <formats> element, and provide its name, using a format from the DATETIME_FORMATS.XML document:
    <index NAME="Time of birth">
       <admindescription>
          Recorded birth time for hospital records docbase.
       </admindescription>
       <timeindex>
          <timeindexproperties>
             <formats>
                <format NAME="ISO 8601"/>
             </formats>
          </timeindexproperties>
       </timeindex>
    </index>
    Note: ISO 8601 is an international standard that provides for several time patterns (all beginning with HH), described in the DATETIME_FORMATS.XML document (available by running the Advanced v4 query from within the TEXTML Server Administration Console). TEXTML Server will search for strings that conform to any of the possible time patterns provided in the specified standard, and index them. If you do not specify a format, TEXTML Server uses a default definition to index times.
  7. Add an <XPATH> element to hold the list of XML elements whose content you want indexed.
    The XPATH attribute provides the exact element name used, preceded by two slashes. In the example below, TEXTML Server is instructed to search <hhmm> and <BirthHr> elements.
    <index NAME="Time of birth">
       <admindescription>
          Recorded birth time for hospital records docbase.
       </admindescription>
       <timeindex>
          <timeindexproperties>
             <formats>
                <format NAME="ISO 8601"/>
             </formats>
          </timeindexproperties>
          <elements>
             <element XPATH="//BirthDateTime/date/hhmm"/>
             <element XPATH="//BirthHr"/>
          </elements>
       </timeindex>
    </index>
  8. Repeat Step 7 to add additional elements if desired.
    Note: In the example in Step 7, the specified format applies to all time elements. To specify different formats for various elements, define a <format> under each <element>.