<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title></title>
	<style type="text/css">
		.style3 {
			font-size: 12pt;
		}

		.style4 {
			font-size: 13pt;
		}

		.style5 {
			font-size: 9pt;
		}

		.underline {
			text-decoration: underline;
		}

		.BodyStyle {
			font-family: "Times New Roman", Times, serif;
			background: url('/n.gif') no-repeat;
			background-attachment: fixed;
		}

		.nonprintstyle {
			font-size: 9pt;
			height: 10pt;
			background-color: #FFC;
			width: 99%;
		}

		.nonprintstyleVisit {
			font-size: 9pt;
			height: 10pt;
			background-color: #badbad;
			width: 99%;
		}

		.nonprintstyleEntry {
			font-size: 9pt;
			height: 10pt;
			background-color: #e9f7f6;
			width: 99%;
		}

		.ultranonprint {
			font-size: 12pt;
			height: 10pt;
			width: 99%;
		}

		.nonprintstyle10 {
			font-size: 9pt;
		}

		.nonprintstyle999 {
			font-size: 9pt;
			height: 10pt;
		}

		.printstyle {
			font-size: 9pt;
			height: 10pt;
			background-color: #FFC;
			width: 99%;
		}

		@media print {
			.nonprintstyle {
				display: none;
			}

			.nonprintstyle999 {
				display: none;
			}

			.nonprintstyle10 {
				display: none;
			}

			.printstyle {
				display: block;
			}

			.ultranonprint {
				display: none;
			}

			.nonprintstyleVisit {
				display: none;
			}

			.nonprintstyleEntry {
				display: none;
			}
		}

		.style6, .style6center, .style6left, .style6right {
			font-size: medium;
			font-weight: bold;
			color: #600;
		}

		.style6center {
			text-align: center;
		}

		.style6left {
			text-align: left;
		}

		.style6right {
			text-align: right;
		}
	</style>
</head>
<body class="BodyStyle">
	<script type="text/javascript">
		function changeStyle(obj, namObj) {
			var h = document.getElementsByName(namObj);
			for (var i = 0; i < h.length; i++) {
				var h1 = document.getElementById(h[i].id);
				if (obj == "PrintAll") {
					if (h[i].checked) {
						h1.className = "printstyle";
					}
					else {
						h1.className = "nonprintstyle";
					}
				}
				else {
					if (h[i].id == obj) {
						h1.className = "printstyle";
					}
					else {
						h1.className = "nonprintstyle";
					}
				}
			}
		}
	</script>
	<script type="text/javascript">
		function checkAll(namObj, chked) {
			var h = document.getElementsByName(namObj);
			for (var i = 0; i < h.length; i++) {
				var h1 = document.getElementById(h[i].id);
				h[i].checked = chked;
				if (chked) {
					h1.className = "printstyle";
				}
				else {
					h1.className = "nonprintstyle";
				}
			}
		}
	</script>

	<table class="nonprintstyle">
		<tr>
			<td width="1%" class="style6left">
				<a href="PrintAll" onclick="changeStyle('PrintAll', 'printDiv');" class="nonprintstyle" style="font-size: 12pt;">Распечатать посещения</a>
			</td>
			<td width="1%" class="style6left"> (</td>
			<td width="1%" class="style6left">
				<a href="CheckAll" onclick="checkAll('printDiv', true);" class="nonprintstyle" style="font-size: 12pt;">Все</a>
			</td>
			<td width="1%" class="style6left"> |</td>
			<td width="1%" class="style6left">
				<a href="UnCheckAll" onclick="checkAll('printDiv', false);" class="nonprintstyle" style="font-size: 12pt;">Выборочно</a>
			</td>
			<td width="1%" class="style6left"> )</td>
			<td align="right">
				<div style="text-align: right; font-size: xx-small; background-color: #FFC; width: 96%">
					Подготовлено системой "Витакарта"
				</div>
			</td>
		</tr>
	</table>
	<div class="style4" style="background-color: #FFC; width: 99%">
		<b>Пациент:</b> <i>%%{AmbulanceEvent/AmbulanceCard/Patient/cFIO}%%</i>
		<b>Возраст:</b> <i>
			<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="9000001" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
			%%DateDiff("year", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}) > 0
			? Cast(DateDiff("year", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}), "String") + " " + NumberWord(DateDiff("year", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}),"год","года","лет")
			: DateDiff("month", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}) > 0
			? Cast(DateDiff("month", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}), "String") + " " + NumberWord(DateDiff("month", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}),"месяц","месяца","месяцев")
			: DateDiff("day", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}) > 0
			? Cast(DateDiff("day", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}), "String") + " " + NumberWord(DateDiff("day", {AmbulanceEvent/AmbulanceCard/Patient/Birthday}, {ExaminationDate}),"день","дня","дней")
			: "новорожденный"%%
			<!-- %%#xsl:end%% -->
		</i>
		<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">	<lx:Path OwnerQueryLevel="0">		<lx:StepInt index="5490001" />		<lx:StepInt index="1000001" />	</lx:Path>	<lx:BaseObjectOperand EntityIndex="1" PrimaryKey="584" /></lx:Criterion>'%% -->
		<b>Номер карты:</b> <i>%%{AmbulanceEvent/AmbulanceCard/Number}%%</i>
		<!-- %%#xsl:end%% -->
		<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">	<lx:Path OwnerQueryLevel="0">		<lx:StepInt index="5490001" />		<lx:StepInt index="1000001" />	</lx:Path>	<lx:BaseObjectOperand EntityIndex="1" PrimaryKey="584" /></lx:Criterion>'%% -->
		<b>Номер истории болезни:</b> <i>%%{Movement / MedCardNumber}%%</i>
		<!-- %%#xsl:end%% -->
	</div>
	<!-- %%#xsl:if lexem='<lx:Criteria type="And" xmlns:lx="lexem">    <lx:Criterion type="=">        <lx:Path OwnerQueryLevel="0">            <lx:StepString name="Mkb" />        </lx:Path>        <lx:ConstOperand isNull="1" />    </lx:Criterion>    <lx:Criterion type="=">        <lx:Path OwnerQueryLevel="0">            <lx:StepString name="ObjectProperties" />            <lx:StepString name="IsNew" />        </lx:Path>        <lx:ConstOperand type="Boolean">True</lx:ConstOperand>    </lx:Criterion>    <lx:Criterion type="=">        <lx:Path OwnerQueryLevel="0">            <lx:StepString name="DoctorVisit" />            <lx:StepString name="ObjectProperties" />            <lx:StepString name="IsNew" />        </lx:Path>        <lx:ConstOperand type="Boolean">False</lx:ConstOperand>    </lx:Criterion></lx:Criteria>'%% -->
	<div id="%%{MedicalRecordID}%%" class="nonprintstyle">
		<!--%%#xsl:end%%-->
		<!--%%#xsl:if lexem='<lx:Not xmlns:lx="lexem"><lx:Criteria type="And"><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="IsNew" /></lx:Path><lx:ConstOperand type="Boolean">True</lx:ConstOperand></lx:Criterion><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepString name="Mkb" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepString name="DoctorVisit" /><lx:StepString name="ObjectProperties" /><lx:StepString name="IsNew" /></lx:Path><lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion></lx:Criteria></lx:Not>'%%-->
		<div id="%%{MedicalRecordID}%%" class="nonprintstyle">
			<!--%%#xsl:end%%-->
			<span class="ultranonprint"><input type="checkbox" checked="checked" id="%%{MedicalRecordID}%%" name="printDiv" />Печатать</span>
			<div>
				<table class="ultranonprint" align="center" width="99%">
					<tr>
						<td width="40%" align="left" nowrap="nowrap">
							<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"> <lx:Path OwnerQueryLevel="0"> <lx:StepInt index="9000020" /> <lx:StepInt index="5450006" /> </lx:Path> <lx:BaseObjectOperand isNull="1" EntityIndex="599" /> </lx:Criterion>'%%-->
							<b>Случай закрыт!</b>
							<!--%%#xsl:end%%-->
							<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="AmbulanceEvent" />        <lx:StepString name="CloseDate" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
							<!-- %%#xsl:if lexem='<lx:Criteria type="And" xmlns:lx="lexem">    <lx:CriterionChildExists>        <condition>            <lx:CriterionChildExists>                <condition>                    <lx:Criterion type="=">                        <lx:Path OwnerQueryLevel="0">                            <lx:StepString name="Resource" />                        </lx:Path>                        <lx:ParamHolder>                            <lx:StepString name="CURRENT_POST" />                        </lx:ParamHolder>                    </lx:Criterion>                </condition>                <lx:Path OwnerQueryLevel="0">                    <lx:StepString name="MedicalService" />                    <lx:StepString name="ResourceServices" />                </lx:Path>            </lx:CriterionChildExists>        </condition>        <lx:Path OwnerQueryLevel="0">            <lx:StepString name="AmbulanceEvent" />            <lx:StepString name="EventServices" />        </lx:Path>    </lx:CriterionChildExists>    <lx:Criteria type="Or">        <lx:CriterionChildExists>            <condition>                <lx:CriterionChildExists not="1">                    <condition />                    <lx:Path OwnerQueryLevel="0">                        <lx:StepString name="EntryToMedservices" />                    </lx:Path>                </lx:CriterionChildExists>            </condition>            <lx:Path OwnerQueryLevel="0">                <lx:StepString name="AmbulanceEvent" />                <lx:StepString name="EventServices" />            </lx:Path>        </lx:CriterionChildExists>        <lx:CriterionChildExists>            <condition>                <lx:CriterionChildExists>                    <condition>                        <lx:Criterion type="=">                            <lx:Path OwnerQueryLevel="0">                                <lx:StepString name="Resource" />                            </lx:Path>                            <lx:ParamHolder>                                <lx:StepString name="CURRENT_POST" />                            </lx:ParamHolder>                        </lx:Criterion>                    </condition>                    <lx:Path OwnerQueryLevel="0">                        <lx:StepString name="EntryToMedservices" />                    </lx:Path>                </lx:CriterionChildExists>            </condition>            <lx:Path OwnerQueryLevel="0">                <lx:StepString name="AmbulanceEvent" />                <lx:StepString name="EventServices" />            </lx:Path>        </lx:CriterionChildExists>    </lx:Criteria></lx:Criteria>'%% -->
							<a href="OpenServices" onclick="changeStyle('%%{MedicalRecordID}%%', 'nonprintstyle');">Услуги по случаю обращения</a>
							<!-- %%#xsl:end%% -->
							<!-- %%#xsl:end%% -->
							&nbsp;
						</td>
						<td align="right" nowrap="nowrap">
							<a href="Print|%%{MedicalRecordID}%%|Inspection" onclick="changeStyle('%%{MedicalRecordID}%%', 'printDiv');">
								Распечатать
							</a>
						</td>
						<td align="right" nowrap="nowrap">
							<a href="Edit|%%{MedicalRecordID}%%|Inspection" onclick="changeStyle('%%{MedicalRecordID}%%', 'nonprintstyle');">
								Редактировать
							</a>
						</td>
						<td align="right" nowrap="nowrap">
							<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"> <lx:Path OwnerQueryLevel="0"> <lx:StepInt index="5460002" /> <lx:StepInt index="5010004" /> <lx:StepInt index="5000013" /> </lx:Path> <lx:ParamHolder> <lx:StepString name="CURRENT_WORKER" /> </lx:ParamHolder> </lx:Criterion>'%%-->
							<a style="color: GrayText; text-decoration: underline;">Действия на приеме</a>
							<!--%%#xsl:end%%-->
							<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"> <lx:Path OwnerQueryLevel="0"> <lx:StepInt index="5460002" /> <lx:StepInt index="5010004" /> <lx:StepInt index="5000013" /> </lx:Path> <lx:ParamHolder> <lx:StepString name="CURRENT_WORKER" /> </lx:ParamHolder> </lx:Criterion>'%%-->
							<a href="new_element|%%{MedicalRecordID}%%|Inspection" onclick="changeStyle('%%{MedicalRecordID}%%', 'nonprintstyle');">
								Действия на приеме
							</a>
							<!--%%#xsl:end%%-->
							&nbsp;
						</td>
						<td align="right" nowrap="nowrap">
							<!--%%#xsl:if lexem='{Post / Worker / WorkerID} = param(CURRENT_WORKER) Or {Users} = param(CURRENT_USER)'%%-->
							<a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
								<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
							</a>
							<!--%%#xsl:end%%-->
						</td>
					</tr>
				</table>
				<td>
					&nbsp;
				</td>

				<!-- %%#xsl:if lexem='{MedicalExaminationType} = Null()'%% -->
				<!--%%#xsl:if lexem='<lx:Criteria type="Or" xmlns:lx="lexem"><lx:Criteria type="And"><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000020" /><lx:StepInt index="5480003" /></lx:Path><lx:ChoiceOperand EntityIndex="580" AttributeIndex="5480003" PrimaryKey="1" /></lx:Criterion><lx:Criterion not="1" type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000020" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="580" /></lx:Criterion></lx:Criteria><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000020" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="580" /></lx:Criterion></lx:Criteria>'%%-->
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000003" /><lx:StepInt index="1000001" /></lx:Path><lx:BaseObjectOperand EntityIndex="1" PrimaryKey="584" /></lx:Criterion>'%% -->
				<div class="style6center">
					Первичный осмотр врача: <i>%%{Post/Speciality/Name}%%</i>
				</div>
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000003" /><lx:StepInt index="1000001" /></lx:Path><lx:BaseObjectOperand EntityIndex="1" PrimaryKey="584" /></lx:Criterion>'%% -->
				<div class="style6center">
					Первичный прием врача: <i>%%{Post/Speciality/Name}%%</i>
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5460002" /><lx:StepInt index="5010004" /><lx:StepInt index="5000014" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<div class="style6center">
					%%{Post/Worker/Category}%%
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criteria type="And" xmlns:lx="lexem"><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000020" /><lx:StepInt index="5480003" /></lx:Path><lx:ChoiceOperand EntityIndex="580" AttributeIndex="5480003" PrimaryKey="2" /></lx:Criterion><lx:Criterion not="1" type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000020" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="580" /></lx:Criterion></lx:Criteria>'%%-->
				<div class="style6center">
					Повторный прием врача: <i>%%{Post/Speciality/Name}%%</i>
				</div>
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5460002" /><lx:StepInt index="5010004" /><lx:StepInt index="5000014" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<div class="style6center">
					%%{Post/Worker/Category}%%
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='{MedicalExaminationType} <> Null()'%% -->
				<div class="style6center">%%(if ({ObjectProperties / ObjectType} = 1000 And {AmbulanceEvent / ObjectProperties / ObjectType} = 584 And {AmbulanceEvent / As AKUZ.EMERGENCY_EVENT / MedicalcardRegistration / MedCardNumber} = Null()) "Осмотр врача в приемном покое " else "Осмотр врача в отделении ")%%<i>%%{Post/Speciality/Name}%%</i></div>

				<!-- %%#xsl:if lexem='{AmbulanceEvent / ObjectProperties / ObjectType} <> 584'%% -->
				<div class="style6center">%%{MedicalExaminationType}%% <i>%%{Post/Speciality/Name}%%</i></div>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:end%% -->
				<table cellpadding="0" cellspacing="0" width="99%">
					<tr>
						<td class="style6left">
							Ф.И.О. врача: <i>%%{Post/Worker/FIO}%%</i>&nbsp;
						</td>
						<td class="style6right">
							Дата приема: <i>%%{ExaminationDate}%%  %%{ExaminationTime}%%</i>&nbsp;
						</td>
					</tr>
					<tr>
						<td class="style6left">
							Отделение: <i>%%{Post/Division/ Name}%%</i>&nbsp;
						</td>
						<td></td>
					</tr>
				</table>
				<!--%%#xsl:if lexem='<lx:Criteria type="Or" xmlns:lx="lexem"><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">561</lx:ConstOperand></lx:Criterion><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">648</lx:ConstOperand></lx:Criterion><lx:Criterion type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">584</lx:ConstOperand></lx:Criterion></lx:Criteria>'%%-->
				<!-- %%#xsl:if lexem='<lx:Criteria type="And" xmlns:lx="lexem">    <lx:Criteria type="Or">        <lx:Criteria type="And">            <lx:Criterion not="1" type="=">                <lx:Path OwnerQueryLevel="0">                    <lx:StepInt index="5490001" />                    <lx:StepInt index="1000002" />                </lx:Path>                <lx:ConstOperand type="Int32">584</lx:ConstOperand>            </lx:Criterion>        </lx:Criteria>        <lx:Criteria type="And">            <lx:Criterion type="=">                <lx:Path OwnerQueryLevel="0">                    <lx:StepInt index="5490001" />                    <lx:StepInt index="1000002" />                </lx:Path>                <lx:ConstOperand type="Int32">584</lx:ConstOperand>            </lx:Criterion>            <lx:Criterion type="=">                <lx:Path OwnerQueryLevel="0">                    <lx:StepInt index="5460001" />                </lx:Path>                <lx:Path OwnerQueryLevel="0">                    <lx:StepInt index="5490001" />                    <lx:StepAs as="AKUZ.EMERGENCY_EVENT" />                    <lx:StepInt index="5840030" />                    <lx:StepInt index="5460001" />                </lx:Path>            </lx:Criterion>        </lx:Criteria>    </lx:Criteria>    <lx:Criterion not="1" type="=">        <lx:Path OwnerQueryLevel="0">            <lx:StepInt index="5490001" />            <lx:StepInt index="5240006" />        </lx:Path>        <lx:BaseObjectOperand isNull="1" EntityIndex="523" />    </lx:Criterion></lx:Criteria>'%% -->

				<div class="style3" style="text-align: center">
					<i>Цель направления: %%{AmbulanceEvent/Direction/Perpose/Name}%%</i>
				</div>
				<div class="style3" style="text-align: center">
					<i>Дата направления: %%{AmbulanceEvent/Direction/DirectionDate{dd.MM.yyyy}}%%</i> <i> Направитель: %%{AmbulanceEvent/Direction/Director/Name}%%</i>
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="5240006" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="523" /></lx:Criterion>'%%-->
				<div class="style3" style="text-align: center">
					<i>Без направления</i>
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<hr />
				<!--%%#xsl:if lexem='<lx:Criteria type="And" xmlns:lx="lexem"><lx:Criterion not="1" type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">561</lx:ConstOperand></lx:Criterion><lx:Criterion not="1" type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">648</lx:ConstOperand></lx:Criterion><lx:Criterion not="1" type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">584</lx:ConstOperand></lx:Criterion></lx:Criteria>'%%-->
				<div class="style3">
					<b>Прием:</b> <i>%%(if ({DoctorVisit / VisitLocation} = 1 And {Post / MOHelpType} <> Null()) {Post / MOHelpType} else {DoctorVisit/VisitLocation})%%</i> <b>с целью:</b> <i>%%{DoctorVisit/VisitPurpose/Name}%%</i>
				</div>
				<!--%%#xsl:end%%-->
				<hr width="30%" size="2">
				<!-- %%#xsl:if lexem='{Status} <> Null()'%% -->
				<!-- <span class="style3">
				<b>Объективное состояние:</b> %%BBEncode(HtmlEncode(Str({Status})))%%<br />
				</span> -->
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{ArterialHighPressure} <> Null() And {ArterialLowPressure} <> Null() Or {HeartRetractionFrequence} <> Null() Or {BreathFrequence} <> Null() Or {Saturation} <> Null() Or {Temperature} <> Null()
				Or {PatientHeight} <> Null() Or {PatientWeight} <> Null() Or {BMI} <> Null()'%% -->
				<!-- %%#xsl:if lexem='{ArterialHighPressure} <> Null() And {ArterialLowPressure} <> Null()'%% -->
				<span class="style3">
					<b>АД:</b> %%BBEncode(HtmlEncode({ArterialHighPressure}))%% / %%BBEncode(HtmlEncode({ArterialLowPressure}))%% мм.рт.ст.
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{HeartRetractionFrequence} <> Null()'%% -->
				<span class="style3">
					<b>ЧСС:</b> %%BBEncode(HtmlEncode({HeartRetractionFrequence}))%% в мин.
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{BreathFrequence} <> Null()'%% -->
				<span class="style3">
					<b>ЧДД:</b> %%BBEncode(HtmlEncode({BreathFrequence}))%% в мин.
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{Saturation} <> Null()'%% -->
				<span class="style3">
					<b>Сатурация:</b> %%BBEncode(HtmlEncode({Saturation}))%% %.
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{Temperature} <> Null()'%% -->
				<span class="style3">
					<b>Температура:</b> %%BBEncode(HtmlEncode({Temperature}))%% <sup>o</sup>C.
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{PatientHeight} <> Null() Or {PatientWeight} <> Null() Or {BMI} <> Null()'%% -->
				<br />
				<!-- %%#xsl:if lexem='{PatientHeight} <> Null()'%% -->
				<span class="style3">
					<b>Рост:</b> %%BBEncode(HtmlEncode({PatientHeight}))%% см.
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{PatientWeight} <> Null()'%% -->
				<span class="style3">
					<b>Вес:</b> %%BBEncode(HtmlEncode({PatientWeight{0:G6}}))%% кг.
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{BMI} <> Null()'%% -->
				<span class="style3">
					<b>ИМТ:</b> %%SubString(BBEncode(HtmlEncode({BMI})),0,5)%% кг/м<sup>2</sup>
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:end%% -->
				<br />
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{Protocol} <> Null()'%% -->
				<span class="style3">
					<b>Протокол осмотра:</b> %%BBEncode(HtmlEncode({Protocol}))%%<br />
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{Examination} <> Null()'%% -->
				<span class="style3">
					%%UnPackString({Examination})%%<br />
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{Examination} = Null()'%% -->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000004" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Жалобы:</b> %%BBEncode(HtmlEncode({Complaint}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000003" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Анамнез заболевания:</b> %%BBEncode(HtmlEncode({AnamnesisMorbi}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000026" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Анамнез жизни:</b> %%BBEncode(HtmlEncode({PatientAnamnesis}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000022" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Эпидемиологический анамнез:</b> %%BBEncode(HtmlEncode({Epidemiological}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000023" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Гинекологический анамнез:</b> %%BBEncode(HtmlEncode({Gynaecological}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000036" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Экспертный анамнез:</b> %%BBEncode(HtmlEncode({ExpertAnamnesis}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000037" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Трансфузионный анамнез:</b> %%BBEncode(HtmlEncode({TransfusionAnamnesis}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000024" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Лекарственная аллергия:</b> %%BBEncode(HtmlEncode({DrugAllergy}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000025" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Пищевая аллергия:</b> %%BBEncode(HtmlEncode({FoodAllergy}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000039" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Принимаемые лекарства:</b> %%BBEncode(HtmlEncode({MedicationsTaken}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000038" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Перенесенные заболевания:</b> %%BBEncode(HtmlEncode({TransferredDiseasesText}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000005" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Объективный статус:</b> %%BBEncode(HtmlEncode({ObjectiveStatus}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="StatusLocale" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
				<span class="style3">
					<b>Локальный статус:</b> %%BBEncode(HtmlEncode({StatusLocale}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:for-each select='{BaseExaminationProtocols}' sort='{PostingTime}' order='asc'%% -->
				<span class="style3">
					%%{HtmlResult}%%
				</span>
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000006" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<div class="style3">
					<span class="underline"><i><b>Диагноз: </b>%%{Mkb}%% %%BBEncode(HtmlEncode({Diagnosis}))%% %%{Stnm}%%</i></span>
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="DiagnosisJustification" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
				<span class="style3">
					<b>Обоснование клинического диагноза:</b> %%BBEncode(HtmlEncode({DiagnosisJustification}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='ChildExists({AssociatedDiseases}, {TypeDisease} = 1)'%% -->
				<div class="style3">
					<span class="style3">
						<i><b>Осложнения: </b></i>
						<!-- %%#xsl:for-each select='{AssociatedDiseases}' sort='{Mkb}' filter='{TypeDisease} = 1'%% -->
						<i>%%{Mkb}%% %%{Diagnosis}%%</i>
						<!-- %%#xsl:end%% -->
					</span>
				</div>
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000033" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<div class="style3">
					<span class="underline"><i><b>Дата следующей явки: </b>%%{NextVisitDate}%%</i></span>
				</div>
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='ChildExists({AssociatedDiseases}, {TypeDisease} = 0)'%% -->
				<div class="style3">
					<span class="style3">
						<i><b>Сопутствующие заболевания: </b></i>
						<!-- %%#xsl:for-each select='{AssociatedDiseases}' sort='{Mkb}' filter='{TypeDisease} = 0'%% -->
						<i>%%{Mkb}%% %%{Diagnosis}%%</i>
						<!-- %%#xsl:end%% -->
					</span>
				</div>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:for-each select='{AmbulanceEvent / AmbulanceEventMovementCardLinks}'%% -->
				<!-- %%#xsl:if lexem='{As AKUZ.ONK_MOVEMENT_CARD_AMBULANCE_EVENT_LINK / OnkMovementCard} <> Null()'%% -->
				<br>
				<b>
					Маршрутная карта: №%%{As AKUZ.ONK_MOVEMENT_CARD_AMBULANCE_EVENT_LINK / OnkMovementCard / Number}%% | %%{As AKUZ.ONK_MOVEMENT_CARD_AMBULANCE_EVENT_LINK / OnkMovementCard / CurrentMKB}%% состояние пациента -> %%str({As AKUZ.ONK_MOVEMENT_CARD_AMBULANCE_EVENT_LINK / OnkMovementCard / OnkPatientStage})%%
				</b>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.ONK_MOVEMENT_CARD_AMBULANCE_EVENT_LINK / AmbulanceEventMovementCardLinkID}%%|%%{As AKUZ.ONK_MOVEMENT_CARD_AMBULANCE_EVENT_LINK / ObjectProperties / ObjectType}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" />
					</a>
					<a href="command=delete&bo=%%{As AKUZ.ONK_MOVEMENT_CARD_AMBULANCE_EVENT_LINK / AmbulanceEventMovementCardLinkID}%%|%%{As AKUZ.ONK_MOVEMENT_CARD_AMBULANCE_EVENT_LINK / ObjectProperties / ObjectType}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
					</a>
				</span>
				</br>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:for-each select='{AmbulanceEvent / AmbulanceEventMovementCardLinks}'%% -->
				<!-- %%#xsl:if lexem='{As AKUZ.PALLIATIVE_CARE_RECORD_AMBULANCE_EVENT_LINK / PalliativeCareRecord} <> Null()'%% -->
				<br>
				<b>
					Дневниковая запись паллиативного больного  от %%{As AKUZ.PALLIATIVE_CARE_RECORD_AMBULANCE_EVENT_LINK / PalliativeCareRecord / Date}%% %%str({As AKUZ.PALLIATIVE_CARE_RECORD_AMBULANCE_EVENT_LINK / PalliativeCareRecord / PalliativeCareTerms})%%
				</b>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.PALLIATIVE_CARE_RECORD_AMBULANCE_EVENT_LINK / AmbulanceEventMovementCardLinkID}%%|%%{As AKUZ.PALLIATIVE_CARE_RECORD_AMBULANCE_EVENT_LINK / ObjectProperties / ObjectType}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" />
					</a>
					<a href="command=delete&bo=%%{As AKUZ.PALLIATIVE_CARE_RECORD_AMBULANCE_EVENT_LINK / AmbulanceEventMovementCardLinkID}%%|%%{As AKUZ.PALLIATIVE_CARE_RECORD_AMBULANCE_EVENT_LINK / ObjectProperties / ObjectType}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
					</a>
				</span>
				</br>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:for-each select='{AmbulanceEvent / AmbulanceEventMovementCardLinks}'%% -->
				<!-- %%#xsl:if lexem='{As AKUZ.PALLIATIVE_REGISTRY_MANIPULATION_AMBULANCE_EVENT_LINK / PalliativeRegistryManipulation} <> Null()'%% -->
				<br>
				<b>
					Направление в/из регстра паллиативных больных  от %%{As AKUZ.PALLIATIVE_REGISTRY_MANIPULATION_AMBULANCE_EVENT_LINK / PalliativeRegistryManipulation / Date}%% %%str({As AKUZ.PALLIATIVE_REGISTRY_MANIPULATION_AMBULANCE_EVENT_LINK / PalliativeRegistryManipulation / State})%%
				</b>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.PALLIATIVE_REGISTRY_MANIPULATION_AMBULANCE_EVENT_LINK / AmbulanceEventMovementCardLinkID}%%|%%{As AKUZ.PALLIATIVE_REGISTRY_MANIPULATION_AMBULANCE_EVENT_LINK / ObjectProperties / ObjectType}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" />
					</a>
					<a href="command=delete&bo=%%{As AKUZ.PALLIATIVE_REGISTRY_MANIPULATION_AMBULANCE_EVENT_LINK / AmbulanceEventMovementCardLinkID}%%|%%{As AKUZ.PALLIATIVE_REGISTRY_MANIPULATION_AMBULANCE_EVENT_LINK / ObjectProperties / ObjectType}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
					</a>
				</span>
				</br>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{AmbulanceEvent / AmbulanceCard / Patient / PalliativeRegistry} <> Null()'%% -->
				<br>
				<b>
					Нуждается в паллиативной помощи с: %%{AmbulanceEvent / AmbulanceCard / Patient / PalliativeRegistry / CreateDate}%%
				</b>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{AmbulanceEvent / AmbulanceCard / Patient / PalliativeRegistry / PalliativeRegistryID}%%|%%{AmbulanceEvent / AmbulanceCard / Patient / PalliativeRegistry / ObjectProperties / ObjectType}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" />
					</a>
				</span>
				</br>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:CriterionChildExists xmlns:lx="lexem">    <condition />    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="ProcedureTreatmentRecords" />    </lx:Path></lx:CriterionChildExists>'%% -->
				<!-- %%#xsl:for-each select='{ProcedureTreatmentRecords}'%% -->
				<span class="style3">
					<b>Назначено немедикаментозное лечение:</b> %%{As AKUZ.PROCEDURE_TREATMENT_RECORD/Procedure} = Null() ? " " : {As AKUZ.PROCEDURE_TREATMENT_RECORD/Procedure/Name}+", "%%
					%%{As AKUZ.PROCEDURE_TREATMENT_RECORD/IntakeRegime}%%,
					%%{As AKUZ.PROCEDURE_TREATMENT_RECORD/PrescriptionRate} = Null() ? " " : Str({As AKUZ.PROCEDURE_TREATMENT_RECORD/PrescriptionRate})+", "%%
					начать с %%{As AKUZ.PROCEDURE_TREATMENT_RECORD/DataBegin}%%
					%%{As AKUZ.PROCEDURE_TREATMENT_RECORD/DaysCount} = Null() ? " " : "в течение " + Cast({as AKUZ.PROCEDURE_TREATMENT_RECORD/DaysCount},"String") + " дней" %%
					%%{As AKUZ.PROCEDURE_TREATMENT_RECORD/DailyQuantity} = Null() ? " " :" " + Cast({as AKUZ.PROCEDURE_TREATMENT_RECORD/DailyQuantity},"String") + " раз в день " %%
					<!-- %%#xsl:if lexem='<lx:Criteria type="And" xmlns:lx="lexem">    <lx:Criterion type="=">        <lx:Path OwnerQueryLevel="0">            <lx:StepString name="ObjectProperties" />            <lx:StepString name="ObjectType" />        </lx:Path>        <lx:BaseObjectOperand Entity="VCLib.ENTITIES" type="Int32" PrimaryKey="902">            <Name><![CDATA[PROCEDURE_TREATMENT_RECORD]]></Name>        </lx:BaseObjectOperand>    </lx:Criterion>    <lx:Criterion not="1" type="=">        <lx:Path OwnerQueryLevel="0">            <lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" />            <lx:StepAs as="AKUZ.TREATMENT_RECORD" />            <lx:StepString name="CancelDate" />        </lx:Path>        <lx:ConstOperand isNull="1" />    </lx:Criterion></lx:Criteria>'%% -->
					<b>Отменено: </b> %%{As AKUZ.PROCEDURE_TREATMENT_RECORD/CancelDate} %%
					<!-- %%#xsl:end%% -->
				</span>
				<span class="nonprintstyle999">
					<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="ObjectProperties" />        <lx:StepString name="ObjectType" />    </lx:Path>    <lx:BaseObjectOperand Entity="VCLib.ENTITIES" type="Int32" PrimaryKey="902">        <Name><![CDATA[PROCEDURE_TREATMENT_RECORD]]></Name>    </lx:BaseObjectOperand></lx:Criterion>'%% -->
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
							 border="0" />
					</a>
					<a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
					<!--%%#xsl:end%%-->
				</span>
				<br />
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:for-each select='{RouteToDoctorInspections}'%%-->
				<span class="style3">
					<b>Назначена консультация:</b> %%{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION/Speciality/Name}%% Тип консультации: %%{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION/RouteType}%%
					<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepInt index="5960003" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
					(%%{As AKUZ.PRESCRIPTION_RECORD/RefferalComment}%%)
					<!--%%#xsl:end%%-->
					<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepAs as="AKUZ.ROUTE_RECORD" /><lx:StepAs as="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" /><lx:StepInt index="5930006" /></lx:Path><lx:ConstOperand type="Boolean">True</lx:ConstOperand></lx:Criterion>'%% -->
					В ЛПУ %%{As AKUZ.ROUTE_RECORD/PerformerLpu/Name}%%
					<!--%%#xsl:end%%-->
				</span>
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path EntityID="593" OwnerQueryLevel="0">        <lx:StepInt index="5960006" />    </lx:Path>    <lx:BaseObjectOperand isNull="1" EntityIndex="535" /></lx:Criterion>'%%-->
				Дата и время явки: %%{EntryAmbulance/EntryDate}%% %%{EntryAmbulance/TimeOrTurn}%% (%%{EntryAmbulance/Resource/As AKUZ.POST/Worker} = Null() ? "кабинет: "+{EntryAmbulance/Resource/As AKUZ.ROOM/Name} : {EntryAmbulance/Resource/As AKUZ.POST/Worker/FIO}%%)
				<!--%%#xsl:end%%-->
				<span class="nonprintstyle999">
					<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepAs as="AKUZ.ROUTE_RECORD" /><lx:StepAs as="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" /><lx:StepInt index="5930006" /></lx:Path><lx:ConstOperand type="Boolean">True</lx:ConstOperand></lx:Criterion>'%% -->
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
							 border="0" />
					</a>
					<!--%%#xsl:end%%-->
					<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepAs as="AKUZ.ROUTE_RECORD" /><lx:StepAs as="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" /><lx:StepInt index="5930006" /></lx:Path><lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%% -->
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
							 border="0" />
					</a>
					<!--%%#xsl:end%%-->
					<a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать стат.талон"
							 border="0" />
					</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
					<!-- %%#xsl:if lexem='{ObjectProperties / ObjectType / EntName} = "ROUTE_TO_DOCTOR_INSPECTION" And {As AKUZ.ROUTE_TO_DOCTOR_INSPECTION / RequestSource} = 1 And {As AKUZ.ROUTE_TO_DOCTOR_INSPECTION / RouteType} = 1'%% -->
					<a href="TelemedCallStart|%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%" onclick="changeStyle('%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%', 'nonprintstyle');">
						Начать вызов
						<!-- %%#xsl:if lexem='{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION / CallValidity} <> Null() And {As AKUZ.ROUTE_TO_DOCTOR_INSPECTION / CallAnwsered} = false'%% -->
						,действителен до %%{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION/CallValidity}%%
						<!-- %%#xsl:end%% -->
					</a>
					<!-- %%#xsl:end%% -->
				</span>
				<!--%%#xsl:if lexem='<lx:CriterionChildExists entity="AKUZ.ROUTE_REMOTE_ENTRY" top="-1" xmlns:lx="lexem"><condition /><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepAs as="AKUZ.ROUTE_RECORD" /><lx:StepAs as="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" /><lx:StepInt index="5930004" /></lx:Path></lx:CriterionChildExists>'%% -->
				<!--%%#xsl:for-each select='{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION/RouteRemoteEntrys}'%%-->
				<br />
				%%{As AKUZ.ROUTE_REMOTE_ENTRY/Speciality}%% %%{As AKUZ.ROUTE_REMOTE_ENTRY/DoctorFIO}%%, место приёма: %%{As AKUZ.ROUTE_REMOTE_ENTRY/VisitPlace}%%,
				время записи: %%{As AKUZ.ROUTE_REMOTE_ENTRY/EntryDate}%%  %%{As AKUZ.ROUTE_REMOTE_ENTRY/EntryTime}%%
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<br />
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:for-each select='{AmbulanceEvent/PatientMonitoringPrograms}'%% -->
				<span class="style3">
					<b>Назначен дистанционный мониторинг с %%{DateBegin}%% по %%{DateEnd}%% </b>
					<span class="nonprintstyle999">
						<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Открыть"
								 border="0" />
							<!--</a> <a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
								 border="0" />-->
						</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
								 border="0" />
						</a>
					</span>
					<br />
					с использованием следующих приборов:
					<br />
					<!-- %%#xsl:for-each select='{PatientMonitoringProgramDeviceLinks}'%% -->
					%%{DeviceType}%%: %%{PersonalMedicalDeviceModel/Name}%%<br />
					<!--%%#xsl:end%%-->
				</span>

				<!--%%#xsl:end%%-->
				<!-- %%#xsl:for-each select='{AmbulanceEvent/RehabRegistryReferrals}'%% -->
				<span class="style3">
					<b>Направлен на реабилитацию %%{ReferralDate}%% </b>
					<span class="nonprintstyle999">
						<a href="command=open&bo=%%{As AKUZ.REHAB_REGISTRY_REFERRAL / RehabRegistryReferralID}%%|%%{As AKUZ.REHAB_REGISTRY_REFERRAL / ObjectProperties / ObjectType}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
								 border="0" />
						</a>
					</span>
				</span>
				<br />
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:for-each select='{RouteToDiagnostics}' filter='{ResultExits} = 2 And ChildExists({Relationships}, {MedicalRecordLink / As AKUZ.AMBULANCE_CARD_RECORD / As AKUZ.AMBULANCE_RECORD / As AKUZ.CANCEL_DIAGNOSTICS / CancellationSource} = 1) Or {Status} <> 2'%% -->
				<span class="style3">
					<b>Назначено исследование № %%{As AKUZ.ROUTE_TO_DIAGNOSTICS/Number}%%:</b> %%{As AKUZ.ROUTE_TO_DIAGNOSTICS/Research/Name}%%
				</span>
				<!--%%#xsl:if lexem='{EntryAmbulance} <> Null()'%%-->
				Дата и время явки: %%{EntryAmbulance/EntryDate}%% %%{EntryAmbulance/TimeOrTurn}%%
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='{EntryAmbulance} = Null() and {TicketDateTime}<>Null()'%%-->
				Дата явки: %%{As AKUZ.ROUTE_TO_DIAGNOSTICS/TicketDateTime{dd.MM.yyyy}}%%
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='{Status} <> 2'%%-->
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
							 border="0" />
					</a> <a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
							 border="0" />
					</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='{Status} = 2'%%-->
				<!-- %%#xsl:for-each select='{Relationships}' filter='{MedicalRecordLink / ObjectProperties / ObjectTypeID} IS "AKUZ.CANCEL_DIAGNOSTICS"' maxCount='1'%% -->
				Отменено лабораторией %%{MedicalRecordLink / As AKUZ.AMBULANCE_CARD_RECORD / As AKUZ.AMBULANCE_RECORD / As AKUZ.CANCEL_DIAGNOSTICS / DateCancel}%% Причина: %%{MedicalRecordLink / As AKUZ.AMBULANCE_CARD_RECORD / As AKUZ.AMBULANCE_RECORD / As AKUZ.CANCEL_DIAGNOSTICS / CancelReason}%%
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:for-each select='{DiagnosticResearchs}'%% -->
				<br />
				Дополнительное исследование: %%{Research/Name}%%
				<!--%%#xsl:end%%-->
				<br />
				<!--%%#xsl:for-each select='{CardNotes}'%%-->
				<b <!-- %%#xsl:if lexem='{IsValidForCda} = false'%% -->style="color:red"<!--%%#xsl:end%%-->>%%{Name}%%</b>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
							 border="0" />
					</a> <a href="command=delete&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
					<!-- %%#xsl:var name='signed' value='true'%% -->
					<!-- %%#xsl:for-each select='{CardNoteFile / CardNoteSignatures}'%% -->
					<!-- %%#xsl:if lexem='{Signed} = false'%% -->
					<!-- %%#xsl:var name='signed' value='false'%% -->
					<!--%%#xsl:end%%-->
					<!--%%#xsl:end%%-->
					<!-- %%#xsl:if lexem='@signed and ChildExists({CardNoteFile / CardNoteSignatures})'%% -->
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\bm.png" alt="Подписан"
						 border="0" />
					<!-- %%#xsl:end%% -->
				</span>

				<!--%%#xsl:end%%-->
				<br />
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='!ChildExists({As AKUZ.MEDICAL_EXAMINATION_MAIN / MedicalExaminationRes}) Or !ChildExists({AmbulanceEvent / AmbulanceRecords}, {Post} = {1:Post} And {As AKUZ.MEDICAL_EXAMINATION / ExaminationDate} = {1:ExaminationDate} And ({As AKUZ.MEDICAL_EXAMINATION / ExaminationTime} > {1:ExaminationTime} Or {As AKUZ.MEDICAL_EXAMINATION / ExaminationTime} = Null()) And {MedicalRecordID} <> {1:MedicalRecordID} And {As AKUZ.MEDICAL_EXAMINATION / As AKUZ.MEDICAL_EXAMINATION_RE / MedicalExaminationMain / MedicalRecordID} = {1:MedicalRecordID})'%% -->
				<!-- %%#xsl:for-each select='{MilkRecipe}' sort='{RecordDate}'%% -->
				<span class="underline">
					<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="7180011" />        <lx:StepInt index="7820002" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
					<b>Молочный рецепт.</b> Категория: %%{As AKUZ.MILK_RECIPE/Category}%%, дата с: %%{As AKUZ.MILK_RECIPE/BeginDate}%%, дата по: %%{As AKUZ.MILK_RECIPE/EndDate}%%
					<span class="nonprintstyle999">
						<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
								 border="0" />
						</a> <a href="command=delete&bo=%%{As AKUZ.MILK_RECIPE/MedicalRecordID}%%|718">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Отбраковать"
								 border="0" />
						</a>
					</span>
					<!-- %%#xsl:end%% -->
					<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="7180011" />        <lx:StepInt index="7820002" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->

					<b>Молочный рецепт отбракован.</b> Категория: %%{As AKUZ.MILK_RECIPE/Category}%%, дата с: %%{As AKUZ.MILK_RECIPE/BeginDate}%%, дата по: %%{As AKUZ.MILK_RECIPE/EndDate}%%, причина отбраковки: %%{As AKUZ.MILK_RECIPE/RecipeDiscard/Reason}%%
					<span class="nonprintstyle999">
						<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
								 border="0" />
						</a>
					</span>
					<!-- %%#xsl:end%% -->
				</span>
				<br />
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:for-each select='{DirectionToMilkRecipe}' sort='{RecordDate}'%% -->
				<span class="underline">
					<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="DirectionToMilkRecipeDiscard" /></lx:Path><lx:BaseObjectOperand Entity="AKUZ.DIRECTION_TO_MILK_RECIPE_DISCARD" isNull="1" /></lx:Criterion>'%% -->
					<b>Молочный рецепт.</b> Категория: %%{As AKUZ.DIRECTION_TO_MILK_RECIPE/Category}%%%%{As AKUZ.DIRECTION_TO_DRY_MILK_PRODUCT/Category}%%, дата с: %%{As AKUZ.MILK_DIRECTION/BeginDate}%%, дата по: %%{As AKUZ.MILK_DIRECTION/EndDate}%%
					<span class="nonprintstyle999">
						<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
								 border="0" />
						</a> <a href="command=delete&bo=%%{As AKUZ.MILK_DIRECTION/MedicalRecordID}%%|718">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Отбраковать"
								 border="0" />
						</a>
					</span>
					<!-- %%#xsl:end%% -->
					<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="DirectionToMilkRecipeDiscard" /><lx:StepString name="Reason" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->

					<b>Молочный рецепт отбракован.</b> Категория: %%{As AKUZ.DIRECTION_TO_MILK_RECIPE/Category}%%%%{As AKUZ.DIRECTION_TO_DRY_MILK_PRODUCT/Category}%%, дата с: %%{As AKUZ.MILK_DIRECTION/BeginDate}%%, дата по: %%{As AKUZ.MILK_DIRECTION/EndDate}%%, причина отбраковки: %%{As AKUZ.MILK_DIRECTION/DirectionToMilkRecipeDiscard/Reason}%%
					<span class="nonprintstyle999">
						<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
								 border="0" />
						</a>
					</span>
					<!-- %%#xsl:end%% -->
				</span>
				<br />
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:for-each select='{Refferals}'%%-->
				<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.HOSPITALIZATION_REFERRAL]]></lx:ConstOperand></lx:Criterion>'%% -->
				<span class="style3">
					<b>Направлен на госпитализацию: </b>%%{As AKUZ.REFERRAL/Lpu/Name}%%,
					отделение %%{As AKUZ.HOSPITALIZATION_REFERRAL/Division/Name}%% | %%{As AKUZ.HOSPITALIZATION_REFERRAL/ChannelsHospitalisation/HospitalisationType}%%
					<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.HOSPITALIZATION_REFERRAL" /><lx:StepInt index="5680012" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="961" /></lx:Criterion>'%%-->
					<b>(отменено)</b>
					<!--%%#xsl:end%%-->
				</span>
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.CONSULTANT_LIST]]></lx:ConstOperand></lx:Criterion>'%% -->
				<span class="style3">
					<b>Лист консультанта: </b>%%{As AKUZ.CONSULTANT_LIST/Number}%%,
					направление в МО: %%{As AKUZ.CONSULTANT_LIST/Lpu/Name}%%, дата: %%{As AKUZ.REFERRAL/ReferralDate}%%
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.REFERRAL_SIMPLE]]></lx:ConstOperand></lx:Criterion>'%% -->
				<span class="style3">
					<b>Направление в МО: %%{As AKUZ.REFERRAL/Lpu/Name}%%, дата: %%{As AKUZ.REFERRAL/ReferralDate}%%</b>
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.REK_REFFERAL]]></lx:ConstOperand></lx:Criterion>'%% -->
				<span class="style5">
					<b>Направление в КЭК, дата: %%{As AKUZ.REFERRAL/ReferralDate}%%</b>
				</span>
				<!-- %%#xsl:end%% -->
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" />
					</a>
					<a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать" border="0" />
					</a>
					<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.REK_REFFERAL]]></lx:ConstOperand></lx:Criterion>'%% -->
					<a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
					</a>
					<!-- %%#xsl:end%% -->
					<!-- %%#xsl:if lexem='<lx:Criteria type="Or" xmlns:lx="lexem"><lx:Criterion type="IS"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.CONSULTANT_LIST]]></lx:ConstOperand></lx:Criterion><lx:Criterion type="IS"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.REFERRAL_SIMPLE]]></lx:ConstOperand></lx:Criterion></lx:Criteria>'%% -->
					<a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
					</a>
					<!-- %%#xsl:end%% -->
				</span>
				<br />
				<!--%%#xsl:if lexem='<lx:CriterionChildExists entity="AKUZ.ROUTE_REMOTE_ENTRY" top="-1" xmlns:lx="lexem"><condition /><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.REFERRAL" /><lx:StepString name="RouteRemoteEntrys" /></lx:Path></lx:CriterionChildExists>'%% -->
				<b>Удаленная запись: </b>
				<!--%%#xsl:for-each select='{As AKUZ.REFERRAL/RouteRemoteEntrys}'%%-->
				<br />
				%%{As AKUZ.ROUTE_REMOTE_ENTRY/Speciality}%% %%{As AKUZ.ROUTE_REMOTE_ENTRY/DoctorFIO}%%, место приёма: %%{As AKUZ.ROUTE_REMOTE_ENTRY/VisitPlace}%%,
				время записи: %%{As AKUZ.ROUTE_REMOTE_ENTRY/EntryDate}%%  %%{As AKUZ.ROUTE_REMOTE_ENTRY/EntryTime}%%
				<!--%%#xsl:end%%-->
				<br />
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!--%%#xsl:for-each select='{InvoiceWriteOffOnPatient}'%%-->
				<span class="style3">
					<b>Накладная по услугам: </b> Номер: %%{Number}%%, Статус: %%{State}%%, Итоговая сумма: %%{TotalSum}%%
				</span>
				<span class="nonprintstyle999">
					<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="19080008" />    </lx:Path>    <lx:ChoiceOperand EntityIndex="1946" AttributeIndex="19080008" PrimaryKey="0" /></lx:Criterion>'%% -->
					<a href="OpenInvoice|%%{InvoiceID}%%|OpenInvoice">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Открыть"
							 border="0" />
					</a> <a href="DeleteInvoice|%%{InvoiceID}%%|DeleteInvoice">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
					<!-- %%#xsl:end%% -->
					<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="19080008" />    </lx:Path>    <lx:ChoiceOperand EntityIndex="1946" AttributeIndex="19080008" PrimaryKey="1" /></lx:Criterion>'%% -->
					<a href="OpenInvoice|%%{InvoiceID}%%|OpenInvoice">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Открыть"
							 border="0" />
					</a>
					<!-- %%#xsl:end%% -->
				</span>
				<br />
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:for-each select='{DoctorVisitServices}'%% -->
				<div class="style3">
					<span class="underline"><i><b>Медицинские услуги: </b>%%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / MedicalService / Code}%% %%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / MedicalService / Name}%%  %%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / Uet}%%</i><i>%%{ToothNumber} = Null() ? " " : " Номер зуба: " + {ToothNumber}%%</i></span>
				</div>
				<!-- %%#xsl:end%% -->
				<i><b>%%{DoctorVisit/Quantity} = Null() ? " " : "Итого УЕТ " + Cast({DoctorVisit/Quantity},"String")%%</b></i>
				<!--%%#xsl:for-each select='{RouteToVaccination}' sort='{As AKUZ.ROUTE_TO_VACCINATION/RouteDate}'%%-->
				<span class="style3">
					<b>%%{As AKUZ.ROUTE_TO_VACCINATION/VaccinationType}%%: </b>
					<!--%%#xsl:for-each select='{As AKUZ.ROUTE_TO_VACCINATION/RtvLinkVgs}'%%-->
					%%{VaccineLibrary/ShortName}%%
					<!--%%#xsl:end%%-->
				</span><span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
							 border="0" />
					</a> <a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
							 border="0" />
					</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
				</span>
				<br />
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:for-each select='{EventServices}'%% -->
				<div class="style3">
					<span class="underline"><b>Оказанная услуга: </b> %%{EventServiceResult / ServiceName}%% <b>Кол-во:</b> %%{EventServiceResult / ServiceCount}%% <b>Сумма:</b> %%{EventServiceResult / Cost}%%</span>
				</div>
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:for-each select='{Recipes}' filter='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path EntityID="632" OwnerQueryLevel="0"><lx:StepString name="Deleted" /></lx:Path><lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%%-->
				<div class="style3">
					<b>Выписан льготный рецепт. Код МКБ: %%{As AKUZ.RECIPE / MKBCode}%%</b> <a href="command=open&bo=%%{As AKUZ.RECIPE/MedicalRecordID}%%|632"><img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" /></a>
					Номер: %%{As AKUZ.RECIPE / Number}%% Серия: %%{As AKUZ.RECIPE / Serial}%%.
					%%{As AKUZ.RECIPE_REGIONAL / MnnRegional / NameRus} = Null()
					? {As AKUZ.RECIPE_REGIONAL / Mnn / Name} = Null()
					? {As AKUZ.RECIPE_GENERAL / CMnn / NameEng}= Null()
					? {As AKUZ.RECIPE_GENERAL / CTrn / NameEng}= Null()
					? {As AKUZ.RECIPE_GENERAL / CTrn / NameRus}
					: {As AKUZ.RECIPE_GENERAL / CTrn / NameEng}
					: {As AKUZ.RECIPE_GENERAL / CMnn / NameEng}
					: {As AKUZ.RECIPE_REGIONAL / Mnn / Name}
					: {As AKUZ.RECIPE_REGIONAL / MnnRegional / NameRus}%% %%{As AKUZ.RECIPE_GENERAL / RGDoseView}%% кол. уп: %%{UnitsCount{0:F2}}%% применять: %%{As AKUZ.RECIPE/Signa}%%
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:for-each select='{RecipeForms}' filter='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="Deleted" /></lx:Path><lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%%-->
				<div class="style3">
					<b>Выписан рецепт</b> <a href="command=open&bo=%%{As AKUZ.RECIPE_FORM/MedicalRecordID}%%|%%{ObjectTypeID}%%"><img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" /></a>
					Номер: %%{As AKUZ.RECIPE_FORM / Number}%% Серия: %%{As AKUZ.RECIPE_FORM / Serial}%%.
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:for-each select='{Relationships}' filter='{MedicalRecordLink / ObjectProperties / ObjectTypeID} IS "AKUZ.FIRST_SURVEY_OF_PREGNANT"' maxCount='1'%% -->
				<span class="style3">
					<b>Обследование беременной от: %%{MedicalRecordLink / RecordDate}%%</b>
				</span>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{MedicalRecordLink/MedicalRecordID}%%|%%{MedicalRecordLink/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
							 border="0" />
					</a> <a href="command=delete&bo=%%{MedicalRecordLink/MedicalRecordID}%%|%%{MedicalRecordLink/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
				</span>
				<br />
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{AmbulanceEvent / ObjectProperties / ObjectTypeID} IS "AKUZ.VACCINATION_EVENT" And !ChildExists({VaccinatedRegistryRecords})'%% -->
				<span class="style3">
					<a href="VaccineRecordAdd|%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%" onclick="changeStyle('%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%', 'nonprintstyle');">
						Внести доп.сведения предварительного осмотра
					</a>
				</span>
				<br />
				<!--%%#xsl:end%%-->
				<!--%%#xsl:for-each select='{VaccinatedRegistryRecords}'%%-->
				<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.VACCINATED_REGISTRY_RECORD]]></lx:ConstOperand></lx:Criterion>'%% -->
				<span class="style3">
					<b>Доп.сведения предварительного осмотра: %%{Admission/NameEHR}%%%%if ({ShiftDate} <> Null()) " до " + Str({ShiftDate}, "dd.MM.yyyy") else Null()%%%%if ({MedicalCommissionDate} <> Null() Or {MedicalComissionNumber} <> Null()) " по решению врачебной комиссии" + (if ({MedicalCommissionDate} <> Null()) " от " + Str({MedicalCommissionDate}, "dd.MM.yyyy") else "") + (if ({MedicalComissionNumber} <> Null()) " №" + {MedicalComissionNumber} else "") else ""%%</b>
				</span>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{MedicalRecordID}%%|%%{Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
							 border="0" />
					</a> <a href="command=delete&bo=%%{MedicalRecordID}%%|%%{Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
				</span>
				<br />
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000027" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Особые отметки:</b> %%BBEncode(HtmlEncode({Descr}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000034" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<span class="style3">
					<b>Лечение:</b> %%BBEncode(HtmlEncode({Healing}))%%<br />
				</span>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000007" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<div class="style3">
					<b>Назначения/Рекомендации:</b> %%BBEncode(HtmlEncode({Recomendations}))%% <span class="nonprintstyle999">
						<a href="command=print&bo=%%{MedicalRecordID}%%|%%{Type}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать рекомендации пациенту"
								 border="0" />
						</a>
					</span>
				</div>
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='{AmbulanceEvent / ObjectProperties / ObjectTypeID} IS "AKUZ.EXAMINATION_BASE"'%% -->
				<div class="style3">
					<a href="EditRouteMap|%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|Inspection" onclick="changeStyle('%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%', 'nonprintstyle');">
						Основные результаты диспансеризации(проф.осмотра)
					</a>
					<a href="DeleteRouteMap|%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|Inspection" onclick="changeStyle('%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%', 'nonprintstyle');">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
					</a>
				</div>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='{AmbulanceEvent / VmpEvent} <> Null()'%% -->
				<div class="style3">
					<a href="EditVmpEvent|%%{AmbulanceEvent / VmpEvent / VmpEventID}%%|VmpEvent" onclick="changeStyle('%%{AmbulanceEvent / VmpEvent / VmpEventID}%%', 'nonprintstyle');">
						Случай оказания ВМП
					</a>
				</div>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepAs as="AKUZ.AMBULANCE_RECORD" />        <lx:StepString name="AmbulanceEvent" />        <lx:StepAs as="AKUZ.EMERGENCY_CALL_EVENT" />        <lx:StepString name="EmergencyAmbulance" />    </lx:Path>    <lx:BaseObjectOperand Entity="AKUZ.EMERGENCY_AMBULANCE" isNull="1" /></lx:Criterion>'%% -->
				<div class="style3">
					<a href="EditEmergencyAmbulance|%%{As AKUZ.EMERGENCY_AMBULANCE/EmergencyAmbulanceID}%%" onclick="changeStyle('%%{As AKUZ.EMERGENCY_AMBULANCE/EmergencyAmbulanceID}%%', 'nonprintstyle');">
						Карта вызова неотложной мед. помощи
					</a>
					<a href="DeleteEmergencyAmbulance|%%{As AKUZ.EMERGENCY_AMBULANCE/EmergencyAmbulanceID}%%" onclick="changeStyle('%%{As AKUZ.EMERGENCY_AMBULANCE/EmergencyAmbulanceID}%%', 'nonprintstyle');">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
					</a>
				</div>
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:for-each select='{Destinations}'%%-->
				<div class="style3">
					<b>Назначение</b>
					<br />
					<span class="underline">
						<i>
							%%{Name}%% - %%{Descr}%%.
							<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="13090024" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
							<b>Отменено с %%{DateCancel}%%</b>
							<!--%%#xsl:end%%-->
							<br />
							Компоненты:
							<br />
							<!--%%#xsl:for-each select='{DestinationComponentss}'%%-->
							<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="13100013" /></lx:Path><lx:BaseObjectOperand Entity="PHARM.C_MNN" isNull="1" /></lx:Criterion>'%% -->
							<b>Процедура:%%{Procedurer/Name}%%  </b>
							<br />
							<!--%%#xsl:end%%-->
							<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="13100013" /></lx:Path><lx:BaseObjectOperand Entity="PHARM.C_MNN" isNull="1" /></lx:Criterion>'%% -->
							Препарат:%%{CMnn/NameEng}%% (%%{CMnn/NameRus}%%) %%{Dosa{0:F2}}%% %%{DoseView/Name}%%.
							<!--%%#xsl:end%%-->
							<!--%%#xsl:end%%-->
							<br />
							%%{Signa}%%
							<br />
						</i>
					</span>
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:for-each select='{AmbulanceEvent / AmbulanceRecords}'%%-->
				<!--%%#xsl:for-each select='{CardNotes}'%%-->
				<div class="style3">
					<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="5890015" />    </lx:Path>    <lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%% -->
					<b <!-- %%#xsl:if lexem='{IsValidForCda} = false'%% -->style="color:red"<!--%%#xsl:end%%-->>%%{Name}%%</b>
					<span class="nonprintstyle999">
						<a href="command=open&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
								 border="0" />
						</a> <a href="command=delete&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
								 border="0" />
						</a>
						<!-- %%#xsl:var name='signed' value='true'%% -->
						<!-- %%#xsl:for-each select='{CardNoteFile / CardNoteSignatures}'%% -->
						<!-- %%#xsl:if lexem='{Signed} = false'%% -->
						<!-- %%#xsl:var name='signed' value='false'%% -->
						<!--%%#xsl:end%%-->
						<!--%%#xsl:end%%-->
						<!-- %%#xsl:if lexem='@signed and ChildExists({CardNoteFile / CardNoteSignatures})'%% -->
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\bm.png" alt="Подписан"
							 border="0" />
						<!-- %%#xsl:end%% -->
					</span>
					<!-- %%#xsl:end%% -->
					<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="5890015" />    </lx:Path>    <lx:ConstOperand type="Boolean">True</lx:ConstOperand></lx:Criterion>'%% -->
					<div class="style3" style="text-decoration:line-through">
						<p <!-- %%#xsl:if lexem='{IsValidForCda} = false'%% -->style="color:red"<!--%%#xsl:end%%-->><b>%%{Name}%%</b>
							<span class="nonprintstyle999">
								<a href="command=open&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
									<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
										 border="0" />
								</a>
							</span>
						</p>
						<!-- %%#xsl:var name='signed' value='true'%% -->
						<!-- %%#xsl:for-each select='{CardNoteFile / CardNoteSignatures}'%% -->
						<!-- %%#xsl:if lexem='{Signed} = false'%% -->
						<!-- %%#xsl:var name='signed' value='false'%% -->
						<!--%%#xsl:end%%-->
						<!--%%#xsl:end%%-->
						<!-- %%#xsl:if lexem='@signed and ChildExists({CardNoteFile / CardNoteSignatures})'%% -->
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\bm.png" alt="Подписан"
							 border="0" />
						<!-- %%#xsl:end%% -->
						№ %%{DocumentNumber}%%. Описание: %%{Name}%%
					</div>
					<!-- %%#xsl:end%% -->
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!--%%#xsl:for-each select='{RepeatedToRouteDoctorInspections}'%%-->
				<span class="style3">
					<b>Повторный прием назначен </b>
					<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path EntityID="780" OwnerQueryLevel="0">        <lx:StepInt index="5960006" />    </lx:Path>    <lx:BaseObjectOperand isNull="1" EntityIndex="535" /></lx:Criterion>'%%-->
					<b>на: </b>%%{EntryAmbulance/EntryDate}%% %%{EntryAmbulance/TimeOrTurn}%%
					<span class="style5">
						%%{EntryAmbulance/Resource/DisplayName}%%
					</span>
					<!--%%#xsl:end%%-->
				</span>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
							 border="0" />
					</a> <a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
							 border="0" />
					</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
				</span>
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="ObjectProperties" />        <lx:StepString name="ObjectType" />    </lx:Path>    <lx:BaseObjectOperand Entity="VCLib.ENTITIES" type="Int32" PrimaryKey="780">        <Name><![CDATA[REPEATED_PRESCRIPTION_RECORD]]></Name>    </lx:BaseObjectOperand></lx:Criterion>'%% -->
				%%{As AKUZ.REPEATED_PRESCRIPTION_RECORD/PrescriptionType}%%
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" />        <lx:StepAs as="AKUZ.REPEATED_PRESCRIPTION_RECORD" />        <lx:StepString name="Speciality" />    </lx:Path>    <lx:BaseObjectOperand Entity="AKUZ.SPECIALITY" isNull="1" /></lx:Criterion>'%% -->
				%%{As AKUZ.REPEATED_PRESCRIPTION_RECORD/Speciality/Name}%%
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepInt index="5960003" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				(%%{As AKUZ.PRESCRIPTION_RECORD/RefferalComment}%%)
				<!--%%#xsl:end%%-->
				<br />
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000020" /><lx:StepInt index="5450006" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="599" /></lx:Criterion>'%%-->
				<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5460001" /></lx:Path><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9080004" /><lx:StepInt index="5460001" /></lx:Path></lx:Criterion>'%%-->
				<hr />
				<div class="style6">
					Заключение
				</div>
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000020" /><lx:StepInt index="5450006" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="599" /></lx:Criterion>'%%-->
				<div class="style3">
					<span class="underline"><i><b>Диагноз: </b>%%{DoctorVisit/OutcomeRecord/MKBCode}%% %%{DoctorVisit/OutcomeRecord/Diagnosis}%%</i></span>
					<!--%%#xsl:if lexem='ChildExists({DoctorVisit / OutcomeRecord / AccompanyingDiseasess}, {TypeDisease} = 0)'%%-->
					<br /><i>
						&nbsp;Сопутствующие:
						<!--%%#xsl:for-each select='{DoctorVisit/OutcomeRecord/AccompanyingDiseasess}' sort='{MKBCode}' filter='{TypeDisease} = 0'%%-->
						&nbsp;%%{MKBCode}%% %%{Diagnosis}%%;
						<!-- %%#xsl:end%% -->
					</i>
					<!-- %%#xsl:end%% -->
					<!--%%#xsl:if lexem='ChildExists({DoctorVisit / OutcomeRecord / AccompanyingDiseasess}, {TypeDisease} = 1)'%%-->
					<br /><i>
						&nbsp;Осложнения:
						<!--%%#xsl:for-each select='{DoctorVisit/OutcomeRecord/AccompanyingDiseasess}' sort='{MKBCode}' filter='{TypeDisease} = 1'%%-->
						&nbsp;%%{MKBCode}%% %%{Diagnosis}%%;
						<!-- %%#xsl:end%% -->
					</i>
					<!-- %%#xsl:end%% -->
				</div>
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000020" /><lx:StepInt index="5450006" /><lx:StepInt index="5990005" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				<div class="style3">
					%%{DoctorVisit/OutcomeRecord/Decision}%%
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
			</div>
		</div>
		<!--%%#xsl:for-each select='{cMedicalExaminationRess}' sort='{ExaminationDate};{ExaminationTime}'%%-->
		<div id="%%{MedicalRecordID}%%" class="nonprintstyle">
			<p style="background-color:white"><br /></p>
			<span class="ultranonprint"><input type="checkbox" checked="checked" id="%%{MedicalRecordID}%%" name="printDiv" />Печатать</span>
			<div>
				<table class="ultranonprint" align="center" width="99%">
					<tr>
						<td width="40%" nowrap="nowrap">
							&nbsp;
						</td>
						<td align="right" nowrap="nowrap">
							<a href="Print|%%{MedicalRecordID}%%|Inspection" onclick="changeStyle('%%{MedicalRecordID}%%', 'printDiv');">
								Распечатать
							</a>
						</td>
						<td align="right" nowrap="nowrap">
							<a href="Edit|%%{MedicalRecordID}%%|Inspection" onclick="changeStyle('%%{MedicalRecordID}%%', 'nonprintstyle');">
								Редактировать
							</a>
						</td>
						<td align="right" nowrap="nowrap">
							<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"> <lx:Path OwnerQueryLevel="0"> <lx:StepInt index="5460002" /> <lx:StepInt index="5010004" /> <lx:StepInt index="5000013" /> </lx:Path> <lx:ParamHolder> <lx:StepString name="CURRENT_WORKER" /> </lx:ParamHolder> </lx:Criterion>'%%-->
							<a style="color: GrayText; text-decoration: underline;">Действия на приеме</a>
							<!--%%#xsl:end%%-->
							<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"> <lx:Path OwnerQueryLevel="0"> <lx:StepInt index="5460002" /> <lx:StepInt index="5010004" /> <lx:StepInt index="5000013" /> </lx:Path> <lx:ParamHolder> <lx:StepString name="CURRENT_WORKER" /> </lx:ParamHolder> </lx:Criterion>'%%-->
							<a href="new_element|%%{MedicalRecordID}%%|Inspection" onclick="changeStyle('%%{MedicalRecordID}%%', 'nonprintstyle');">
								Действия на приеме
							</a>
							<!--%%#xsl:end%%-->
							&nbsp;
						</td>
						<td align="right" nowrap="nowrap">
							<!--%%#xsl:if lexem='{Post / Worker / WorkerID} = param(CURRENT_WORKER) Or {Users} = param(CURRENT_USER)'%%-->
							<a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
								<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" />
							</a>
							<!--%%#xsl:end%%-->
						</td>
					</tr>
				</table>

				<!-- %%#xsl:if lexem='{MedicalExaminationType} = Null()'%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="5240011" /></lx:Path><lx:BaseObjectOperand EntityIndex="1" PrimaryKey="584" /></lx:Criterion>'%% -->
				<div class="style6center">
					Повторный прием врача: <i>%%{Post/Speciality/Name}%%</i>
				</div>
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='<lx:Criterion  type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="5240011" /></lx:Path><lx:BaseObjectOperand EntityIndex="1" PrimaryKey="584" /></lx:Criterion>'%% -->
				<div class="style6center">
					Повторный осмотр врача: <i>%%{Post/Speciality/Name}%%</i>
				</div>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
			</div>
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5460002" /><lx:StepInt index="5010004" /><lx:StepInt index="5000014" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<div class="style6center">
				%%{Post/Worker/Category}%%
			</div>

			<!-- %%#xsl:if lexem='{MedicalExaminationType} <> Null()'%% -->
			<div class="style6center">%%{MedicalExaminationType}%% <i>%%{Post/Speciality/Name}%%</i></div>
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:end%%-->
			<table cellpadding="0" cellspacing="0" width="99%">
				<tr>
					<td class="style6left">
						Ф.И.О. врача: <i>%%{Post/Worker/FIO}%%</i>&nbsp;
					</td>
					<td class="style6right">
						Дата приема: <i>%%{ExaminationDate}%%  %%{ExaminationTime}%%</i>&nbsp;
					</td>
				</tr>
				<tr>
					<td class="style6left">
						Отделение: <i>%%{Post/Division/ Name}%%</i>&nbsp;
					</td>
					<td></td>
				</tr>
			</table>
			<hr />
			<!--%%#xsl:if lexem='<lx:Criteria type="And" xmlns:lx="lexem"><lx:Criterion not="1" type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">561</lx:ConstOperand></lx:Criterion><lx:Criterion not="1" type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">648</lx:ConstOperand></lx:Criterion><lx:Criterion not="1" type="="><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5490001" /><lx:StepInt index="1000001" /></lx:Path><lx:ConstOperand type="Int32">584</lx:ConstOperand></lx:Criterion></lx:Criteria>'%%-->
			<div class="style3">
				<b>Прием:</b> <i>%%(if ({DoctorVisit / VisitLocation} = 1 And {Post / MOHelpType} <> Null()) {Post / MOHelpType} else {DoctorVisit/VisitLocation})%%</i> <b>с целью:</b> <i>%%{DoctorVisit/VisitPurpose/Name}%%</i>
			</div>
			<!--%%#xsl:end%%-->
			<hr width="30%" size="2">
			<!-- %%#xsl:if lexem='{Examination} <> Null()'%% -->
			<span class="style3">
				%%UnPackString({Examination})%%<br />
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{Status} <> Null()'%% -->
			<!-- <span class="style3">
			<b>Объективное состояние:</b> %%BBEncode(HtmlEncode(Str({Status})))%%<br />
			</span> -->
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{ArterialHighPressure} <> Null() And {ArterialLowPressure} <> Null() Or {HeartRetractionFrequence} <> Null() Or {BreathFrequence} <> Null() Or {Saturation} <> Null() Or {Temperature} <> Null()
			Or {PatientHeight} <> Null() Or {PatientWeight} <> Null() Or {BMI} <> Null()'%% -->
			<!-- %%#xsl:if lexem='{ArterialHighPressure} <> Null() And {ArterialLowPressure} <> Null()'%% -->
			<span class="style3">
				<b>АД:</b> %%BBEncode(HtmlEncode({ArterialHighPressure}))%% / %%BBEncode(HtmlEncode({ArterialLowPressure}))%% мм.рт.ст.
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{HeartRetractionFrequence} <> Null()'%% -->
			<span class="style3">
				<b>ЧСС:</b> %%BBEncode(HtmlEncode({HeartRetractionFrequence}))%% в мин.
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{BreathFrequence} <> Null()'%% -->
			<span class="style3">
				<b>ЧДД:</b> %%BBEncode(HtmlEncode({BreathFrequence}))%% в мин.
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{Saturation} <> Null()'%% -->
			<span class="style3">
				<b>Сатурация:</b> %%BBEncode(HtmlEncode({Saturation}))%% %.
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{Temperature} <> Null()'%% -->
			<span class="style3">
				<b>Температура:</b> %%BBEncode(HtmlEncode({Temperature}))%% <sup>o</sup>C.
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{PatientHeight} <> Null() Or {PatientWeight} <> Null() Or {BMI} <> Null()'%% -->
			<br />
			<!-- %%#xsl:if lexem='{PatientHeight} <> Null()'%% -->
			<span class="style3">
				<b>Рост:</b> %%BBEncode(HtmlEncode({PatientHeight}))%% см.
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{PatientWeight} <> Null()'%% -->
			<span class="style3">
				<b>Вес:</b> %%BBEncode(HtmlEncode({PatientWeight{0:G6}}))%% кг.
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{BMI} <> Null()'%% -->
			<span class="style3">
				<b>ИМТ:</b> %%SubString(BBEncode(HtmlEncode({BMI})),0,5)%% кг/м<sup>2</sup>
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:end%% -->
			<br />
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{Examination} = Null()'%% -->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000004" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Жалобы: </b>%%BBEncode(HtmlEncode({Complaint}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000003" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Анамнез заболевания:</b> %%BBEncode(HtmlEncode({AnamnesisMorbi}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000026" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Анамнез жизни:</b> %%BBEncode(HtmlEncode({PatientAnamnesis}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000022" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Эпидемиологический анамнез:</b> %%BBEncode(HtmlEncode({Epidemiological}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000023" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Гинекологический анамнез:</b> %%BBEncode(HtmlEncode({Gynaecological}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000036" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Экспертный анамнез:</b> %%BBEncode(HtmlEncode({ExpertAnamnesis}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000037" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Трансфузионный анамне:</b> %%BBEncode(HtmlEncode({TransfusionAnamnesis}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000024" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Лекарственная аллергия:</b> %%BBEncode(HtmlEncode({DrugAllergy}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000025" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Пищевая аллергия:</b> %%BBEncode(HtmlEncode({FoodAllergy}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000039" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Принимаемые лекарства:</b> %%BBEncode(HtmlEncode({MedicationsTaken}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000038" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Перенесенные заболевания:</b> %%BBEncode(HtmlEncode({TransferredDiseasesText}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000005" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Объективный статус:</b> %%BBEncode(HtmlEncode({ObjectiveStatus}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="StatusLocale" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
			<span class="style3">
				<b>Локальный статус:</b> %%BBEncode(HtmlEncode({StatusLocale}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:for-each select='{BaseExaminationProtocols}' sort='{PostingTime}' order='asc'%% -->
			<span class="style3">
				%%{HtmlResult}%%
			</span>
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000006" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<div class="style3">
				<span class="underline"><i><b>Диагноз: </b>%%{Mkb}%% %%BBEncode(HtmlEncode({Diagnosis}))%% %%{Stnm}%%</i></span>
			</div>
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="DiagnosisJustification" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
			<span class="style3">
				<b>Обоснование клинического диагноза:</b> %%BBEncode(HtmlEncode({DiagnosisJustification}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:if lexem='ChildExists({AssociatedDiseases}, {TypeDisease} = 1)'%% -->
			<div class="style3">
				<span class="style3">
					<i><b>Осложнения: </b></i>
					<!-- %%#xsl:for-each select='{AssociatedDiseases}' sort='{Mkb}' filter='{TypeDisease} = 1'%% -->
					<i>%%{Mkb}%% %%{Diagnosis}%%</i>
					<!-- %%#xsl:end%% -->
				</span>
			</div>
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000033" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<div class="style3">
				<span class="underline"><i><b>Дата следующей явки: </b>%%{NextVisitDate}%%</i></span>
			</div>
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:if lexem='ChildExists({AssociatedDiseases}, {TypeDisease} = 0)'%% -->
			<div class="style3">
				<span class="style3">
					<i><b>Сопутствующие заболевания: </b></i>
					<!-- %%#xsl:for-each select='{AssociatedDiseases}' sort='{Mkb}' filter='{TypeDisease} = 0'%% -->
					<i>%%{Mkb}%% %%{Diagnosis}%%</i>
					<!-- %%#xsl:end%% -->
				</span>
			</div>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='<lx:CriterionChildExists xmlns:lx="lexem">    <condition />    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="ProcedureTreatmentRecords" />    </lx:Path></lx:CriterionChildExists>'%% -->
			<!-- %%#xsl:for-each select='{ProcedureTreatmentRecords}'%% -->
			<span class="style3">
				<b>Назначено немедикаментозное лечение:</b> %%{As AKUZ.PROCEDURE_TREATMENT_RECORD/Procedure} = Null() ? " " : {As AKUZ.PROCEDURE_TREATMENT_RECORD/Procedure/Name}+", "%%
				%%{As AKUZ.PROCEDURE_TREATMENT_RECORD/IntakeRegime}%%,
				%%{As AKUZ.PROCEDURE_TREATMENT_RECORD/PrescriptionRate} = Null() ? " " : Str({As AKUZ.PROCEDURE_TREATMENT_RECORD/PrescriptionRate})+", "%%
				начать с %%{As AKUZ.PROCEDURE_TREATMENT_RECORD/DataBegin}%%
				%%{As AKUZ.PROCEDURE_TREATMENT_RECORD/DaysCount} = Null() ? " " : "в течение " + Cast({as AKUZ.PROCEDURE_TREATMENT_RECORD/DaysCount},"String") + " дней" %%
				%%{As AKUZ.PROCEDURE_TREATMENT_RECORD/DailyQuantity} = Null() ? " " :" " + Cast({as AKUZ.PROCEDURE_TREATMENT_RECORD/DailyQuantity},"String") + " раз в день " %%
				<!-- %%#xsl:if lexem='<lx:Criteria type="And" xmlns:lx="lexem">    <lx:Criterion type="=">        <lx:Path OwnerQueryLevel="0">            <lx:StepString name="ObjectProperties" />            <lx:StepString name="ObjectType" />        </lx:Path>        <lx:BaseObjectOperand Entity="VCLib.ENTITIES" type="Int32" PrimaryKey="902">            <Name><![CDATA[PROCEDURE_TREATMENT_RECORD]]></Name>        </lx:BaseObjectOperand>    </lx:Criterion>    <lx:Criterion not="1" type="=">        <lx:Path OwnerQueryLevel="0">            <lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" />            <lx:StepAs as="AKUZ.TREATMENT_RECORD" />            <lx:StepString name="CancelDate" />        </lx:Path>        <lx:ConstOperand isNull="1" />    </lx:Criterion></lx:Criteria>'%% -->
				<b>Отменено: </b> %%{As AKUZ.PROCEDURE_TREATMENT_RECORD/CancelDate} %%
				<!-- %%#xsl:end%% -->
			</span>
			<span class="nonprintstyle999">
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="ObjectProperties" />        <lx:StepString name="ObjectType" />    </lx:Path>    <lx:BaseObjectOperand Entity="VCLib.ENTITIES" type="Int32" PrimaryKey="902">        <Name><![CDATA[PROCEDURE_TREATMENT_RECORD]]></Name>    </lx:BaseObjectOperand></lx:Criterion>'%% -->
				<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
						 border="0" />
				</a>
				<a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
				<!-- %%#xsl:end%% -->
			</span>
			</br>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:for-each select='{RouteToDoctorInspections}'%%-->
			<span class="style3">
				<b>Назначена консультация:</b> %%{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION/Speciality/Name}%% Тип консультации: %%{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION/RouteType}%%
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepInt index="5960003" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
				(%%{As AKUZ.PRESCRIPTION_RECORD/RefferalComment}%%)
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepAs as="AKUZ.ROUTE_RECORD" /><lx:StepAs as="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" /><lx:StepInt index="5930006" /></lx:Path><lx:ConstOperand type="Boolean">True</lx:ConstOperand></lx:Criterion>'%% -->
				В ЛПУ %%{As AKUZ.ROUTE_RECORD/PerformerLpu/Name}%%
				<!--%%#xsl:end%%-->
			</span>
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path EntityID="593" OwnerQueryLevel="0">        <lx:StepInt index="5960006" />    </lx:Path>    <lx:BaseObjectOperand isNull="1" EntityIndex="535" /></lx:Criterion>'%%-->
			Дата и время явки: %%{EntryAmbulance/EntryDate}%% %%{EntryAmbulance/TimeOrTurn}%%  (%%{EntryAmbulance/Resource/As AKUZ.POST/Worker} = Null() ? "кабинет: "+{EntryAmbulance/Resource/As AKUZ.ROOM/Name} : {EntryAmbulance/Resource/As AKUZ.POST/Worker/FIO}%%)
			<!--%%#xsl:end%%-->
			<span class="nonprintstyle999">
				<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepAs as="AKUZ.ROUTE_RECORD" /><lx:StepAs as="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" /><lx:StepInt index="5930006" /></lx:Path><lx:ConstOperand type="Boolean">True</lx:ConstOperand></lx:Criterion>'%% -->
				<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
						 border="0" />
				</a>
				<!--%%#xsl:end%%-->
				<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepAs as="AKUZ.ROUTE_RECORD" /><lx:StepAs as="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" /><lx:StepInt index="5930006" /></lx:Path><lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%% -->
				<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a>
				<!--%%#xsl:end%%-->
				<a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать стат.талон"
						 border="0" />
				</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
				<!-- %%#xsl:if lexem='{ObjectProperties / ObjectType / EntName} = "ROUTE_TO_DOCTOR_INSPECTION" And {As AKUZ.ROUTE_TO_DOCTOR_INSPECTION / RequestSource} = 1 And {As AKUZ.ROUTE_TO_DOCTOR_INSPECTION / RouteType} = 1'%% -->
				<a href="TelemedCallStart|%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%" onclick="changeStyle('%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%', 'nonprintstyle');">
					Начать вызов
					<!-- %%#xsl:if lexem='{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION / CallValidity} <> Null() And {As AKUZ.ROUTE_TO_DOCTOR_INSPECTION / CallAnwsered} = false'%% -->
					,действителен до %%{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION/CallValidity}%%
					<!-- %%#xsl:end%% -->
				</a>
				<!-- %%#xsl:end%% -->
			</span>
			<!--%%#xsl:if lexem='<lx:CriterionChildExists entity="AKUZ.ROUTE_REMOTE_ENTRY" top="-1" xmlns:lx="lexem"><condition /><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepAs as="AKUZ.ROUTE_RECORD" /><lx:StepAs as="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" /><lx:StepInt index="5930004" /></lx:Path></lx:CriterionChildExists>'%% -->
			<!--%%#xsl:for-each select='{As AKUZ.ROUTE_TO_DOCTOR_INSPECTION/RouteRemoteEntrys}'%%-->
			<br />
			%%{As AKUZ.ROUTE_REMOTE_ENTRY/Speciality}%% %%{As AKUZ.ROUTE_REMOTE_ENTRY/DoctorFIO}%%, место приёма: %%{As AKUZ.ROUTE_REMOTE_ENTRY/VisitPlace}%%,
			время записи: %%{As AKUZ.ROUTE_REMOTE_ENTRY/EntryDate}%%  %%{As AKUZ.ROUTE_REMOTE_ENTRY/EntryTime}%%
			<!--%%#xsl:end%%-->
			<!--%%#xsl:end%%-->
			<br />
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:for-each select='{RouteToDiagnostics}' filter='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="5920004" />    </lx:Path>    <lx:ChoiceOperand EntityIndex="594" AttributeIndex="5920004" PrimaryKey="2" /></lx:Criterion>'%% -->
			<span class="style3">
				<b>Назначено исследование № %%{As AKUZ.ROUTE_TO_DIAGNOSTICS/Number}%%:</b> %%{As AKUZ.ROUTE_TO_DIAGNOSTICS/Research/Name}%%
			</span>
			<!--%%#xsl:if lexem='{EntryAmbulance} <> Null()'%%-->
			Дата и время явки: %%{EntryAmbulance/EntryDate}%% %%{EntryAmbulance/TimeOrTurn}%%
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='{EntryAmbulance} = Null() and {TicketDateTime}<>Null()'%%-->
			Дата явки: %%{As AKUZ.ROUTE_TO_DIAGNOSTICS/TicketDateTime{dd.MM.yyyy}}%%
			<!--%%#xsl:end%%-->
			<span class="nonprintstyle999">
				<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a> <a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
						 border="0" />
				</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
			</span>
			<br />
			<!--%%#xsl:for-each select='{CardNotes}'%%-->
			<b <!-- %%#xsl:if lexem='{IsValidForCda} = false'%% -->style="color:red"<!--%%#xsl:end%%-->>%%{Name}%%</b>
			<span class="nonprintstyle999">
				<a href="command=open&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a> <a href="command=delete&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
				<!-- %%#xsl:var name='signed' value='true'%% -->
				<!-- %%#xsl:for-each select='{CardNoteFile / CardNoteSignatures}'%% -->
				<!-- %%#xsl:if lexem='{Signed} = false'%% -->
				<!-- %%#xsl:var name='signed' value='false'%% -->
				<!--%%#xsl:end%%-->
				<!--%%#xsl:end%%-->
				<!-- %%#xsl:if lexem='@signed and ChildExists({CardNoteFile / CardNoteSignatures})'%% -->
				<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\bm.png" alt="Подписан"
					 border="0" />
				<!-- %%#xsl:end%% -->
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:end%%-->
			<br />
			<!-- %%#xsl:for-each select='{Relationships}' filter='{MedicalRecordLink / ObjectProperties / ObjectTypeID} IS "AKUZ.FIRST_SURVEY_OF_PREGNANT"' maxCount='1'%% -->
			<span class="style3">
				<b>Обследование беременной от: %%{MedicalRecordLink / RecordDate}%%</b>
			</span>
			<span class="nonprintstyle999">
				<a href="command=open&bo=%%{MedicalRecordLink/MedicalRecordID}%%|%%{MedicalRecordLink/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a> <a href="command=delete&bo=%%{MedicalRecordLink/MedicalRecordID}%%|%%{MedicalRecordLink/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
			</span>
			<br />
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{AmbulanceEvent / ObjectProperties / ObjectTypeID} IS "AKUZ.VACCINATION_EVENT" And !ChildExists({VaccinatedRegistryRecords})'%% -->
			<span class="style3">
				<a href="VaccineRecordAdd|%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%" onclick="changeStyle('%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%', 'nonprintstyle');">
					Внести доп.сведения предварительного осмотра
				</a>
			</span>
			<br />
			<!--%%#xsl:end%%-->
			<!--%%#xsl:for-each select='{VaccinatedRegistryRecords}'%%-->
			<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.VACCINATED_REGISTRY_RECORD]]></lx:ConstOperand></lx:Criterion>'%% -->
			<span class="style3">
				<b>Доп.сведения предварительного осмотра: %%{Admission/NameEHR}%%%%if ({ShiftDate} <> Null()) " до " + Str({ShiftDate}, "dd.MM.yyyy") else Null()%%%%if ({MedicalCommissionDate} <> Null() Or {MedicalComissionNumber} <> Null()) " по решению врачебной комиссии" + (if ({MedicalCommissionDate} <> Null()) " от " + Str({MedicalCommissionDate}, "dd.MM.yyyy") else "") + (if ({MedicalComissionNumber} <> Null()) " №" + {MedicalComissionNumber} else "") else ""%%</b>
			</span>
			<span class="nonprintstyle999">
				<a href="command=open&bo=%%{MedicalRecordID}%%|%%{Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a> <a href="command=delete&bo=%%{MedicalRecordID}%%|%%{Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
			</span>
			<br />
			<!--%%#xsl:end%%-->
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:if lexem='!ChildExists({As AKUZ.MEDICAL_EXAMINATION_MAIN / MedicalExaminationRes}) Or !ChildExists({AmbulanceEvent / AmbulanceRecords}, {Post} = {1:Post} And {As AKUZ.MEDICAL_EXAMINATION / ExaminationDate} = {1:ExaminationDate} And ({As AKUZ.MEDICAL_EXAMINATION / ExaminationTime} > {1:ExaminationTime} Or {As AKUZ.MEDICAL_EXAMINATION / ExaminationTime} = Null()) And {MedicalRecordID} <> {1:MedicalRecordID} And {As AKUZ.MEDICAL_EXAMINATION / As AKUZ.MEDICAL_EXAMINATION_RE / MedicalExaminationMain / MedicalRecordID} = {1:MedicalRecordID})'%% -->
			<!-- %%#xsl:for-each select='{MilkRecipe}' sort='{RecordDate}'%% -->
			<span class="underline">
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="7180011" />        <lx:StepInt index="7820002" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
				<b>Молочный рецепт.</b> Категория: %%{As AKUZ.MILK_RECIPE/Category}%%, дата с: %%{As AKUZ.MILK_RECIPE/BeginDate}%%, дата по: %%{As AKUZ.MILK_RECIPE/EndDate}%%
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
							 border="0" />
					</a> <a href="command=delete&bo=%%{As AKUZ.MILK_RECIPE/MedicalRecordID}%%|718">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Отбраковать"
							 border="0" />
					</a>
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="7180011" />        <lx:StepInt index="7820002" />    </lx:Path>    <lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
				<b>Молочный рецепт отбракован.</b> Категория: %%{As AKUZ.MILK_RECIPE/Category}%%, дата с: %%{As AKUZ.MILK_RECIPE/BeginDate}%%, дата по: %%{As AKUZ.MILK_RECIPE/EndDate}%%, причина отбраковки: %%{As AKUZ.MILK_RECIPE/RecipeDiscard/Reason}%%
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
							 border="0" />
					</a>
				</span>
				<!-- %%#xsl:end%% -->
			</span>
			<br />
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:for-each select='{DirectionToMilkRecipe}' sort='{RecordDate}'%% -->
			<span class="underline">
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="DirectionToMilkRecipeDiscard" /></lx:Path><lx:BaseObjectOperand Entity="AKUZ.DIRECTION_TO_MILK_RECIPE_DISCARD" isNull="1" /></lx:Criterion>'%% -->
				<b>Молочный рецепт.</b> Категория: %%{As AKUZ.DIRECTION_TO_MILK_RECIPE/Category}%%%%{As AKUZ.DIRECTION_TO_DRY_MILK_PRODUCT/Category}%%, дата с: %%{As AKUZ.MILK_DIRECTION/BeginDate}%%, дата по: %%{As AKUZ.MILK_DIRECTION/EndDate}%%
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
							 border="0" />
					</a> <a href="command=delete&bo=%%{As AKUZ.MILK_DIRECTION/MedicalRecordID}%%|718">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Отбраковать"
							 border="0" />
					</a>
				</span>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="DirectionToMilkRecipeDiscard" /><lx:StepString name="Reason" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->

				<b>Молочный рецепт отбракован.</b> Категория: %%{As AKUZ.DIRECTION_TO_MILK_RECIPE/Category}%%%%{As AKUZ.DIRECTION_TO_DRY_MILK_PRODUCT/Category}%%, дата с: %%{As AKUZ.MILK_DIRECTION/BeginDate}%%, дата по: %%{As AKUZ.MILK_DIRECTION/EndDate}%%, причина отбраковки: %%{As AKUZ.MILK_DIRECTION/DirectionToMilkRecipeDiscard/Reason}%%
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Просмотреть"
							 border="0" />
					</a>
				</span>
				<!-- %%#xsl:end%% -->
			</span>
			<br />
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:for-each select='{Refferals}'%%-->
			<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.HOSPITALIZATION_REFERRAL]]></lx:ConstOperand></lx:Criterion>'%% -->
			<span class="style3">
				<b>Направлен на госпитализацию: </b>%%{As AKUZ.REFERRAL/Lpu/Name}%%,
				отделение %%{As AKUZ.HOSPITALIZATION_REFERRAL/Division/Name}%% | %%{As AKUZ.HOSPITALIZATION_REFERRAL/ChannelsHospitalisation/HospitalisationType}%%
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.HOSPITALIZATION_REFERRAL" /><lx:StepInt index="5680012" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="961" /></lx:Criterion>'%%-->
				<b>(отменено)</b>
				<!--%%#xsl:end%%-->
			</span>
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.CONSULTANT_LIST]]></lx:ConstOperand></lx:Criterion>'%% -->
			<span class="style3">
				<b>Лист консультанта: </b>%%{As AKUZ.CONSULTANT_LIST/Number}%%,
				направление в МО: %%{As AKUZ.CONSULTANT_LIST/Lpu/Name}%%, дата: %%{As AKUZ.REFERRAL/ReferralDate}%%
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='<lx:Criterion type="IS" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.REFERRAL_SIMPLE]]></lx:ConstOperand></lx:Criterion>'%% -->
			<span class="style3">
				<b>Направление в МО: %%{As AKUZ.REFERRAL/Lpu/Name}%%, дата: %%{As AKUZ.REFERRAL/ReferralDate}%%</b>
			</span>
			<!-- %%#xsl:end%% -->
			<span class="nonprintstyle999">
				<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a> <a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
						 border="0" />
				</a>
				<!-- %%#xsl:if lexem='<lx:Criteria type="Or" xmlns:lx="lexem"><lx:Criterion type="IS"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.CONSULTANT_LIST]]></lx:ConstOperand></lx:Criterion><lx:Criterion type="IS"><lx:Path OwnerQueryLevel="0"><lx:StepString name="ObjectProperties" /><lx:StepString name="ObjectTypeID" /></lx:Path><lx:ConstOperand type="String"><![CDATA[AKUZ.REFERRAL_SIMPLE]]></lx:ConstOperand></lx:Criterion></lx:Criteria>'%% -->
				<a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
				<!-- %%#xsl:end%% -->
			</span>
			<br />
			<!--%%#xsl:if lexem='<lx:CriterionChildExists entity="AKUZ.ROUTE_REMOTE_ENTRY" top="-1" xmlns:lx="lexem"><condition /><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.REFERRAL" /><lx:StepString name="RouteRemoteEntrys" /></lx:Path></lx:CriterionChildExists>'%% -->
			<b>Удаленная запись: </b>
			<!--%%#xsl:for-each select='{As AKUZ.REFERRAL/RouteRemoteEntrys}'%%-->
			<br />
			%%{As AKUZ.ROUTE_REMOTE_ENTRY/Speciality}%% %%{As AKUZ.ROUTE_REMOTE_ENTRY/DoctorFIO}%%, место приёма: %%{As AKUZ.ROUTE_REMOTE_ENTRY/VisitPlace}%%,
			время записи: %%{As AKUZ.ROUTE_REMOTE_ENTRY/EntryDate}%%  %%{As AKUZ.ROUTE_REMOTE_ENTRY/EntryTime}%%
			<!--%%#xsl:end%%-->
			<br />
			<!--%%#xsl:end%%-->
			<!--%%#xsl:end%%-->
			<!--%%#xsl:for-each select='{InvoiceWriteOffOnPatient}'%%-->
			<span class="style3">
				<b>Накладная по услугам: </b> Номер: %%{Number}%%, Статус: %%{State}%%, Итоговая сумма: %%{TotalSum}%%
			</span>
			<span class="nonprintstyle999">
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="19080008" />    </lx:Path>    <lx:ChoiceOperand EntityIndex="1946" AttributeIndex="19080008" PrimaryKey="0" /></lx:Criterion>'%% -->
				<a href="OpenInvoice|%%{InvoiceID}%%|OpenInvoice">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Открыть"
						 border="0" />
				</a> <a href="DeleteInvoice|%%{InvoiceID}%%|DeleteInvoice">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="19080008" />    </lx:Path>    <lx:ChoiceOperand EntityIndex="1946" AttributeIndex="19080008" PrimaryKey="1" /></lx:Criterion>'%% -->
				<a href="OpenInvoice|%%{InvoiceID}%%|OpenInvoice">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Открыть"
						 border="0" />
				</a>
				<!-- %%#xsl:end%% -->
			</span>
			<br />
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:for-each select='{EventServices}'%% -->
			<div class="style3">
				<span class="underline"><b>Оказанная услуга: </b> %%{EventServiceResult / ServiceName}%% <b>Кол-во:</b> %%{EventServiceResult / ServiceCount}%% <b>Сумма:</b> %%{EventServiceResult / Cost}%%</span>
			</div>
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:if lexem='<lx:CriterionChildExists entity="AKUZ.RECIPE" top="-1" xmlns:lx="lexem"><condition /><orderBy /><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000013" /></lx:Path></lx:CriterionChildExists>'%%-->
			<!--%%#xsl:for-each select='{Recipes}' filter='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path EntityID="632" OwnerQueryLevel="0"><lx:StepString name="Deleted" /></lx:Path><lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%%-->
			<div class="style3">
				<b>Выписан льготный рецепт. Код МКБ: %%{As AKUZ.RECIPE / MKBCode}%%</b> <a href="command=open&bo=%%{As AKUZ.RECIPE/MedicalRecordID}%%|%%{ObjectTypeID}%%"><img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" /></a>
				Номер: %%{As AKUZ.RECIPE / Number}%% Серия: %%{As AKUZ.RECIPE / Serial}%%.
				%%{As AKUZ.RECIPE_REGIONAL / MnnRegional / NameRus} = Null()
				? {As AKUZ.RECIPE_REGIONAL / Mnn / Name} = Null()
				? {As AKUZ.RECIPE_GENERAL / CMnn / NameEng}= Null()
				? {As AKUZ.RECIPE_GENERAL / CTrn / NameEng}= Null()
				? {As AKUZ.RECIPE_GENERAL / CTrn / NameRus}
				: {As AKUZ.RECIPE_GENERAL / CTrn / NameEng}
				: {As AKUZ.RECIPE_GENERAL / CMnn / NameEng}
				: {As AKUZ.RECIPE_REGIONAL / Mnn / Name}
				: {As AKUZ.RECIPE_REGIONAL / MnnRegional / NameRus}%% %%{As AKUZ.RECIPE_GENERAL / RGDoseView}%% кол. уп: %%{UnitsCount{0:F2}}%% применять: %%{As AKUZ.RECIPE/Signa}%%
			</div>
			<!--%%#xsl:end%%-->
			<br />
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:CriterionChildExists xmlns:lx="lexem"><condition /><lx:Path OwnerQueryLevel="0"><lx:StepString name="RecipeForms" /></lx:Path></lx:CriterionChildExists>'%%-->
			<!--%%#xsl:for-each select='{RecipeForms}' filter='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepString name="Deleted" /></lx:Path><lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%%-->
			<div class="style3">
				<b>Выписан рецепт</b> <a href="command=open&bo=%%{As AKUZ.RECIPE_FORM/MedicalRecordID}%%|%%{ObjectTypeID}%%"><img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" /></a>
				Номер: %%{As AKUZ.RECIPE_FORM / Number}%% Серия: %%{As AKUZ.RECIPE_FORM / Serial}%%.
			</div>
			<!--%%#xsl:end%%-->
			<br />
			<!--%%#xsl:end%%-->
			<!--%%#xsl:for-each select='{RepeatedToRouteDoctorInspections}'%%-->
			<span class="style3">
				<b>Повторный прием назначен </b>
				<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path EntityID="780" OwnerQueryLevel="0">        <lx:StepInt index="5960006" />    </lx:Path>    <lx:BaseObjectOperand isNull="1" EntityIndex="535" /></lx:Criterion>'%%-->
				<b>на: </b>%%{EntryAmbulance/EntryDate}%% %%{EntryAmbulance/TimeOrTurn}%%
				<span class="style5">
					%%{EntryAmbulance/Resource/DisplayName}%%
				</span>
				<!--%%#xsl:end%%-->
			</span>
			<span class="nonprintstyle999">
				<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a> <a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
						 border="0" />
				</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
			</span>
			<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepString name="ObjectProperties" />        <lx:StepString name="ObjectType" />    </lx:Path>    <lx:BaseObjectOperand Entity="VCLib.ENTITIES" type="Int32" PrimaryKey="780">        <Name><![CDATA[REPEATED_PRESCRIPTION_RECORD]]></Name>    </lx:BaseObjectOperand></lx:Criterion>'%% -->
			%%{As AKUZ.REPEATED_PRESCRIPTION_RECORD/PrescriptionType}%%
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" />        <lx:StepAs as="AKUZ.REPEATED_PRESCRIPTION_RECORD" />        <lx:StepString name="Speciality" />    </lx:Path>    <lx:BaseObjectOperand Entity="AKUZ.SPECIALITY" isNull="1" /></lx:Criterion>'%% -->
			%%{As AKUZ.REPEATED_PRESCRIPTION_RECORD/Speciality/Name}%%
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepAs as="AKUZ.PRESCRIPTION_RECORD" /><lx:StepInt index="5960003" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			(%%{As AKUZ.PRESCRIPTION_RECORD/RefferalComment}%%)
			<!--%%#xsl:end%%-->
			<br />
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:for-each select='{DoctorVisitServices}'%% -->
			<div class="style3">
				<span class="underline"><i><b>Медицинские услуги: </b>%%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / MedicalService / Code}%% %%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / MedicalService / Name}%%  %%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / Uet}%%</i><i>%%{ToothNumber} = Null() ? " " : " Номер зуба: " + {ToothNumber}%%</i></span>
			</div>
			<!-- %%#xsl:end%% -->
			<i><b>%%{DoctorVisit/Quantity} = Null() ? " " : "Итого УЕТ " + Cast({DoctorVisit/Quantity},"String")%%</b></i>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:for-each select='{RouteToVaccination}' sort='{As AKUZ.ROUTE_TO_VACCINATION/RouteDate}'%%-->
			<span class="style3">
				<b>%%{As AKUZ.ROUTE_TO_VACCINATION/VaccinationType}%%: </b>
				<!--%%#xsl:for-each select='{As AKUZ.ROUTE_TO_VACCINATION/RtvLinkVgs}'%%-->
				%%{VaccineLibrary/ShortName}%%
				<!--%%#xsl:end%%-->
			</span><span class="nonprintstyle999">
				<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a> <a href="command=print&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
						 border="0" />
				</a> <a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
			</span>
			<br />
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000027" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Особые отметки:</b> %%BBEncode(HtmlEncode({Descr}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000034" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<span class="style3">
				<b>Лечение:</b> %%BBEncode(HtmlEncode({Healing}))%%<br />
			</span>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9000007" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<div class="style3">
				<b>Назначения/Рекомендации:</b> %%BBEncode(HtmlEncode({Recomendations}))%% <span class="nonprintstyle999">
					<a href="command=print&bo=%%{MedicalRecordID}%%|%%{Type}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать рекомендации пациенту"
							 border="0" />
					</a>
				</span>
			</div>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:for-each select='{Destinations}'%%-->
			<div class="style3">
				<b>Назначение</b>
				<br />
				<span class="underline">
					<i>
						%%{Name}%% - %%{Descr}%%.
						<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="13090024" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%% -->
						<b>Отменено с %%{DateCancel}%%</b>
						<!--%%#xsl:end%%-->
						<br />
						Компоненты:
						<br />
						<!--%%#xsl:for-each select='{DestinationComponentss}'%%-->
						<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="13100013" /></lx:Path><lx:BaseObjectOperand Entity="PHARM.C_MNN" isNull="1" /></lx:Criterion>'%% -->
						<b>Процедура:%%{Procedurer/Name}%%  </b>
						<br />
						<!--%%#xsl:end%%-->
						<!-- %%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="13100013" /></lx:Path><lx:BaseObjectOperand Entity="PHARM.C_MNN" isNull="1" /></lx:Criterion>'%% -->
						Препарат:%%{CMnn/NameEng}%% (%%{CMnn/NameRus}%%) %%{Dosa{0:F2}}%% %%{DoseView/Name}%%.
						<!--%%#xsl:end%%-->
						<!--%%#xsl:end%%-->
						<br />
						%%{Signa}%%
						<br />
					</i>
				</span>
			</div>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:for-each select='{CardNotes}'%%-->
			<div class="style3">
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="5890015" />    </lx:Path>    <lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%% -->
				<b <!-- %%#xsl:if lexem='{IsValidForCda} = false'%% -->style="color:red"<!--%%#xsl:end%%-->>%%{Name}%%</b>
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
							 border="0" />
					</a> <a href="command=delete&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
						<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
							 border="0" />
					</a>
					<!-- %%#xsl:var name='signed' value='true'%% -->
					<!-- %%#xsl:for-each select='{CardNoteFile / CardNoteSignatures}'%% -->
					<!-- %%#xsl:if lexem='{Signed} = false'%% -->
					<!-- %%#xsl:var name='signed' value='false'%% -->
					<!--%%#xsl:end%%-->
					<!--%%#xsl:end%%-->
					<!-- %%#xsl:if lexem='@signed and ChildExists({CardNoteFile / CardNoteSignatures})'%% -->
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\bm.png" alt="Подписан"
						 border="0" />
					<!-- %%#xsl:end%% -->
				</span>

				<!-- %%#xsl:end%% -->
				<!-- %%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="5890015" />    </lx:Path>    <lx:ConstOperand type="Boolean">True</lx:ConstOperand></lx:Criterion>'%% -->
				<div class="style3" style="text-decoration:line-through">
					<b <!-- %%#xsl:if lexem='{IsValidForCda} = false'%% -->style="color:red"<!--%%#xsl:end%%-->>%%{Name}%%</b>
					<span class="nonprintstyle999">
						<a href="command=open&bo=%%{As AKUZ.CARD_NOTE/MedicalRecordID}%%|%%{ObjectProperties / ObjectTypeID}%%">
							<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
								 border="0" />
						</a>
					</span>

					<!-- %%#xsl:end%% -->
					<!-- %%#xsl:var name='signed' value='true'%% -->
					<!-- %%#xsl:for-each select='{CardNoteFile / CardNoteSignatures}'%% -->
					<!-- %%#xsl:if lexem='{Signed} = false'%% -->
					<!-- %%#xsl:var name='signed' value='false'%% -->
					<!--%%#xsl:end%%-->
					<!--%%#xsl:end%%-->
					<!-- %%#xsl:if lexem='@signed and ChildExists({CardNoteFile / CardNoteSignatures})'%% -->
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\bm.png" alt="Подписан"
						 border="0" />
					<!-- %%#xsl:end%% -->
					№ %%{DocumentNumber}%%. Описание: %%{Name}%%
				</div>
			</div>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9090001" /><lx:StepInt index="9000020" /><lx:StepInt index="5450006" /></lx:Path><lx:BaseObjectOperand isNull="1" EntityIndex="599" /></lx:Criterion>'%%-->
			<!--%%#xsl:if lexem='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="5460001" /></lx:Path><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9090001" /><lx:StepInt index="9080004" /><lx:StepInt index="5460001" /></lx:Path></lx:Criterion>'%%-->
			<hr />
			<div class="style6">
				Заключение
			</div>
			<div class="style3">
				<span class="underline"><i><b>Диагноз: </b>%%{MedicalExaminationMain/DoctorVisit/OutcomeRecord/MKBCode}%% %%{MedicalExaminationMain/DoctorVisit/OutcomeRecord/Diagnosis}%%</i> </span>
				<!--%%#xsl:if lexem='ChildExists({DoctorVisit / OutcomeRecord / AccompanyingDiseasess}, {TypeDisease} = 0)'%%-->
				<br /><i>
					&nbsp;Сопутствующие:
					<!--%%#xsl:for-each select='{DoctorVisit/OutcomeRecord/AccompanyingDiseasess}' sort='{MKBCode}' filter='{TypeDisease} = 0'%%-->
					&nbsp;%%{MKBCode}%% %%{Diagnosis}%%;
					<!-- %%#xsl:end%% -->
				</i>
				<!-- %%#xsl:end%% -->
				<!--%%#xsl:if lexem='ChildExists({DoctorVisit / OutcomeRecord / AccompanyingDiseasess}, {TypeDisease} = 1)'%%-->
				<br /><i>
					&nbsp;Осложнения:
					<!--%%#xsl:for-each select='{DoctorVisit/OutcomeRecord/AccompanyingDiseasess}' sort='{MKBCode}' filter='{TypeDisease} = 1'%%-->
					&nbsp;%%{MKBCode}%% %%{Diagnosis}%%;
					<!-- %%#xsl:end%% -->
				</i>
				<!-- %%#xsl:end%% -->
			</div>

			<!--%%#xsl:if lexem='<lx:Criterion not="1" type="=" xmlns:lx="lexem"><lx:Path OwnerQueryLevel="0"><lx:StepInt index="9090001" /><lx:StepInt index="9000020" /><lx:StepInt index="5450006" /><lx:StepInt index="5990005" /></lx:Path><lx:ConstOperand isNull="1" /></lx:Criterion>'%%-->
			<div class="style3">
				%%{MedicalExaminationMain/DoctorVisit/OutcomeRecord/Decision}%%
			</div>
			<!--%%#xsl:end%%-->
			<!--%%#xsl:end%%-->
			<!--%%#xsl:end%%-->
		</div>
		<!--%%#xsl:end%%-->
		<!-- %%#xsl:if lexem='{AmbulanceEvent / ObjectProperties / ObjectTypeID} IS "AKUZ.VACCINATION_EVENT"'%% -->
		<div id="241OtherInf" class="nonprintstyle" style="background-color: #ffffff;">
			<span class="ultranonprint"><input type="checkbox" checked="checked" id="OtherInf" name="printDiv" />Печатать</span>
			<div class="style4" style="color: #600">
				<b>Назначенные прививки</b>
			</div>
			<!-- %%#xsl:for-each select='{AmbulanceEvent /As AKUZ.MAINTENANCE_EVENT / As AKUZ.VACCINATION_EVENT / VaccinationEventLinks}'%% -->
			<!-- %%#xsl:for-each select='{VaccinationEventLinkVaccines}'%% -->
			<table style="width: 99%; font-size: 9 pt; border-color: #600; border-style: solid; border-width:1px 1px 0 0 ; table-layout: fixed; border-spacing: 0; border-collapse: collapse">
				<tr>
					<td style="border-color: #600; border-style: solid; margin: 0; width: 25%; padding: 4px; border-width: 1px 1px 0 0; background-color: #FFC;">
						%%{VaccineLibrary/ShortName}%%
					</td>
					<!-- %%#xsl:if lexem='{VaccinationEventLink/cRouteToVaccination} = Null()'%% -->
					<td style="border-color: #600; border-style: solid; margin: 0; width: 75%;padding: 4px; border-width: 1px 1px 0 0; background-color: #FFC;">
						<a href="RouteVaccineEdit|%%{As AKUZ.VACCINATION_EVENT_LINK_VACCINE/VaccinationEventLink/VaccinationEventLinkID}%%|%%{ObjectTypeID}%%" onclick="changeStyle('%%{As AKUZ.VACCINATION_EVENT_LINK_VACCINE/VaccinationEventLink/VaccinationEventLinkID}%%', 'nonprintstyle');">
							Создать направление
						</a>
					</td>
					<!-- %%#xsl:end%% -->
					<!-- %%#xsl:if lexem='{VaccinationEventLink/cRouteToVaccination} <> Null()'%% -->
					<td style="border-color: #600; border-style: solid; margin: 0; width: 75%;padding: 4px; border-width: 1px 1px 0 0; background-color: #FFC;">
						<a href="RouteVaccineEdit|%%{As AKUZ.VACCINATION_EVENT_LINK_VACCINE/VaccinationEventLink/VaccinationEventLinkID}%%|%%{ObjectTypeID}%%" onclick="changeStyle('%%{As AKUZ.VACCINATION_EVENT_LINK_VACCINE/VaccinationEventLink/VaccinationEventLinkID}%%', 'nonprintstyle');">
							Просмотр направления
						</a>
					</td>
					<!-- %%#xsl:end%% -->
				</tr>
			</table>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:end%% -->
		</div>
		<!--%%#xsl:end%%-->
		<!-- %%#xsl:if lexem='ChildExists({AmbulanceEvent / MedicalCertificates})'%% -->
		<br />
		<div id="OtherInf" class="nonprintstyle" style="background-color: #ffffff;">
			<span class="ultranonprint"><input type="checkbox" checked="checked" id="OtherInf" name="printDiv" />Печатать</span>
			<div class="style4" style="color: #600">
				<b>Общие данные по случаю обращения в %%{AmbulanceEvent/AmbulanceCard/CardLpu/Name}%% </b>
			</div>
			<!--%%#xsl:for-each select='{AmbulanceEvent/MedicalCertificates}'%%-->
			<span class="style3">
				<br />
				<b>%%{#OrderNum#}%%)Больничный лист</b> № %%{As AKUZ.MEDICAL_CERTIFICATE/CertificateNumber}%%.<b>
					Дата
					открытия:
				</b> %%{As AKUZ.MEDICAL_CERTIFICATE/OpenDate}%%
				<span class="nonprintstyle999">
					<a href="command=open&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%"><img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" /></a>
					<a href="command=delete&bo=%%{As AKUZ.MEDICAL_RECORD/MedicalRecordID}%%|%%{As AKUZ.MEDICAL_RECORD/Type}%%"><img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить" border="0" /></a>
				</span>
				<br />
			</span>
			<!-- %%#xsl:if lexem='ChildExists({MedicalCertificateProlongations})'%% -->
			<table style="width: 99%; font-size: smaller; border-color: #600; border-style: solid;
        border-width: 0 0 1px 1px; border-spacing: 0; border-collapse: collapse">
				<tr>
					<td style="border-color: #600; border-style: solid; margin: 0; padding: 4px; border-width: 1px 1px 0 0;
                background-color: #FFC;">
						Продлен до
					</td>
					<td style="border-color: #600; border-style: solid; margin: 0; padding: 4px; border-width: 1px 1px 0 0;
                background-color: #FFC;">
						Специалист
					</td>
				</tr>
				<!--%%#xsl:for-each select='{MedicalCertificateProlongations}'%%-->
				<tr>
					<td style="border-color: #600; border-style: solid; margin: 0; padding: 4px; border-width: 1px 1px 0 0;
                background-color: #FFC;">
						%%{ProlongationDate}%%&nbsp;
					</td>
					<td style="border-color: #600; border-style: solid; margin: 0; padding: 4px; border-width: 1px 1px 0 0;
                background-color: #FFC;">
						%%{Post/DisplayName}%%&nbsp;
					</td>
				</tr>
				<!--%%#xsl:end%%-->
			</table>
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:if lexem='{MedicalCertificateClose} = Null()'%% -->
			<span class="style3">
				<b>Статус больничного листа: </b>ОТКРЫТ<br />
			</span>
			<!-- %%#xsl:end%% -->
			<!-- %%#xsl:if lexem='{MedicalCertificateClose} <> Null()'%% -->
			<span class="style3">
				<b>Статус больничного листа:</b> ЗАКРЫТ (Дата закрытия:%%{MedicalCertificateClose/DateClose}%%)<br />
				<b>Закрыл б/л:</b>%%{MedicalCertificateClose/Post/DisplayName}%%
				<br />
			</span>
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:if lexem='{FssLnStatus} <> 0 and {FssLnStatus} <> Null()'%% -->
			<span class="style3">
				<b>Статус ЛН ФСС: </b>%%{FssLnStatus}%%<br />
			</span>
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:end%%-->
			<!--%%#xsl:end%%-->
		</div>
	</div>
	<br />
	<!-- %%#xsl:var name='typeD' value='{Post/PostType}'%% -->
	<!-- %%#xsl:var name='division' value='{Post/Division}'%% -->
	<!-- %%#xsl:var name='enabled' value='1'%% -->
	<!--%%#xsl:if lexem='{MedicalRecordID} <> param(MEDICAL_EXAMINATION_MAIN) or {Post} = Null() or {ExaminationDate} = Null()'%%-->
	<!--%%@enabled := 0;%%-->
	<!--%%#xsl:end%%-->
	<!-- %%#xsl:for-each select='{AmbulanceEvent / EntryAmbulances}' sort='{EntryDate}' filter='
	!ChildExists({AmbulanceEvent / AmbulanceRecords}, {ObjectProperties / ObjectTypeID} IS "AKUZ.MEDICAL_EXAMINATION" And ({As AKUZ.MEDICAL_EXAMINATION / ExaminationDate} = {1:EntryDate} And {Post} = {1:Resource} Or {As AKUZ.MEDICAL_EXAMINATION / EntryAmbulance / EntryBaseID} = {1:EntryBaseID}))
	And( {ObjectProperties / ObjectTypeID} IS "AKUZ.ENTRY_TO_DOCTOR_INSPECTION_RE"
	Or {ObjectProperties / ObjectTypeID} IS "AKUZ.ENTRY_TO_TELECONSULTATION")
	And {Resource / PostType} = @typeD
	And {Resource / Division} = @division'%% -->
	<!--%%#xsl:if lexem='{Resource / Speciality / SpecialityID} <> param(SPECIALITY)'%%-->
	<!--%%@enabled := 0;%%-->
	<!--%%#xsl:end%%-->
	<div>
		<div id="%%{EntryBaseID}%%" class="nonprintstyleEntry">
			<table class="ultranonprint" align="center" width="99%">
				<tr>

					<!--%%#xsl:if lexem='@enabled = 0'%%-->
					<td align="right" nowrap="nowrap">
						<a style="color: GrayText; text-decoration: underline;">Внести данные осмотра</a>
					</td>
					<td width="60%" nowrap="nowrap">
						&nbsp;
					</td>
					<td align="right" nowrap="nowrap">
						<a style="color: GrayText; text-decoration: underline;">Удалить запись</a>
					</td>
					<!--%%#xsl:end%%-->
					<!--%%#xsl:if lexem='@enabled = 1'%%-->
					<td align="right" nowrap="nowrap">
						<a href="EditVisitWithEntry|%%{EntryBaseID}%%|Entry" onclick="changeStyle('%%{EntryBaseID}%%', 'nonprintstyle');">
							Внести данные осмотра
						</a>
					</td>
					<td width="60%" nowrap="nowrap">
						&nbsp;
					</td>
					<td align="right" nowrap="nowrap">
						<a href="DeleteEntry|%%{EntryBaseID}%%|Entry" onclick="changeStyle('%%{EntryBaseID}%%', 'nonprintstyle');">
							Удалить запись<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить запись" border="0" />
						</a>
					</td>
					<!--%%#xsl:end%%-->
				</tr>
			</table>
			<div class="style6center">
				Запись на прием к специалисту: <i>%%{Resource / As AKUZ.POST /Speciality/Name}%%</i>
			</div>
			<div class="style6center">
				%%{Resource / As AKUZ.POST/Worker/Category}%%
			</div>
			<table cellpadding="0" cellspacing="0" width="99%">
				<tr>
					<td class="style6left">
						Ф.И.О. врача: <i>%%{Resource / As AKUZ.POST /Worker/FIO}%%</i>&nbsp;
					</td>
					<td class="style6right">
						Дата записи: <i>%%{EntryDate}%% %%{TimeOrTurn}%%</i>&nbsp;
					</td>
				</tr>
				<tr>
					<td class="style6left">
						Отделение: <i>%%{Resource / As AKUZ.POST/Division/ Name}%%</i>&nbsp;
					</td>
					<td></td>
				</tr>
			</table>
		</div>
		<br />
		<!-- %%#xsl:end%% -->
	</div>

	<!-- %%#xsl:for-each select='{DoctorVisit / As AKUZ.DOCTOR_INSPECTION / DoctorInspectionRes}' sort='{VisitDate}' filter='<lx:Criterion type="=" xmlns:lx="lexem">    <lx:Path OwnerQueryLevel="0">        <lx:StepInt index="5800005" />    </lx:Path>    <lx:BaseObjectOperand isNull="1" EntityIndex="900" /></lx:Criterion>'%% -->
	<div>
		<div id="%%{VisitID}%%" class="nonprintstyleVisit">
			<table class="ultranonprint" align="center" width="99%">
				<tr>
					<td width="40%" nowrap="nowrap">
						&nbsp;
					</td>
					<td align="right" nowrap="nowrap">
						<a href="EditVisit|%%{VisitID}%%|Inspection" onclick="changeStyle('%%{VisitID}%%', 'nonprintstyle');">
							Внести данные осмотра
						</a>
					</td>
				</tr>
			</table>
			<div class="style6center">
				Повторное посещение(не содержит осмотр врача): <i>%%{Post/Speciality/Name}%%</i>
			</div>
			<div class="style6center">
				%%{Post/Worker/Category}%%
			</div>
			<table cellpadding="0" cellspacing="0" width="99%">
				<tr>
					<td class="style6left">
						Ф.И.О. врача: <i>%%{Post/Worker/FIO}%%</i>&nbsp;
					</td>
					<td class="style6right">
						Дата приема: <i>%%{VisitDate}%%</i>&nbsp;
					</td>
				</tr>
				<tr>
					<td class="style6left">
						Отделение: <i>%%{Post/Division/ Name}%%</i>&nbsp;
					</td>
					<td></td>
				</tr>
			</table>
			<hr />
			<div class="style3">
				<b>Прием:</b> <i>%%(if ({VisitLocation} = 1 And {Post / MOHelpType} <> Null()) {Post / MOHelpType} else {VisitLocation})%%</i> <b>с целью:</b> <i>%%{VisitPurpose/Name}%%</i>
			</div>
			<br />
			<!-- %%#xsl:for-each select='{DoctorVisitServices}'%% -->
			<div class="style3">
				<span class="underline"><i><b>Медицинские услуги: </b>%%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / MedicalService / Code}%% %%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / MedicalService / Name}%% %%{As AKUZ.AMBULANCE_SURGICAL_OPERATION / Uet}%%</i><i>%%{ToothNumber} = Null() ? " " : " Номер зуба: " + {ToothNumber}%%</i></span>
			</div>
			<!-- %%#xsl:end%% -->
			<i><b>%%{Quantity} = Null() ? " " : "Итого УЕТ " + Cast({Quantity},"String")%%</b></i>
			<!--%%#xsl:for-each select='{RouteToVaccination}' sort='{As AKUZ.ROUTE_TO_VACCINATION/RouteDate}'%%-->
			<span class="style3">
				<b>%%{As AKUZ.ROUTE_TO_VACCINATION/VaccinationType}%%: </b>
				<!--%%#xsl:for-each select='{As AKUZ.ROUTE_TO_VACCINATION/RtvLinkVgs}'%%-->
				%%{VaccineLibrary/ShortName}%%
				<!--%%#xsl:end%%-->
			</span><span class="nonprintstyle999">
				<a href="command=open&bo=%%{As AKUZ.VISIT / VisitID}%%|%%{As AKUZ.VISIT/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать"
						 border="0" />
				</a> <a href="command=print&bo=%%{As AKUZ.VISIT / VisitID}%%|%%{As AKUZ.VISIT/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\PrintHS.png" alt="Распечатать"
						 border="0" />
				</a> <a href="command=delete&bo=%%{As AKUZ.VISIT / VisitID}%%|%%{As AKUZ.VISIT/Type}%%">
					<img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\delete.png" alt="Удалить"
						 border="0" />
				</a>
			</span>
			<br />
			<!--%%#xsl:end%%-->
			<!-- %%#xsl:for-each select='{EventServices}'%% -->
			<div class="style3">
				<span class="underline"><b>Оказанная услуга: </b> %%{EventServiceResult / ServiceName}%% <b>Кол-во:</b> %%{EventServiceResult / ServiceCount}%% <b>Сумма:</b> %%{EventServiceResult / Cost}%%</span>
			</div>
			<!-- %%#xsl:end%% -->
			<!--%%#xsl:for-each select='{Recipes}' filter='<lx:Criterion type="=" xmlns:lx="lexem"><lx:Path EntityID="632" OwnerQueryLevel="0"><lx:StepString name="Deleted" /></lx:Path><lx:ConstOperand type="Boolean">False</lx:ConstOperand></lx:Criterion>'%%-->
			<div class="style3">
				<b>Выписан рецепт</b> <a href="command=open&bo=%%{As AKUZ.RECIPE/MedicalRecordID}%%|632"><img src="%%param(CURRENT_FOLDER)%%\Templates\Pictures\edit.png" alt="Редактировать" border="0" /></a>
				Номер: %%{As AKUZ.RECIPE / Number}%% Серия: %%{As AKUZ.RECIPE / Serial}%%.
				%%{As AKUZ.RECIPE_REGIONAL / MnnRegional / NameRus} = Null()
				? {As AKUZ.RECIPE_REGIONAL / Mnn / Name} = Null()
				? {As AKUZ.RECIPE_GENERAL / CMnn / NameEng}= Null()
				? {As AKUZ.RECIPE_GENERAL / CTrn / NameEng}= Null()
				? {As AKUZ.RECIPE_GENERAL / CTrn / NameRus}
				: {As AKUZ.RECIPE_GENERAL / CTrn / NameEng}
				: {As AKUZ.RECIPE_GENERAL / CMnn / NameEng}
				: {As AKUZ.RECIPE_REGIONAL / Mnn / Name}
				: {As AKUZ.RECIPE_REGIONAL / MnnRegional / NameRus}%% %%{As AKUZ.RECIPE_GENERAL / RGDoseView}%% кол. уп: %%{UnitsCount{0:F2}}%% применять: %%{As AKUZ.RECIPE/Signa}%%
			</div>
			<!--%%#xsl:end%%-->
		</div>
		<!-- %%#xsl:end%% -->

	</div>

	</div>

</body>
</html>
