<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.00">
  <!--=========================================-->
  <!--===== ECS Simple Types -->
  <!--===== DDNXA V11.00  -->
  <!--===== Included Features: [4, 17, 18, 20, 24, 25, 28, 29]  -->
  <!--=========================================-->
  <!--===== Includes =====-->
  <xs:include schemaLocation="simple_types.xsd" />
  <xs:include schemaLocation="doc.xsd" />
  <!--===== Data Item Types =====-->
  <xs:simpleType name="Alpha_8">
    <xs:restriction base="AlphaType">
      <xs:length value="8" />
      <xs:pattern value="[a-zA-Z]{8}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alpha_Max29_With_Spaces">
    <xs:restriction base="AlphaType">
      <xs:maxLength value="29" />
      <xs:pattern value="[a-zA-Z _]{1,29}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_10">
    <xs:restriction base="AlphaNumType">
      <xs:length value="10" />
      <xs:pattern value=".{10}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_5">
    <xs:restriction base="AlphaNumType">
      <xs:length value="5" />
      <xs:pattern value=".{5}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max10">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="10" />
      <xs:pattern value=".{1,10}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max15">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="15" />
      <xs:pattern value=".{1,15}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max16">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="16" />
      <xs:pattern value=".{1,16}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max19">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="19" />
      <xs:pattern value=".{1,19}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max30">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="30" />
      <xs:pattern value=".{1,30}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Alphanumeric_Max80">
    <xs:restriction base="AlphaNumType">
      <xs:maxLength value="80" />
      <xs:pattern value=".{1,80}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CORefNumType">
    <xs:annotation>
      <xs:documentation>Customs Office Reference Number (format: an8)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="8" />
      <xs:pattern value="[A-Z]{2}[a-zA-Z0-9]{6}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CountryCodeType">
    <xs:annotation>
      <xs:documentation>Country Code (format: an2)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="2" />
      <xs:pattern value="[a-zA-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="DateType">
    <xs:annotation>
      <xs:documentation>Date and Time with precision of minute (format YYYYMMDD)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="8" />
      <xs:pattern value="[0-9]{8}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_11_2">
    <xs:restriction base="DecType">
      <xs:totalDigits value="11" />
      <xs:fractionDigits value="2" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Decimal_6_5">
    <xs:restriction base="DecType">
      <xs:totalDigits value="6" />
      <xs:fractionDigits value="5" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="LanguageCodeType">
    <xs:annotation>
      <xs:documentation>Language Code (format: an2)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:length value="2" />
      <xs:pattern value="[a-zA-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="MRNType">
    <xs:annotation>
      <xs:documentation>MRN (format: an..21), (alias: DocNumHEA5Type)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="AlphaNumType">
      <xs:pattern value="[0-9]{2}[A-Z]{2}[a-zA-Z0-9]{1,16}[0-9]" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_12">
    <xs:restriction base="NumType">
      <xs:length value="12" />
      <xs:pattern value="[0-9]{12}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Numeric_Max11">
    <xs:restriction base="NumType">
      <xs:maxLength value="11" />
      <xs:pattern value="[0-9]{1,11}" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>

