<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        .style1 {
            width: 5%;
        }

        .style2 {
            font-size: small;
            font-weight: bold;
        }

        .style3 {
            font-size: 12pt;
            font-weight: bold;
        }

        .BodyStyle {
            font-family: "Times New Roman", Times, serif;
        }

        .ultranonprint {
            font-size: 12pt;
            height: 10px;
            padding: 1em;
            width: 100%;
        }

        .ultranonprint1 {
            font-size: 12pt;
            width: 1%;
        }

        .nonprintstyle {
            font-size: 9pt;
        }

        .printstyle {
            font-size: 9pt;
        }

        .printstyle1 {
            font-size: 9pt;
            height: 10px;
            padding: 1em;
            margin-bottom: 1em;
            width: 100%;
        }

        H3 {
            padding: 0px;
            margin: 0px;
        }

        table.printstyle {
            border-collapse: collapse;
            width: 100%;
            border: 1px solid #000;
            margin-bottom: 15px;
        }


            table.printstyle th,
            table.printstyle td {
                border: 1px solid #000;
                text-align: center;
                padding: 8px;
                vertical-align: middle;
                font-size: 12pt;
            }

            table.printstyle th {
                background-color: #e0e0e0;
                font-weight: bold;
                font-size: 10pt;
            }

                table.printstyle th:first-child {
                    text-align: left;
                    background-color: #f2f2f2;
                    font-weight: bold;
                }

            table.printstyle tr:nth-child(even) {
                background-color: #f9f9f9;
            }

            table.printstyle a {
                color: #0066cc;
                text-decoration: none;
            }

        .table-container {
            overflow: hidden;
            width: 100%;
        }

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

            .ultranonprint {
                display: none;
            }

            .ultranonprint1 {
                display: none;
            }

            table.printstyle {
                border: 1px solid #000;
            }

                table.printstyle th,
                table.printstyle td {
                    border: 1px solid #000;
                    padding: 5px;
                    text-align: center;
                }
        }
    </style>
    <script type="text/javascript">
        function changeStyle(obj, style) {
            var h = document.getElementById(obj);
            h.className = (h.className == "nonprintstyle") ? "printstyle" : "nonprintstyle";
        }

    </script>
</head>
<body>
    <table width="100%">
        <tr>
            <td style="text-align:left"><b>Ф.И.О.%%{[0]/ VaccinationCardRecord /AmbulanceCard/Patient/cFIO}%%&nbsp</b></td>
            <td style="text-align:right"> <i>Форма №63</i></td>
        </tr>
        <tr>
            <td style="text-align:left"><b>Дата рождения %%{[0]/ VaccinationCardRecord /AmbulanceCard/Patient/ Birthday{dd.MM.yyyy}}%%&nbsp</b></td>
            <td style="text-align:right"><b>Адрес %%{[0]/ VaccinationCardRecord /AmbulanceCard/Patient/AddressReal/ShortAddress}%%&nbsp</b></td>
        </tr>
        <tr>
            <td style="text-align:left; background-color: #999999;" colspan="2">&nbsp;</td>            
        </tr>
    </table>
    %%#xsl:group-by select='{*}' paths='{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' sort='{VaccinationCardRecord / PostingDate};{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' filter='{VaccinationCardRecord / ObjectProperties / ObjectTypeID} IS "AKUZ.INOCULATION_ACCEPT" And {ObjectProperties / ObjectTypeID} IS "AKUZ.VACCINATION_LINK_LIBRARY" Or {ObjectProperties / ObjectTypeID} IS "AKUZ.VACCINATION_LINK_VTYPE" And {VaccineLibrary / VaccineType / Name} <> "Туберкулез" And {VaccineLibrary / VaccineType / Name} <> "Туберкулинодиагностика" Or {ObjectProperties / ObjectTypeID} IS "AKUZ.VACCINATION_LINK_VTYPE" And {VaccinationCardRecord / ObjectProperties / ObjectTypeID} IS "AKUZ.VACCINATION_CANCEL"'%%
    %%#xsl:for-each select='{*}'%%
    %%#xsl:once%%
    <table border="0" width="100%" cellspacing="0" class="printstyle " id="1">
        <tr>
            <td style="text-align:left;" colspan="9" class="style3">
                <b><i>Вакцинопрофилактика</i></b><span class="ultranonprint">
                    <input type="checkbox" id="Checkbox100" checked="true" onclick="javascript:changeStyle('1', 'nonprintstyle')" />Печатать
                </span>
            </td>
        </tr>
        <tr>
            <td>
                <br />
                %%#xsl:end%%
                <table border="1" width="100%" cellspacing="0" class="printstyle " id="%%{#group-by-groups(0)}%%">
                    <tr>
                        <td style="text-align:left;" colspan="9">
                            <b><i>%%{#group-by-groups(0)}%%</i></b><span class="ultranonprint">
                                <input type="checkbox" id="Checkbox1" checked="true" onclick="javascript:changeStyle('%%{#group-by-groups(0)}%%', 'nonprintstyle')" />Печатать
                            </span>
                        </td>
                    </tr>
                    <tr style="font-size:12px">
                        <th class="ultranonprint1">
                        </th>
                        <th style="width:5%">Дата</th>
                        <th style="width:12%">Возраст пациента</th>
                        <th style="width:20%">Наименование</th>
                        <th style="width:5%">Доза</th>
                        <th style="width:5%">Серия</th>
                        <th style="width:20%">Препарат</th>
                        <th style="width:23%">Медицинский отвод</th>
                        <th style="width:10%" class="ultranonprint">&nbsp</th>
                    </tr>
                    %%#xsl:for-each select='{*}'%%
                    <tr style="font-size:12px" class="printstyle" id="%%{VaccinationCardRecord / MedicalRecordID}%%">
                        <td class="ultranonprint1">
                            <span class="ultranonprint1">
                                <input type="checkbox" id="Checkbox2" checked="true" onclick="javascript:changeStyle('%%{VaccinationCardRecord / MedicalRecordID}%%', 'nonprintstyle')" />
                            </span>
                        </td>
                        <td>%%{VaccinationCardRecord / PostingDate}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / PatientAge}%%&nbsp</td>
                        <td>%%{VaccineLibrary / Name} = Null() ? {VaccineLibrary / VaccineType / Name} : {VaccineLibrary / Name}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT / Dose}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT /Seria}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT / VaccineDrug/ Name}%%&nbsp</td>
                        <td>%%"Причина отказа: "+ {VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / VacctinationOtvod / Name}+ ". "%%&nbsp%%IsNull({VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / MovingDate}, Null(),  "Дата переноса: " + Str({VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / MovingDate}, "dd.MM.yyyy"))%%&nbsp</td>
                        <td class="nonprintstyle" colspan="2">
                            &nbsp;<a href="command=open&bo=%%{VaccinationCardRecord / MedicalRecordID}%%|%%{VaccinationCardRecord / Type}%%">
                                <span class="style2">Просмотр и редактирование</span>
                            </a>
                        </td>
                    </tr>
                    %%#xsl:end%%
                </table>
                %%#xsl:end%%
                %%#xsl:end%%
            </td>
        </tr>
    </table>
    <br />

    %%#xsl:group-by select='{*}' paths='{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' sort='{VaccinationCardRecord / PostingDate};{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' filter='({VaccinationCardRecord / ObjectType} = 1093 And {ObjectType} = 1077) Or ({ObjectType} = 1090 And {VaccineLibrary / VaccineType / Name} = "Туберкулез")'%%
    %%#xsl:for-each select='{*}'%%
    %%#xsl:once%%
    <table border="0" width="100%" cellspacing="0" class="printstyle " id="2">
        <tr>
            <td style="text-align:left;" colspan="9" class="style3">
                <b><i>Вакцинация против туберкулеза</i></b><span class="ultranonprint">
                    <input type="checkbox" id="Checkbox100" checked="true" onclick="javascript:changeStyle('2', 'nonprintstyle')" />Печатать
                </span>
            </td>
        </tr>
        <tr>
            <td>
                <br />
                %%#xsl:end%%
                <table border="1" width="100%" cellspacing="0" class="printstyle " id="%%{#group-by-groups(0)}%%">
                    <tr>
                        <td style="text-align:left;" colspan="9">
                            %%{#group-by-groups(0)}%%
                        </td>
                    </tr>
                    <tr style="font-size:12px">
                        <th class="ultranonprint1"></th>
                        <th style="width:5%">Дата</th>
                        <th style="width:12%">Возраст пациента</th>
                        <th style="width:20%">Наменование</th>
                        <th style="width:5%">Доза</th>
                        <th style="width:5%">Серия</th>
                        <th style="width:20%">Препарат</th>
                        <th style="width:23%">Медицинский отвод</th>
                        <th style="width:10%" class="ultranonprint">&nbsp</th>
                    </tr>
                    %%#xsl:for-each select='{*}'%%
                    <tr style="font-size:12px" class="printstyle" id="%%{VaccinationCardRecord / MedicalRecordID}%%">
                        <td class="ultranonprint1">
                            <span class="ultranonprint1">
                                <input type="checkbox" id="cb1" checked="true" onclick="javascript:changeStyle('%%{VaccinationCardRecord / MedicalRecordID}%%', 'nonprintstyle')" />
                            </span>
                        </td>
                        <td>%%{VaccinationCardRecord / PostingDate}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / PatientAge}%%&nbsp</td>
                        <td>%%{VaccineLibrary / Name} = Null() ? {VaccineLibrary / VaccineType / Name} : {VaccineLibrary / Name}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT / Dose}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT /Seria}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT / VaccineDrug/ Name}%%&nbsp</td>
                        <td>%%"Причина отказа: "+ {VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / VacctinationOtvod / Name}+ ". "%%&nbsp%%IsNull({VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / MovingDate}, Null(),  "Дата переноса: " + Str({VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / MovingDate}, "dd.MM.yyyy"))%%&nbsp</td>
                        <td class="nonprintstyle" colspan="2">
                            &nbsp;<a href="command=open&bo=%%{VaccinationCardRecord / MedicalRecordID}%%|%%{VaccinationCardRecord / Type}%%">
                                <span class="style2">Просмотр и редактирование</span>
                            </a>
                        </td>
                    </tr>
                    %%#xsl:end%%
                </table>
                %%#xsl:end%%
                %%#xsl:end%%
            </td>
        </tr>
    </table>
    <br />

    %%#xsl:group-by select='{*}' paths='{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' sort='{VaccinationCardRecord / PostingDate};{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' filter='{VaccinationCardRecord / ObjectType} = 1086 And {ObjectType} = 1077 Or {ObjectType} = 1090 And {VaccineLibrary / VaccineType / Name} = "Туберкулинодиагностика"'%%
    %%#xsl:for-each select='{*}'%%
    %%#xsl:once%%
    <table border="0" width="100%" cellspacing="0" class="printstyle " id="3">
        <tr>
            <td style="text-align:left;" colspan="11" class="style3">
                <b><i>Туберкулинодиагностика (таблица №1)</i></b><span class="ultranonprint">
                    <input type="checkbox" id="Checkbox100" checked="true" onclick="javascript:changeStyle('3', 'nonprintstyle')" />Печатать
                </span>
            </td>
        </tr>
        <tr>
            <td>
                <br />
                %%#xsl:end%%
                <table border="1" width="100%" cellspacing="0" class="printstyle " id="%%{#group-by-groups(0)}%%">
                    <tr>
                        <td style="text-align:left;" colspan="11">
                            %%{#group-by-groups(0)}%%
                        </td>
                    </tr>
                    <tr style="font-size:12px">
                        <th class="ultranonprint1">
                        </th>
                        <th style="width:8%">Дата</th>
                        <th style="width:30%">Наменование</th>
                        <th class="style1">Доза</th>
                        <th style="width:5%">Серия</th>
                        <th style="width:5%">Контроль</th>
                        <th style="width:10%">Правая или левая рука</th>
                        <th style="width:10%">Дата проверки</th>
                        <th style="width:12%">Результат пробы</th>
                        <th style="width:20%">Медицинский отвод</th>
                        <th style="width:10%" class="ultranonprint">&nbsp</th>
                    </tr>
                    %%#xsl:for-each select='{*}'%%
                    <tr style="font-size:12px" class="printstyle" id="%%{VaccinationCardRecord / MedicalRecordID}%%">
                        <td class="ultranonprint1">
                            <span class="ultranonprint1">
                                <input type="checkbox" id="cb1" checked="true" onclick="javascript:changeStyle('%%{VaccinationCardRecord / MedicalRecordID}%%', 'nonprintstyle')" />
                            </span>
                        </td>
                        <td>%%{VaccinationCardRecord / PostingDate}%%&nbsp</td>
                        <td>%%{VaccineLibrary / Name} = Null() ? {VaccineLibrary / VaccineType / Name} : {VaccineLibrary / Name}%%&nbsp(%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT / VaccineDrug / Name}%%)&nbsp</td>
                        <td class="style1">%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT /Dose}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT / Seria}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT / ControlNumber}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / Hand}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult / ResultDate}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult / Result}%%&nbsp</td>
                        <td>%%"Причина отказа: "+ {VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / VacctinationOtvod / Name}+ ". "%%&nbsp%%IsNull({VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / MovingDate}, Null(),  "Дата переноса: " + Str({VaccinationCardRecord / As AKUZ.VACCINATION_CANCEL / MovingDate}, "dd.MM.yyyy"))%%&nbsp</td>
                        <td class="nonprintstyle" colspan="2">
                            &nbsp;<a href="command=open&bo=%%{VaccinationCardRecord/MedicalRecordID}%%|%%{VaccinationCardRecord / Type}%%">
                                <span class="style2">
                                    %%#xsl:if lexem='{VaccinationCardRecord / ObjectType} = 1086 And {ObjectType} = 1077 And {VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult} = Null()'%%
                                    Добавить результат
                                    %%#xsl:end%%
                                    %%#xsl:if lexem='{VaccinationCardRecord / ObjectType} = 1086 And {ObjectType} = 1077 And {VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult} <> Null()'%%
                                    Просмотр и редактирование
                                    %%#xsl:end%%
                                </span>
                            </a>
                        </td>
                    </tr>
                    %%#xsl:end%%
                </table>
                %%#xsl:end%%
                %%#xsl:end%%
            </td>
        </tr>
    </table>
    <br />

    %%#xsl:group-by select='{*}' paths='{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' sort='{VaccinationCardRecord / PostingDate};{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' filter='{VaccinationCardRecord / ObjectType} = 1086 And {ObjectType} = 1077 And {VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult} <> Null()'%%
    %%#xsl:for-each select='{*}'%%
    %%#xsl:once%%
    <table border="0" width="100%" cellspacing="0" class="printstyle " id="4">
        <tr>
            <td style="text-align:left;" colspan="6" class="style3">
                <b><i>Туберкулинодиагностика (таблица №2)</i></b><span class="ultranonprint">
                    <input type="checkbox" id="Checkbox100" checked="true" onclick="javascript:changeStyle('4', 'nonprintstyle')" />Печатать
                </span>
            </td>
        </tr>
        <tr>
            <td>
                <br />
                %%#xsl:end%%
                <table border="1" width="100%" cellspacing="0" class="printstyle " id="%%{#group-by-groups(0)}%%">
                    <tr>
                        <td style="text-align:left;" colspan="6">
                            %%{#group-by-groups(0)}%%
                        </td>
                    </tr>
                    <tr style="font-size:12px">
                        <th class="ultranonprint1">
                        </th>
                        <th style="width:7%">Дата проведения</th>
                        <th style="width:33%">Наменование</th>
                        <th class="style1">Результат пробы</th>
                        <th style="width:5%">Размер папулы в мм</th>
                        <th style="width:5%">Размер гиперемии в мм</th>
                    </tr>
                    %%#xsl:for-each select='{*}'%%
                    <tr style="font-size:12px" class="printstyle" id="%%{VaccinationCardRecord / MedicalRecordID}%%">
                        <td class="ultranonprint1">
                            <span class="ultranonprint1">
                                <input type="checkbox" id="cb1" checked="true" onclick="javascript:changeStyle('%%{VaccinationCardRecord / MedicalRecordID}%%', 'nonprintstyle')" />
                            </span>
                        </td>
                        <td>%%{VaccinationCardRecord / PostingDate}%%&nbsp</td>
                        <td>%%{VaccineLibrary / Name}%%&nbsp(%%{VaccinationCardRecord / As AKUZ.VACCINATION_ACCEPT / VaccineDrug / Name}%%)&nbsp</td>
                        <td class="style1">%%{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult /  Result}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult / Papule}%%&nbsp</td>
                        <td>%%{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult / Giperemia}%%&nbsp</td>
                    </tr>
                    %%#xsl:end%%
                </table>
                %%#xsl:end%%
                %%#xsl:end%%
            </td>
        </tr>
    </table>
    <br />

    <table border="0" width="100%" cellspacing="0" class="printstyle " id="5">
        <tr>
            <td style="text-align:left;" colspan="11">
                <span class="ultranonprint">
                    <input type="checkbox" id="Checkbox100" checked="true" onclick="javascript:changeStyle('5', 'nonprintstyle')" />Печатать
                </span>
            </td>
        </tr>
        <tr>
            <td>
                <br />
                <ImageBegin Type=1>
                    <Properties> AxisXLabel = Номера туберкулиновых проб AxisYLabel = Размер папулы в мм ChartTitle = Динамика реакции туберкулинодиагностики </Properties>
                    %%#xsl:group-by select='{*}' paths='{VaccineLibrary / VaccineType / Name} = Null() ? {As AKUZ.VACCINATION_LINK_VTYPE / VaccineType / Name} : {VaccineLibrary / VaccineType / Name}' sort='{VaccinationCardRecord / PostingDate}' filter='{VaccinationCardRecord / ObjectType} = 1086 And {ObjectType} = 1077 And {VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult} <> Null()'%%
                    %%#xsl:for-each select='{*}'%%
                    %%{#group-by-groups(0)}%%
                    <table>
                        %%#xsl:for-each select='{*}'%%
                        %%#xsl:if lexem='{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult / Papule} = Null()'%%
                        <tr> 0 </tr>
                        %%#xsl:end%%
                        %%#xsl:if lexem='{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT / MantuResult / Papule} <> Null()'%%
                        <tr>%%{VaccinationCardRecord / As AKUZ.MANTU_ACCEPT/ MantuResult/ Papule}%%</tr>
                        %%#xsl:end%%
                        %%#xsl:end%%
                    </table>
                    %%#xsl:end%%
                    %%#xsl:end%%
                    <ImageEnd Type=1>
                    </ImageEnd>
                </ImageBegin>
            </td>
        </tr>
    </table>
</body>
</html>
