1929 lines
116 KiB
XML
1929 lines
116 KiB
XML
<?xml version="1.0"?>
|
||
<xsl:transform version="2.0"
|
||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||
xmlns:n1="urn:hl7-org:v3"
|
||
xmlns:fn="http://www.w3.org/2005/xpath-functions"
|
||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
xmlns:n2="urn:hl7-org:v3/meta/voc"
|
||
xmlns:voc="urn:hl7-org:v3/voc"
|
||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||
xmlns:fias="urn:hl7-ru:fias"
|
||
xmlns:identity="urn:hl7-ru:identity"
|
||
xmlns:address="urn:hl7-ru:address"
|
||
xmlns:PII="urn:hl7-ru:PII">
|
||
<xsl:output method="html" indent="yes" encoding="utf-8"/>
|
||
<xsl:template match="/">
|
||
<xsl:apply-templates select="n1:ClinicalDocument"/>
|
||
</xsl:template>
|
||
<xsl:template match="n1:ClinicalDocument">
|
||
<html>
|
||
<!-- Файл для трансформации XML->HTML->PDF при помощи библиотек iText Core, iText XMLWorker или аналогичных
|
||
Данный файл должен использоваться только для трансформации документа СЭМД (111) Протокол консультации в рамках диспансерного наблюдения (CDA) Редакция 4, v1.7
|
||
Разработан по заказу Минздрава РФ компанией ООО "Цифромед" 26.07.2023
|
||
Замечания по данному файлу можно направить на почту egisz@stp-egisz.ru
|
||
Тема сообщения: замечания и вопросы по файлам визуализации -->
|
||
<head>
|
||
<style>
|
||
@page {
|
||
size: A4 portrait;
|
||
margin-top: 20pt;
|
||
margin-bottom: 156pt;
|
||
margin-left: 10pt;
|
||
margin-right: 20pt;
|
||
}
|
||
|
||
table {
|
||
table-layout: fixed;
|
||
width: 98%;
|
||
border-collapse: collapse;
|
||
|
||
font-family: Arial, sans-serif;
|
||
word-wrap: break-word;
|
||
margin-top: 0;
|
||
margin-bottom: 10pt;
|
||
margin-left: 20pt;
|
||
}
|
||
|
||
td {
|
||
vertical-align: top;
|
||
padding: 2;
|
||
}
|
||
|
||
.table-break {
|
||
margin-left: 0;
|
||
border-collapse: collapse;
|
||
}
|
||
|
||
.param {
|
||
font-size: 15px;
|
||
border: 1pt solid gray;
|
||
|
||
word-wrap: none;
|
||
}
|
||
|
||
.created {
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.medorg {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
font-weight: 400;
|
||
color: #000000;
|
||
margin-top: 5pt;
|
||
margin-bottom: 5pt;
|
||
white-space: normal;
|
||
}
|
||
|
||
.address {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
font-weight: 100;
|
||
color: #000000;
|
||
margin-top: 5pt;
|
||
margin-bottom: 5pt;
|
||
white-space: normal;
|
||
}
|
||
|
||
.emd {
|
||
text-align: center;
|
||
font-size: 18px;
|
||
font-weight: 400;
|
||
color: #000000;
|
||
margin-top: 25pt;
|
||
margin-bottom: 25pt;
|
||
white-space: normal;
|
||
}
|
||
|
||
.date {
|
||
text-align: center;
|
||
font-size: 15px;
|
||
font-weight: 400;
|
||
color: #000000;
|
||
margin-top: 5pt;
|
||
margin-bottom: 5pt;
|
||
white-space: normal;
|
||
}
|
||
|
||
.tablegray {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
font-weight: 100;
|
||
color: #aaaaaa;
|
||
margin-top: 5pt;
|
||
margin-bottom: 5pt;
|
||
}
|
||
|
||
.tablegrayhead {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
font-weight: bold;
|
||
color: #aaaaaa;
|
||
margin-top: 5pt;
|
||
margin-bottom: 5pt;
|
||
}
|
||
|
||
.tableblack {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
font-weight: 100;
|
||
color: #000000;
|
||
margin-top: 0;
|
||
margin-bottom: 3pt;
|
||
white-space: normal;
|
||
}
|
||
|
||
.tableresult {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
font-weight: 100;
|
||
color: #000000;
|
||
margin-top: 2pt;
|
||
margin-bottom: 2pt;
|
||
white-space: normal;
|
||
}
|
||
|
||
.tableresulthead {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
font-weight: bold;
|
||
color: #000000;
|
||
margin-top: 2pt;
|
||
margin-bottom: 2pt;
|
||
white-space: normal;
|
||
}
|
||
|
||
|
||
.tableresultscore {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
font-weight: bold;
|
||
color: #000000;
|
||
margin-top: 0;
|
||
margin-bottom: 5pt;
|
||
white-space: normal;
|
||
}
|
||
|
||
.createdate {
|
||
text-align: right;
|
||
font-size: 15px;
|
||
font-weight: 100;
|
||
color: #aaaaaa;
|
||
margin-right: 10pt;
|
||
}
|
||
|
||
.pagenumber {
|
||
text-align: center;
|
||
valign: center;
|
||
font-size: 15px;
|
||
font-weight: 100;
|
||
color: #aaaaaa;
|
||
margin-right: 10pt;
|
||
}
|
||
|
||
h2+p {
|
||
page-break-inside: avoid;
|
||
}
|
||
|
||
th {
|
||
text-align: left;
|
||
font-size: 15px;
|
||
padding: 5pt;
|
||
background-color: #D9D9D6;
|
||
}
|
||
|
||
.first-block-form {
|
||
margin-top: -10pt;
|
||
}
|
||
|
||
.block-form {
|
||
border-collapse: collapse;
|
||
margin-top: 0;
|
||
margin-bottom: 0;
|
||
border-bottom: 1pt solid #e0e0e0;
|
||
}
|
||
|
||
.end-block-form {
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<table class="first-block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="medorg">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:name"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:addr[not(@nullFlavor)]">
|
||
<br/><xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:addr/n1:postalCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:addr/n1:postalCode"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:addr/address:stateCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:addr/address:stateCode/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:addr/n1:streetAddressLine"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props[not(@nullFlavor)]">
|
||
<br/>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props/identity:Ogrn[not(@nullFlavor)]">
|
||
<xsl:text>ОГРН: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props/identity:Ogrn"/>
|
||
<xsl:text>; </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props/identity:Ogrnip[not(@nullFlavor)]">
|
||
<xsl:text>ОГРНИП: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props/identity:Ogrnip"/>
|
||
<xsl:text>; </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props/identity:Okpo[not(@nullFlavor)]">
|
||
<xsl:text>ОКПО: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props/identity:Okpo"/>
|
||
<xsl:text>; </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props/identity:Okato[not(@nullFlavor)]">
|
||
<xsl:text>ОКАТО: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/identity:Props/identity:Okato"/>
|
||
<xsl:text>; </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:id[2][not(@nullFlavor)]">
|
||
<br/><xsl:text>Лицензия на осуществление медицинской деятельности: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:id[2]/@extension"/>
|
||
<xsl:text> </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:id[2]/@assigningAuthorityName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:telecom[not(@nullFlavor)]">
|
||
<br/>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:providerOrganization/n1:telecom">
|
||
<xsl:call-template name="formatContact">
|
||
<xsl:with-param name="contact" select="./@value"/>
|
||
</xsl:call-template>
|
||
<xsl:text> </xsl:text>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:informationRecipient[position()>1]/n1:intendedRecipient/n1:receivedOrganization/n1:name">
|
||
<tr>
|
||
<td colspan="8">
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:informationRecipient[position()>1]">
|
||
<p class="tableblack">
|
||
<xsl:text>Для предоставления в: </xsl:text>
|
||
<xsl:value-of select="./n1:intendedRecipient/n1:receivedOrganization/n1:name"/>
|
||
</p>
|
||
</xsl:for-each>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</table>
|
||
<table class="block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h1 class="emd">
|
||
<b>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:code[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:code/@displayName"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text>[Название вида медицинского документа]</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</b>
|
||
</h1>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="4">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Пациент</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:text>ФИО: </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:call-template name="formatNullFlavor">
|
||
<xsl:with-param name="nullflavor" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:name/@nullFlavor"/>
|
||
</xsl:call-template>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</p>
|
||
<p class="tableblack">
|
||
<xsl:text>Дата рождения: </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:birthTime[not(@nullFlavor)]">
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:birthTime/@value"/>
|
||
</xsl:call-template>
|
||
<xsl:text> </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:effectiveTime[not(@nullFlavor)]">
|
||
<xsl:text> (</xsl:text>
|
||
<xsl:call-template name="getAge">
|
||
<xsl:with-param name="birthdate" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:birthTime/@value"/>
|
||
<xsl:with-param name="deathdate" select="/n1:ClinicalDocument/n1:effectiveTime/@value"/>
|
||
<xsl:with-param name="withtext" select="1"/>
|
||
</xsl:call-template>
|
||
<xsl:text>)</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:administrativeGenderCode[not(@nullFlavor)]">
|
||
<xsl:text>Пол: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:administrativeGenderCode/@displayName"/>
|
||
</xsl:when>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:administrativeGenderCode/@nullFlavor">
|
||
<xsl:text>Пол: </xsl:text>
|
||
<xsl:call-template name="formatNullFlavor">
|
||
<xsl:with-param name="nullflavor" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:administrativeGenderCode/@nullFlavor"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
<td colspan="4">
|
||
<h2 class="tablegray">
|
||
<xsl:text> </xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:InsurancePolicy[not(@nullFlavor)]">
|
||
<xsl:text>Полис ОМС: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:InsurancePolicy/identity:Series"/>
|
||
<xsl:text> </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:InsurancePolicy/identity:Number"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:id[2]/@extension[not(@nullFlavor)]">
|
||
<xsl:text>СНИЛС: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:id[2]/@extension"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:componentOf/n1:encompassingEncounter/n1:id[2]/@extension[not(@nullFlavor)]">
|
||
<p class="tableblack">
|
||
<xsl:call-template name="formatMedCard">
|
||
<xsl:with-param name="medcard" select="/n1:ClinicalDocument/n1:componentOf/n1:encompassingEncounter/n1:code/@code"/>
|
||
</xsl:call-template>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:componentOf/n1:encompassingEncounter/n1:id[2]/@extension"/>
|
||
</p>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</td>
|
||
</tr>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='1']/n1:streetAddressLine">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:text>Адрес по месту жительства (постоянной регистрации): </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='1']/n1:postalCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='1']/n1:postalCode"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='1']/address:stateCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='1']/address:stateCode/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='1']/n1:streetAddressLine"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='2']/n1:streetAddressLine">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:text>Адрес по месту пребывания (временной регистрации): </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='2']/n1:postalCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='2']/n1:postalCode"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='2']/address:stateCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='2']/address:stateCode/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='2']/n1:streetAddressLine"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='3']/n1:streetAddressLine">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:text>Адрес фактического проживания (пребывания): </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='3']/n1:postalCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='3']/n1:postalCode"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='3']/address:stateCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='3']/address:stateCode/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:addr[address:Type/@code='3']/n1:streetAddressLine"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc[not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:IdentityCardType/@displayName"/>
|
||
<xsl:text>: </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:Series[not(@nullFlavor)]">
|
||
<xsl:text>серия </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:Series"/>
|
||
<xsl:text> </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:text>номер </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:Number"/>
|
||
<xsl:text> от </xsl:text>
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:IssueDate/@value"/>
|
||
</xsl:call-template>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:IssueOrgName[not(@nullFlavor)]">
|
||
<xsl:text> выдан </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:IssueOrgName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:IssueOrgCode[not(@nullFlavor)]">
|
||
<xsl:text>, код подразделения </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/identity:IdentityDoc/identity:IssueOrgCode"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:telecom[not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:telecom">
|
||
<xsl:call-template name="formatContact">
|
||
<xsl:with-param name="contact" select="./@value"/>
|
||
</xsl:call-template>
|
||
<xsl:text> </xsl:text>
|
||
</xsl:for-each>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</table>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian[not(@nullFlavor)]">
|
||
<table class="block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Законный (уполномоченный) представитель пациента</xsl:text>
|
||
</h2>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:guardianPerson/n1:name[not(@nullFlavor)]">
|
||
<p class="tableblack">
|
||
<xsl:text>ФИО: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:guardianPerson/n1:name"/>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:code[not(@nullFlavor)]">
|
||
<xsl:text> (</xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:code/@displayName"/>
|
||
<xsl:text>)</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:guardianOrganization/n1:name[not(@nullFlavor)]">
|
||
<p class="tableblack">
|
||
<xsl:text>Наименование организации: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:guardianOrganization/n1:name"/>
|
||
</p>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/PII:birthTime[not(@nullFlavor)]">
|
||
<p class="tableblack">
|
||
<xsl:text>Дата рождения: </xsl:text>
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/PII:birthTime/@value"/>
|
||
</xsl:call-template>
|
||
</p>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:id/@extension[not(@nullFlavor)]">
|
||
<p class="tableblack">
|
||
<xsl:text>СНИЛС: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:id/@extension"/>
|
||
</p>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</td>
|
||
</tr>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='1']/n1:streetAddressLine">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:text>Адрес по месту жительства (постоянной регистрации): </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='1']/n1:postalCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='1']/n1:postalCode"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='1']/address:stateCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='1']/address:stateCode/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='1']/n1:streetAddressLine"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='2']/n1:streetAddressLine">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:text>Адрес по месту пребывания (временной регистрации): </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='2']/n1:postalCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='2']/n1:postalCode"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='2']/address:stateCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='2']/address:stateCode/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='2']/n1:streetAddressLine"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='3']/n1:streetAddressLine[not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:text>Адрес фактического проживания (пребывания): </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='3']/n1:postalCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='3']/n1:postalCode"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='3']/address:stateCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='3']/address:stateCode/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:addr[address:Type/@code='3']/n1:streetAddressLine"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:IdentityCardType/@displayName"/>
|
||
<xsl:text>: </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:Series[not(@nullFlavor)]">
|
||
<xsl:text>серия </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:Series"/>
|
||
<xsl:text> </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:text>номер </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:Number"/>
|
||
<xsl:text> от </xsl:text>
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:IssueDate/@value"/>
|
||
</xsl:call-template>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:IssueOrgName[not(@nullFlavor)]">
|
||
<xsl:text> выдан </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:IssueOrgName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:IssueOrgCode[not(@nullFlavor)]">
|
||
<xsl:text>, код подразделения </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/identity:IssueOrgCode"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:IdentityDoc/@nullFlavor">
|
||
<xsl:text>Документ, удостоверяющий личность: </xsl:text>
|
||
<xsl:call-template name="formatNullFlavor">
|
||
<xsl:with-param name="nullflavor" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian /identity:IdentityDoc/@nullFlavor"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian /identity:AuthorityDoc[not(@nullFlavor)]">
|
||
<xsl:text>Документ, удостоверяющий полномочия: </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:IdentityCardType/@displayName"/>
|
||
<xsl:text> </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:Series[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:Series"/>
|
||
<xsl:text> </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:Number"/>
|
||
<xsl:text> </xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:IssueOrgName[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:IssueOrgName"/>
|
||
<xsl:text> </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:IssueOrgCode[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:IssueOrgCode"/>
|
||
<xsl:text> </xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:text>Дата выдачи: </xsl:text>
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/identity:AuthorityDoc/identity:IssueDate/@value"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian /identity:AuthorityDoc/@nullFlavor">
|
||
<xsl:text>Документ, удостоверяющий полномочия: </xsl:text>
|
||
<xsl:call-template name="formatNullFlavor">
|
||
<xsl:with-param name="nullflavor" select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian /identity:AuthorityDoc/@nullFlavor"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:telecom[not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<p class="tableblack">
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:recordTarget/n1:patientRole/n1:patient/n1:guardian/n1:telecom">
|
||
<xsl:call-template name="formatContact">
|
||
<xsl:with-param name="contact" select="./@value"/>
|
||
</xsl:call-template>
|
||
<xsl:text> </xsl:text>
|
||
</xsl:for-each>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</table>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<table class="block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Шифр по МКБ-10</xsl:text>
|
||
</h2>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='809']/n1:value[not(@nullFlavor)]">
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='809']">
|
||
<p class="tableblack">
|
||
<xsl:value-of select="./n1:value/@code"/>
|
||
<xsl:text> </xsl:text>
|
||
<xsl:value-of select="./n1:value/@displayName"/>
|
||
</p>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text>-</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Вид обращения</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='800']/n1:value[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='800']/n1:value/@displayName"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text>-</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7003']/n1:value[not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Заболевание выявлено при профилактическом осмотре или обращении за лечением</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7003']/n1:value/@displayName"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Место проведения</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='801']/n1:value[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='801']/n1:value/@displayName"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text>-</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7002'][not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="4">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Начало диспансерного наблюдения</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7002']/n1:effectiveTime[not(@nullFlavor)]">
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7002']/n1:effectiveTime/@value"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text>-</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7002']/n1:entryRelationship/n1:observation[n1:code/@code='7004']/n1:effectiveTime[not(@nullFlavor)]">
|
||
<td colspan="4">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Прекращение диспансерного наблюдения</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7002']/n1:entryRelationship/n1:observation[n1:code/@code='7004']/n1:effectiveTime/@value"/>
|
||
</xsl:call-template>
|
||
</p>
|
||
</td>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation/n1:entryRelationship/n1:observation[n1:code/@code='7005']/n1:value[not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Следующая явка</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation/n1:entryRelationship/n1:observation[n1:code/@code='7005']/n1:value"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7002']/n1:entryRelationship/n1:observation[n1:code/@code='7004']/n1:value[not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Причина прекращения диспансерного наблюдения</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='DOCINFO']/n1:entry/n1:observation[n1:code/@code='7002']/n1:entryRelationship/n1:observation[n1:code/@code='7004']/n1:value/@displayName"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</table>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='BENEFITS']">
|
||
<table class="block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Льготы</xsl:text>
|
||
</h2>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='BENEFITS']/n1:entry/n1:observation">
|
||
<p class="tableblack">
|
||
<xsl:value-of select="./n1:code/@displayName"/>
|
||
<xsl:text>: </xsl:text>
|
||
<xsl:value-of select="./n1:value/@displayName"/>
|
||
<br/>
|
||
</p>
|
||
</xsl:for-each>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<table class="block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Анамнез заболевания</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='ANAM']/n1:entry/n1:observation[n1:code/@code='7006']/n1:value[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='ANAM']/n1:entry/n1:observation[n1:code/@code='7006']/n1:value"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text>-</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Анамнез жизни</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@code='7006']/n1:value[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@code='7006']/n1:value"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text>-</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</p>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@codeSystem='1.2.643.5.1.13.13.11.1053'][not(@nullFlavor)]">
|
||
<h2 class="tableblack">
|
||
<u><xsl:text>Инвалидность:</xsl:text></u>
|
||
</h2>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@codeSystem='1.2.643.5.1.13.13.11.1053']">
|
||
<p class="tableblack">
|
||
<xsl:value-of select="./n1:code/@displayName"/>.
|
||
<xsl:value-of select="./n1:code/n1:qualifier/n1:value/@displayName"/>,
|
||
<xsl:value-of select="./n1:entryRelationship/n1:observation[n1:code/@code='4115']/n1:value/@displayName"/>
|
||
<xsl:text> (</xsl:text>
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="./n1:effectiveTime/n1:low/@value"/>
|
||
</xsl:call-template>
|
||
<xsl:choose>
|
||
<xsl:when test="./n1:effectiveTime/n1:high[not(@nullFlavor)]">
|
||
<xsl:text> — </xsl:text>
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="./n1:effectiveTime/n1:high/@value"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:text>)</xsl:text>
|
||
<xsl:choose>
|
||
<xsl:when test="./n1:entryRelationship/n1:observation[n1:code/@code='4058'][not(@nullFlavor)]">
|
||
<br/><xsl:text>Степень утраты профессиональной трудоспособности(%): </xsl:text>
|
||
<xsl:value-of select="./n1:entryRelationship/n1:observation[n1:code/@code='4058']/n1:value/@value"/>
|
||
<xsl:text>%</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="./n1:entryRelationship/n1:observation[n1:code/@code='4058']/n1:entryRelationship/n1:observation[n1:code/@code='4083'][not(@nullFlavor)]">
|
||
<br/><xsl:text>Срок, на который установлена степень утраты профессиональной трудоспособности: </xsl:text>
|
||
<xsl:value-of select="./n1:entryRelationship/n1:observation[n1:code/@code='4058']/n1:entryRelationship/n1:observation[n1:code/@code='4083']/n1:value/@displayName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@codeSystem='1.2.643.5.1.13.13.11.1059'][not(@nullFlavor)]">
|
||
<h2 class="tableblack">
|
||
<u><xsl:text>Потенциально-опасные для здоровья социальные факторы:</xsl:text></u>
|
||
</h2>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@codeSystem='1.2.643.5.1.13.13.11.1059']">
|
||
<p class="tableblack">
|
||
<xsl:value-of select="./n1:code/@displayName"/>
|
||
</p>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@codeSystem='1.2.643.5.1.13.13.11.1060'][not(@nullFlavor)]">
|
||
<h2 class="tableblack">
|
||
<u><xsl:text>Вредные производственные факторы:</xsl:text></u>
|
||
</h2>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@codeSystem='1.2.643.5.1.13.13.11.1060']">
|
||
<p class="tableblack">
|
||
<xsl:value-of select="./n1:code/@displayName"/>
|
||
</p>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@codeSystem='1.2.643.5.1.13.13.11.1058'][not(@nullFlavor)]">
|
||
<h2 class="tableblack">
|
||
<u><xsl:text>Вредные привычки и зависимости:</xsl:text></u>
|
||
</h2>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LANAM']/n1:entry/n1:observation[n1:code/@codeSystem='1.2.643.5.1.13.13.11.1058']">
|
||
<p class="tableblack">
|
||
<xsl:value-of select="./n1:code/@displayName"/>
|
||
</p>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table class="block-form">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='VITALPARAM']/n1:entry">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Витальные параметры</xsl:text>
|
||
</h2>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='VITALPARAM']/n1:entry/n1:organizer[n1:statusCode/@code='completed']/n1:precondition/n1:criterion/n1:value">
|
||
<p class="tableblack">
|
||
<table class="table-break">
|
||
<tr>
|
||
<th class="param">Дата измерения</th>
|
||
<th class="param">Параметр</th>
|
||
<th class="param">Значение</th>
|
||
<th class="param">Ед. изм.</th>
|
||
<th class="param">Комментарий</th>
|
||
</tr>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='VITALPARAM']/n1:entry/n1:organizer[n1:statusCode/@code='completed']/n1:component/n1:observation">
|
||
<tr>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:call-template name="formatDatewithTime">
|
||
<xsl:with-param name="newdate" select="../../n1:effectiveTime/@value"/>
|
||
</xsl:call-template>
|
||
</p>
|
||
</td>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:value-of select="./n1:code/@displayName"/>
|
||
</p>
|
||
</td>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:value-of select="./n1:value/n1:translation/@value"/>
|
||
</p>
|
||
</td>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:value-of select="./n1:value/n1:translation/@displayName"/>
|
||
</p>
|
||
</td>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:value-of select="../../n1:precondition/n1:criterion/n1:value"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:for-each>
|
||
</table>
|
||
</p>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<p class="tableblack">
|
||
<table class="table-break">
|
||
<tr>
|
||
<th class="param">Дата измерения</th>
|
||
<th class="param">Параметр</th>
|
||
<th class="param">Значение</th>
|
||
<th class="param">Ед. изм.</th>
|
||
</tr>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='VITALPARAM']/n1:entry/n1:organizer[n1:statusCode/@code='completed']/n1:component/n1:observation">
|
||
<tr>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:call-template name="formatDatewithTime">
|
||
<xsl:with-param name="newdate" select="../../n1:effectiveTime/@value"/>
|
||
</xsl:call-template>
|
||
</p>
|
||
</td>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:value-of select="./n1:code/@displayName"/>
|
||
</p>
|
||
</td>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:value-of select="./n1:value/n1:translation/@value"/>
|
||
</p>
|
||
</td>
|
||
<td class="param">
|
||
<p class="tableresult">
|
||
<xsl:value-of select="./n1:value/n1:translation/@displayName"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:for-each>
|
||
</table>
|
||
</p>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegrayhead">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:title"/>
|
||
</h2>
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='804'][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='804']/n1:code/@displayName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='804'][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='804']/n1:value/@displayName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='805'][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='805']/n1:code/@displayName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='805'][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='805']/n1:value"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='806'][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='806']/n1:code/@displayName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='806'][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='806']/n1:value"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='808'][not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='808']/n1:code/@displayName"/>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='808'][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='808']/n1:value/@displayName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='810'][not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='810']/n1:code/@displayName"/>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='810'][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='RESCONS']/n1:entry/n1:observation[n1:code/@code='810']/n1:value/@displayName"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table class="block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Диагнозы</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:component/n1:section[n1:code/@code='DGN']/n1:entry/n1:observation[n1:code/@code='806']/n1:value[1][not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:component/n1:section[n1:code/@code='DGN']/n1:entry/n1:observation[n1:code/@code='806']/n1:value[1]"/>
|
||
</xsl:when>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:component/n1:section[n1:code/@code='DGN']/n1:entry/n1:observation[n1:code/@code='806']/n1:value[1]/@nullFlavor">
|
||
<xsl:call-template name="formatNullFlavor">
|
||
<xsl:with-param name="nullflavor" select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:component/n1:section[n1:code/@code='DGN']/n1:entry/n1:observation[n1:code/@code='806']/n1:value[1]/@nullFlavor"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:component/n1:section[n1:code/@code='REGIME']/n1:entry/n1:observation[n1:code/@code='807'][not(@nullFlavor)]">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Режим и рекомендации</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section/n1:component/n1:section[n1:code/@code='REGIME']/n1:entry/n1:observation[n1:code/@code='807']/n1:value"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</table>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='SERVICES'][not(@nullFlavor)]">
|
||
<table class="block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Оказанные услуги</xsl:text>
|
||
</h2>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='SERVICES']/n1:entry/n1:act">
|
||
<p class="tableblack">
|
||
<xsl:value-of select="./n1:code/@code"/>
|
||
<xsl:text> </xsl:text>
|
||
<xsl:value-of select="./n1:code/@displayName"/>
|
||
<xsl:choose>
|
||
<xsl:when test="./n1:effectiveTime/@value">
|
||
<xsl:text> от </xsl:text>
|
||
<xsl:call-template name="formatDatewithTime">
|
||
<xsl:with-param name="newdate" select="./n1:effectiveTime/@value"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</xsl:for-each>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LINKDOCS']">
|
||
<table class="block-form">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegrayhead">
|
||
<xsl:text>Связанные документы</xsl:text>
|
||
</h2>
|
||
<xsl:for-each select="/n1:ClinicalDocument/n1:component/n1:structuredBody/n1:component/n1:section[n1:code/@code='LINKDOCS']/n1:entry/n1:act">
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:value-of select="./n1:code/@displayName"/>
|
||
<xsl:choose>
|
||
<xsl:when test="./n1:effectiveTime/@value">
|
||
<xsl:text> от </xsl:text>
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="./n1:effectiveTime/@value"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="./n1:entryRelationship/n1:observation[n1:code/@code='11002']/n1:value[not(@nullFlavor)]">
|
||
<xsl:text> (</xsl:text>
|
||
<xsl:value-of select="./n1:entryRelationship/n1:observation[n1:code/@code='11002']/n1:value"/>
|
||
<xsl:text>)</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<xsl:choose>
|
||
<xsl:when test="./n1:entryRelationship/n1:observation[n1:code/@code='11003']/n1:value[not(@nullFlavor)]">
|
||
<xsl:text> № </xsl:text>
|
||
<xsl:value-of select="./n1:entryRelationship/n1:observation[n1:code/@code='11003']/n1:value"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:value-of select="./n1:text"/>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</xsl:for-each>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
<table class="end-block-form">
|
||
<tr>
|
||
<td colspan="4">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Консультацию провел</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:author/n1:assignedAuthor/n1:code[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:author/n1:assignedAuthor/n1:code/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:author/n1:assignedAuthor/n1:assignedPerson/n1:name"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:effectiveTime[not(@nullFlavor)]">
|
||
<td colspan="4">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Дата составления</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:effectiveTime[not(@nullFlavor)]">
|
||
<xsl:call-template name="formatDate">
|
||
<xsl:with-param name="newdate" select="/n1:ClinicalDocument/n1:effectiveTime/@value"/>
|
||
</xsl:call-template>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="8">
|
||
<h2 class="tablegray">
|
||
<xsl:text>Документ заверил</xsl:text>
|
||
</h2>
|
||
<p class="tableblack">
|
||
<xsl:choose>
|
||
<xsl:when test="/n1:ClinicalDocument/n1:legalAuthenticator/n1:assignedEntity/n1:code[not(@nullFlavor)]">
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:legalAuthenticator/n1:assignedEntity/n1:code/@displayName"/>
|
||
<xsl:text>, </xsl:text>
|
||
<xsl:value-of select="/n1:ClinicalDocument/n1:legalAuthenticator/n1:assignedEntity/n1:assignedPerson/n1:name"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</body>
|
||
</html>
|
||
</xsl:template>
|
||
<xsl:template name="getR">
|
||
<xsl:param name="templateId"/>
|
||
<xsl:variable name="templateIdLength" select="string-length($templateId)"/>
|
||
<xsl:value-of select="substring ($templateId, $templateIdLength, 1)"/>
|
||
</xsl:template>
|
||
<xsl:template name="getYear">
|
||
<xsl:param name="date"/>
|
||
<xsl:variable name="dateLength" select="string-length($date)"/>
|
||
<xsl:value-of select="substring ($date, 1, 4)"/>
|
||
</xsl:template>
|
||
<xsl:template name="getMonth">
|
||
<xsl:param name="date"/>
|
||
<xsl:variable name="dateLength" select="string-length($date)"/>
|
||
<xsl:variable name="month" select="substring ($date, 5, 2)"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$dateLength>=6">
|
||
<xsl:value-of select="substring ($date, 5, 2)"/>
|
||
<xsl:text>.</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getTextMonth">
|
||
<xsl:param name="date"/>
|
||
<xsl:variable name="dateLength" select="string-length($date)"/>
|
||
<xsl:variable name="month" select="substring ($date, 5, 2)"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$dateLength>=6">
|
||
<xsl:choose>
|
||
<xsl:when test="$month='01'">
|
||
<xsl:text>января</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='02'">
|
||
<xsl:text>Февраля</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='03'">
|
||
<xsl:text>марта</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='04'">
|
||
<xsl:text>апреля</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='05'">
|
||
<xsl:text>мая</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='06'">
|
||
<xsl:text>июня</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='07'">
|
||
<xsl:text>июля</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='08'">
|
||
<xsl:text>августа</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='09'">
|
||
<xsl:text>сентября</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='10'">
|
||
<xsl:text>октября</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='11'">
|
||
<xsl:text>ноября</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$month='12'">
|
||
<xsl:text>декабря</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getDay">
|
||
<xsl:param name="date"/>
|
||
<xsl:variable name="dateLength" select="string-length($date)"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$dateLength>=8">
|
||
<xsl:value-of select="substring ($date, 7, 2)"/>
|
||
<xsl:text>.</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getName">
|
||
<xsl:param name="name"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$name/n1:family">
|
||
<xsl:if test="$name/n1:prefix">
|
||
<xsl:value-of select="$name/n1:prefix"/>
|
||
<xsl:text></xsl:text>
|
||
</xsl:if>
|
||
<xsl:value-of select="$name/n1:family"/>
|
||
<xsl:text></xsl:text>
|
||
<xsl:value-of select="$name/n1:given[1]"/>
|
||
<xsl:text></xsl:text>
|
||
<xsl:value-of select="$name/n1:given[2]"/>
|
||
<xsl:text></xsl:text>
|
||
<xsl:if test="$name/n1:suffix">
|
||
<xsl:value-of select="$name/n1:suffix"/>
|
||
</xsl:if>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="$name"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getHour">
|
||
<xsl:param name="date"/>
|
||
<xsl:variable name="dateLength" select="string-length($date)"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$dateLength>=10">
|
||
<xsl:text> </xsl:text>
|
||
<xsl:value-of select="substring ($date, 9, 2)"/>
|
||
<xsl:text>:</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getMinute">
|
||
<xsl:param name="date"/>
|
||
<xsl:variable name="dateLength" select="string-length($date)"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$dateLength>=12">
|
||
<xsl:value-of select="substring ($date, 11, 2)"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getSecond">
|
||
<xsl:param name="date"/>
|
||
<xsl:variable name="dateLength" select="string-length($date)"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$dateLength>=14">
|
||
<xsl:value-of select="substring ($date, 13, 5)"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getMKB">
|
||
<xsl:param name="code"/>
|
||
<xsl:param name="pos"/>
|
||
<xsl:value-of select="substring ($code, $pos, 1)"/>
|
||
</xsl:template>
|
||
<xsl:template name="getAges">
|
||
<xsl:param name="age"/>
|
||
<xsl:variable name="agestr" select="string($age)"/>
|
||
<xsl:variable name="agebefore100" select="substring($agestr, 2, 1)"/>
|
||
<xsl:variable name="ageafter100" select="substring($agestr, 3, 1)"/>
|
||
<xsl:variable name="age1234" select="substring($agestr, 1, 1)"/>
|
||
<xsl:if test="string-length($agestr)=2">
|
||
<xsl:choose>
|
||
<xsl:when test="($agebefore100='1') and (number($agestr)>20)">
|
||
<xsl:text> год</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="(($agebefore100='2') or ($agebefore100='3') or ($agebefore100='4')) and (number($agestr)>20)">
|
||
<xsl:text> года</xsl:text>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text> лет</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:if>
|
||
<xsl:if test="string-length($agestr)=1">
|
||
<xsl:choose>
|
||
<xsl:when test="$age1234='1'">
|
||
<xsl:text> год</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="($age1234='2') or ($age1234='3') or ($age1234='4')">
|
||
<xsl:text> года</xsl:text>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text> лет</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:if>
|
||
<xsl:if test="(number($agestr)>100) and (number($agestr)<110)">
|
||
<xsl:choose>
|
||
<xsl:when test="($ageafter100='1')">
|
||
<xsl:text> год</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="($ageafter100='2') or ($ageafter100='3') or ($ageafter100='4')">
|
||
<xsl:text> года</xsl:text>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text> лет</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:if>
|
||
<xsl:if test="(number($agestr)>120)">
|
||
<xsl:choose>
|
||
<xsl:when test="($ageafter100='1')">
|
||
<xsl:text> год</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="($ageafter100='2') or ($ageafter100='3') or ($ageafter100='4')">
|
||
<xsl:text> года</xsl:text>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text> лет</xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:if>
|
||
</xsl:template>
|
||
<xsl:template name="getAge">
|
||
<xsl:param name="birthdate"/>
|
||
<xsl:param name="deathdate"/>
|
||
<xsl:param name="withtext"/>
|
||
<xsl:variable name="bDay" select="substring ($birthdate, 7, 2)"/>
|
||
<xsl:variable name="dDay" select="substring ($deathdate, 7, 2)"/>
|
||
<xsl:variable name="bMonth" select="substring ($birthdate, 5, 2)"/>
|
||
<xsl:variable name="dMonth" select="substring ($deathdate, 5, 2)"/>
|
||
<xsl:variable name="bYear" select="substring ($birthdate, 1, 4)"/>
|
||
<xsl:variable name="dYear" select="substring ($deathdate, 1, 4)"/>
|
||
<xsl:variable name="age1" select="number($dYear)-number($bYear)"/>
|
||
<xsl:variable name="age2" select="number($dYear)-number($bYear)-1"/>
|
||
<xsl:choose>
|
||
<xsl:when test="number($dDay)-number($bDay)>=0">
|
||
<xsl:choose>
|
||
<xsl:when test="number($dMonth)-number($bMonth)>=0">
|
||
<xsl:value-of select="$age1"/>
|
||
<xsl:if test="$withtext=1">
|
||
<xsl:call-template name="getAges">
|
||
<xsl:with-param name="age" select="$age1"/>
|
||
</xsl:call-template>
|
||
</xsl:if>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="$age2"/>
|
||
<xsl:if test="$withtext=1">
|
||
<xsl:call-template name="getAges">
|
||
<xsl:with-param name="age" select="$age2"/>
|
||
</xsl:call-template>
|
||
</xsl:if>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:choose>
|
||
<xsl:when test="number($dMonth)-number($bMonth)-1>=0">
|
||
<xsl:value-of select="$age1"/>
|
||
<xsl:if test="$withtext=1">
|
||
<xsl:call-template name="getAges">
|
||
<xsl:with-param name="age" select="$age1"/>
|
||
</xsl:call-template>
|
||
</xsl:if>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="$age2"/>
|
||
<xsl:if test="$withtext=1">
|
||
<xsl:call-template name="getAges">
|
||
<xsl:with-param name="age" select="$age2"/>
|
||
</xsl:call-template>
|
||
</xsl:if>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getMonths">
|
||
<xsl:param name="birthdate"/>
|
||
<xsl:param name="deathdate"/>
|
||
<xsl:variable name="bDay" select="substring ($birthdate, 7, 2)"/>
|
||
<xsl:variable name="dDay" select="substring ($deathdate, 7, 2)"/>
|
||
<xsl:variable name="bMonth" select="substring ($birthdate, 5, 2)"/>
|
||
<xsl:variable name="dMonth" select="substring ($deathdate, 5, 2)"/>
|
||
<xsl:variable name="bYear" select="substring ($birthdate, 1, 4)"/>
|
||
<xsl:variable name="dYear" select="substring ($deathdate, 1, 4)"/>
|
||
<xsl:choose>
|
||
<xsl:when test="number($dYear)=number($bYear)">
|
||
<xsl:choose>
|
||
<xsl:when test="(string-length($birthdate)>=8) and (string-length($deathdate)>=8)">
|
||
<xsl:choose>
|
||
<xsl:when test="number($dDay)>=number($bDay)">
|
||
<xsl:value-of select="number($dMonth)-number($bMonth)"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="number($dMonth)-number($bMonth)-1"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:choose>
|
||
<xsl:when test="(string-length($birthdate)<6) or (string-length($deathdate)<6)">
|
||
<xsl:value-of select="0"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="number($dMonth)-number($bMonth)"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:choose>
|
||
<xsl:when test="(string-length($birthdate)>=8) and (string-length($deathdate)>=8)">
|
||
<xsl:choose>
|
||
<xsl:when test="number($dDay)>=number($bDay)">
|
||
<xsl:value-of select="number($dMonth)+12-number($bMonth)"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="number($dMonth)+12-number($bMonth)-1"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:choose>
|
||
<xsl:when test="(string-length($birthdate)<6) or (string-length($deathdate)<6)">
|
||
<xsl:value-of select="12"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="number($dMonth)+12-number($bMonth)"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="getDays">
|
||
<xsl:param name="birthdate"/>
|
||
<xsl:param name="deathdate"/>
|
||
<xsl:variable name="bDay" select="substring ($birthdate, 7, 2)"/>
|
||
<xsl:variable name="dDay" select="substring ($deathdate, 7, 2)"/>
|
||
<xsl:variable name="bMonth" select="substring ($birthdate, 5, 2)"/>
|
||
<xsl:variable name="dMonth" select="substring ($deathdate, 5, 2)"/>
|
||
<xsl:variable name="dYear" select="substring ($deathdate, 1, 4)"/>
|
||
<xsl:choose>
|
||
<xsl:when test="(string-length($birthdate)>=8) and (string-length($deathdate)>=8)">
|
||
<xsl:choose>
|
||
<xsl:when test="number($dDay)>=number($bDay)">
|
||
<xsl:value-of select="number($dDay)-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:choose>
|
||
<xsl:when test="number($dMonth)=1">
|
||
<xsl:value-of select="number($dDay)+31-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=2">
|
||
<xsl:value-of select="number($dDay)+31-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=3">
|
||
<xsl:choose>
|
||
<xsl:when test="number($dYear) mod 4=0">
|
||
<xsl:choose>
|
||
<xsl:when test="(number($dYear) mod 100)=0">
|
||
<xsl:choose>
|
||
<xsl:when test="(number($dYear) mod 400)=0">
|
||
<xsl:value-of select="number($dDay)+28-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="number($dDay)+29-number($bDay)"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="number($dDay)+29-number($bDay)"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="number($dDay)+28-number($bDay)"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=4">
|
||
<xsl:value-of select="number($dDay)+31-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=5">
|
||
<xsl:value-of select="number($dDay)+30-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=6">
|
||
<xsl:value-of select="number($dDay)+31-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=7">
|
||
<xsl:value-of select="number($dDay)+30-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=8">
|
||
<xsl:value-of select="number($dDay)+31-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=9">
|
||
<xsl:value-of select="number($dDay)+31-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=10">
|
||
<xsl:value-of select="number($dDay)+30-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=11">
|
||
<xsl:value-of select="number($dDay)+31-number($bDay)"/>
|
||
</xsl:when>
|
||
<xsl:when test="number($dMonth)=12">
|
||
<xsl:value-of select="number($dDay)+30-number($bDay)"/>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:value-of select="0"/>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="formatDate">
|
||
<xsl:param name="newdate"/>
|
||
<xsl:call-template name="getDay">
|
||
<xsl:with-param name="date" select="$newdate"/>
|
||
</xsl:call-template>
|
||
<xsl:call-template name="getMonth">
|
||
<xsl:with-param name="date" select="$newdate"/>
|
||
</xsl:call-template>
|
||
<xsl:call-template name="getYear">
|
||
<xsl:with-param name="date" select="$newdate"/>
|
||
</xsl:call-template>
|
||
</xsl:template>
|
||
<xsl:template name="formatDatewithTime">
|
||
<xsl:param name="newdate"/>
|
||
<xsl:call-template name="getDay">
|
||
<xsl:with-param name="date" select="$newdate"/>
|
||
</xsl:call-template>
|
||
<xsl:call-template name="getMonth">
|
||
<xsl:with-param name="date" select="$newdate"/>
|
||
</xsl:call-template>
|
||
<xsl:call-template name="getYear">
|
||
<xsl:with-param name="date" select="$newdate"/>
|
||
</xsl:call-template>
|
||
<xsl:call-template name="getHour">
|
||
<xsl:with-param name="date" select="$newdate"/>
|
||
</xsl:call-template>
|
||
<xsl:call-template name="getMinute">
|
||
<xsl:with-param name="date" select="$newdate"/>
|
||
</xsl:call-template>
|
||
</xsl:template>
|
||
<xsl:template name="formatContact">
|
||
<xsl:param name="contact"/>
|
||
<xsl:choose>
|
||
<xsl:when test="substring($contact,1,4)='tel:'">
|
||
<xsl:text>Тел: </xsl:text>
|
||
<xsl:value-of select="substring-after($contact[1], ':')"/>
|
||
<xsl:for-each select="$contact[position()>1]">
|
||
<xsl:text>; </xsl:text>
|
||
<xsl:value-of select="substring-after($contact[position()>1], ':')"/>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
<xsl:when test="substring($contact,1,7)='mailto:'">
|
||
<xsl:text>E-mail: </xsl:text>
|
||
<xsl:value-of select="substring-after($contact[1], ':')"/>
|
||
<xsl:for-each select="$contact[position()>1]">
|
||
<xsl:text>; </xsl:text>
|
||
<xsl:value-of select="substring-after($contact[position()>1], ':')"/>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
<xsl:when test="substring($contact,1,5)='http:'">
|
||
<xsl:text>Сайт: </xsl:text>
|
||
<xsl:value-of select="substring-after($contact[1], ':')"/>
|
||
<xsl:for-each select="$contact[position()>1]">
|
||
<xsl:text>; </xsl:text>
|
||
<xsl:value-of select="substring-after($contact[position()>1], ':')"/>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
<xsl:when test="substring($contact,1,4)='fax:'">
|
||
<xsl:text>Факс: </xsl:text>
|
||
<xsl:value-of select="substring-after($contact[1], ':')"/>
|
||
<xsl:for-each select="$contact[position()>1]">
|
||
<xsl:text>; </xsl:text>
|
||
<xsl:value-of select="substring-after($contact[position()>1], ':')"/>
|
||
</xsl:for-each>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="formatMedCard">
|
||
<xsl:param name="medcard"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$medcard='1'">
|
||
<xsl:text>Номер амбулаторной карты: </xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$medcard='2'">
|
||
<xsl:text>Номер стационарной карты: </xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$medcard='3'">
|
||
<xsl:text>Номер медицинской карты: </xsl:text>
|
||
</xsl:when>
|
||
<xsl:otherwise>
|
||
<xsl:text>Номер медицинской карты: </xsl:text>
|
||
</xsl:otherwise>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
<xsl:template name="formatNullFlavor">
|
||
<xsl:param name="nullflavor"/>
|
||
<xsl:choose>
|
||
<xsl:when test="$nullflavor='INV'">
|
||
<xsl:text>Недопустимое значение</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='NI'">
|
||
<xsl:text>Нет информации</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='OTH'">
|
||
<xsl:text>Другое</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='NINF'">
|
||
<xsl:text>Минус бесконечность</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='PINF'">
|
||
<xsl:text>Плюс бесконечность</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='NA'">
|
||
<xsl:text>Неприменимо</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='UNK'">
|
||
<xsl:text>Неизвестно</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='ASKU'">
|
||
<xsl:text>Запрошено, но неизвестно</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='NAV'">
|
||
<xsl:text>Временно недоступно</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='NASK'">
|
||
<xsl:text>Не запрашивалось</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='TRC'">
|
||
<xsl:text>Трудноразличимо</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='MSK'">
|
||
<xsl:text>Скрыто</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='DER'">
|
||
<xsl:text>Извлекаемое значение</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='UNC'">
|
||
<xsl:text>Кодирование не проводилось</xsl:text>
|
||
</xsl:when>
|
||
<xsl:when test="$nullflavor='QS'">
|
||
<xsl:text>Достаточное количество</xsl:text>
|
||
</xsl:when>
|
||
</xsl:choose>
|
||
</xsl:template>
|
||
</xsl:transform>
|
||
|
||
<!-- Список изменений:
|
||
|
||
v1.7: Скорректированы стили и getAges для работы РЭМДа -->
|