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

<!-- COVID19_DIAGNOZES xsd byla -->

<xs:element name="COVID19_DIAGNOZES">
  <xs:annotation><xs:documentation>COVID19 tyrimų duomenys</xs:documentation></xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="DIAGNOZE" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="DIAGNOZE">
  <xs:annotation><xs:documentation/></xs:annotation>
    <xs:complexType>
      <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_ID"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_COMPOSITION_ID"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_COMPOSITION_DATE"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_COMPOSITION_STATUS_CODE"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_PACIENTO_ID"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_ASM_AK"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_PACIENTO_ESI"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_ISTAIGOS_ID"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_ISTAIGOS_JA_KODAS"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_ISTAIGOS_PAV"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_DIAGNOZES_KODAS"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_PASTABOS_DIAGNOZEI"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_SPECIALISTO_SPAUDO_NR"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_SPECIALISTO_VARDAS"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_SPECIALISTO_PAVARDE"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_PACIENTO_VARDAS"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_PACIENTO_PAVARDE"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_PRISIRASYMO_ASPI"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_SAV_PAV"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_TELEFONO_NR"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_PRISIRASYMO_ASPI_JA_KODAS"/>
      <xs:element minOccurs="0" maxOccurs="1" ref="CD_SVEIKATOS_SPECIALISTAS"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>


<xs:element name="CD_ID" type="xs:long">
  <xs:annotation><xs:documentation>Įrašo identifikatorius. Unikalus.</xs:documentation></xs:annotation>
</xs:element>

<xs:element name="CD_COMPOSITION_ID" type="xs:long">
  <xs:annotation><xs:documentation>E025 kompozicijos identifikatorius. Unikalus.</xs:documentation></xs:annotation>
</xs:element>

<xs:element name="CD_COMPOSITION_DATE" type="data_laikas">
  <xs:annotation><xs:documentation>E025 kompozicijos sukūrimo data.</xs:documentation></xs:annotation>
</xs:element>

<xs:element name="CD_COMPOSITION_STATUS_CODE">
  <xs:annotation><xs:documentation/></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_PACIENTO_ID" type="xs:long">
  <xs:annotation><xs:documentation>Paciento identifikatorius.</xs:documentation></xs:annotation>
</xs:element>

<xs:element name="CD_ASM_AK">
  <xs:annotation><xs:documentation>Paciento asmens kodas</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_PACIENTO_ESI">
  <xs:annotation><xs:documentation>Paciento ESI numeris</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_ISTAIGOS_ID" type="xs:long">
  <xs:annotation><xs:documentation>Įstaigos identifikatorius ESPBI IS</xs:documentation></xs:annotation>
</xs:element>

<xs:element name="CD_ISTAIGOS_JA_KODAS">
  <xs:annotation><xs:documentation>Įstaigos juridinio asmens kodas (įmonės kodas)</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_ISTAIGOS_PAV">
  <xs:annotation><xs:documentation>Įstaigos pavadinimas</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_DIAGNOZES_KODAS">
  <xs:annotation><xs:documentation>TLK10 diagnozės kodas</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="2000"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_PASTABOS_DIAGNOZEI">
  <xs:annotation><xs:documentation>Specialisto patikslinimas/papildymas TLK10 diagnozės kodui</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="4000"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_SPECIALISTO_SPAUDO_NR">
  <xs:annotation><xs:documentation>Specialisto, įrašiusio diagnozę, spaudo numeris</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_SPECIALISTO_VARDAS">
  <xs:annotation><xs:documentation>Specialisto, įrašiusio diagnozę, vardas</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_SPECIALISTO_PAVARDE">
  <xs:annotation><xs:documentation>Specialisto, įrašiusio diagnozę, pavardė</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_PACIENTO_VARDAS">
  <xs:annotation><xs:documentation>Paciento vardas</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_PACIENTO_PAVARDE">
  <xs:annotation><xs:documentation>Paciento pavardė</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_PRISIRASYMO_ASPI">
  <xs:annotation><xs:documentation>Paciento prisirašymo sveikatos priežiūros įstaiga</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="300"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_SAV_PAV">
  <xs:annotation><xs:documentation>Paciento prisirašymo įstaigos savivaldybė</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="250"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_TELEFONO_NR">
  <xs:annotation><xs:documentation>Paciento telefono numeriai</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="2000"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

<xs:element name="CD_PRISIRASYMO_ASPI_JA_KODAS">
  <xs:annotation><xs:documentation>Paciento prisirašymo sveikatos priežiūros įstaigos juridinio asmens (įmonės) kodas</xs:documentation></xs:annotation>
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>


<xs:element name="CD_SVEIKATOS_SPECIALISTAS" type="xs:int">
  <xs:annotation><xs:documentation>Ar pacientas yra kartu ir sveikatos priežiūros specialistas</xs:documentation></xs:annotation>
</xs:element>


<xs:simpleType name="data_laikas">
  <xs:annotation><xs:documentation>Data ir laikas</xs:documentation></xs:annotation>
  <xs:restriction base="xs:string">
    <xs:pattern value="\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}"/>
  </xs:restriction>
</xs:simpleType>


</xs:schema>
