DROP TABLE [dbo].[shems]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[shems](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[tip] [varchar](2) NULL,
	[version] [varchar](5) NULL,
	[xsd] [text] NULL,
 CONSTRAINT [PK_shems] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[shems] ON 

GO
INSERT [dbo].[shems] ([id], [tip], [version], [xsd]) VALUES (1, N'H', N'3.0', N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ms="urn:schemas-microsoft-com:mapping-schema">
	<xs:annotation>
		<xs:appinfo>
			<ms:relationship name="Files_Pacient" parent="Files" parent-key="ID_FILES" child="Pacient" child-key="ID_FILES"/>
			<ms:relationship name="Pacient_SLUCH" parent="Pacient" parent-key="ID_PACIENT" child="Z_SL" child-key="ID_PACIENT"/>
			<ms:relationship name="Z_SL_VNOV" parent="Z_SL" parent-key="ID_Z_SL" child="VNOV_M" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_OS_SLUCH" parent="Z_SL" parent-key="ID_Z_SL" child="OS_SLUCH" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_SL" parent="Z_SL" parent-key="ID_Z_SL" child="Sluch" child-key="ID_Z_SL"/>
			<ms:relationship name="SL_SANK" parent="Sluch" parent-key="ID_SLUCH" child="SANK" child-key="SLUCH_ID"/>
			<ms:relationship name="SL_USL" parent="Sluch" parent-key="ID_SLUCH" child="Usl" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_KSG_KPG" parent="Sluch" parent-key="ID_SLUCH" child="KSG_KPG" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS2" parent="Sluch" parent-key="ID_SLUCH" child="DS2" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS3" parent="Sluch" parent-key="ID_SLUCH" child="DS3" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_CODE_MES1" parent="Sluch" parent-key="ID_SLUCH" child="CODE_MES1" child-key="ID_SLUCH"/>
			<ms:relationship name="KSG_KPG_SL_KOEF" parent="KSG_KPG" parent-key="ID_SLUCH" child="SL_KOEF" child-key="ID_KSG_KPG"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:element name="ZL_LIST" ms:relation="Files">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ZGLV" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="VERSION" minOccurs="1" maxOccurs="1" ms:field="VERSION" ms:datatype="varchar(5)"/>
							<xs:element name="DATA" minOccurs="1" maxOccurs="1" ms:field="DATA" ms:datatype="smalldatetime"/>
							<xs:element name="FILENAME" minOccurs="1" maxOccurs="1" ms:field="FILENAME" ms:datatype="varchar(26)"/>
							<xs:element name="SD_Z" minOccurs="1" maxOccurs="1" ms:field="SD_Z" ms:datatype="numeric(9,0)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="SCHET" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="CODE" minOccurs="1" maxOccurs="1" ms:field="CODE" ms:datatype="numeric(8,0)"/>
							<xs:element name="CODE_MO" minOccurs="1" maxOccurs="1" ms:field="CODE_MO" ms:datatype="varchar(6)"/>
							<xs:element name="YEAR" minOccurs="1" maxOccurs="1" ms:field="YEAR" ms:datatype="numeric(4,0)"/>
							<xs:element name="MONTH" minOccurs="1" maxOccurs="1" ms:field="MONTH" ms:datatype="numeric(2,0)"/>
							<xs:element name="NSCHET" minOccurs="1" maxOccurs="1" ms:field="NSCHET" ms:datatype="varchar(15)"/>
							<xs:element name="DSCHET" minOccurs="1" maxOccurs="1" ms:field="DSCHET" ms:datatype="smalldatetime"/>
							<xs:element name="PLAT" minOccurs="1" maxOccurs="1" ms:field="PLAT" ms:datatype="varchar(5)"/>
							<xs:element name="SUMMAV" minOccurs="1" maxOccurs="1" ms:field="SUMMAV" ms:datatype="numeric(15,2)"/>
							<xs:element name="COMENTS" minOccurs="1" maxOccurs="1" ms:field="COMENTS" ms:datatype="varchar(250)"/>
							<xs:element name="SUMMAP" minOccurs="1" maxOccurs="1" ms:field="SUMMAP" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEK" minOccurs="1" maxOccurs="1" ms:field="SANK_MEK" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEE" minOccurs="1" maxOccurs="1" ms:field="SANK_MEE" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_EKMP" minOccurs="1" maxOccurs="1" ms:field="SANK_EKMP" ms:datatype="numeric(15,2)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="ZAP" minOccurs="1" maxOccurs="unbounded" ms:relation="Pacient" ms:relationship="Files_Pacient">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="N_ZAP" minOccurs="1" maxOccurs="1" ms:field="N_ZAP" ms:datatype="numeric(8,0)"/>
							<xs:element name="PR_NOV" minOccurs="1" maxOccurs="1" ms:field="PR_NOV" ms:datatype="numeric(1,0)"/>
							<xs:element name="PACIENT" minOccurs="1" maxOccurs="1" ms:is-constant="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="ID_PAC" minOccurs="1" maxOccurs="1" ms:field="ID_PAC" ms:datatype="varchar(36)"/>
										<xs:element name="VPOLIS" minOccurs="1" maxOccurs="1" ms:field="VPOLIS" ms:datatype="numeric(1,0)"/>
										<xs:element name="SPOLIS" minOccurs="0" maxOccurs="1" ms:field="SPOLIS" ms:datatype="varchar(10)"/>
										<xs:element name="NPOLIS" minOccurs="1" maxOccurs="1" ms:field="NPOLIS" ms:datatype="varchar(20)"/>
										<xs:element name="ST_OKATO" minOccurs="0" maxOccurs="1" ms:field="ST_OKATO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO" minOccurs="0" maxOccurs="1" ms:field="SMO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_OGRN" minOccurs="0" maxOccurs="1" ms:field="SMO_OGRN" ms:datatype="varchar(15)"/>
										<xs:element name="SMO_OK" minOccurs="0" maxOccurs="1" ms:field="SMO_OK" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_NAM" minOccurs="0" maxOccurs="1" ms:field="SMO_NAM" ms:datatype="varchar(100)"/>
										<xs:element name="INV" minOccurs="0" maxOccurs="1" ms:field="INV" ms:datatype="numeric(1,0)"/>
										<xs:element name="MSE" minOccurs="0" maxOccurs="1" ms:field="MSE" ms:datatype="numeric(1,0)"/>
										<xs:element name="NOVOR" minOccurs="1" maxOccurs="1" ms:field="NOVOR" ms:datatype="varchar(9)"/>
										<xs:element name="VNOV_D" minOccurs="0" maxOccurs="1" ms:field="VNOV_D" ms:datatype="numeric(4,0)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Z_SL" ms:relation="Z_SL" ms:relationship="Pacient_SLUCH">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="IDCASE" minOccurs="1" maxOccurs="1" ms:field="IDCASE" ms:datatype="numeric(11,0)"/>
										<xs:element name="USL_OK" minOccurs="1" maxOccurs="1" ms:field="USL_OK" ms:datatype="numeric(2,0)"/>
										<xs:element name="VIDPOM" minOccurs="1" maxOccurs="1" ms:field="VIDPOM" ms:datatype="numeric(4,0)"/>
										<xs:element name="FOR_POM" minOccurs="1" maxOccurs="1" ms:field="FOR_POM" ms:datatype="numeric(1,0)"/>
										<xs:element name="NPR_MO" minOccurs="0" maxOccurs="1" ms:field="NPR_MO" ms:datatype="varchar(6)"/>
										<xs:element name="NPR_DATE" minOccurs="0" maxOccurs="1" ms:field="NPR_DATE" ms:datatype="smalldatetime"/>
										<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
										<xs:element name="DATE_Z_1" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_1" ms:datatype="smalldatetime"/>
										<xs:element name="DATE_Z_2" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_2" ms:datatype="smalldatetime"/>
										<xs:element name="KD_Z" minOccurs="0" maxOccurs="1" ms:field="KD_Z" ms:datatype="numeric(3,0)"/>
										<xs:element name="VNOV_M" minOccurs="0" maxOccurs="unbounded" ms:relation="VNOV_M" ms:field="VNOV_M" ms:relationship="Z_SL_VNOV" ms:datatype="numeric(4,0)"/>
										<xs:element name="RSLT" minOccurs="1" maxOccurs="1" ms:field="RSLT" ms:datatype="numeric(3,0)"/>
										<xs:element name="ISHOD" minOccurs="1" maxOccurs="1" ms:field="ISHOD" ms:datatype="numeric(3,0)"/>
										<xs:element name="OS_SLUCH" minOccurs="0" maxOccurs="unbounded" ms:relation="OS_SLUCH" ms:field="OS_SLUCH" ms:relationship="Z_SL_OS_SLUCH" ms:datatype="numeric(1,0)"/>
										<xs:element name="VB_P" minOccurs="1" maxOccurs="1" ms:field="VB_P" ms:datatype="numeric(1,0)"/>
										<xs:element name="SL" minOccurs="1" maxOccurs="unbounded" ms:relation="Sluch" ms:relationship="Z_SL_SL">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="SL_ID" minOccurs="1" maxOccurs="1" ms:field="SL_ID" ms:datatype="varchar(36)"/>
													<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
													<xs:element name="PODR" minOccurs="0" maxOccurs="1" ms:field="PODR" ms:datatype="numeric(12,0)"/>
													<xs:element name="PROFIL" minOccurs="1" maxOccurs="1" ms:field="PROFIL" ms:datatype="numeric(3,0)"/>
													<xs:element name="PROFIL_K" minOccurs="0" maxOccurs="1" ms:field="PROFIL_K" ms:datatype="numeric(3,0)"/>
													<xs:element name="DET" minOccurs="1" maxOccurs="1" ms:field="DET" ms:datatype="numeric(1,0)"/>
													<xs:element name="P_CEL" minOccurs="0" maxOccurs="1" ms:field="P_CEL" ms:datatype="varchar(3)"/>
													<xs:element name="NHISTORY" minOccurs="1" maxOccurs="1" ms:field="NHISTORY" ms:datatype="varchar(50)"/>
													<xs:element name="DATE_1" minOccurs="1" maxOccurs="1" ms:field="DATE_1" ms:datatype="smalldatetime"/>
													<xs:element name="DATE_2" minOccurs="1" maxOccurs="1" ms:field="DATE_2" ms:datatype="smalldatetime"/>
													<xs:element name="KD" minOccurs="0" maxOccurs="1" ms:field="KD" ms:datatype="numeric(3,0)"/>
													<xs:element name="DS0" minOccurs="0" maxOccurs="1" ms:field="DS0" ms:datatype="varchar(10)"/>
													<xs:element name="DS1" minOccurs="1" maxOccurs="1" ms:field="DS1" ms:datatype="varchar(10)"/>
													<xs:element name="DS2" minOccurs="0" maxOccurs="unbounded" ms:relation="DS2" ms:field="DS2" ms:relationship="SL_DS2" ms:datatype="varchar(10)"/>
													<xs:element name="DS3" minOccurs="0" maxOccurs="unbounded" ms:relation="DS3" ms:field="DS3" ms:relationship="SL_DS3" ms:datatype="varchar(10)"/>
													<xs:element name="DN" minOccurs="0" maxOccurs="1" ms:field="DN" ms:datatype="numeric(1,0)"/>
													<xs:element name="CODE_MES1" minOccurs="0" maxOccurs="unbounded" ms:relation="CODE_MES1" ms:field="CODE_MES1" ms:relationship="SL_CODE_MES1" ms:datatype="varchar(20)"/>
													<xs:element name="CODE_MES2" minOccurs="0" maxOccurs="1" ms:field="CODE_MES2" ms:datatype="varchar(20)"/>
													<xs:element name="KSG_KPG" minOccurs="0" maxOccurs="1" ms:relation="KSG_KPG" ms:relationship="SL_KSG_KPG">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="N_KSG" ms:field="N_KSG" ms:datatype="varchar(20)"/>
																<xs:element name="VER_KSG" ms:field="VER_KSG" ms:datatype="numeric(4,0)"/>
																<xs:element name="KSG_PG" ms:field="KSG_PG" ms:datatype="numeric(1,0)"/>
																<xs:element name="N_KPG" ms:field="N_KPG" ms:datatype="numeric(2,0)"/>
																<xs:element name="KOEF_Z" ms:field="KOEF_Z" ms:datatype="numeric(7,5)"/>
																<xs:element name="KOEF_UP" ms:field="KOEF_UP" ms:datatype="numeric(7,5)"/>
																<xs:element name="BZTSZ" ms:field="BZTSZ" ms:datatype="numeric(8,2)"/>
																<xs:element name="KOEF_D" ms:field="KOEF_D" ms:datatype="numeric(7,5)"/>
																<xs:element name="KOEF_U" ms:field="KOEF_U" ms:datatype="numeric(7,5)"/>
																<xs:element name="DKK1" ms:field="DKK1" ms:datatype="varchar(10)"/>
																<xs:element name="DKK2" ms:field="DKK2" ms:datatype="varchar(10)"/>
																<xs:element name="SL_K" ms:field="SL_K" ms:datatype="numeric(1,0)"/>
																<xs:element name="IT_SL" ms:field="IT_SL" ms:datatype="numeric(6,5)"/>
																<xs:element name="SL_KOEF" minOccurs="0" maxOccurs="unbounded" ms:relation="SL_KOEF" ms:relationship="KSG_KPG_SL_KOEF">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="IDSL" ms:field="IDSL" ms:datatype="numeric(4,0)"/>
																			<xs:element name="Z_SL" ms:field="Z_SL" ms:datatype="numeric(3,2)"/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="REAB" minOccurs="0" maxOccurs="1" ms:field="REAB" ms:datatype="numeric(1,0)"/>
													<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
													<xs:element name="VERS_SPEC" minOccurs="1" maxOccurs="1" ms:field="VERS_SPEC" ms:datatype="varchar(4)"/>
													<xs:element name="IDDOKT" minOccurs="1" maxOccurs="1" ms:field="IDDOKT" ms:datatype="varchar(25)"/>
													<xs:element name="ED_COL" minOccurs="0" maxOccurs="1" ms:field="ED_COL" ms:datatype="numeric(7,2)"/>
													<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
													<xs:element name="SUM_M" minOccurs="1" maxOccurs="1" ms:field="SUM_M" ms:datatype="numeric(15,2)"/>
													<xs:element name="SANK" minOccurs="0" maxOccurs="1" ms:relation="SANK" ms:relationship="SL_SANK">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="S_CODE" ms:field="S_CODE" ms:datatype="varchar(36)"/>
																<xs:element name="S_SUM" ms:field="S_SUM" ms:datatype="numeric(15,2)"/>
																<xs:element name="S_TIP" ms:field="S_TIP" ms:datatype="numeric(2,0)"/>
																<xs:element name="S_OSN" ms:field="S_OSN" ms:datatype="numeric(3,0)"/>
																<xs:element name="S_COM" ms:field="S_COM" ms:datatype="varchar(250)"/>
																<xs:element name="S_IST" ms:field="S_IST" ms:datatype="numeric(1,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="USL" minOccurs="0" maxOccurs="unbounded" ms:relation="Usl" ms:relationship="SL_USL">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="IDSERV" minOccurs="1" maxOccurs="1" ms:field="IDSERV" ms:datatype="varchar(36)"/>
																<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
																<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
																<xs:element name="PODR" minOccurs="0" maxOccurs="1" ms:field="PODR" ms:datatype="numeric(12,0)"/>
																<xs:element name="PROFIL" minOccurs="1" maxOccurs="1" ms:field="PROFIL" ms:datatype="numeric(3,0)"/>
																<xs:element name="VID_VME" minOccurs="0" maxOccurs="1" ms:field="VID_VME" ms:datatype="varchar(15)"/>
																<xs:element name="DET" minOccurs="1" maxOccurs="1" ms:field="DET" ms:datatype="numeric(1,0)"/>
																<xs:element name="DATE_IN" minOccurs="1" maxOccurs="1" ms:field="DATE_IN" ms:datatype="smalldatetime"/>
																<xs:element name="DATE_OUT" minOccurs="1" maxOccurs="1" ms:field="DATE_OUT" ms:datatype="smalldatetime"/>
																<xs:element name="DS" minOccurs="1" maxOccurs="1" ms:field="DS" ms:datatype="varchar(10)"/>
																<xs:element name="CODE_USL" minOccurs="1" maxOccurs="1" ms:field="CODE_USL" ms:datatype="varchar(20)"/>
																<xs:element name="KOL_USL" minOccurs="1" maxOccurs="1" ms:field="KOL_USL" ms:datatype="numeric(8,2)"/>
																<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
																<xs:element name="SUMV_USL" minOccurs="1" maxOccurs="1" ms:field="SUMV_USL" ms:datatype="numeric(15,2)"/>
																<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
																<xs:element name="CODE_MD" minOccurs="1" maxOccurs="1" ms:field="CODE_MD" ms:datatype="varchar(25)"/>
																<xs:element name="NPL" minOccurs="0" maxOccurs="1" ms:field="NPL" ms:datatype="numeric(1,0)"/>
																<xs:element name="COMENTU" minOccurs="0" maxOccurs="1" ms:field="COMENTU" ms:datatype="varchar(250)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="COMENTSL" minOccurs="0" maxOccurs="1" ms:field="COMENTSL" ms:datatype="varchar(250)"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="IDSP" minOccurs="1" maxOccurs="1" ms:field="IDSP" ms:datatype="numeric(2,0)"/>
										<xs:element name="SUMV" minOccurs="1" maxOccurs="1" ms:field="SUMV" ms:datatype="numeric(15,2)"/>
										<xs:element name="OPLATA" minOccurs="0" maxOccurs="1" ms:field="OPLATA" ms:datatype="numeric(1,0)"/>
										<xs:element name="SUMP" minOccurs="0" maxOccurs="1" ms:field="SUMP" ms:datatype="numeric(15,2)"/>
										<xs:element name="SANKIT" minOccurs="0" maxOccurs="1" ms:field="SANK_IT" ms:datatype="numeric(15,2)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="filename" ms:field="NAME_FILE" ms:datatype="varchar(60)"/>
			<xs:attribute name="md5" ms:field="MD5" ms:datatype="varchar(32)"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
')
GO
INSERT [dbo].[shems] ([id], [tip], [version], [xsd]) VALUES (2, N'L', N'2.1', N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ms="urn:schemas-microsoft-com:mapping-schema">
	<xs:annotation>
		<xs:appinfo>
		<!--	<ms:relationship name="FILES_ZGLV" parent="Files_PERS" parent-key="ID_FILES_PERS" child="ZGLV_PERS" child-key="ID_FILES"/>-->
			<ms:relationship name="ZGLV_PP" parent="ZGLV_PERS" parent-key="ID_ZGLV_PERS" child="PERS" child-key="ID_ZGLV_PERS"/>
			<ms:relationship name="PERS_DOST" parent="PERS" parent-key="ID_PERS" child="DOST" child-key="ID_PERS"/>
			<ms:relationship name="PERS_DOST_P" parent="PERS" parent-key="ID_PERS" child="DOST_P" child-key="ID_PERS"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:element name="PERS_LIST" ms:relation="ZGLV_PERS">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ZGLV" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="VERSION" minOccurs="1" maxOccurs="1" ms:field="VERSION" ms:datatype="varchar(5)"/>
							<xs:element name="DATA" minOccurs="1" maxOccurs="1" ms:field="DATA" ms:datatype="smalldatetime"/>
							<xs:element name="FILENAME" minOccurs="1" maxOccurs="1" ms:field="FILENAME" ms:datatype="varchar(26)"/>
							<xs:element name="FILENAME1" minOccurs="1" maxOccurs="1" ms:field="FILENAME1" ms:datatype="varchar(26)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="PERS" minOccurs="1" maxOccurs="unbounded" ms:relation="PERS" ms:relationship="ZGLV_PP" >
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ID_PAC" minOccurs="1" maxOccurs="1" ms:field="ID_PAC" ms:datatype="varchar(36)"/>
							<xs:element name="FAM" minOccurs="0" maxOccurs="1" ms:field="FAM" ms:datatype="varchar(40)"/>
							<xs:element name="IM" minOccurs="0" maxOccurs="1" ms:field="IM" ms:datatype="varchar(40)"/>
							<xs:element name="OT" minOccurs="0" maxOccurs="1" ms:field="OT" ms:datatype="varchar(40)"/>
							<xs:element name="W" minOccurs="1" maxOccurs="1" ms:field="W" ms:datatype="numeric(1,0)"/>
							<xs:element name="DR" minOccurs="1" maxOccurs="1" ms:field="DR" ms:datatype="smalldatetime"/>
							<xs:element name="DOST" minOccurs="0" maxOccurs="unbounded" ms:relation="DOST" ms:field="DOST" ms:datatype="numeric(1,0)" ms:relationship="PERS_DOST"/>
							<xs:element name="TEL" minOccurs="0" maxOccurs="1" ms:field="TEL" ms:datatype="varchar(100)"/>
							<xs:element name="FAM_P" minOccurs="0" maxOccurs="1" ms:field="FAM_P" ms:datatype="varchar(40)"/>
							<xs:element name="IM_P" minOccurs="0" maxOccurs="1" ms:field="IM_P" ms:datatype="varchar(40)"/>
							<xs:element name="OT_P" minOccurs="0" maxOccurs="1" ms:field="OT_P" ms:datatype="varchar(40)"/>
							<xs:element name="W_P" minOccurs="0" maxOccurs="1" ms:field="W_P" ms:datatype="numeric(1,0)"/>
							<xs:element name="DR_P" minOccurs="0" maxOccurs="1" ms:field="DR_P" ms:datatype="smalldatetime"/>
							<xs:element name="DOST_P" minOccurs="0" maxOccurs="unbounded" ms:relation="DOST_P" ms:field="DOST_P" ms:datatype="numeric(1,0)" ms:relationship="PERS_DOST_P"/>
							<xs:element name="MR" minOccurs="0" maxOccurs="1" ms:field="MR" ms:datatype="varchar(100)"/>
							<xs:element name="DOCTYPE" minOccurs="0" maxOccurs="1" ms:field="DOCTYPE" ms:datatype="varchar(2)"/>
							<xs:element name="DOCSER" minOccurs="0" maxOccurs="1" ms:field="DOCSER" ms:datatype="varchar(10)"/>
							<xs:element name="DOCNUM" minOccurs="0" maxOccurs="1" ms:field="DOCNUM" ms:datatype="varchar(20)"/>
							<xs:element name="SNILS" minOccurs="0" maxOccurs="1" ms:field="SNILS" ms:datatype="varchar(14)"/>
							<xs:element name="OKATOG" minOccurs="0" maxOccurs="1" ms:field="OKATOG" ms:datatype="varchar(11)"/>
							<xs:element name="OKATOP" minOccurs="0" maxOccurs="1" ms:field="OKATOP" ms:datatype="varchar(11)"/>
							<xs:element name="COMENTP" minOccurs="0" maxOccurs="1" ms:field="COMENTP" ms:datatype="varchar(250)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="md5" ms:field="MD5" ms:datatype="varchar(32)"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
')
GO
INSERT [dbo].[shems] ([id], [tip], [version], [xsd]) VALUES (3, N'D', N'3.0', N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ms="urn:schemas-microsoft-com:mapping-schema">
	<xs:annotation>
		<xs:appinfo>
			<ms:relationship name="Files_Pacient" parent="Files" parent-key="ID_FILES" child="Pacient" child-key="ID_FILES"/>
			<ms:relationship name="Pacient_SLUCH" parent="Pacient" parent-key="ID_PACIENT" child="Z_SL" child-key="ID_PACIENT"/>
			<ms:relationship name="Z_SL_OS_SLUCH" parent="Z_SL" parent-key="ID_Z_SL" child="OS_SLUCH" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_SL" parent="Z_SL" parent-key="ID_Z_SL" child="Sluch" child-key="ID_Z_SL"/>
			<ms:relationship name="SL_SANK" parent="Sluch" parent-key="ID_SLUCH" child="SANK" child-key="SLUCH_ID"/>
			<ms:relationship name="SL_USL" parent="Sluch" parent-key="ID_SLUCH" child="Usl" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS2_N" parent="Sluch" parent-key="ID_SLUCH" child="DS2_N" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_NAZ" parent="Sluch" parent-key="ID_SLUCH" child="NAZ" child-key="ID_SLUCH"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:element name="ZL_LIST" ms:relation="Files">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ZGLV" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="VERSION" minOccurs="1" maxOccurs="1" ms:field="VERSION" ms:datatype="varchar(5)"/>
							<xs:element name="DATA" minOccurs="1" maxOccurs="1" ms:field="DATA" ms:datatype="smalldatetime"/>
							<xs:element name="FILENAME" minOccurs="1" maxOccurs="1" ms:field="FILENAME" ms:datatype="varchar(26)"/>
							<xs:element name="SD_Z" minOccurs="1" maxOccurs="1" ms:field="SD_Z" ms:datatype="numeric(9,0)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="SCHET" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="CODE" minOccurs="1" maxOccurs="1" ms:field="CODE" ms:datatype="numeric(8,0)"/>
							<xs:element name="CODE_MO" minOccurs="1" maxOccurs="1" ms:field="CODE_MO" ms:datatype="varchar(6)"/>
							<xs:element name="YEAR" minOccurs="1" maxOccurs="1" ms:field="YEAR" ms:datatype="numeric(4,0)"/>
							<xs:element name="MONTH" minOccurs="1" maxOccurs="1" ms:field="MONTH" ms:datatype="numeric(2,0)"/>
							<xs:element name="NSCHET" minOccurs="1" maxOccurs="1" ms:field="NSCHET" ms:datatype="varchar(15)"/>
							<xs:element name="DSCHET" minOccurs="1" maxOccurs="1" ms:field="DSCHET" ms:datatype="smalldatetime"/>
							<xs:element name="PLAT" minOccurs="1" maxOccurs="1" ms:field="PLAT" ms:datatype="varchar(5)"/>
							<xs:element name="SUMMAV" minOccurs="1" maxOccurs="1" ms:field="SUMMAV" ms:datatype="numeric(15,2)"/>
							<xs:element name="COMENTS" minOccurs="1" maxOccurs="1" ms:field="COMENTS" ms:datatype="varchar(250)"/>
							<xs:element name="SUMMAP" minOccurs="1" maxOccurs="1" ms:field="SUMMAP" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEK" minOccurs="1" maxOccurs="1" ms:field="SANK_MEK" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEE" minOccurs="1" maxOccurs="1" ms:field="SANK_MEE" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_EKMP" minOccurs="1" maxOccurs="1" ms:field="SANK_EKMP" ms:datatype="numeric(15,2)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="ZAP" minOccurs="1" maxOccurs="unbounded" ms:relation="Pacient" ms:relationship="Files_Pacient">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="N_ZAP" minOccurs="1" maxOccurs="1" ms:field="N_ZAP" ms:datatype="numeric(8,0)"/>
							<xs:element name="PR_NOV" minOccurs="1" maxOccurs="1" ms:field="PR_NOV" ms:datatype="numeric(1,0)"/>
							<xs:element name="PACIENT" minOccurs="1" maxOccurs="1" ms:is-constant="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="ID_PAC" minOccurs="1" maxOccurs="1" ms:field="ID_PAC" ms:datatype="varchar(36)"/>
										<xs:element name="VPOLIS" minOccurs="1" maxOccurs="1" ms:field="VPOLIS" ms:datatype="numeric(1,0)"/>
										<xs:element name="SPOLIS" minOccurs="0" maxOccurs="1" ms:field="SPOLIS" ms:datatype="varchar(10)"/>
										<xs:element name="NPOLIS" minOccurs="1" maxOccurs="1" ms:field="NPOLIS" ms:datatype="varchar(20)"/>
										<xs:element name="ST_OKATO" minOccurs="0" maxOccurs="1" ms:field="ST_OKATO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO" minOccurs="0" maxOccurs="1" ms:field="SMO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_OGRN" minOccurs="0" maxOccurs="1" ms:field="SMO_OGRN" ms:datatype="varchar(15)"/>
										<xs:element name="SMO_OK" minOccurs="0" maxOccurs="1" ms:field="SMO_OK" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_NAM" minOccurs="0" maxOccurs="1" ms:field="SMO_NAM" ms:datatype="varchar(100)"/>
										<xs:element name="INV" minOccurs="0" maxOccurs="1" ms:field="INV" ms:datatype="numeric(1,0)"/>
										<xs:element name="MSE" minOccurs="0" maxOccurs="1" ms:field="MSE" ms:datatype="numeric(1,0)"/>
										<xs:element name="NOVOR" minOccurs="1" maxOccurs="1" ms:field="NOVOR" ms:datatype="varchar(9)"/>
										<xs:element name="VNOV_D" minOccurs="0" maxOccurs="1" ms:field="VNOV_D" ms:datatype="numeric(4,0)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Z_SL" ms:relation="Z_SL" ms:relationship="Pacient_SLUCH">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="IDCASE" minOccurs="1" maxOccurs="1" ms:field="IDCASE" ms:datatype="numeric(11,0)"/>
										<xs:element name="VIDPOM" minOccurs="1" maxOccurs="1" ms:field="VIDPOM" ms:datatype="numeric(4,0)"/>
										<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
										<xs:element name="VBR" minOccurs="1" maxOccurs="1" ms:field="VBR" ms:datatype="numeric(1,0)"/>
										<xs:element name="DATE_Z_1" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_1" ms:datatype="smalldatetime"/>
										<xs:element name="DATE_Z_2" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_2" ms:datatype="smalldatetime"/>
										<xs:element name="P_OTK" minOccurs="1" maxOccurs="1" ms:field="P_OTK" ms:datatype="numeric(1,0)"/>
										<xs:element name="RSLT_D" minOccurs="1" maxOccurs="1" ms:field="RSLT_D" ms:datatype="numeric(2,0)"/>
										<xs:element name="OS_SLUCH" minOccurs="0" maxOccurs="unbounded" ms:relation="OS_SLUCH" ms:field="OS_SLUCH" ms:relationship="Z_SL_OS_SLUCH" ms:datatype="numeric(1,0)"/>
										<xs:element name="SL" minOccurs="1" maxOccurs="unbounded" ms:relation="Sluch" ms:relationship="Z_SL_SL">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="SL_ID" minOccurs="1" maxOccurs="1" ms:field="SL_ID" ms:datatype="varchar(36)"/>
													<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
													<xs:element name="NHISTORY" minOccurs="1" maxOccurs="1" ms:field="NHISTORY" ms:datatype="varchar(50)"/>
													<xs:element name="DATE_1" minOccurs="1" maxOccurs="1" ms:field="DATE_1" ms:datatype="smalldatetime"/>
													<xs:element name="DATE_2" minOccurs="1" maxOccurs="1" ms:field="DATE_2" ms:datatype="smalldatetime"/>
													<xs:element name="DS1" minOccurs="1" maxOccurs="1" ms:field="DS1" ms:datatype="varchar(10)"/>
													<xs:element name="DS1_PR" minOccurs="0" maxOccurs="1" ms:field="DS1_PR" ms:datatype="numeric(1,0)"/>
													<xs:element name="PR_D_N" minOccurs="1" maxOccurs="1" ms:field="PR_D_N" ms:datatype="numeric(1,0)"/>
													<xs:element name="DS2_N" minOccurs="0" maxOccurs="unbounded" ms:relation="DS2_N" ms:relationship="SL_DS2_N">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="DS2" minOccurs="1" maxOccurs="1" ms:field="DS2" ms:datatype="varchar(10)"/>
																<xs:element name="DS2_PR" minOccurs="0" maxOccurs="1" ms:field="DS2_PR" ms:datatype="numeric(1,0)"/>
																<xs:element name="PR_DS2_N" minOccurs="1" maxOccurs="1" ms:field="PR_DS2_N" ms:datatype="numeric(1,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="NAZ" minOccurs="0" maxOccurs="unbounded" ms:relation="NAZ" ms:relationship="SL_NAZ">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="NAZ_N" minOccurs="1" maxOccurs="1" ms:field="NAZ_N" ms:datatype="numeric(2,0)"/>
																<xs:element name="NAZ_R" minOccurs="1" maxOccurs="1" ms:field="NAZ_R" ms:datatype="numeric(2,0)"/>
																<xs:element name="NAZ_SP" minOccurs="0" maxOccurs="1" ms:field="NAZ_SP" ms:datatype="numeric(4,0)"/>
																<xs:element name="NAZ_V" minOccurs="0" maxOccurs="1" ms:field="NAZ_V" ms:datatype="numeric(1,0)"/>
																<xs:element name="NAZ_PMP" minOccurs="0" maxOccurs="1" ms:field="NAZ_PMP" ms:datatype="numeric(3,0)"/>
																<xs:element name="NAZ_PK" minOccurs="0" maxOccurs="1" ms:field="NAZ_PK" ms:datatype="numeric(3,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="ED_COL" minOccurs="0" maxOccurs="1" ms:field="ED_COL" ms:datatype="numeric(7,2)"/>
													<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
													<xs:element name="SUM_M" minOccurs="1" maxOccurs="1" ms:field="SUM_M" ms:datatype="numeric(15,2)"/>
													<xs:element name="SANK" minOccurs="0" maxOccurs="1" ms:relation="SANK" ms:relationship="SL_SANK">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="S_CODE" ms:field="S_CODE" ms:datatype="varchar(36)"/>
																<xs:element name="S_SUM" ms:field="S_SUM" ms:datatype="numeric(15,2)"/>
																<xs:element name="S_TIP" ms:field="S_TIP" ms:datatype="numeric(2,0)"/>
																<xs:element name="S_OSN" ms:field="S_OSN" ms:datatype="numeric(3,0)"/>
																<xs:element name="S_COM" ms:field="S_COM" ms:datatype="varchar(250)"/>
																<xs:element name="S_IST" ms:field="S_IST" ms:datatype="numeric(1,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="USL" minOccurs="0" maxOccurs="unbounded" ms:relation="Usl" ms:relationship="SL_USL">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="IDSERV" minOccurs="1" maxOccurs="1" ms:field="IDSERV" ms:datatype="varchar(36)"/>
																<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
																<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
																<xs:element name="DATE_IN" minOccurs="1" maxOccurs="1" ms:field="DATE_IN" ms:datatype="smalldatetime"/>
																<xs:element name="DATE_OUT" minOccurs="1" maxOccurs="1" ms:field="DATE_OUT" ms:datatype="smalldatetime"/>
																<xs:element name="P_OTK" minOccurs="1" maxOccurs="1" ms:field="P_OTK" ms:datatype="numeric(1,0)"/>
																<xs:element name="CODE_USL" minOccurs="1" maxOccurs="1" ms:field="CODE_USL" ms:datatype="varchar(20)"/>
																<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
																<xs:element name="SUMV_USL" minOccurs="1" maxOccurs="1" ms:field="SUMV_USL" ms:datatype="numeric(15,2)"/>
																<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
																<xs:element name="CODE_MD" minOccurs="1" maxOccurs="1" ms:field="CODE_MD" ms:datatype="varchar(25)"/>
																<xs:element name="COMENTU" minOccurs="0" maxOccurs="1" ms:field="COMENTU" ms:datatype="varchar(250)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="COMENTSL" minOccurs="0" maxOccurs="1" ms:field="COMENTSL" ms:datatype="varchar(250)"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="IDSP" minOccurs="1" maxOccurs="1" ms:field="IDSP" ms:datatype="numeric(2,0)"/>
										<xs:element name="SUMV" minOccurs="1" maxOccurs="1" ms:field="SUMV" ms:datatype="numeric(15,2)"/>
										<xs:element name="OPLATA" minOccurs="0" maxOccurs="1" ms:field="OPLATA" ms:datatype="numeric(1,0)"/>
										<xs:element name="SUMP" minOccurs="0" maxOccurs="1" ms:field="SUMP" ms:datatype="numeric(15,2)"/>
										<xs:element name="SANK_IT" minOccurs="0" maxOccurs="1" ms:field="SANK_IT" ms:datatype="numeric(15,2)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="filename" ms:field="NAME_FILE" ms:datatype="varchar(60)"/>
			<xs:attribute name="md5" ms:field="MD5" ms:datatype="varchar(32)"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
')
GO
INSERT [dbo].[shems] ([id], [tip], [version], [xsd]) VALUES (4, N'H', N'3.1', N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ms="urn:schemas-microsoft-com:mapping-schema">
	<xs:annotation>
		<xs:appinfo>
			<ms:relationship name="Files_Pacient" parent="Files" parent-key="ID_FILES" child="Pacient" child-key="ID_FILES"/>
			<ms:relationship name="Pacient_SLUCH" parent="Pacient" parent-key="ID_PACIENT" child="Z_SL" child-key="ID_PACIENT"/>
			<ms:relationship name="Z_SL_VNOV" parent="Z_SL" parent-key="ID_Z_SL" child="VNOV_M" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_OS_SLUCH" parent="Z_SL" parent-key="ID_Z_SL" child="OS_SLUCH" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_SL" parent="Z_SL" parent-key="ID_Z_SL" child="Sluch" child-key="ID_Z_SL"/>
			<ms:relationship name="SL_SANK" parent="Sluch" parent-key="ID_SLUCH" child="SANK" child-key="SLUCH_ID"/>
			<ms:relationship name="SL_USL" parent="Sluch" parent-key="ID_SLUCH" child="Usl" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_KSG_KPG" parent="Sluch" parent-key="ID_SLUCH" child="KSG_KPG" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS2" parent="Sluch" parent-key="ID_SLUCH" child="DS2" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS3" parent="Sluch" parent-key="ID_SLUCH" child="DS3" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_CODE_MES1" parent="Sluch" parent-key="ID_SLUCH" child="CODE_MES1" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_B_DIAG" parent="Sluch" parent-key="ID_SLUCH" child="B_DIAG" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_B_PROT" parent="Sluch" parent-key="ID_SLUCH" child="B_PROT" child-key="ID_SLUCH"/>
			<ms:relationship name="USL_NAPR" parent="Usl" parent-key="ID_USL" child="NAPR" child-key="ID_USL"/>
			<ms:relationship name="KSG_KPG_SL_KOEF" parent="KSG_KPG" parent-key="ID_SLUCH" child="SL_KOEF" child-key="ID_KSG_KPG"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:element name="ZL_LIST" ms:relation="Files">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ZGLV" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="VERSION" minOccurs="1" maxOccurs="1" ms:field="VERSION" ms:datatype="varchar(5)"/>
							<xs:element name="DATA" minOccurs="1" maxOccurs="1" ms:field="DATA" ms:datatype="smalldatetime"/>
							<xs:element name="FILENAME" minOccurs="1" maxOccurs="1" ms:field="FILENAME" ms:datatype="varchar(26)"/>
							<xs:element name="SD_Z" minOccurs="1" maxOccurs="1" ms:field="SD_Z" ms:datatype="numeric(9,0)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="SCHET" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="CODE" minOccurs="1" maxOccurs="1" ms:field="CODE" ms:datatype="numeric(8,0)"/>
							<xs:element name="CODE_MO" minOccurs="1" maxOccurs="1" ms:field="CODE_MO" ms:datatype="varchar(6)"/>
							<xs:element name="YEAR" minOccurs="1" maxOccurs="1" ms:field="YEAR" ms:datatype="numeric(4,0)"/>
							<xs:element name="MONTH" minOccurs="1" maxOccurs="1" ms:field="MONTH" ms:datatype="numeric(2,0)"/>
							<xs:element name="NSCHET" minOccurs="1" maxOccurs="1" ms:field="NSCHET" ms:datatype="varchar(15)"/>
							<xs:element name="DSCHET" minOccurs="1" maxOccurs="1" ms:field="DSCHET" ms:datatype="smalldatetime"/>
							<xs:element name="PLAT" minOccurs="1" maxOccurs="1" ms:field="PLAT" ms:datatype="varchar(5)"/>
							<xs:element name="SUMMAV" minOccurs="1" maxOccurs="1" ms:field="SUMMAV" ms:datatype="numeric(15,2)"/>
							<xs:element name="COMENTS" minOccurs="1" maxOccurs="1" ms:field="COMENTS" ms:datatype="varchar(250)"/>
							<xs:element name="SUMMAP" minOccurs="0" maxOccurs="1" ms:field="SUMMAP" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEK" minOccurs="0" maxOccurs="1" ms:field="SANK_MEK" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEE" minOccurs="0" maxOccurs="1" ms:field="SANK_MEE" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_EKMP" minOccurs="0" maxOccurs="1" ms:field="SANK_EKMP" ms:datatype="numeric(15,2)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="ZAP" minOccurs="1" maxOccurs="unbounded" ms:relation="Pacient" ms:relationship="Files_Pacient">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="N_ZAP" minOccurs="1" maxOccurs="1" ms:field="N_ZAP" ms:datatype="numeric(8,0)"/>
							<xs:element name="PR_NOV" minOccurs="1" maxOccurs="1" ms:field="PR_NOV" ms:datatype="numeric(1,0)"/>
							<xs:element name="PACIENT" minOccurs="1" maxOccurs="1" ms:is-constant="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="ID_PAC" minOccurs="1" maxOccurs="1" ms:field="ID_PAC" ms:datatype="varchar(36)"/>
										<xs:element name="VPOLIS" minOccurs="1" maxOccurs="1" ms:field="VPOLIS" ms:datatype="numeric(1,0)"/>
										<xs:element name="SPOLIS" minOccurs="0" maxOccurs="1" ms:field="SPOLIS" ms:datatype="varchar(10)"/>
										<xs:element name="NPOLIS" minOccurs="1" maxOccurs="1" ms:field="NPOLIS" ms:datatype="varchar(20)"/>
										<xs:element name="ST_OKATO" minOccurs="0" maxOccurs="1" ms:field="ST_OKATO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO" minOccurs="0" maxOccurs="1" ms:field="SMO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_OGRN" minOccurs="0" maxOccurs="1" ms:field="SMO_OGRN" ms:datatype="varchar(15)"/>
										<xs:element name="SMO_OK" minOccurs="0" maxOccurs="1" ms:field="SMO_OK" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_NAM" minOccurs="0" maxOccurs="1" ms:field="SMO_NAM" ms:datatype="varchar(100)"/>
										<xs:element name="INV" minOccurs="0" maxOccurs="1" ms:field="INV" ms:datatype="numeric(1,0)"/>
										<xs:element name="MSE" minOccurs="0" maxOccurs="1" ms:field="MSE" ms:datatype="numeric(1,0)"/>
										<xs:element name="NOVOR" minOccurs="1" maxOccurs="1" ms:field="NOVOR" ms:datatype="varchar(9)"/>
										<xs:element name="VNOV_D" minOccurs="0" maxOccurs="1" ms:field="VNOV_D" ms:datatype="numeric(4,0)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Z_SL" ms:relation="Z_SL" ms:relationship="Pacient_SLUCH">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="IDCASE" minOccurs="1" maxOccurs="1" ms:field="IDCASE" ms:datatype="numeric(11,0)"/>
										<xs:element name="USL_OK" minOccurs="1" maxOccurs="1" ms:field="USL_OK" ms:datatype="numeric(2,0)"/>
										<xs:element name="VIDPOM" minOccurs="1" maxOccurs="1" ms:field="VIDPOM" ms:datatype="numeric(4,0)"/>
										<xs:element name="FOR_POM" minOccurs="1" maxOccurs="1" ms:field="FOR_POM" ms:datatype="numeric(1,0)"/>
										<xs:element name="NPR_MO" minOccurs="0" maxOccurs="1" ms:field="NPR_MO" ms:datatype="varchar(6)"/>
										<xs:element name="NPR_DATE" minOccurs="0" maxOccurs="1" ms:field="NPR_DATE" ms:datatype="smalldatetime"/>
										<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
										<xs:element name="DATE_Z_1" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_1" ms:datatype="smalldatetime"/>
										<xs:element name="DATE_Z_2" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_2" ms:datatype="smalldatetime"/>
										<xs:element name="KD_Z" minOccurs="0" maxOccurs="1" ms:field="KD_Z" ms:datatype="numeric(3,0)"/>
										<xs:element name="VNOV_M" minOccurs="0" maxOccurs="unbounded" ms:relation="VNOV_M" ms:field="VNOV_M" ms:relationship="Z_SL_VNOV" ms:datatype="numeric(4,0)"/>
										<xs:element name="RSLT" minOccurs="1" maxOccurs="1" ms:field="RSLT" ms:datatype="numeric(3,0)"/>
										<xs:element name="ISHOD" minOccurs="1" maxOccurs="1" ms:field="ISHOD" ms:datatype="numeric(3,0)"/>
										<xs:element name="OS_SLUCH" minOccurs="0" maxOccurs="unbounded" ms:relation="OS_SLUCH" ms:field="OS_SLUCH" ms:relationship="Z_SL_OS_SLUCH" ms:datatype="numeric(1,0)"/>
										<xs:element name="VB_P" minOccurs="1" maxOccurs="1" ms:field="VB_P" ms:datatype="numeric(1,0)"/>
										<xs:element name="SL" minOccurs="1" maxOccurs="unbounded" ms:relation="Sluch" ms:relationship="Z_SL_SL">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="SL_ID" minOccurs="1" maxOccurs="1" ms:field="SL_ID" ms:datatype="varchar(36)"/>
													<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
													<xs:element name="PODR" minOccurs="0" maxOccurs="1" ms:field="PODR" ms:datatype="numeric(12,0)"/>
													<xs:element name="PROFIL" minOccurs="1" maxOccurs="1" ms:field="PROFIL" ms:datatype="numeric(3,0)"/>
													<xs:element name="PROFIL_K" minOccurs="0" maxOccurs="1" ms:field="PROFIL_K" ms:datatype="numeric(3,0)"/>
													<xs:element name="DET" minOccurs="1" maxOccurs="1" ms:field="DET" ms:datatype="numeric(1,0)"/>
													<xs:element name="P_CEL" minOccurs="0" maxOccurs="1" ms:field="P_CEL" ms:datatype="varchar(3)"/>
													<xs:element name="NHISTORY" minOccurs="1" maxOccurs="1" ms:field="NHISTORY" ms:datatype="varchar(50)"/>
													<xs:element name="DATE_1" minOccurs="1" maxOccurs="1" ms:field="DATE_1" ms:datatype="smalldatetime"/>
													<xs:element name="DATE_2" minOccurs="1" maxOccurs="1" ms:field="DATE_2" ms:datatype="smalldatetime"/>
													<xs:element name="KD" minOccurs="0" maxOccurs="1" ms:field="KD" ms:datatype="numeric(3,0)"/>
													<xs:element name="DS0" minOccurs="0" maxOccurs="1" ms:field="DS0" ms:datatype="varchar(10)"/>
													<xs:element name="DS1" minOccurs="1" maxOccurs="1" ms:field="DS1" ms:datatype="varchar(10)"/>
													<xs:element name="DS2" minOccurs="0" maxOccurs="unbounded" ms:relation="DS2" ms:field="DS2" ms:relationship="SL_DS2" ms:datatype="varchar(10)"/>
													<xs:element name="DS3" minOccurs="0" maxOccurs="unbounded" ms:relation="DS3" ms:field="DS3" ms:relationship="SL_DS3" ms:datatype="varchar(10)"/>
													<xs:element name="DS_ONK" minOccurs="0" maxOccurs="1" ms:field="DS_ONK" ms:datatype="numeric(1,0)"/>
													<xs:element name="DN" minOccurs="0" maxOccurs="1" ms:field="DN" ms:datatype="numeric(1,0)"/>
													<xs:element name="CODE_MES1" minOccurs="0" maxOccurs="unbounded" ms:relation="CODE_MES1" ms:field="CODE_MES1" ms:relationship="SL_CODE_MES1" ms:datatype="varchar(20)"/>
													<xs:element name="CODE_MES2" minOccurs="0" maxOccurs="1" ms:field="CODE_MES2" ms:datatype="varchar(20)"/>
													
													<xs:element name="ONK_SL" minOccurs="0" maxOccurs="1" ms:is-constant="1">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="DS1_T" minOccurs="0" maxOccurs="1" ms:field="DS1_T" ms:datatype="numeric(1,0)"/>
																<xs:element name="STAD" minOccurs="1" maxOccurs="1" ms:field="STAD" ms:datatype="numeric(3,0)"/>
																<xs:element name="ONK_T" minOccurs="1" maxOccurs="1" ms:field="ONK_T" ms:datatype="numeric(3,0)"/>
																<xs:element name="ONK_N" minOccurs="1" maxOccurs="1" ms:field="ONK_N" ms:datatype="numeric(3,0)"/>
																<xs:element name="ONK_M" minOccurs="1" maxOccurs="1" ms:field="ONK_M" ms:datatype="numeric(3,0)"/>
																<xs:element name="MTSTZ" minOccurs="0" maxOccurs="1" ms:field="MTSTZ" ms:datatype="numeric(1,0)"/>
																<xs:element name="B_DIAG" minOccurs="0" maxOccurs="unbounded"  ms:relation="B_DIAG" ms:relationship="SL_B_DIAG">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="DIAG_TIP" minOccurs="1" maxOccurs="1" ms:field="DIAG_TIP" ms:datatype="numeric(1,0)"/>
																			<xs:element name="DIAG_CODE" minOccurs="1" maxOccurs="1" ms:field="DIAG_CODE" ms:datatype="numeric(3,0)"/>
																			<xs:element name="DIAG_RSLT" minOccurs="1" maxOccurs="1" ms:field="DIAG_RSLT" ms:datatype="numeric(3,0)"/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
																<xs:element name="B_PROT" minOccurs="0" maxOccurs="unbounded" ms:relation="B_PROT" ms:relationship="SL_B_PROT">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="PROT" minOccurs="1" maxOccurs="1" ms:field="PROT" ms:datatype="numeric(1,0)"/>
																			<xs:element name="D_PROT" minOccurs="1" maxOccurs="1" ms:field="D_PROT" ms:datatype="smalldatetime"/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
																<xs:element name="SOD" minOccurs="0" maxOccurs="1" ms:field="SOD" ms:datatype="numeric(3,2)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>													
													
													<xs:element name="KSG_KPG" minOccurs="0" maxOccurs="1" ms:relation="KSG_KPG" ms:relationship="SL_KSG_KPG">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="N_KSG" ms:field="N_KSG" ms:datatype="varchar(20)"/>
																<xs:element name="VER_KSG" ms:field="VER_KSG" ms:datatype="numeric(4,0)"/>
																<xs:element name="KSG_PG" ms:field="KSG_PG" ms:datatype="numeric(1,0)"/>
																<xs:element name="N_KPG" ms:field="N_KPG" ms:datatype="numeric(2,0)"/>
																<xs:element name="KOEF_Z" ms:field="KOEF_Z" ms:datatype="numeric(7,5)"/>
																<xs:element name="KOEF_UP" ms:field="KOEF_UP" ms:datatype="numeric(7,5)"/>
																<xs:element name="BZTSZ" ms:field="BZTSZ" ms:datatype="numeric(8,2)"/>
																<xs:element name="KOEF_D" ms:field="KOEF_D" ms:datatype="numeric(7,5)"/>
																<xs:element name="KOEF_U" ms:field="KOEF_U" ms:datatype="numeric(7,5)"/>
																<xs:element name="DKK1" ms:field="DKK1" ms:datatype="varchar(10)"/>
																<xs:element name="DKK2" ms:field="DKK2" ms:datatype="varchar(10)"/>
																<xs:element name="SL_K" ms:field="SL_K" ms:datatype="numeric(1,0)"/>
																<xs:element name="IT_SL" ms:field="IT_SL" ms:datatype="numeric(6,5)"/>
																<xs:element name="SL_KOEF" minOccurs="0" maxOccurs="unbounded" ms:relation="SL_KOEF" ms:relationship="KSG_KPG_SL_KOEF">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="IDSL" ms:field="IDSL" ms:datatype="numeric(4,0)"/>
																			<xs:element name="Z_SL" ms:field="Z_SL" ms:datatype="numeric(3,2)"/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="REAB" minOccurs="0" maxOccurs="1" ms:field="REAB" ms:datatype="numeric(1,0)"/>
													<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
													<xs:element name="VERS_SPEC" minOccurs="1" maxOccurs="1" ms:field="VERS_SPEC" ms:datatype="varchar(4)"/>
													<xs:element name="IDDOKT" minOccurs="1" maxOccurs="1" ms:field="IDDOKT" ms:datatype="varchar(25)"/>
													<xs:element name="ED_COL" minOccurs="0" maxOccurs="1" ms:field="ED_COL" ms:datatype="numeric(7,2)"/>
													<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
													<xs:element name="SUM_M" minOccurs="1" maxOccurs="1" ms:field="SUM_M" ms:datatype="numeric(15,2)"/>
													<xs:element name="SANK" minOccurs="0" maxOccurs="1" ms:relation="SANK" ms:relationship="SL_SANK">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="S_CODE" ms:field="S_CODE" ms:datatype="varchar(36)"/>
																<xs:element name="S_SUM" ms:field="S_SUM" ms:datatype="numeric(15,2)"/>
																<xs:element name="S_TIP" ms:field="S_TIP" ms:datatype="numeric(2,0)"/>
																<xs:element name="S_OSN" ms:field="S_OSN" ms:datatype="numeric(3,0)"/>
																<xs:element name="S_COM" ms:field="S_COM" ms:datatype="varchar(250)"/>
																<xs:element name="S_IST" ms:field="S_IST" ms:datatype="numeric(1,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="USL" minOccurs="0" maxOccurs="unbounded" ms:relation="Usl" ms:relationship="SL_USL">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="IDSERV" minOccurs="1" maxOccurs="1" ms:field="IDSERV" ms:datatype="varchar(36)"/>
																<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
																<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
																<xs:element name="PODR" minOccurs="0" maxOccurs="1" ms:field="PODR" ms:datatype="numeric(12,0)"/>
																<xs:element name="PROFIL" minOccurs="1" maxOccurs="1" ms:field="PROFIL" ms:datatype="numeric(3,0)"/>
																<xs:element name="VID_VME" minOccurs="0" maxOccurs="1" ms:field="VID_VME" ms:datatype="varchar(15)"/>
																<xs:element name="DET" minOccurs="1" maxOccurs="1" ms:field="DET" ms:datatype="numeric(1,0)"/>
																<xs:element name="DATE_IN" minOccurs="1" maxOccurs="1" ms:field="DATE_IN" ms:datatype="smalldatetime"/>
																<xs:element name="DATE_OUT" minOccurs="1" maxOccurs="1" ms:field="DATE_OUT" ms:datatype="smalldatetime"/>
																<xs:element name="DS" minOccurs="1" maxOccurs="1" ms:field="DS" ms:datatype="varchar(10)"/>
																<xs:element name="CODE_USL" minOccurs="1" maxOccurs="1" ms:field="CODE_USL" ms:datatype="varchar(20)"/>
																<xs:element name="KOL_USL" minOccurs="1" maxOccurs="1" ms:field="KOL_USL" ms:datatype="numeric(8,2)"/>
																<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
																<xs:element name="SUMV_USL" minOccurs="1" maxOccurs="1" ms:field="SUMV_USL" ms:datatype="numeric(15,2)"/>
																<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
																<xs:element name="CODE_MD" minOccurs="1" maxOccurs="1" ms:field="CODE_MD" ms:datatype="varchar(25)"/>
																
																<xs:element name="NAPR" minOccurs="0" maxOccurs="unbounded" ms:relation="NAPR" ms:relationship="USL_NAPR">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="NAPR_DATE" minOccurs="1" maxOccurs="1" ms:field="NAPR_DATE" ms:datatype="smalldatetime"/>
																			<xs:element name="MET_V" minOccurs="1" maxOccurs="1" ms:field="MET_V" ms:datatype="numeric(1,0)"/>
																			<xs:element name="MET_ISSL" minOccurs="1" maxOccurs="1" ms:field="MET_ISSL" ms:datatype="numeric(1,0)"/>
																			<xs:element name="NAPR_USL" minOccurs="1" maxOccurs="1" ms:field="NAPR_USL" ms:datatype="varchar(15)"/>
																		</xs:sequence>
																		</xs:complexType>
																</xs:element>
																<xs:element name="ONK_USL" minOccurs="0" maxOccurs="1" ms:is-constant="1">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="PR_CONS" minOccurs="0" maxOccurs="1" ms:field="PR_CONS" ms:datatype="numeric(1,0)"/>
																			<xs:element name="USL_TIP" minOccurs="1" maxOccurs="1" ms:field="USL_TIP" ms:datatype="numeric(1,0)"/>
																			<xs:element name="HIR_TIP" minOccurs="0" maxOccurs="1" ms:field="HIR_TIP" ms:datatype="numeric(1,0)"/>
																			<xs:element name="LEK_TIP_L" minOccurs="0" maxOccurs="1" ms:field="LEK_TIP_L" ms:datatype="numeric(1,0)"/>
																			<xs:element name="LEK_TIP_V" minOccurs="0" maxOccurs="1" ms:field="LEK_TIP_V" ms:datatype="numeric(1,0)"/>
																			<xs:element name="LUCH_TIP" minOccurs="0" maxOccurs="1" ms:field="LUCH_TIP" ms:datatype="numeric(1,0)"/>
																		</xs:sequence>
																		</xs:complexType>
																</xs:element>
																																
																<xs:element name="NPL" minOccurs="0" maxOccurs="1" ms:field="NPL" ms:datatype="numeric(1,0)"/>
																<xs:element name="COMENTU" minOccurs="0" maxOccurs="1" ms:field="COMENTU" ms:datatype="varchar(250)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="COMENTSL" minOccurs="0" maxOccurs="1" ms:field="COMENTSL" ms:datatype="varchar(250)"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="IDSP" minOccurs="1" maxOccurs="1" ms:field="IDSP" ms:datatype="numeric(2,0)"/>
										<xs:element name="SUMV" minOccurs="1" maxOccurs="1" ms:field="SUMV" ms:datatype="numeric(15,2)"/>
										<xs:element name="OPLATA" minOccurs="0" maxOccurs="1" ms:field="OPLATA" ms:datatype="numeric(1,0)"/>
										<xs:element name="SUMP" minOccurs="0" maxOccurs="1" ms:field="SUMP" ms:datatype="numeric(15,2)"/>
										<xs:element name="SANK_IT" minOccurs="0" maxOccurs="1" ms:field="SANK_IT" ms:datatype="numeric(15,2)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="filename" ms:field="NAME_FILE" ms:datatype="varchar(60)"/>
			<xs:attribute name="md5" ms:field="MD5" ms:datatype="varchar(32)"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
')
GO
INSERT [dbo].[shems] ([id], [tip], [version], [xsd]) VALUES (5, N'T', N'3.0', N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ms="urn:schemas-microsoft-com:mapping-schema">
	<xs:annotation>
		<xs:appinfo>
			<ms:relationship name="Files_Pacient" parent="Files" parent-key="ID_FILES" child="Pacient" child-key="ID_FILES"/>
			<ms:relationship name="Pacient_SLUCH" parent="Pacient" parent-key="ID_PACIENT" child="Z_SL" child-key="ID_PACIENT"/>
			<ms:relationship name="Z_SL_VNOV" parent="Z_SL" parent-key="ID_Z_SL" child="VNOV_M" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_OS_SLUCH" parent="Z_SL" parent-key="ID_Z_SL" child="OS_SLUCH" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_SL" parent="Z_SL" parent-key="ID_Z_SL" child="Sluch" child-key="ID_Z_SL"/>
			<ms:relationship name="SL_SANK" parent="Sluch" parent-key="ID_SLUCH" child="SANK" child-key="SLUCH_ID"/>
			<ms:relationship name="SL_USL" parent="Sluch" parent-key="ID_SLUCH" child="Usl" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS2" parent="Sluch" parent-key="ID_SLUCH" child="DS2" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS3" parent="Sluch" parent-key="ID_SLUCH" child="DS3" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_CODE_MES1" parent="Sluch" parent-key="ID_SLUCH" child="CODE_MES1" child-key="ID_SLUCH"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:element name="ZL_LIST" ms:relation="Files">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ZGLV" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="VERSION" minOccurs="1" maxOccurs="1" ms:field="VERSION" ms:datatype="varchar(5)"/>
							<xs:element name="DATA" minOccurs="1" maxOccurs="1" ms:field="DATA" ms:datatype="smalldatetime"/>
							<xs:element name="FILENAME" minOccurs="1" maxOccurs="1" ms:field="FILENAME" ms:datatype="varchar(26)"/>
							<xs:element name="SD_Z" minOccurs="1" maxOccurs="1" ms:field="SD_Z" ms:datatype="numeric(9,0)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="SCHET" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="CODE" minOccurs="1" maxOccurs="1" ms:field="CODE" ms:datatype="numeric(8,0)"/>
							<xs:element name="CODE_MO" minOccurs="1" maxOccurs="1" ms:field="CODE_MO" ms:datatype="varchar(6)"/>
							<xs:element name="YEAR" minOccurs="1" maxOccurs="1" ms:field="YEAR" ms:datatype="numeric(4,0)"/>
							<xs:element name="MONTH" minOccurs="1" maxOccurs="1" ms:field="MONTH" ms:datatype="numeric(2,0)"/>
							<xs:element name="NSCHET" minOccurs="1" maxOccurs="1" ms:field="NSCHET" ms:datatype="varchar(15)"/>
							<xs:element name="DSCHET" minOccurs="1" maxOccurs="1" ms:field="DSCHET" ms:datatype="smalldatetime"/>
							<xs:element name="PLAT" minOccurs="1" maxOccurs="1" ms:field="PLAT" ms:datatype="varchar(5)"/>
							<xs:element name="SUMMAV" minOccurs="1" maxOccurs="1" ms:field="SUMMAV" ms:datatype="numeric(15,2)"/>
							<xs:element name="COMENTS" minOccurs="1" maxOccurs="1" ms:field="COMENTS" ms:datatype="varchar(250)"/>
							<xs:element name="SUMMAP" minOccurs="0" maxOccurs="1" ms:field="SUMMAP" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEK" minOccurs="0" maxOccurs="1" ms:field="SANK_MEK" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEE" minOccurs="0" maxOccurs="1" ms:field="SANK_MEE" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_EKMP" minOccurs="0" maxOccurs="1" ms:field="SANK_EKMP" ms:datatype="numeric(15,2)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="ZAP" minOccurs="1" maxOccurs="unbounded" ms:relation="Pacient" ms:relationship="Files_Pacient">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="N_ZAP" minOccurs="1" maxOccurs="1" ms:field="N_ZAP" ms:datatype="numeric(8,0)"/>
							<xs:element name="PR_NOV" minOccurs="1" maxOccurs="1" ms:field="PR_NOV" ms:datatype="numeric(1,0)"/>
							<xs:element name="PACIENT" minOccurs="1" maxOccurs="1" ms:is-constant="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="ID_PAC" minOccurs="1" maxOccurs="1" ms:field="ID_PAC" ms:datatype="varchar(36)"/>
										<xs:element name="VPOLIS" minOccurs="1" maxOccurs="1" ms:field="VPOLIS" ms:datatype="numeric(1,0)"/>
										<xs:element name="SPOLIS" minOccurs="0" maxOccurs="1" ms:field="SPOLIS" ms:datatype="varchar(10)"/>
										<xs:element name="NPOLIS" minOccurs="1" maxOccurs="1" ms:field="NPOLIS" ms:datatype="varchar(20)"/>
										<xs:element name="ST_OKATO" minOccurs="0" maxOccurs="1" ms:field="ST_OKATO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO" minOccurs="0" maxOccurs="1" ms:field="SMO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_OGRN" minOccurs="0" maxOccurs="1" ms:field="SMO_OGRN" ms:datatype="varchar(15)"/>
										<xs:element name="SMO_OK" minOccurs="0" maxOccurs="1" ms:field="SMO_OK" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_NAM" minOccurs="0" maxOccurs="1" ms:field="SMO_NAM" ms:datatype="varchar(100)"/>
										<xs:element name="INV" minOccurs="0" maxOccurs="1" ms:field="INV" ms:datatype="numeric(1,0)"/>
										<xs:element name="MSE" minOccurs="0" maxOccurs="1" ms:field="MSE" ms:datatype="numeric(1,0)"/>
										<xs:element name="NOVOR" minOccurs="1" maxOccurs="1" ms:field="NOVOR" ms:datatype="varchar(9)"/>
										<xs:element name="VNOV_D" minOccurs="0" maxOccurs="1" ms:field="VNOV_D" ms:datatype="numeric(4,0)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Z_SL" ms:relation="Z_SL" ms:relationship="Pacient_SLUCH">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="IDCASE" minOccurs="1" maxOccurs="1" ms:field="IDCASE" ms:datatype="numeric(11,0)"/>
										<xs:element name="USL_OK" minOccurs="1" maxOccurs="1" ms:field="USL_OK" ms:datatype="numeric(2,0)"/>
										<xs:element name="VIDPOM" minOccurs="1" maxOccurs="1" ms:field="VIDPOM" ms:datatype="numeric(4,0)"/>
										<xs:element name="FOR_POM" minOccurs="1" maxOccurs="1" ms:field="FOR_POM" ms:datatype="numeric(1,0)"/>
										<xs:element name="NPR_MO" minOccurs="0" maxOccurs="1" ms:field="NPR_MO" ms:datatype="varchar(6)"/>
										<xs:element name="NPR_DATE" minOccurs="0" maxOccurs="1" ms:field="NPR_DATE" ms:datatype="smalldatetime"/>
										<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
										<xs:element name="DATE_Z_1" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_1" ms:datatype="smalldatetime"/>
										<xs:element name="DATE_Z_2" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_2" ms:datatype="smalldatetime"/>
										<xs:element name="KD_Z" minOccurs="0" maxOccurs="1" ms:field="KD_Z" ms:datatype="numeric(3,0)"/>
										<xs:element name="VNOV_M" minOccurs="0" maxOccurs="unbounded" ms:relation="VNOV_M" ms:field="VNOV_M" ms:relationship="Z_SL_VNOV" ms:datatype="numeric(4,0)"/>
										<xs:element name="RSLT" minOccurs="1" maxOccurs="1" ms:field="RSLT" ms:datatype="numeric(3,0)"/>
										<xs:element name="ISHOD" minOccurs="1" maxOccurs="1" ms:field="ISHOD" ms:datatype="numeric(3,0)"/>
										<xs:element name="OS_SLUCH" minOccurs="0" maxOccurs="unbounded" ms:relation="OS_SLUCH" ms:field="OS_SLUCH" ms:relationship="Z_SL_OS_SLUCH" ms:datatype="numeric(1,0)"/>
										<xs:element name="VB_P" minOccurs="1" maxOccurs="1" ms:field="VB_P" ms:datatype="numeric(1,0)"/>
										<xs:element name="SL" minOccurs="1" maxOccurs="unbounded" ms:relation="Sluch" ms:relationship="Z_SL_SL">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="SL_ID" minOccurs="1" maxOccurs="1" ms:field="SL_ID" ms:datatype="varchar(36)"/>
													<xs:element name="VID_HMP" minOccurs="1" maxOccurs="1" ms:field="VID_HMP" ms:datatype="varchar(12)"/>
													<xs:element name="METOD_HMP" minOccurs="1" maxOccurs="1" ms:field="METOD_HMP" ms:datatype="numeric(3)"/>
													<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
													<xs:element name="PODR" minOccurs="0" maxOccurs="1" ms:field="PODR" ms:datatype="numeric(12,0)"/>
													<xs:element name="PROFIL" minOccurs="1" maxOccurs="1" ms:field="PROFIL" ms:datatype="numeric(3,0)"/>
													<xs:element name="PROFIL_K" minOccurs="0" maxOccurs="1" ms:field="PROFIL_K" ms:datatype="numeric(3,0)"/>
													<xs:element name="DET" minOccurs="1" maxOccurs="1" ms:field="DET" ms:datatype="numeric(1,0)"/>
													<xs:element name="TAL_D" minOccurs="1" maxOccurs="1" ms:field="TAL_D" ms:datatype="smalldatetime"/>
													<xs:element name="TAL_NUM" minOccurs="1" maxOccurs="1" ms:field="TAL_NUM" ms:datatype="varchar(20)"/>
													<xs:element name="TAL_P" minOccurs="1" maxOccurs="1" ms:field="TAL_P" ms:datatype="smalldatetime"/>
													<xs:element name="NHISTORY" minOccurs="1" maxOccurs="1" ms:field="NHISTORY" ms:datatype="varchar(50)"/>
													<xs:element name="DATE_1" minOccurs="1" maxOccurs="1" ms:field="DATE_1" ms:datatype="smalldatetime"/>
													<xs:element name="DATE_2" minOccurs="1" maxOccurs="1" ms:field="DATE_2" ms:datatype="smalldatetime"/>
													<xs:element name="DS0" minOccurs="0" maxOccurs="1" ms:field="DS0" ms:datatype="varchar(10)"/>
													<xs:element name="DS1" minOccurs="1" maxOccurs="1" ms:field="DS1" ms:datatype="varchar(10)"/>
													<xs:element name="DS2" minOccurs="0" maxOccurs="unbounded" ms:relation="DS2" ms:field="DS2" ms:relationship="SL_DS2" ms:datatype="varchar(10)"/>
													<xs:element name="DS3" minOccurs="0" maxOccurs="unbounded" ms:relation="DS3" ms:field="DS3" ms:relationship="SL_DS3" ms:datatype="varchar(10)"/>
													<xs:element name="DN" minOccurs="0" maxOccurs="1" ms:field="DN" ms:datatype="numeric(1,0)"/>
													<xs:element name="CODE_MES1" minOccurs="0" maxOccurs="unbounded" ms:relation="CODE_MES1" ms:field="CODE_MES1" ms:relationship="SL_CODE_MES1" ms:datatype="varchar(20)"/>
													<xs:element name="CODE_MES2" minOccurs="0" maxOccurs="1" ms:field="CODE_MES2" ms:datatype="varchar(20)"/>
													<xs:element name="REAB" minOccurs="0" maxOccurs="1" ms:field="REAB" ms:datatype="numeric(1,0)"/>
													<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
													<xs:element name="VERS_SPEC" minOccurs="1" maxOccurs="1" ms:field="VERS_SPEC" ms:datatype="varchar(4)"/>
													<xs:element name="IDDOKT" minOccurs="1" maxOccurs="1" ms:field="IDDOKT" ms:datatype="varchar(25)"/>
													<xs:element name="ED_COL" minOccurs="0" maxOccurs="1" ms:field="ED_COL" ms:datatype="numeric(7,2)"/>
													<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
													<xs:element name="SUM_M" minOccurs="1" maxOccurs="1" ms:field="SUM_M" ms:datatype="numeric(15,2)"/>
													<xs:element name="SANK" minOccurs="0" maxOccurs="1" ms:relation="SANK" ms:relationship="SL_SANK">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="S_CODE" ms:field="S_CODE" ms:datatype="varchar(36)"/>
																<xs:element name="S_SUM" ms:field="S_SUM" ms:datatype="numeric(15,2)"/>
																<xs:element name="S_TIP" ms:field="S_TIP" ms:datatype="numeric(2,0)"/>
																<xs:element name="S_OSN" ms:field="S_OSN" ms:datatype="numeric(3,0)"/>
																<xs:element name="S_COM" ms:field="S_COM" ms:datatype="varchar(250)"/>
																<xs:element name="S_IST" ms:field="S_IST" ms:datatype="numeric(1,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="USL" minOccurs="0" maxOccurs="unbounded" ms:relation="Usl" ms:relationship="SL_USL">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="IDSERV" minOccurs="1" maxOccurs="1" ms:field="IDSERV" ms:datatype="varchar(36)"/>
																<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
																<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
																<xs:element name="PODR" minOccurs="0" maxOccurs="1" ms:field="PODR" ms:datatype="numeric(12,0)"/>
																<xs:element name="PROFIL" minOccurs="1" maxOccurs="1" ms:field="PROFIL" ms:datatype="numeric(3,0)"/>
																<xs:element name="VID_VME" minOccurs="0" maxOccurs="1" ms:field="VID_VME" ms:datatype="varchar(15)"/>
																<xs:element name="DET" minOccurs="1" maxOccurs="1" ms:field="DET" ms:datatype="numeric(1,0)"/>
																<xs:element name="DATE_IN" minOccurs="1" maxOccurs="1" ms:field="DATE_IN" ms:datatype="smalldatetime"/>
																<xs:element name="DATE_OUT" minOccurs="1" maxOccurs="1" ms:field="DATE_OUT" ms:datatype="smalldatetime"/>
																<xs:element name="DS" minOccurs="1" maxOccurs="1" ms:field="DS" ms:datatype="varchar(10)"/>
																<xs:element name="CODE_USL" minOccurs="1" maxOccurs="1" ms:field="CODE_USL" ms:datatype="varchar(20)"/>
																<xs:element name="KOL_USL" minOccurs="1" maxOccurs="1" ms:field="KOL_USL" ms:datatype="numeric(8,2)"/>
																<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
																<xs:element name="SUMV_USL" minOccurs="1" maxOccurs="1" ms:field="SUMV_USL" ms:datatype="numeric(15,2)"/>
																<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
																<xs:element name="CODE_MD" minOccurs="1" maxOccurs="1" ms:field="CODE_MD" ms:datatype="varchar(25)"/>
																<xs:element name="NPL" minOccurs="0" maxOccurs="1" ms:field="NPL" ms:datatype="numeric(1,0)"/>
																<xs:element name="COMENTU" minOccurs="0" maxOccurs="1" ms:field="COMENTU" ms:datatype="varchar(250)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="COMENTSL" minOccurs="0" maxOccurs="1" ms:field="COMENTSL" ms:datatype="varchar(250)"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="IDSP" minOccurs="1" maxOccurs="1" ms:field="IDSP" ms:datatype="numeric(2,0)"/>
										<xs:element name="SUMV" minOccurs="1" maxOccurs="1" ms:field="SUMV" ms:datatype="numeric(15,2)"/>
										<xs:element name="OPLATA" minOccurs="0" maxOccurs="1" ms:field="OPLATA" ms:datatype="numeric(1,0)"/>
										<xs:element name="SUMP" minOccurs="0" maxOccurs="1" ms:field="SUMP" ms:datatype="numeric(15,2)"/>
										<xs:element name="SANK_IT" minOccurs="0" maxOccurs="1" ms:field="SANK_IT" ms:datatype="numeric(15,2)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="filename" ms:field="NAME_FILE" ms:datatype="varchar(60)"/>
			<xs:attribute name="md5" ms:field="MD5" ms:datatype="varchar(32)"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
')
GO
INSERT [dbo].[shems] ([id], [tip], [version], [xsd]) VALUES (6, N'T', N'3.1', N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ms="urn:schemas-microsoft-com:mapping-schema">
	<xs:annotation>
		<xs:appinfo>
			<ms:relationship name="Files_Pacient" parent="Files" parent-key="ID_FILES" child="Pacient" child-key="ID_FILES"/>
			<ms:relationship name="Pacient_SLUCH" parent="Pacient" parent-key="ID_PACIENT" child="Z_SL" child-key="ID_PACIENT"/>
			<ms:relationship name="Z_SL_VNOV" parent="Z_SL" parent-key="ID_Z_SL" child="VNOV_M" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_OS_SLUCH" parent="Z_SL" parent-key="ID_Z_SL" child="OS_SLUCH" child-key="ID_Z_SL"/>
			<ms:relationship name="Z_SL_SL" parent="Z_SL" parent-key="ID_Z_SL" child="Sluch" child-key="ID_Z_SL"/>
			<ms:relationship name="SL_SANK" parent="Sluch" parent-key="ID_SLUCH" child="SANK" child-key="SLUCH_ID"/>
			<ms:relationship name="SL_USL" parent="Sluch" parent-key="ID_SLUCH" child="Usl" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS2" parent="Sluch" parent-key="ID_SLUCH" child="DS2" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS3" parent="Sluch" parent-key="ID_SLUCH" child="DS3" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_B_DIAG" parent="Sluch" parent-key="ID_SLUCH" child="B_DIAG" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_B_PROT" parent="Sluch" parent-key="ID_SLUCH" child="B_PROT" child-key="ID_SLUCH"/>
			<ms:relationship name="USL_NAPR" parent="Usl" parent-key="ID_USL" child="NAPR" child-key="ID_USL"/>
			<ms:relationship name="SL_CODE_MES1" parent="Sluch" parent-key="ID_SLUCH" child="CODE_MES1" child-key="ID_SLUCH"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:element name="ZL_LIST" ms:relation="Files">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ZGLV" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="VERSION" minOccurs="1" maxOccurs="1" ms:field="VERSION" ms:datatype="varchar(5)"/>
							<xs:element name="DATA" minOccurs="1" maxOccurs="1" ms:field="DATA" ms:datatype="smalldatetime"/>
							<xs:element name="FILENAME" minOccurs="1" maxOccurs="1" ms:field="FILENAME" ms:datatype="varchar(26)"/>
							<xs:element name="SD_Z" minOccurs="1" maxOccurs="1" ms:field="SD_Z" ms:datatype="numeric(9,0)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="SCHET" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="CODE" minOccurs="1" maxOccurs="1" ms:field="CODE" ms:datatype="numeric(8,0)"/>
							<xs:element name="CODE_MO" minOccurs="1" maxOccurs="1" ms:field="CODE_MO" ms:datatype="varchar(6)"/>
							<xs:element name="YEAR" minOccurs="1" maxOccurs="1" ms:field="YEAR" ms:datatype="numeric(4,0)"/>
							<xs:element name="MONTH" minOccurs="1" maxOccurs="1" ms:field="MONTH" ms:datatype="numeric(2,0)"/>
							<xs:element name="NSCHET" minOccurs="1" maxOccurs="1" ms:field="NSCHET" ms:datatype="varchar(15)"/>
							<xs:element name="DSCHET" minOccurs="1" maxOccurs="1" ms:field="DSCHET" ms:datatype="smalldatetime"/>
							<xs:element name="PLAT" minOccurs="1" maxOccurs="1" ms:field="PLAT" ms:datatype="varchar(5)"/>
							<xs:element name="SUMMAV" minOccurs="1" maxOccurs="1" ms:field="SUMMAV" ms:datatype="numeric(15,2)"/>
							<xs:element name="COMENTS" minOccurs="1" maxOccurs="1" ms:field="COMENTS" ms:datatype="varchar(250)"/>
							<xs:element name="SUMMAP" minOccurs="0" maxOccurs="1" ms:field="SUMMAP" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEK" minOccurs="0" maxOccurs="1" ms:field="SANK_MEK" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEE" minOccurs="0" maxOccurs="1" ms:field="SANK_MEE" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_EKMP" minOccurs="0" maxOccurs="1" ms:field="SANK_EKMP" ms:datatype="numeric(15,2)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="ZAP" minOccurs="1" maxOccurs="unbounded" ms:relation="Pacient" ms:relationship="Files_Pacient">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="N_ZAP" minOccurs="1" maxOccurs="1" ms:field="N_ZAP" ms:datatype="numeric(8,0)"/>
							<xs:element name="PR_NOV" minOccurs="1" maxOccurs="1" ms:field="PR_NOV" ms:datatype="numeric(1,0)"/>
							<xs:element name="PACIENT" minOccurs="1" maxOccurs="1" ms:is-constant="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="ID_PAC" minOccurs="1" maxOccurs="1" ms:field="ID_PAC" ms:datatype="varchar(36)"/>
										<xs:element name="VPOLIS" minOccurs="1" maxOccurs="1" ms:field="VPOLIS" ms:datatype="numeric(1,0)"/>
										<xs:element name="SPOLIS" minOccurs="0" maxOccurs="1" ms:field="SPOLIS" ms:datatype="varchar(10)"/>
										<xs:element name="NPOLIS" minOccurs="1" maxOccurs="1" ms:field="NPOLIS" ms:datatype="varchar(20)"/>
										<xs:element name="ST_OKATO" minOccurs="0" maxOccurs="1" ms:field="ST_OKATO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO" minOccurs="0" maxOccurs="1" ms:field="SMO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_OGRN" minOccurs="0" maxOccurs="1" ms:field="SMO_OGRN" ms:datatype="varchar(15)"/>
										<xs:element name="SMO_OK" minOccurs="0" maxOccurs="1" ms:field="SMO_OK" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_NAM" minOccurs="0" maxOccurs="1" ms:field="SMO_NAM" ms:datatype="varchar(100)"/>
										<xs:element name="INV" minOccurs="0" maxOccurs="1" ms:field="INV" ms:datatype="numeric(1,0)"/>
										<xs:element name="MSE" minOccurs="0" maxOccurs="1" ms:field="MSE" ms:datatype="numeric(1,0)"/>
										<xs:element name="NOVOR" minOccurs="1" maxOccurs="1" ms:field="NOVOR" ms:datatype="varchar(9)"/>
										<xs:element name="VNOV_D" minOccurs="0" maxOccurs="1" ms:field="VNOV_D" ms:datatype="numeric(4,0)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Z_SL" ms:relation="Z_SL" ms:relationship="Pacient_SLUCH">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="IDCASE" minOccurs="1" maxOccurs="1" ms:field="IDCASE" ms:datatype="numeric(11,0)"/>
										<xs:element name="USL_OK" minOccurs="1" maxOccurs="1" ms:field="USL_OK" ms:datatype="numeric(2,0)"/>
										<xs:element name="VIDPOM" minOccurs="1" maxOccurs="1" ms:field="VIDPOM" ms:datatype="numeric(4,0)"/>
										<xs:element name="FOR_POM" minOccurs="1" maxOccurs="1" ms:field="FOR_POM" ms:datatype="numeric(1,0)"/>
										<xs:element name="NPR_MO" minOccurs="0" maxOccurs="1" ms:field="NPR_MO" ms:datatype="varchar(6)"/>
										<xs:element name="NPR_DATE" minOccurs="0" maxOccurs="1" ms:field="NPR_DATE" ms:datatype="smalldatetime"/>
										<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
										<xs:element name="DATE_Z_1" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_1" ms:datatype="smalldatetime"/>
										<xs:element name="DATE_Z_2" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_2" ms:datatype="smalldatetime"/>
										<xs:element name="KD_Z" minOccurs="0" maxOccurs="1" ms:field="KD_Z" ms:datatype="numeric(3,0)"/>
										<xs:element name="VNOV_M" minOccurs="0" maxOccurs="unbounded" ms:relation="VNOV_M" ms:field="VNOV_M" ms:relationship="Z_SL_VNOV" ms:datatype="numeric(4,0)"/>
										<xs:element name="RSLT" minOccurs="1" maxOccurs="1" ms:field="RSLT" ms:datatype="numeric(3,0)"/>
										<xs:element name="ISHOD" minOccurs="1" maxOccurs="1" ms:field="ISHOD" ms:datatype="numeric(3,0)"/>
										<xs:element name="OS_SLUCH" minOccurs="0" maxOccurs="unbounded" ms:relation="OS_SLUCH" ms:field="OS_SLUCH" ms:relationship="Z_SL_OS_SLUCH" ms:datatype="numeric(1,0)"/>
										<xs:element name="VB_P" minOccurs="1" maxOccurs="1" ms:field="VB_P" ms:datatype="numeric(1,0)"/>
										<xs:element name="SL" minOccurs="1" maxOccurs="unbounded" ms:relation="Sluch" ms:relationship="Z_SL_SL">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="SL_ID" minOccurs="1" maxOccurs="1" ms:field="SL_ID" ms:datatype="varchar(36)"/>
													<xs:element name="VID_HMP" minOccurs="1" maxOccurs="1" ms:field="VID_HMP" ms:datatype="varchar(12)"/>
													<xs:element name="METOD_HMP" minOccurs="1" maxOccurs="1" ms:field="METOD_HMP" ms:datatype="numeric(3)"/>
													<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
													<xs:element name="PODR" minOccurs="0" maxOccurs="1" ms:field="PODR" ms:datatype="numeric(12,0)"/>
													<xs:element name="PROFIL" minOccurs="1" maxOccurs="1" ms:field="PROFIL" ms:datatype="numeric(3,0)"/>
													<xs:element name="PROFIL_K" minOccurs="0" maxOccurs="1" ms:field="PROFIL_K" ms:datatype="numeric(3,0)"/>
													<xs:element name="DET" minOccurs="1" maxOccurs="1" ms:field="DET" ms:datatype="numeric(1,0)"/>
													<xs:element name="TAL_D" minOccurs="1" maxOccurs="1" ms:field="TAL_D" ms:datatype="smalldatetime"/>
													<xs:element name="TAL_NUM" minOccurs="1" maxOccurs="1" ms:field="TAL_NUM" ms:datatype="varchar(20)"/>
													<xs:element name="TAL_P" minOccurs="1" maxOccurs="1" ms:field="TAL_P" ms:datatype="smalldatetime"/>
													<xs:element name="NHISTORY" minOccurs="1" maxOccurs="1" ms:field="NHISTORY" ms:datatype="varchar(50)"/>
													<xs:element name="DATE_1" minOccurs="1" maxOccurs="1" ms:field="DATE_1" ms:datatype="smalldatetime"/>
													<xs:element name="DATE_2" minOccurs="1" maxOccurs="1" ms:field="DATE_2" ms:datatype="smalldatetime"/>
													<xs:element name="DS0" minOccurs="0" maxOccurs="1" ms:field="DS0" ms:datatype="varchar(10)"/>
													<xs:element name="DS1" minOccurs="1" maxOccurs="1" ms:field="DS1" ms:datatype="varchar(10)"/>
													<xs:element name="DS2" minOccurs="0" maxOccurs="unbounded" ms:relation="DS2" ms:field="DS2" ms:relationship="SL_DS2" ms:datatype="varchar(10)"/>
													<xs:element name="DS3" minOccurs="0" maxOccurs="unbounded" ms:relation="DS3" ms:field="DS3" ms:relationship="SL_DS3" ms:datatype="varchar(10)"/>
													<xs:element name="DS_ONK" minOccurs="0" maxOccurs="1" ms:field="DS_ONK" ms:datatype="numeric(1,0)"/>
													<xs:element name="DN" minOccurs="0" maxOccurs="1" ms:field="DN" ms:datatype="numeric(1,0)"/>
													<xs:element name="CODE_MES1" minOccurs="0" maxOccurs="unbounded" ms:relation="CODE_MES1" ms:field="CODE_MES1" ms:relationship="SL_CODE_MES1" ms:datatype="varchar(20)"/>
													<xs:element name="CODE_MES2" minOccurs="0" maxOccurs="1" ms:field="CODE_MES2" ms:datatype="varchar(20)"/>
													<xs:element name="ONK_SL" minOccurs="0" maxOccurs="1" ms:is-constant="1">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="DS1_T" minOccurs="0" maxOccurs="1" ms:field="DS1_T" ms:datatype="numeric(1,0)"/>
																<xs:element name="STAD" minOccurs="1" maxOccurs="1" ms:field="STAD" ms:datatype="numeric(3,0)"/>
																<xs:element name="ONK_T" minOccurs="1" maxOccurs="1" ms:field="ONK_T" ms:datatype="numeric(3,0)"/>
																<xs:element name="ONK_N" minOccurs="1" maxOccurs="1" ms:field="ONK_N" ms:datatype="numeric(3,0)"/>
																<xs:element name="ONK_M" minOccurs="1" maxOccurs="1" ms:field="ONK_M" ms:datatype="numeric(3,0)"/>
																<xs:element name="MTSTZ" minOccurs="0" maxOccurs="1" ms:field="MTSTZ" ms:datatype="numeric(1,0)"/>
																<xs:element name="B_DIAG" minOccurs="0" maxOccurs="unbounded" ms:relation="B_DIAG" ms:relationship="SL_B_DIAG">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="DIAG_TIP" minOccurs="1" maxOccurs="1" ms:field="DIAG_TIP" ms:datatype="numeric(1,0)"/>
																			<xs:element name="DIAG_CODE" minOccurs="1" maxOccurs="1" ms:field="DIAG_CODE" ms:datatype="numeric(3,0)"/>
																			<xs:element name="DIAG_RSLT" minOccurs="1" maxOccurs="1" ms:field="DIAG_RSLT" ms:datatype="numeric(3,0)"/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
																<xs:element name="B_PROT" minOccurs="0" maxOccurs="unbounded" ms:relation="B_PROT" ms:relationship="SL_B_PROT">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="PROT" minOccurs="1" maxOccurs="1" ms:field="PROT" ms:datatype="numeric(1,0)"/>
																			<xs:element name="D_PROT" minOccurs="1" maxOccurs="1" ms:field="D_PROT" ms:datatype="smalldatetime"/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
																<xs:element name="SOD" minOccurs="0" maxOccurs="1" ms:field="SOD" ms:datatype="numeric(3,2)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="REAB" minOccurs="0" maxOccurs="1" ms:field="REAB" ms:datatype="numeric(1,0)"/>
													<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
													<xs:element name="VERS_SPEC" minOccurs="1" maxOccurs="1" ms:field="VERS_SPEC" ms:datatype="varchar(4)"/>
													<xs:element name="IDDOKT" minOccurs="1" maxOccurs="1" ms:field="IDDOKT" ms:datatype="varchar(25)"/>
													<xs:element name="ED_COL" minOccurs="0" maxOccurs="1" ms:field="ED_COL" ms:datatype="numeric(7,2)"/>
													<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
													<xs:element name="SUM_M" minOccurs="1" maxOccurs="1" ms:field="SUM_M" ms:datatype="numeric(15,2)"/>
													<xs:element name="SANK" minOccurs="0" maxOccurs="1" ms:relation="SANK" ms:relationship="SL_SANK">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="S_CODE" ms:field="S_CODE" ms:datatype="varchar(36)"/>
																<xs:element name="S_SUM" ms:field="S_SUM" ms:datatype="numeric(15,2)"/>
																<xs:element name="S_TIP" ms:field="S_TIP" ms:datatype="numeric(2,0)"/>
																<xs:element name="S_OSN" ms:field="S_OSN" ms:datatype="numeric(3,0)"/>
																<xs:element name="S_COM" ms:field="S_COM" ms:datatype="varchar(250)"/>
																<xs:element name="S_IST" ms:field="S_IST" ms:datatype="numeric(1,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="USL" minOccurs="0" maxOccurs="unbounded" ms:relation="Usl" ms:relationship="SL_USL">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="IDSERV" minOccurs="1" maxOccurs="1" ms:field="IDSERV" ms:datatype="varchar(36)"/>
																<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
																<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
																<xs:element name="PODR" minOccurs="0" maxOccurs="1" ms:field="PODR" ms:datatype="numeric(12,0)"/>
																<xs:element name="PROFIL" minOccurs="1" maxOccurs="1" ms:field="PROFIL" ms:datatype="numeric(3,0)"/>
																<xs:element name="VID_VME" minOccurs="0" maxOccurs="1" ms:field="VID_VME" ms:datatype="varchar(15)"/>
																<xs:element name="DET" minOccurs="1" maxOccurs="1" ms:field="DET" ms:datatype="numeric(1,0)"/>
																<xs:element name="DATE_IN" minOccurs="1" maxOccurs="1" ms:field="DATE_IN" ms:datatype="smalldatetime"/>
																<xs:element name="DATE_OUT" minOccurs="1" maxOccurs="1" ms:field="DATE_OUT" ms:datatype="smalldatetime"/>
																<xs:element name="DS" minOccurs="1" maxOccurs="1" ms:field="DS" ms:datatype="varchar(10)"/>
																<xs:element name="CODE_USL" minOccurs="1" maxOccurs="1" ms:field="CODE_USL" ms:datatype="varchar(20)"/>
																<xs:element name="KOL_USL" minOccurs="1" maxOccurs="1" ms:field="KOL_USL" ms:datatype="numeric(8,2)"/>
																<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
																<xs:element name="SUMV_USL" minOccurs="1" maxOccurs="1" ms:field="SUMV_USL" ms:datatype="numeric(15,2)"/>
																<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
																<xs:element name="CODE_MD" minOccurs="1" maxOccurs="1" ms:field="CODE_MD" ms:datatype="varchar(25)"/>
																<xs:element name="NAPR" minOccurs="0" maxOccurs="unbounded" ms:relation="NAPR" ms:relationship="USL_NAPR">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="NAPR_DATE" minOccurs="1" maxOccurs="1" ms:field="NAPR_DATE" ms:datatype="smalldatetime"/>
																			<xs:element name="MET_V" minOccurs="1" maxOccurs="1" ms:field="MET_V" ms:datatype="numeric(1,0)"/>
																			<xs:element name="MET_ISSL" minOccurs="1" maxOccurs="1" ms:field="MET_ISSL" ms:datatype="numeric(1,0)"/>
																			<xs:element name="NAPR_USL" minOccurs="1" maxOccurs="1" ms:field="NAPR_USL" ms:datatype="varchar(15)"/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
																<xs:element name="ONK_USL" minOccurs="0" maxOccurs="1" ms:is-constant="1">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="PR_CONS" minOccurs="0" maxOccurs="1" ms:field="PR_CONS" ms:datatype="numeric(1,0)"/>
																			<xs:element name="USL_TIP" minOccurs="1" maxOccurs="1" ms:field="USL_TIP" ms:datatype="numeric(1,0)"/>
																			<xs:element name="HIR_TIP" minOccurs="0" maxOccurs="1" ms:field="HIR_TIP" ms:datatype="numeric(1,0)"/>
																			<xs:element name="LEK_TIP_L" minOccurs="0" maxOccurs="1" ms:field="LEK_TIP_L" ms:datatype="numeric(1,0)"/>
																			<xs:element name="LEK_TIP_V" minOccurs="0" maxOccurs="1" ms:field="LEK_TIP_V" ms:datatype="numeric(1,0)"/>
																			<xs:element name="LUCH_TIP" minOccurs="0" maxOccurs="1" ms:field="LUCH_TIP" ms:datatype="numeric(1,0)"/>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
																<xs:element name="NPL" minOccurs="0" maxOccurs="1" ms:field="NPL" ms:datatype="numeric(1,0)"/>
																<xs:element name="COMENTU" minOccurs="0" maxOccurs="1" ms:field="COMENTU" ms:datatype="varchar(250)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="COMENTSL" minOccurs="0" maxOccurs="1" ms:field="COMENTSL" ms:datatype="varchar(250)"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="IDSP" minOccurs="1" maxOccurs="1" ms:field="IDSP" ms:datatype="numeric(2,0)"/>
										<xs:element name="SUMV" minOccurs="1" maxOccurs="1" ms:field="SUMV" ms:datatype="numeric(15,2)"/>
										<xs:element name="OPLATA" minOccurs="0" maxOccurs="1" ms:field="OPLATA" ms:datatype="numeric(1,0)"/>
										<xs:element name="SUMP" minOccurs="0" maxOccurs="1" ms:field="SUMP" ms:datatype="numeric(15,2)"/>
										<xs:element name="SANK_IT" minOccurs="0" maxOccurs="1" ms:field="SANK_IT" ms:datatype="numeric(15,2)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="filename" ms:field="NAME_FILE" ms:datatype="varchar(60)"/>
			<xs:attribute name="md5" ms:field="MD5" ms:datatype="varchar(32)"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
')
GO
INSERT [dbo].[shems] ([id], [tip], [version], [xsd]) VALUES (7, N'D', N'3.1', N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ms="urn:schemas-microsoft-com:mapping-schema">
	<xs:annotation>
		<xs:appinfo>
			<ms:relationship name="Files_Pacient" parent="Files" parent-key="ID_FILES" child="Pacient" child-key="ID_FILES"/>
			<ms:relationship name="Pacient_SLUCH" parent="Pacient" parent-key="ID_PACIENT" child="Z_SL" child-key="ID_PACIENT"/>
			<ms:relationship name="Z_SL_SL" parent="Z_SL" parent-key="ID_Z_SL" child="Sluch" child-key="ID_Z_SL"/>
			<ms:relationship name="SL_SANK" parent="Sluch" parent-key="ID_SLUCH" child="SANK" child-key="SLUCH_ID"/>
			<ms:relationship name="SL_USL" parent="Sluch" parent-key="ID_SLUCH" child="Usl" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_DS2_N" parent="Sluch" parent-key="ID_SLUCH" child="DS2_N" child-key="ID_SLUCH"/>
			<ms:relationship name="SL_NAZ" parent="Sluch" parent-key="ID_SLUCH" child="NAZ" child-key="ID_SLUCH"/>
		</xs:appinfo>
	</xs:annotation>
	<xs:annotation/>
	<xs:annotation/>
	<xs:annotation/>
	<xs:element name="ZL_LIST" ms:relation="Files">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ZGLV" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="VERSION" minOccurs="1" maxOccurs="1" ms:field="VERSION" ms:datatype="varchar(5)"/>
							<xs:element name="DATA" minOccurs="1" maxOccurs="1" ms:field="DATA" ms:datatype="smalldatetime"/>
							<xs:element name="FILENAME" minOccurs="1" maxOccurs="1" ms:field="FILENAME" ms:datatype="varchar(26)"/>
							<xs:element name="SD_Z" minOccurs="1" maxOccurs="1" ms:field="SD_Z" ms:datatype="numeric(9,0)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="SCHET" minOccurs="1" maxOccurs="1" ms:is-constant="1">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="CODE" minOccurs="1" maxOccurs="1" ms:field="CODE" ms:datatype="numeric(8,0)"/>
							<xs:element name="CODE_MO" minOccurs="1" maxOccurs="1" ms:field="CODE_MO" ms:datatype="varchar(6)"/>
							<xs:element name="YEAR" minOccurs="1" maxOccurs="1" ms:field="YEAR" ms:datatype="numeric(4,0)"/>
							<xs:element name="MONTH" minOccurs="1" maxOccurs="1" ms:field="MONTH" ms:datatype="numeric(2,0)"/>
							<xs:element name="NSCHET" minOccurs="1" maxOccurs="1" ms:field="NSCHET" ms:datatype="varchar(15)"/>
							<xs:element name="DSCHET" minOccurs="1" maxOccurs="1" ms:field="DSCHET" ms:datatype="smalldatetime"/>
							<xs:element name="PLAT" minOccurs="1" maxOccurs="1" ms:field="PLAT" ms:datatype="varchar(5)"/>
							<xs:element name="SUMMAV" minOccurs="1" maxOccurs="1" ms:field="SUMMAV" ms:datatype="numeric(15,2)"/>
							<xs:element name="COMENTS" minOccurs="1" maxOccurs="1" ms:field="COMENTS" ms:datatype="varchar(250)"/>
							<xs:element name="SUMMAP" minOccurs="0" maxOccurs="1" ms:field="SUMMAP" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEK" minOccurs="0" maxOccurs="1" ms:field="SANK_MEK" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_MEE" minOccurs="0" maxOccurs="1" ms:field="SANK_MEE" ms:datatype="numeric(15,2)"/>
							<xs:element name="SANK_EKMP" minOccurs="0" maxOccurs="1" ms:field="SANK_EKMP" ms:datatype="numeric(15,2)"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="ZAP" minOccurs="1" maxOccurs="unbounded" ms:relation="Pacient" ms:relationship="Files_Pacient">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="N_ZAP" minOccurs="1" maxOccurs="1" ms:field="N_ZAP" ms:datatype="numeric(8,0)"/>
							<xs:element name="PR_NOV" minOccurs="1" maxOccurs="1" ms:field="PR_NOV" ms:datatype="numeric(1,0)"/>
							<xs:element name="PACIENT" minOccurs="1" maxOccurs="1" ms:is-constant="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="ID_PAC" minOccurs="1" maxOccurs="1" ms:field="ID_PAC" ms:datatype="varchar(36)"/>
										<xs:element name="VPOLIS" minOccurs="1" maxOccurs="1" ms:field="VPOLIS" ms:datatype="numeric(1,0)"/>
										<xs:element name="SPOLIS" minOccurs="0" maxOccurs="1" ms:field="SPOLIS" ms:datatype="varchar(10)"/>
										<xs:element name="NPOLIS" minOccurs="1" maxOccurs="1" ms:field="NPOLIS" ms:datatype="varchar(20)"/>
										<xs:element name="ST_OKATO" minOccurs="0" maxOccurs="1" ms:field="ST_OKATO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO" minOccurs="0" maxOccurs="1" ms:field="SMO" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_OGRN" minOccurs="0" maxOccurs="1" ms:field="SMO_OGRN" ms:datatype="varchar(15)"/>
										<xs:element name="SMO_OK" minOccurs="0" maxOccurs="1" ms:field="SMO_OK" ms:datatype="varchar(5)"/>
										<xs:element name="SMO_NAM" minOccurs="0" maxOccurs="1" ms:field="SMO_NAM" ms:datatype="varchar(100)"/>
										<xs:element name="INV" minOccurs="0" maxOccurs="1" ms:field="INV" ms:datatype="numeric(1,0)"/>
										<xs:element name="MSE" minOccurs="0" maxOccurs="1" ms:field="MSE" ms:datatype="numeric(1,0)"/>
										<xs:element name="NOVOR" minOccurs="1" maxOccurs="1" ms:field="NOVOR" ms:datatype="varchar(9)"/>
										<xs:element name="VNOV_D" minOccurs="0" maxOccurs="1" ms:field="VNOV_D" ms:datatype="numeric(4,0)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Z_SL" ms:relation="Z_SL" ms:relationship="Pacient_SLUCH">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="IDCASE" minOccurs="1" maxOccurs="1" ms:field="IDCASE" ms:datatype="numeric(11,0)"/>
										<xs:element name="VIDPOM" minOccurs="1" maxOccurs="1" ms:field="VIDPOM" ms:datatype="numeric(4,0)"/>
										<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
										<xs:element name="VBR" minOccurs="1" maxOccurs="1" ms:field="VBR" ms:datatype="numerik(1,0)"/>
										<xs:element name="DATE_Z_1" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_1" ms:datatype="smalldatetime"/>
										<xs:element name="DATE_Z_2" minOccurs="1" maxOccurs="1" ms:field="DATE_Z_2" ms:datatype="smalldatetime"/>
										<xs:element name="P_OTK" minOccurs="1" maxOccurs="1" ms:field="P_OTK" ms:datatype="numeric(1,0)"/>
										<xs:element name="RSLT_D" minOccurs="1" maxOccurs="1" ms:field="RSLT_D" ms:datatype="numeric(2,0)"/>
										<xs:element name="OS_SLUCH" minOccurs="0" maxOccurs="unbounded" ms:relation="OS_SLUCH" ms:field="OS_SLUCH" ms:relationship="Z_SL_OS_SLUCH" ms:datatype="numeric(1,0)"/>
										<xs:element name="SL" minOccurs="1" maxOccurs="unbounded" ms:relation="Sluch" ms:relationship="Z_SL_SL">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="SL_ID" minOccurs="1" maxOccurs="1" ms:field="SL_ID" ms:datatype="varchar(36)"/>
													<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
													<xs:element name="NHISTORY" minOccurs="1" maxOccurs="1" ms:field="NHISTORY" ms:datatype="varchar(50)"/>
													<xs:element name="DATE_1" minOccurs="1" maxOccurs="1" ms:field="DATE_1" ms:datatype="smalldatetime"/>
													<xs:element name="DATE_2" minOccurs="1" maxOccurs="1" ms:field="DATE_2" ms:datatype="smalldatetime"/>
													<xs:element name="DS1" minOccurs="1" maxOccurs="1" ms:field="DS1" ms:datatype="varchar(10)"/>
													<xs:element name="DS1_PR" minOccurs="0" maxOccurs="1" ms:field="DS1_PR" ms:datatype="numeric(1,0)"/>
													<xs:element name="DS_ONK" minOccurs="0" maxOccurs="1" ms:field="DS_ONK" ms:datatype="numeric(1,0)"/>
													<xs:element name="PR_D_N" minOccurs="1" maxOccurs="1" ms:field="PR_D_N" ms:datatype="numeric(1,0)"/>
													<xs:element name="DS2" minOccurs="0" maxOccurs="unbounded" ms:relation="DS2" ms:field="DS2" ms:relationship="SL_DS2" ms:datatype="varchar(10)"/>
													<xs:element name="DS3" minOccurs="0" maxOccurs="unbounded" ms:relation="DS3" ms:field="DS3" ms:relationship="SL_DS3" ms:datatype="varchar(10)"/>
													<xs:element name="DS2_N" minOccurs="0" maxOccurs="unbounded" ms:relation="DS2_N" ms:relationship="SL_DS2_N">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="DS2" minOccurs="1" maxOccurs="1" ms:field="DS2" ms:datatype="varchar(10)"/>
																<xs:element name="DS2_PR" minOccurs="0" maxOccurs="1" ms:field="DS2_PR" ms:datatype="numeric(1,0)"/>
																<xs:element name="PR_DS2_N" minOccurs="1" maxOccurs="1" ms:field="PR_DS2_N" ms:datatype="numeric(1,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="NAZ" minOccurs="0" maxOccurs="unbounded" ms:relation="NAZ" ms:relationship="SL_NAZ">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="NAZ_N" minOccurs="1" maxOccurs="1" ms:field="NAZ_N" ms:datatype="numeric(2,0)"/>
																<xs:element name="NAZ_R" minOccurs="1" maxOccurs="1" ms:field="NAZ_R" ms:datatype="numeric(2,0)"/>
																<xs:element name="NAZ_SP" minOccurs="0" maxOccurs="1" ms:field="NAZ_SP" ms:datatype="numeric(4,0)"/>
																<xs:element name="NAZ_V" minOccurs="0" maxOccurs="1" ms:field="NAZ_V" ms:datatype="numeric(1,0)"/>
																<xs:element name="NAZ_PMP" minOccurs="0" maxOccurs="1" ms:field="NAZ_PMP" ms:datatype="numeric(3,0)"/>
																<xs:element name="NAZ_PK" minOccurs="0" maxOccurs="1" ms:field="NAZ_PK" ms:datatype="numeric(3,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="ED_COL" minOccurs="0" maxOccurs="1" ms:field="ED_COL" ms:datatype="numeric(7,2)"/>
													<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
													<xs:element name="SUM_M" minOccurs="1" maxOccurs="1" ms:field="SUM_M" ms:datatype="numeric(15,2)"/>
													<xs:element name="SANK" minOccurs="0" maxOccurs="1" ms:relation="SANK" ms:relationship="SL_SANK">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="S_CODE" ms:field="S_CODE" ms:datatype="varchar(36)"/>
																<xs:element name="S_SUM" ms:field="S_SUM" ms:datatype="numeric(15,2)"/>
																<xs:element name="S_TIP" ms:field="S_TIP" ms:datatype="numeric(2,0)"/>
																<xs:element name="S_OSN" ms:field="S_OSN" ms:datatype="numeric(3,0)"/>
																<xs:element name="S_COM" ms:field="S_COM" ms:datatype="varchar(250)"/>
																<xs:element name="S_IST" ms:field="S_IST" ms:datatype="numeric(1,0)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="USL" minOccurs="0" maxOccurs="unbounded" ms:relation="Usl" ms:relationship="SL_USL">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="IDSERV" minOccurs="1" maxOccurs="1" ms:field="IDSERV" ms:datatype="varchar(36)"/>
																<xs:element name="LPU" minOccurs="1" maxOccurs="1" ms:field="LPU" ms:datatype="varchar(6)"/>
																<xs:element name="LPU_1" minOccurs="0" maxOccurs="1" ms:field="LPU_1" ms:datatype="varchar(8)"/>
																<xs:element name="DATE_IN" minOccurs="1" maxOccurs="1" ms:field="DATE_IN" ms:datatype="smalldatetime"/>
																<xs:element name="DATE_OUT" minOccurs="1" maxOccurs="1" ms:field="DATE_OUT" ms:datatype="smalldatetime"/>
																<xs:element name="P_OTK" minOccurs="1" maxOccurs="1" ms:field="P_OTK" ms:datatype="numeric(1,0)"/>
																<xs:element name="CODE_USL" minOccurs="1" maxOccurs="1" ms:field="CODE_USL" ms:datatype="varchar(20)"/>
																<xs:element name="TARIF" minOccurs="0" maxOccurs="1" ms:field="TARIF" ms:datatype="numeric(15,2)"/>
																<xs:element name="SUMV_USL" minOccurs="1" maxOccurs="1" ms:field="SUMV_USL" ms:datatype="numeric(15,2)"/>
																<xs:element name="PRVS" minOccurs="1" maxOccurs="1" ms:field="PRVS" ms:datatype="numeric(4,0)"/>
																<xs:element name="CODE_MD" minOccurs="1" maxOccurs="1" ms:field="CODE_MD" ms:datatype="varchar(25)"/>
																<xs:element name="COMENTU" minOccurs="0" maxOccurs="1" ms:field="COMENTU" ms:datatype="varchar(250)"/>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
													<xs:element name="COMENTSL" minOccurs="0" maxOccurs="1" ms:field="COMENTSL" ms:datatype="varchar(250)"/>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="IDSP" minOccurs="1" maxOccurs="1" ms:field="IDSP" ms:datatype="numeric(2,0)"/>
										<xs:element name="SUMV" minOccurs="1" maxOccurs="1" ms:field="SUMV" ms:datatype="numeric(15,2)"/>
										<xs:element name="OPLATA" minOccurs="0" maxOccurs="1" ms:field="OPLATA" ms:datatype="numeric(1,0)"/>
										<xs:element name="SUMP" minOccurs="0" maxOccurs="1" ms:field="SUMP" ms:datatype="numeric(15,2)"/>
										<xs:element name="SANK_IT" minOccurs="0" maxOccurs="1" ms:field="SANK_IT" ms:datatype="numeric(15,2)"/>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="filename" ms:field="NAME_FILE" ms:datatype="varchar(60)"/>
			<xs:attribute name="md5" ms:field="MD5" ms:datatype="varchar(32)"/>
		</xs:complexType>
	</xs:element>
</xs:schema>
')
GO
SET IDENTITY_INSERT [dbo].[shems] OFF
GO
