<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<xs:element name="PTE46C">
  <xs:annotation>
    <xs:documentation> ; Envelope da Mensagem; O; </xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="messageSender">
        <xs:annotation>
          <xs:documentation> ; Emissor (Sender); O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="35"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="messageRecipient">
        <xs:annotation>
          <xs:documentation> ; Recetor; O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="35"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="preparationDateAndTime">
        <xs:annotation>
          <xs:documentation> ; Data e hora preparação; O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="19"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="messageIdentification">
        <xs:annotation>
          <xs:documentation> ; Identificação da mensagem; O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="35"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="messageType">
        <xs:annotation>
          <xs:documentation> ; Tipo de mensagem; O; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="6"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="correlationIdentifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation> ; Identificador de correlação; C; </xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="35"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ExportOperation">
        <xs:annotation>
          <xs:documentation> ; Operação de exportação; O; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MRN">
              <xs:annotation>
                <xs:documentation> ; MRN; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="18"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="availableDocuments" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; Documentos disponiveis; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:totalDigits value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="RequestedDocuments" minOccurs="0" maxOccurs="99">
        <xs:annotation>
          <xs:documentation> ; Documentos solicitados; C; </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="sequenceNumber">
              <xs:annotation>
                <xs:documentation> ; N.º de sequência; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:maxInclusive value="99999"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="documentType" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; Tipo de documento; C; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:length value="4"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="referenceNumber" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; Nº de referência; F; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="70"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="description" minOccurs="0">
              <xs:annotation>
                <xs:documentation> ; Descrição; F; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:maxLength value="512"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="CCEElements">
              <xs:annotation>
                <xs:documentation> ; Elementos CCE; O; </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:int">
                  <xs:totalDigits value="1"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DocumentsImages" minOccurs="0" maxOccurs="9">
              <xs:annotation>
                <xs:documentation> ; Imagem documentos; C; </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="sequenceNumber">
                    <xs:annotation>
                      <xs:documentation> ; N.º de sequência; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:int">
                        <xs:maxInclusive value="99999"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="fileType">
                    <xs:annotation>
                      <xs:documentation> ; Tipo de ficheiro; O; </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="200"/>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="image">
                    <xs:annotation>
                      <xs:documentation> ; Imagem; O; Classificar como string (base64Binary)</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>
