<?xml version="1.0" encoding="utf-8"?>
<!-- dodany element //Dokumenty/UsuwanaKontrola/NumerKontroli -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:include schemaLocation="SimStrukturyDanych_v1.0.xsd"/>
	<xsd:element name="UsuwanaKontrola">
		<xsd:annotation>
			<xsd:documentation>Usuwana informacja o kontroli</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="TypDokumentu" type="xsd:string" fixed="USKNTR"/>
				<xsd:element name="WariantTypuDokumentu" type="xsd:byte" fixed="1"/>
				<xsd:element name="NumerKontroli" type="TNrDokumentu">
					<xsd:annotation>
						<xsd:documentation>Numer kontroli</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="LokalnyIdKontroli" type="TSygnatura">
					<xsd:annotation>
						<xsd:documentation>Niezmienny identyfikator kontroli w systemie lokalnym</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="NumerUmowyDecyzji" type="TNrUmowyDecyzji">
					<xsd:annotation>
						<xsd:documentation>Numer umowy/decyzji (nie może to być numer aneksu/zmiany)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="LokalnyIdUmowyDec" type="TSygnatura">
					<xsd:annotation>
						<xsd:documentation>Niezmienny identyfikator umowy/decyzji w systemie lokalnym</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="WnioskiPlatnicze" type="TWnioskiPlatnicze" minOccurs="0"/>
				<xsd:element name="IdInstytucji" type="TKodInstytucji">
					<xsd:annotation>
						<xsd:documentation>Kod instytucji w KSI SIMIK 07-13</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="NazwaInstytucjiKontr" type="TNazwaPodmiotu">
					<xsd:annotation>
						<xsd:documentation>Nazwa instytucji przeprowadzającej kontrolę</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="DataKontroli" type="TData">
					<xsd:annotation>
						<xsd:documentation>Data przeprowadzenia kontroli</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="TWnioskiPlatnicze">
		<xsd:sequence>
			<xsd:element name="WniosekPlatniczy" type="TWniosekPlatniczy" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="TWniosekPlatniczy">
		<xsd:sequence>
			<xsd:element name="NumerWnioskuPlatn" type="TNrDokumentu">
				<xsd:annotation>
					<xsd:documentation>Numer wniosku o płatność</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
			<xsd:element name="LokalnyIdWnioskuPlatn" type="TSygnatura">
				<xsd:annotation>
					<xsd:documentation>Niezmienny identyfikator wniosku od dofinansowanie w systemie lokalnym</xsd:documentation>
				</xsd:annotation>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="Dokumenty">
		<xsd:annotation>
			<xsd:documentation>Dokumenty SIMIK</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="UsuwanaKontrola" maxOccurs="unbounded"/>
			</xsd:sequence>
			<xsd:attribute name="idSystemuLokalnego" type="TSygnatura" use="required"/>
			<xsd:attribute name="dataUtworzenia" use="required">
				<xsd:simpleType>
					<xsd:restriction base="xsd:dateTime">
						<xsd:minInclusive value="2007-01-01T00:00:00"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
		<xsd:unique name="kluczIdLokalnyKontroli">
			<xsd:selector xpath="UsuwanaKontrola"/>
			<xsd:field xpath="LokalnyIdKontroli"/>
		</xsd:unique>
		<xsd:unique name="kluczNrKontroli">
			<xsd:selector xpath="Kontrola/Naglowek"/>
			<xsd:field xpath="NumerKontroli"/>
		</xsd:unique>
		<xsd:unique name="kluczIdLokalnyWnioskuPlatn">
			<xsd:selector xpath="UsuwanaKontrola/WnioskiPlatnicze/WniosekPlatniczy"/>
			<xsd:field xpath="LokalnyIdWnioskuPlatn"/>
		</xsd:unique>
		<xsd:unique name="kluczNumerWnioskuPlatn">
			<xsd:selector xpath="UsuwanaKontrola/WnioskiPlatnicze/WniosekPlatniczy"/>
			<xsd:field xpath="NumerWnioskuPlatn"/>
		</xsd:unique>
	</xsd:element>
</xsd:schema>

