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

    td,
    th {
        border: 1px solid #000000;
        text-align: left;
        padding: 8px;
    }

    tr:nth-child(even) {
        background-color: #dddddd;
    }
</style>
<div class="page-content-wrapper">
    <div class="page-content">
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-user"></i>Embryo Freezing Report
                        </div>
                    </div>
                    <div class="portlet-body">

                        <!--Begin Semen-->

                        <div class="row">


                            <div class="portlet-title tbox">
                                <div class="caption font-blue-haze col-md-6">
                                    <span class="caption-subject bold uppercase">Add</span>
                                </div>

                            </div>

                            <div class="clearfix"></div>

                            {if $patientId}
                            <form action="{$hosturl}/controllers/{$controllname}.php?ac=updateit&patientid={$patientId}"
                                method="post" enctype="multipart/form-data">
                                {else}
                                <form action="{$hosturl}/controllers/{$controllname}.php?ac=updateit" method="post"
                                    enctype="multipart/form-data">
                                    {/if}
                                    <input type="hidden" name="id" value="{$embryofreezingreport->id}">
                                    <div class="form-body">
                                        <div class="col-md-12">
                                            <div class="form-group col-md-12">
                                                <div class="form-group col-md-12">
                                                    <label class="col-md-2 txtl " for="form_control_1">Date :</label>
                                                    <div class="col-md-3">
                                                        <input type="text" class="form-control  datepicker"
                                                            required="required" value="{$embryofreezingreport->date}"
                                                            name="date" />
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                                <label class="col-md-2 txtl" for="form_control_1">Ref.by . Prof. Dr
                                                    :</label>
                                                <div class="col-md-3">
                                                    <input type="text" class="form-control " readonly
                                                        required="required"
                                                        value="{if !empty($ref_dr['name'])}{$ref_dr['name']}{else}{$ref_dr}{/if}"
                                                        name="ref_by" />
                                                    <input type="hidden"
                                                        value="{if !empty($ref_dr['user_id'])}{$ref_dr['user_id']}{else}0{/if}"
                                                        name="ref_by_dr_id" />

                                                </div>
                                                <label class="col-md-2 txtl" for="form_control_1">Embryologist :</label>
                                                <div class="col-md-3">
                                                    <select class="form-control select2me" id="embryologist"
                                                        name="embryologist" data-colName="name"
                                                        select-tableName="awusers" data-id="{$one.user_id}"
                                                        required="required">
                                                        <option value="">choose</option>
                                                        {foreach $embryologist as $one}
                                                        <option value="{$one.user_id}" {if
                                                            $one.user_id==$embryofreezingreport.embryologist}selected{/if}>
                                                            {$one.name}</option>
                                                        {/foreach}
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="clearfix"></div>
                                            <hr>
                                            <div class="form-group col-md-12">
                                                <div class="form-group col-md-12">
                                                    <label class="col-md-2 txtl" for="form_control_1">No.of Straws
                                                        :</label>
                                                    <div class="col-md-2">
                                                        <input type="text" class="form-control"
                                                            value="{$embryofreezingreport.no_of_straws}"
                                                            name="no_of_straws" id="no_of_straws" />
                                                    </div>
                                                </div>
                                                <div class="form-group col-md-12">
                                                    <label class="col-md-2 txtl" for="form_control_1">No.of Embryos
                                                        :</label>
                                                    <div class="col-md-2">
                                                        <input type="text" class="form-control "
                                                            value="{$embryofreezingreport.no_of_embryos}"
                                                            name="no_of_embryos" id="no_of_embryos" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12">
                                                <label class="col-md-3 control-label" for="form_control_1">
                                                    Day of Freezing:
                                                </label>
                                                <div class="col-md-8">
                                                    <div class="col-md-2">
                                                        <div class="md-radio-list">
                                                            <div class="md-radio">
                                                                <input type="radio" id="2d" name="days"
                                                                    class="md-radiobtn sradio" data-val="0" value="0"
                                                                    {if $embryofreezingreport.day_of_freezing eq 0}
                                                                    checked {/if}>
                                                                <label for="2d">
                                                                    <span></span>
                                                                    <span class="check"></span>
                                                                    <span class="box"></span>
                                                                    2nd day</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-2">
                                                        <div class="md-radio-list">
                                                            <div class="md-radio">
                                                                <input type="radio" id="3d" name="days"
                                                                    class="md-radiobtn sradio" data-val="4" value="4"
                                                                    {if $embryofreezingreport.day_of_freezing eq 4}
                                                                    checked {/if}>
                                                                <label for="3d">
                                                                    <span></span>
                                                                    <span class="check"></span>
                                                                    <span class="box"></span>
                                                                    3rd day</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-2">
                                                        <div class="md-radio-list">
                                                            <div class="md-radio">
                                                                <input type="radio" id="4d" name="days"
                                                                    class="md-radiobtn sradio" data-val="1" value="1"
                                                                    {if $embryofreezingreport.day_of_freezing eq 1}
                                                                    checked {/if}>
                                                                <label for="4d">
                                                                    <span></span>
                                                                    <span class="check"></span>
                                                                    <span class="box"></span>
                                                                    4nd day</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-2">
                                                        <div class="md-radio-list">
                                                            <div class="md-radio">
                                                                <input type="radio" id="5d" name="days"
                                                                    class="md-radiobtn sradio" data-val="2" value="2"
                                                                    {if $embryofreezingreport.day_of_freezing eq 2}
                                                                    checked {/if}>
                                                                <label for="5d">
                                                                    <span></span>
                                                                    <span class="check"></span>
                                                                    <span class="box"></span>
                                                                    5nd day</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-2">
                                                        <div class="md-radio-list">
                                                            <div class="md-radio">
                                                                <input type="radio" id="6d" name="days"
                                                                    class="md-radiobtn sradio" data-val="3" value="3"
                                                                    {if $embryofreezingreport.day_of_freezing eq 3}
                                                                    checked {/if}>
                                                                <label for="6d">
                                                                    <span></span>
                                                                    <span class="check"></span>
                                                                    <span class="box"></span>
                                                                    6nd day</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-12">
                                                <label class="col-md-3 control-label" for="form_control_1">
                                                    collapsed:
                                                </label>
                                                <div class="col-md-8">
                                                    <div class="col-md-2">
                                                        <div class="md-radio-list">
                                                            <div class="md-radio">
                                                                <input type="radio" id="collapsedYes" name="collapsed"
                                                                    class="md-radiobtn sradio" data-val="1" value="1"
                                                                    {if $embryofreezingreport.collapsed eq 1} checked
                                                                    {/if}>
                                                                <label for="collapsedYes">
                                                                    <span></span>
                                                                    <span class="check"></span>
                                                                    <span class="box"></span>
                                                                    Yes</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-2">
                                                        <div class="md-radio-list">
                                                            <div class="md-radio">
                                                                <input type="radio" id="collapsedNo" name="collapsed"
                                                                    class="md-radiobtn sradio" data-val="0" value="0"
                                                                    {if $embryofreezingreport.collapsed eq 0} checked
                                                                    {/if}>
                                                                <label for="collapsedNo">
                                                                    <span></span>
                                                                    <span class="check"></span>
                                                                    <span class="box"></span>
                                                                    No</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group col-md-12">
                                                <div class="form-group col-md-12">
                                                    <label class="col-md-2 txtl" for="form_control_1">notes:</label>
                                                    <div class="col-md-5">
                                                        <textarea class="form-control input-sm"
                                                            name="notes">{$embryofreezingreport.note}</textarea>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="clearfix"></div>
                                            <hr>

                                            <div class="col-md-12">
                                                <div class="portlet box blue"
                                                    style="width: 100%;overflow: auto;background-color:transparent;">
                                                    <div class="portlet-title" style="height: 5px;width: 133%;">
                                                        <div class="caption">
                                                            <i class="fa fa-edit"></i>Embryo
                                                        </div>
                                                    </div>
                                                    <div class="portlet-body">
                                                        <div class="table-toolbar">
                                                            <div class="row">
                                                                <div class="col-md-6">
                                                                    <div class="btn-group">
                                                                        <a href="javascript:;"
                                                                            class="btn btn green btn-sm"
                                                                            id="addNewembryoRow"
                                                                            data-tableName="embryo">
                                                                            <i class="fa fa-plus"></i> Add New</a>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-6">
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <input type="hidden" id="storesController" value="1">

                                                        <table>
                                                            <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>
                                                                    <th rowspan="2">
                                                                        Delete
                                                                    </th>
                                                                </tr>
                                                                <tr>

                                                                    <th style="min-width: 100px;">
                                                                        Stage

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Grade

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Stage

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Grade

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Stage

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Grade

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Stage

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Grade

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Stage

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Grade

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Stage

                                                                    </th>
                                                                    <th style="min-width: 100px;">
                                                                        Grade

                                                                    </th>

                                                                </tr>
                                                            </thead>
                                                            <input type="hidden" id="embryo" value="{$count_embryo}"
                                                                name="embryo" />
                                                            <tbody id="embryoContent">
                                                                {assign var=itr value=1}
                                                                {foreach $embryos as $pre}
                                                                <tr>
                                                                    <!-- 
                                                                    -->
                                                                    <td>
                                                                        Straw#{$itr}
                                                                        <input type="hidden" name="safyinput2_{$itr}"
                                                                            id="safyinput2_{$itr}" value="{$itr}" />

                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control stageselect stage allupdateselect"
                                                                                id="stage_{$itr}_1_1"
                                                                                data-itra="{$itr}_1_1"
                                                                                name="stage_{$itr}_1_1"
                                                                                select-tableName="stage"
                                                                                data-colName="stage">
                                                                                <option value="">choose</option>
                                                                                {foreach $stages as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.stage1 eq $one.id} selected
                                                                                    {/if}>{$one.stage}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control gradeselect grade allupdateselect"
                                                                                id="grade_{$itr}_1_2"
                                                                                name="grade_{$itr}_1_2"
                                                                                data-itra="{$itr}_1_2"
                                                                                select-tableName="grade"
                                                                                data-colName="grade">
                                                                                <option value="">choose</option>
                                                                                {foreach $grades as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.grade1 eq $one.id} selected
                                                                                    {/if}>{$one.grade}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control stage stageselect allupdateselect"
                                                                                id="stage_{$itr}_2_1"
                                                                                name="stage_{$itr}_2_1"
                                                                                data-itra="{$itr}_2_1"
                                                                                select-tableName="stage"
                                                                                data-colName="stage">
                                                                                <option value="">choose</option>
                                                                                {foreach $stages as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.stage2 eq $one.id} selected
                                                                                    {/if}>{$one.stage}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control grade gradeselect allupdateselect"
                                                                                id="grade_{$itr}_2_2"
                                                                                name="grade_{$itr}_2_2"
                                                                                data-itra="{$itr}_2_2"
                                                                                select-tableName="grade"
                                                                                data-colName="grade">
                                                                                <option value="">choose</option>
                                                                                {foreach $grades as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.grade2 eq $one.id} selected
                                                                                    {/if}>{$one.grade}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control stage stageselect allupdateselect"
                                                                                id="stage_{$itr}_3_1"
                                                                                name="stage_{$itr}_3_1"
                                                                                data-itra="{$itr}_3_1"
                                                                                select-tableName="stage"
                                                                                data-colName="stage">
                                                                                <option value="">choose</option>
                                                                                {foreach $stages as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.stage3 eq $one.id} selected
                                                                                    {/if}>{$one.stage}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control grade gradeselect allupdateselect"
                                                                                id="grade_{$itr}_3_2"
                                                                                name="grade_{$itr}_3_2"
                                                                                data-itra="{$itr}_3_2"
                                                                                select-tableName="grade"
                                                                                data-colName="grade">
                                                                                <option value="">choose</option>
                                                                                {foreach $grades as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.grade3 eq $one.id} selected
                                                                                    {/if}>{$one.grade}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control stage stageselect allupdateselect"
                                                                                id="stage_{$itr}_4_1"
                                                                                name="stage_{$itr}_4_1"
                                                                                data-itra="{$itr}_4_1"
                                                                                select-tableName="stage"
                                                                                data-colName="stage">
                                                                                <option value="">choose</option>
                                                                                {foreach $stages as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.stage4 eq $one.id} selected
                                                                                    {/if}>{$one.stage}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control grade gradeselect allupdateselect"
                                                                                id="grade_{$itr}_4_2"
                                                                                name="grade_{$itr}_4_2"
                                                                                data-itra="{$itr}_4_2"
                                                                                select-tableName="grade"
                                                                                data-colName="grade">
                                                                                <option value="">choose</option>
                                                                                {foreach $grades as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.grade4 eq $one.id} selected
                                                                                    {/if}>{$one.grade}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control stage stageselect allupdateselect"
                                                                                id="stage_{$itr}_5_1"
                                                                                name="stage_{$itr}_5_1"
                                                                                data-itra="{$itr}_5_1"
                                                                                select-tableName="stage"
                                                                                data-colName="stage">
                                                                                <option value="">choose</option>
                                                                                {foreach $stages as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.stage5 eq $one.id} selected
                                                                                    {/if}>{$one.stage}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control grade gradeselect allupdateselect"
                                                                                id="grade_{$itr}_5_2"
                                                                                name="grade_{$itr}_5_2"
                                                                                data-itra="{$itr}_5_2"
                                                                                select-tableName="grade"
                                                                                data-colName="grade">
                                                                                <option value="">choose</option>
                                                                                {foreach $grades as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.grade5 eq $one.id} selected
                                                                                    {/if}>{$one.grade}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control stage stageselect allupdateselect"
                                                                                id="stage_{$itr}_6_1"
                                                                                name="stage_{$itr}_6_1"
                                                                                data-itra="{$itr}_6_1"
                                                                                select-tableName="stage"
                                                                                data-colName="stage">
                                                                                <option value="">choose</option>
                                                                                {foreach $stages as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.stage6 eq $one.id} selected
                                                                                    {/if}>{$one.stage}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select
                                                                                class="form-control grade gradeselect allupdateselect"
                                                                                id="grade_{$itr}_6_2"
                                                                                name="grade_{$itr}_6_2"
                                                                                data-itra="{$itr}_6_2"
                                                                                select-tableName="grade"
                                                                                data-colName="grade">
                                                                                <option value="">choose</option>
                                                                                {foreach $grades as $one}
                                                                                <option value="{$one.id}" {if
                                                                                    $pre.grade6 eq $one.id} selected
                                                                                    {/if}>{$one.grade}</option>
                                                                                {/foreach}

                                                                                <option value="-2"
                                                                                    class="deleteoptincompo">Delete
                                                                                </option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <a class="btn grey-cascade btn-xs deletemsgEX"
                                                                            data-id="{$pre.id}" style=" float: left;"
                                                                            href="#" data-link="embryofreezing"
                                                                            data-fn="delRowsommedel"
                                                                            data-tableName="embryo">
                                                                            <i class="fa fa-close"></i>
                                                                        </a>
                                                                    </td>
                                                                </tr>
                                                                {capture assign=itr}{$itr+1}{/capture}
                                                                {/foreach}
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="clearfix"></div>
                                            <hr>
                                            <div class="portlet-body check_heigt_and_make_new_class" id="justfordrugs">
                                                <div class="table-toolbar">

                                                </div>
                                                <table class="table table-striped table-hover table-bordered" id="gyna">
                                                    <thead>
                                                        <tr>
                                                            <th class="col-md-2">
                                                                Kit
                                                            </th>
                                                            <th class="col-md-2">
                                                                Lot No.
                                                            </th>
                                                            <th class="col-md-2">
                                                                Device
                                                            </th>

                                                            <th class="col-md-2">
                                                                Location
                                                            </th>

                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <tr>
                                                            <td>
                                                                <div class="col-md-12">
                                                                    <select
                                                                        class="form-control kitselect kit allupdateselect"
                                                                        id="kit" name="kit" select-tableName="kit"
                                                                        data-colName="kit">
                                                                        <option value="">choose</option>
                                                                        {foreach $kits as $one}
                                                                        <option value="{$one.id}" {if
                                                                            $embryofreezingreport.kit==$one.id}selected
                                                                            {/if}>{$one.kit}</option>
                                                                        {/foreach}

                                                                        <option value="-2" class="deleteoptincompo">
                                                                            Delete</option>
                                                                    </select>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <input type="text" class="form-control " name="lot_no"
                                                                    value="{$embryofreezingreport.lot_no}" />
                                                            </td>
                                                            <td>
                                                                <div class="col-md-12">
                                                                    <select
                                                                        class="form-control deviceselect device allupdateselect"
                                                                        id="device" name="device"
                                                                        select-tableName="device" data-colName="device">
                                                                        <option value="">choose</option>
                                                                        {foreach $devices as $one}
                                                                        <option value="{$one.id}" {if
                                                                            $embryofreezingreport.device==$one.id}selected
                                                                            {/if}>{$one.device}</option>
                                                                        {/foreach}

                                                                        <option value="-2" class="deleteoptincompo">
                                                                            Delete</option>
                                                                    </select>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <input type="text" class="form-control bp_location"
                                                                    name="location"
                                                                    value='{$embryofreezingreport.location}' />
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                            <!--div class="col-md-12">
                                                <div class="portlet box blue">
                                                    <div class="portlet-title" style="height: 5px">
                                                        <div class="caption">
                                                            <i class="fa fa-edit"></i>Embryo Thawing
                                                        </div>
                                                    </div>
                                                    <div class="portlet-body" id="justfordrugs" >
                                                        <div class="table-toolbar">
                                                            <div class="row">
                                                                <div class="col-md-6">
                                                                    <div class="btn-group">
                                                                        <a href="javascript:;" class="btn btn green btn-sm" id="addNewthawingRow" data-tableName="embryothawing">
                                                                            <i class="fa fa-plus"></i> Add New</a>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-6">
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <input type="hidden" id="storesController" value="1">
                                                        <table class="table table-striped table-hover table-bordered" >
                                                            <thead>
                                                                <tr>
                                                                    <th class="col-md-1">
                                                                        Straw
                                                                    </th >
                                                                    <th class="col-md-1">
                                                                        No Of Embryos
                                                                    </th>
                                                                    <th class="col-md-1">
                                                                        Thawing Date
                                                                    </th>

                                                                    <th class="col-md-1">
                                                                        Recovered
                                                                    </th>
                                                                    <th class="col-md-1">
                                                                        Lost
                                                                    </th>
                                                                    <th class="col-md-1">
                                                                        E.T Date
                                                                    </th>
                                                                    <th class="col-md-1">
                                                                        Embryos
                                                                    </th>

                                                                    <th class="col-md-1">
                                                                        Grades
                                                                    </th>
                                                                    <th class="col-md-1">
                                                                        Embryol oigist
                                                                    </th>
                                                                    <th class="col-md-1">
                                                                        Clinician
                                                                    </th>
                                                                    <th class="col-md-1">
                                                                        Cathetr
                                                                    </th>
                                                                    <th >
                                                                        Delete
                                                                    </th>
                                                                </tr>

                                                            </thead>
                                                            <input type="hidden" id="thawitr" value="{$count_embryothawing}" name="thawitr"/>
                                                            <tbody id="thawingContent">
                                                                {assign var=itr value=1}
                                                                {foreach $embryothawing as $pre}
                                                                <tr>

                                                                    <td>
                                                                        {$itr}
                                                                        <input type="hidden" name="safyinput1_{$itr}" id="safyinput1_{$itr}" value="{$itr}"/>
                                                                    </td>
                                                                    <td>
                                                                        <input type="text" class="form-control " value="{$pre.no_of_embryos}" id="no_of_embryos_{$itr}_1"  data-itra="{$itr}_1" name="no_of_embryos_{$itr}_1" data-colName="embryol_oigist" data-tableName="embryothawing"/>
                                                                    </td>
                                                                    <td>
                                                                        <input type="text" class="form-control datepicker" value="{$pre.thawing_date}" id="thawing_date_{$itr}_2"  data-itra="{$itr}_2" name="thawing_date_{$itr}_2"/>
                                                                    </td>
                                                                    <td>
                                                                        <input type="text" class="form-control " value="{$pre.recovered}" id="recovered_{$itr}_3"  data-itra="{$itr}_3" name="recovered_{$itr}_3"/>
                                                                    </td>
                                                                    <td>
                                                                        <input type="text" class="form-control " value="{$pre.lost}" id="lost_{$itr}_4"  data-itra="{$itr}_4" name="lost_{$itr}_4"/>
                                                                    </td>
                                                                    <td>
                                                                        <input type="text" class="form-control datepicker" value="{$pre.e_t_date}" id="et_date_{$itr}_5"  data-itra="{$itr}_5" name="et_date_{$itr}_5"/>
                                                                    </td>
                                                                    <td>
                                                                        <input type="text" class="form-control " value="{$pre.embryos}" id="embryos_{$itr}_6"  data-itra="{$itr}_6" name="embryos_{$itr}_6"/>
                                                                    </td>
                                                                    <td>
                                                                        <input type="text" class="form-control " value="{$pre.grades}" id="grades_{$itr}_7"  data-itra="{$itr}_7" name="grades_{$itr}_7"/>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select class="form-control  select2me updateElement" id="embryol_{$itr}_8" name="embryol_{$itr}_8" data-itr="{$itr}_8" data-id="{$pre.id}" data-colName="embryol_oigist" data-tableName="embryothawing"  data-placeholder="Select..."  >
                                                                                <option value="">choose</option>
                                                                                {foreach  $embryologist as $one}
                                                                                <option value="{$one.user_id}"  {if $pre.embryol_oigist == $one.user_id}selected{/if}>{$one.name}</option>
                                                                                {/foreach}
                                                                            </select>
                                                                        </div>                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select class="form-control  select2me updateElement" id="clinician_{$itr}_9" name="clinician_{$itr}_9" data-itr="{$itr}_9" data-id="{$pre->id}"  data-colName="clinician" data-tableName="embryothawing"  data-placeholder="Select...">
                                                                                <option value="">choose</option>
                                                                                {foreach  $clinician as $one}
                                                                                <option value="{$one.user_id}"  {if $pre.clinician == $one.user_id}selected{/if}>{$one.name}</option>
                                                                                {/foreach}
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <select class="form-control xx dname select2me cathetrselect allupdateselect cathetr " data-itra="{$itr}_10" id="cathetr_{$itr}_10" name="cathetr_{$itr}_10" data-id="{$pre->id}" data-colName="cathetr" select-tableName="cathetr"  data-placeholder="Select...">
                                                                                <option value="">choose</option>
                                                                                {foreach  $cathetrs as $one}
                                                                                <option value="{$one.id}" {if $pre.cathetr == $one.id}selected{/if}>{$one.cathetr}</option>
                                                                                {/foreach}

                                                                                <option value="-2" class="deleteoptincompo">Delete</option>
                                                                            </select>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$pre.id}" style=" float: left;" href="#" data-link="embryofreezing" data-fn="delRowsommedel" data-tableName="embryothawing">
                                                                            <i class="fa fa-close"></i>
                                                                        </a>
                                                                    </td>
                                                                </tr>

                                                                {capture assign=itr}{$itr+1}{/capture}
                                                                {/foreach}
                                                                <!--<input type="hidden" name="embryo_th" id="embryo_th" value="{$i}"/>--


                                                            </tbody>
                                                        </table>
                                                    </div>
                                                </div>
                                            </div-->

                                            <div class="clearfix"></div>
                                            <hr>
                                        </div>

                                        <div class="clearfix"></div>
                                        <br> <br>

                                        <div class="form-actions">
                                            <div class="row">
                                                <div class="col-md-offset-2 col-md-10">
                                                    {if $patientId}
                                                    <a class="btn default"
                                                        href="{$hosturl}/controllers/{$controllname}.php?ac=show&patientid={$patientId}">Cancel</a>
                                                    {else}
                                                    <a class="btn default"
                                                        href="{$hosturl}/controllers/{$controllname}.php?ac=show">Cancel</a>
                                                    {/if}

                                                    <button type="submit" class="btn blue">Submit</button>

                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bootbox modal fade bootbox-alert in" tabindex="-1" role="dialog" aria-hidden="false"
                id="edit_model">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                            <h4 class="modal-title"> Edit </h4>
                        </div>
                        <div class="modal-body">
                            <div class="portlet-body form">
                                <form action="" id="" method="post" class="form-horizontal  emptyform">
                                    <div class="form-body all">
                                        <!------===========================================------->
                                        <div class="form-group">
                                            <label class="col-md-1 control-label"> </label>
                                            <div class="col-md-10">
                                                <div id="alldatadiv" class=""> </div>
                                            </div>
                                            <label class="col-md-1 control-label"> </label>
                                        </div>

                                        <!------===========================================------->

                                        <!------===========================================------->
                                        <div class="modal-footer">

                                            <button type="submit" id="amountcloseinput" class="btn default"
                                                data-dismiss="modal">Close</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                </div>
            </div>
        </div>
    </div>

    <input type="hidden" id="embryofreezing_report" value="1">


</div>


{literal}
<script type="text/javascript">


    //   
    //       var itr = $('#thawitr').val();
    //    if ($().select2)
    //    {
    //    alert()
    //    var i;
    //        for (i = 1; i <= itr.length; i++) { 
    //    $('#embryol_'+i+'_8').select2({placeholder: "Select", allowClear: true});
    //        $('#clinician_'+i+'_9').select2({placeholder: "Select", allowClear: true});
    //}
    //      }  

    //   $("select.updateElement").select2({
    //                width: '170px',
    //                allowClear: true});

    $('.datepickertoday').datepicker('setDate', '+0');
    $(".datepicker").datepicker({
        todayBtn: "linked",
        autoclose: true,
        todayHighlight: true,
        format: 'yy-mm-dd',
        isRTL: true
    });

</script>
{/literal}