<style>
    @media print {
        #patient_profile_print {
            transform: scale(.9);
        }

        .noborder tr {
            height: 8mm;
        }

        .txtl {
            text-align: left !important;
        }

        .bold {
            font-weight: bold;
        }

        .h1 {
            font-weight: 900;
            font-size: 28px;
        }

        .h3 {
            font-weight: 700;
            font-size: 24px;
        }

        .col-md-12 {
            width: 100% !important;
        }

        .col-md-4 {
            width: 33% !important;
        }

        .col-md-8 {
            width: 66% !important;
        }

        .break {
            page-break-after: always;
        }
    }
</style>

<style>
    table {
        font-family: arial, sans-serif;
        border-collapse: collapse;
        width: 100%;

    }


    td:not(.patient_data),
    th {
        border: 1px solid #000000;
        text-align: center;
        padding: 2px;
    }

    tr:nth-child(even) {
        background-color: #dddddd;
    }
</style>






<style>
    @page {
        ldelim
    }

    size: auto;

    margin-top: {
        $ProgramesettingData->above
    }

    cm;

    margin-bottom: {
        $ProgramesettingData->buttom
    }

    cm;

        {
        rdelim
    }

    .arbfnt {
        ldelim
    }

    font-size: {
        $ProgramesettingData->fontsizear
    }

    px !important;

        {
        rdelim
    }

    .enfnt {
        ldelim
    }

    font-size: {
        $ProgramesettingData->fontsizeen
    }

    px !important;

        {
        rdelim
    }
</style>


<div class="row">

    <!-- BEGIN EXAMPLE TABLE PORTLET-->
    <div class="portlet-title">
        <div class="caption">
            <h2 style="text-align:center">Embryo Freezing Report</h2>
        </div>
    </div>
    <!--Begin Semen-->


    <table style="border: 1px black solid;">
        <tr>
            <td>

                <label>Wife Name :</label>
            </td>

            <td>
                {$wifename}

            </td>
            <td>

                <label>Age:</label>
            </td>

            <td>
                {$wifeage}

            </td>
            <td>
                <label>&nbsp; Date :</label>
            </td>
            <td>
                {$embryofreezingreport.date}
            </td>

        </tr>
        <tr>
            <td>
                <label>Husband Name :</label>

            </td>
            <td>
                {$husbandname}
            </td>
            <td>

                <label>ID:</label>
            </td>
            <td>
                {$embryofreezingreport.id}
            </td>

        </tr>

        <tr>
            <td>
                <label>Ref. by Prof. Dr :</label>
            </td>
            <td>
                {$ref_dr}

            </td>
            <td>

                <label>Embryologist :</label>
            </td>
            <td>
                {$embryofreezingreport.embryologist_name}

            </td>
        </tr>
    </table>
    <table class="noborder">
        <tr>
            <td>No.of Straws:</td>
            <td>{$embryofreezingreport.no_of_straws}</td>
            <td>No.of Embryos :</td>
            <td>{$embryofreezingreport.no_of_embryos }</td>
        </tr>
        <tr>
            <td>Day of freezing:</td>
            <td><input type="checkbox" {if $embryofreezingreport.day_of_freezing==2 } checked {/if}> 2nd day </td>
            <td><input type="checkbox" {if $embryofreezingreport.day_of_freezing==3 } checked {/if}> 3rd day </td>
            <td><input type="checkbox" {if $embryofreezingreport.day_of_freezing==4 } checked {/if}> 4th day </td>
            <td><input type="checkbox" {if $embryofreezingreport.day_of_freezing==5 } checked {/if}> 5th day </td>
            <td><input type="checkbox" {if $embryofreezingreport.day_of_freezing==6 } checked {/if}> 6th day </td>
        </tr>
        <tr>
            <td>Collapsed:</td>
            <td><input type="checkbox" {if $embryofreezingreport.collapsed==1 } checked {/if}> Yes</td>
            <td><input type="checkbox" {if $embryofreezingreport.collapsed==0 } checked {/if}> No </td>
        </tr>
        <tr>
            <td>Note:</td>
            <td>{$embryofreezingreport.notes}</td>
        </tr>
    </table>

    <table style="border:1px solid black; border-collapse: collapse;">
        <thead>
            <tr>
                <th rowspan="2">Embryo</th>
                <th colspan="2">1</th>
                <th colspan="2">2</th>
                <th colspan="2">3</th>
                <th colspan="2">4</th>
                <th colspan="2">5</th>
                <th colspan="2">6</th>
            </tr>
            <tr>
                <th>stage</th>
                <th>grade</th>
                <th>stage</th>
                <th>grade</th>
                <th>stage</th>
                <th>grade</th>
                <th>stage</th>
                <th>grade</th>
                <th>stage</th>
                <th>grade</th>
                <th>stage</th>
                <th>grade</th>
            </tr>
        </thead>
        <tbody>
            {assign var=m value=1}
            {foreach $embryos as $embryo}
            <tr>
                <th> Straw # {$m} </th>
                <td>
                    {foreach $stages as $one}
                    {if $embryo.stage1 eq $one.id}{$one.stage}{/if}</option>
                    {/foreach}
                </td>

                <td>{foreach $grades as $one}
                    {if $embryo.grade1 eq $one.id}{$one.grade}{/if}
                    {/foreach}
                </td>

                <td>
                    {foreach $stages as $one}
                    {if $embryo.stage2 eq $one.id}{$one.stage}{/if}
                    {/foreach}
                </td>

                <td>{foreach $grades as $one}
                    {if $embryo.grade2 eq $one.id}{$one.grade}{/if}
                    {/foreach}
                </td>
                <td>{foreach $stages as $one}
                    {if $embryo.stage3 eq $one.id}{$one.stage}{/if}
                    {/foreach}
                </td>

                <td>{foreach $grades as $one}
                    {if $embryo.grade3 eq $one.id}{$one.grade}{/if}
                    {/foreach}
                </td>
                <td>{foreach $stages as $one}
                    {if $embryo.stage4 eq $one.id}{$one.stage}{/if}
                    {/foreach}
                </td>

                <td>{foreach $grades as $one}
                    {if $embryo.grade4 eq $one.id}{$one.grade}{/if}
                    {/foreach}
                </td>

                <td>{foreach $stages as $one}
                    {if $embryo.stage5 eq $one.id}{$one.stage}{/if}
                    {/foreach}
                </td>

                <td>{foreach $grades as $one}
                    {if $embryo.grade5 eq $one.id}{$one.grade}{/if}
                    {/foreach}
                </td>

                <td>{foreach $stages as $one}
                    {if $embryo.stage6 eq $one.id}{$one.stage}{/if}
                    {/foreach}
                </td>

                <td>{foreach $grades as $one}
                    {if $embryo.grade6 eq $one.id}{$one.grade}{/if}
                    {/foreach}
                </td>
            </tr>
            {capture assign=m}{$m+1}{/capture}
            {/foreach}
        </tbody>
    </table>
</div>
<div class="row">
    <label>Location:</label>
    {if $programesetting->tanks_view == 1 }
    {foreach $cells as $cell}
    Can {$cell.location}{$cell.btn_no}
    ({$cell.rows_letter}{$cell.row_no} -
    {$cell.col_no} -
    cell{$cell.cell_no})
    {/foreach}
    {elseif $programesetting->tanks_view == 2 }
    {foreach $tank_cells as $cell}
    <label>{$cell.name}-{$cell.up_level_name}-{$cell.cell_name}</label>
    {/foreach}
    {foreach $tank_cells_2 as $cell}
    <label>{$cell.name}-{$cell.up_level_name}-{$cell.cell_name}-{$cell.cell_part_name}</label>
    {/foreach}
    {foreach $tank_cells_3 as $cell}
    <label>{$cell.name}-{$cell.up_level_name}-{$cell.cell_name}-{$cell.cell_part_name}</label>
    {/foreach}
    {/if}
</div>

<div class="row">
    <div class="portlet-title">
        <div class="caption">
            <h3>Embryo Thawing</h2>
        </div>
    </div>
    <table>
        <thead>
            <tr>
                <th>Straw</th>
                <th>No. of Embryos</th>
                <th>Thawing Date</th>
                <th>Recovered</th>
                <th>Lost</th>
                <th>E.T Date</th>
                <th>Embryos</th>
                <th>Grades</th>
                <th>Embryologist</th>
                <th>Clinician</th>
                <th>Cathetr</th>
            </tr>
        </thead>
        <tbody>
            {assign var=m value=1}
            {foreach $embryothawing as $data}
            {if !in_array(($m % 100),[11,12,13])}
            {if ($m%10) == 1}
            {assign var=mm value='st'}
            {elseif ($m%10) ==2}
            {assign var=mm value='nd'}
            {elseif ($m%10) ==3}
            {assign var=mm value='rd'}
            {/if}
            {else}
            {assign var=mm value='th'}
            {/if}
            <tr>
                <th> # {$m}{$mm}</th>
                <td>
                    {$data.no_of_embryos}
                </td>
                <td>
                    {$data.thawing_date}
                </td>

                <td>
                    {$data.recovered}
                </td>

                <td>
                    {$data.lost}
                </td>

                <td>
                    {$data.e_t_date}
                </td>

                <td>
                    {$data.embryos}
                </td>

                <td>
                    {$data.grades}
                </td>

                <td>
                    {foreach $embryologist as $one}
                    {if $data.embryol_oigist eq $one.user_id}{$one.name}{/if}
                    {/foreach}
                </td>

                <td>{foreach $clinician as $one}
                    {if $data.clinician eq $one.user_id}{$one.name}{/if}
                    {/foreach}
                </td>

                <td>
                    {$data.cathetr}
                </td>
            </tr>
            {capture assign=m}{$m+1}{/capture}
            {/foreach}
        </tbody>
    </table>
</div>