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


  <xs:simpleType name="SqlDate">
    <xs:restriction base="xs:date">
      <xs:minInclusive value="1870-01-01"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SqlDateSluch">
    <xs:restriction base="xs:date">
      <xs:minInclusive value="1990-01-01"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SqlDateTime">
    <xs:restriction base="xs:dateTime">
      <xs:minInclusive value="1990-01-01T00:00:00"/>
    </xs:restriction>
  </xs:simpleType>
  <!--fixed lenght-->

  <xs:simpleType name="string3fixed">
    <xs:restriction base="xs:string">
      <xs:length value="3"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string5fixed">
    <xs:restriction base="xs:string">
      <xs:length value="5"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string9fixed">
    <xs:restriction base="xs:string">
      <xs:length value="9"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string14fixed">
    <xs:restriction base="xs:string">
      <xs:length value="14"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string13fixed">
    <xs:restriction base="xs:string">
      <xs:length value="13"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string15fixed">
    <xs:restriction base="xs:string">
      <xs:length value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <!--max lenght-->
  <xs:simpleType name="string1max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string2max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="2"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string3max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="3"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string4max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="4"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string5max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="5"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string6max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="6"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string7max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="7"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string8max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="8"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string08max">
    <xs:restriction base="xs:string">
      <xs:minLength value="0"/>
      <xs:maxLength value="8"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string9max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="9"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string10max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string1min10max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string11max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="11"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string12max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="12"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string13max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string14max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="14"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string15max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string16max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="16"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string17max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="17"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string1min16max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="16"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string1min17max">
  	<xs:restriction base="xs:string">
  		<xs:minLength value="1"/>
  		<xs:maxLength value="17"/>
  	</xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string20max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="20"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string21max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="21"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string24max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="24"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string25max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="25"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string1min25max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="25"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string26max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="26"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string30max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string32max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="32"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string36max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="36"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string40max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string45max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="45"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string46max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="45"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string50max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string80max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string100max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="100"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string120max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="120"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string122max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="122"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string128max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="128"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string130max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="130"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string150max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="150"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string200max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="200"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string210max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="210"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string250max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="250"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string254max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="254"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string255max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="255"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string512max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="512"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string1000max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="1000"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string4000max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="4000"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string4096max">
    <xs:restriction base="xs:string">
      <xs:maxLength value="4096"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="bool">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="int1_3">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint1">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="int0_1">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="int1_2">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint1_3">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="int1_4">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="4" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="int1_5">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="5" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="int1_7">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="7" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint2">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="2"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint3">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="3"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="int0_2">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="3"/>
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="int0_3">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="3"/>
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint4">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="4"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint0_5">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="5"/>
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint5">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="5"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint6">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="6"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint7">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="7"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint8">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="8"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint08">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="8"/>
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint09">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="9"/>
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint9">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="9"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint010">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="10"/>
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint10">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="10"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint11">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="11"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint12">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="12"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint20">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="20"/>
      <xs:minInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="int0_12">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="12"/>
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="uint16_regex">
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{16}" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_3_2">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0.00" />
      <xs:maxInclusive value="9.99" />
      <xs:fractionDigits value="2"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_2_5">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0.00000" />
      <xs:maxInclusive value="99.99999" />
      <xs:fractionDigits value="5"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_5_2">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0.00" />
      <xs:maxInclusive value="999.99" />
      <xs:fractionDigits value="2"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_6_2">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0.00" />
      <xs:maxInclusive value="9999.99" />
      <xs:fractionDigits value="2"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_6_4">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0.0000" />
      <xs:maxInclusive value="99.9999" />
      <xs:fractionDigits value="4"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_7_2">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0.00" />
      <xs:maxInclusive value="99999.99" />
      <xs:fractionDigits value="2"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_8_2">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0.00" />
      <xs:maxInclusive value="999999.99" />
      <xs:fractionDigits value="2"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_15_2">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0.00" />
      <xs:maxInclusive value="9999999999999.99" />
      <xs:fractionDigits value="2"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_15_2_msko">
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="-999999999999.99" />
      <xs:maxInclusive value="9999999999999.99" />
      <xs:fractionDigits value="2"  />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="decimal_15_2_regex">
    <xs:restriction base="xs:string">
      <xs:pattern value="^[0-9]{1,15}.{0,1}[0-9]{0,2}$" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OKATO">
    <xs:restriction base="xs:string">
      <xs:maxLength value="11" />
      <xs:pattern value="[0-9]*" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OKATO_v2_1">
    <xs:restriction base="xs:string">
      <xs:maxLength value="5" />
      <xs:minLength value="1" />
      <xs:pattern value="[0-9]*" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PACK_TYPE">
    <xs:restriction base="xs:string">
      <xs:pattern value="Insert|Update|Delete" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="REG_TYPE">
    <xs:restriction base="xs:string">
      <xs:pattern value="ORL|MTR|NI|NT" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NOVOR">
    <xs:restriction base="xs:string">
      <xs:pattern value="(0)|([1-2]{1}[0-9]{6}[0-9]{1,2})" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NOVOR_Karelia">
    <xs:restriction base="xs:string">
      <xs:pattern value="(0)|(1)|([1-2]{1}[0-9]{6}[0-9]{1,2})" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="VNOV_D">
    <xs:restriction base="xs:int">
      <xs:totalDigits value="4"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EXTR">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EXTR_kar">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DET">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OPLATA">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="5" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="VARIANCE_CAT">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DOST">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="6" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="INV">
    <xs:restriction base="xs:unsignedInt">
      <xs:pattern value="0"/>
      <xs:pattern value="1"/>
      <xs:pattern value="2"/>
      <xs:pattern value="3"/>
      <xs:pattern value="4"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="P_PER">
    <xs:restriction base="xs:unsignedInt">
      <xs:pattern value="1"/>
      <xs:pattern value="2"/>
      <xs:pattern value="3"/>
      <xs:pattern value="4"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="P_PER_tat">
    <xs:restriction base="xs:unsignedInt">
      <xs:pattern value="1"/>
      <xs:pattern value="2"/>
      <xs:pattern value="3"/>
      <xs:pattern value="4"/>
      <xs:pattern value="5"/>
      <xs:pattern value="6"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NPL">
    <xs:restriction base="xs:unsignedInt">
      <xs:pattern value="1"/>
      <xs:pattern value="2"/>
      <xs:pattern value="3"/>
      <xs:pattern value="4"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NAZR">
    <xs:restriction base="xs:unsignedInt">
      <xs:pattern value="1"/>
      <xs:pattern value="2"/>
      <xs:pattern value="3"/>
      <xs:pattern value="4"/>
      <xs:pattern value="5"/>
      <xs:pattern value="6"/>
    </xs:restriction>
  </xs:simpleType>


  <xs:simpleType name="year">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1990" />
      <xs:maxInclusive value="2100" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="month">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="12" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="day">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="31" />
    </xs:restriction>
  </xs:simpleType>


  <xs:simpleType name="mode">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DIRECTION">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MEE_V_ACT_V">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="EKMP_V_ACT_V">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="5" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MEE_V_ACT">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>

  <xs:simpleType name="MEE_R_ACT">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EKMP_V_ACT">
    <xs:restriction base="xs:string"/>
  </xs:simpleType>

  <xs:simpleType name="choice0_2">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="T_ACT">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IRP_TYPE">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="5" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IRP_RESULT">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="7" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="STATUS_RKK">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="2" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RATING">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="5" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HOW">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="5" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="WAY">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FORM">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IS_MEE">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IS_EKMP">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="REASON">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="20" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="POLIS_PRZ">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="6" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="POLIS_PRZ_disp">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="5" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="REASONH">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="620" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="INIT_RET">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ORG">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="JUSTIFY">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="STATUS">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RESULT">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RESOLVE">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="0" />
      <xs:maxInclusive value="1" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="V_ACT">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="5" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="V_ACT_NEW">
    <xs:restriction base="xs:unsignedInt">
      <xs:pattern value="1"/>
      <xs:pattern value="11"/>
      <xs:pattern value="21"/>
      <xs:pattern value="22"/>
      <xs:pattern value="23"/>
      <xs:pattern value="31"/>
      <xs:pattern value="32"/>
      <xs:pattern value="41"/>
      <xs:pattern value="42"/>
      <xs:pattern value="43"/>
      <xs:pattern value="44"/>
      <xs:pattern value="45"/>
      <xs:pattern value="46"/>
      <xs:pattern value="5"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="R_ACT">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="S_TIP">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="2" />
      <xs:maxInclusive value="3" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ENP">
    <xs:restriction base="xs:string">
      <xs:pattern value="^[0-9]{16}$" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RESULT_YANAO">
    <xs:restriction base="xs:string">
      <xs:pattern value="[1]|[2]|[7]|[9]" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CATEGORY">
    <xs:restriction base="xs:string">
      <xs:pattern value="[0]|[1]|[9]" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CEL">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="4" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NSCHET_bur">
    <xs:restriction base="xs:string">
      <xs:pattern value="^[0-9]{1,15}$" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DENTAL">
    <xs:restriction base="xs:unsignedInt">
      <xs:totalDigits value="2"/>
      <xs:minInclusive value="0" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SEX">
    <xs:restriction base="xs:unsignedInt">
      <xs:minInclusive value="1" />
      <xs:maxInclusive value="2" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RegexHHMM">
    <xs:restriction base="xs:string">
      <xs:pattern value="^(0[0-9]|1[0-9]|2[0-3]|[0-9])-[0-5][0-9]$" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="string_3fixed">
    <xs:restriction base="xs:string">
      <xs:length value="3"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="int_0min1max">
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="1"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="int_1min2dig">
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="1"/>
      <xs:totalDigits value="2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string_1min50max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string_1min10max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="10"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string_1min20max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="20"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string_0min254max">
    <xs:restriction base="xs:string">
      <xs:minLength value="0"/>
      <xs:maxLength value="254"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="int_1min4max">
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="4"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="string_1min25max">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="25"/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>





