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

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

    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 clinick invz" id="gprinModel">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet box blue">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-user"></i>Embryos Transfer
                        </div>
                        <div class="actions">

                            <a href="{$hosturl}/controllers/{$controllname}.php?ac=index&&patientid={$patientId}" class="btn btn-default btn-sm">
                                Show </a>

                        </div>
                    </div>
                    <div class="portlet-body all">
                        <!---======================================================== tab1============================================================================================ ----->

                        <div class="row">
                            <div id="ultrasoundgynaDiv">

                                <div class="row">

                                    <div class="portlet-body form">
                                        <form action="{$hosturl}/controllers/{$controllname}.php?ac=updateEmbryoTransferMine&patientid={$patientId}" method="post">
                                            <div class="form-body">

                                                <input type="hidden" id="row_id" name="transfer_embryo_id" value="{$updatedate.id}"/>
                                                <div >
                                                    <hr>
                                                    <div class="col-md-12" >
                                                        <div class="caption font-green-haze col-md-4">
                                                            <label class="col-md-4 control-label">Consultant :</label>
                                                            <div class="col-md-8">
                                                                <select class="form-control select2me" name="transfer_clinician_id" data-colName="clinician_id" data-tableName="embryotransfer"   >
                                                                    <option value="">choose</option>
                                                                    {foreach  $clinician as $one}
                                                                    <option value="{$one.user_id}" {if $transfer->clinician_id eq $one.user_id}selected{/if}>{$one.name}</option>
                                                                    {/foreach}

                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="caption font-green-haze col-md-4">
                                                            <label class="col-md-4 control-label">Embryologist :</label>
                                                            <div class="col-md-8">
                                                                <select class="form-control select2me" name="transfer_embryologist_id" data-colName="embryologist_id" data-tableName="embryotransfer"  >
                                                                    <option value="">choose</option>
                                                                    {foreach  $embryologist as $one}
                                                                    <option value="{$one.user_id}" {if $transfer->embryologist_id eq $one.user_id} selected{/if}>{$one.name}</option>
                                                                    {/foreach}

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


                                                        <div class="col-md-4">
                                                            <div class="form-group">
                                                                <label class="col-md-4 control-label">Day:</label>
                                                                <div class="col-md-8">
                                                                    <select class="form-control select2me " id="et_day"  data-placeholder="Select..." name="transfer_day_id" data-colName="et_day" data-tableName="embryotransfer" >
                                                                        <option></option>
                                                                        <option value=''>--Select Day--</option>
                                                                        <option value='1' {if $transfer->et_day eq 1}selected{/if}>1</option>
                                                                        <option value='2' {if $transfer->et_day eq 2}selected{/if}>2</option>
                                                                        <option value='3' {if $transfer->et_day eq 3}selected{/if}>3</option>
                                                                        <option value='4' {if $transfer->et_day eq 4}selected{/if}>4</option>
                                                                        <option value='5' {if $transfer->et_day eq 5}selected{/if}>5</option>
                                                                        <option value='6' {if $transfer->et_day eq 6}selected{/if}>6</option>

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

                                                        <div class="col-md-4">
                                                            <div class="form-group">
                                                                <label class="col-md-4 control-label">Date:</label>
                                                                <div class="col-md-8">
                                                                    <input type="text" class="form-control  datepicker"  value="{$updatedate.date}" name="date_transer_embryo" data-colName="date_transer_embryo" data-tableName="embryotransfer" />
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="col-md-4">
                                                            <div class="form-group">
                                                            <label class="col-md-4 control-label" >Nurse :</label>
                                                            <div class="col-md-8">
                                                                <select class="form-control" name="nurse" data-colName="name" select-tableName="awusers"  data-id="{$one.user_id}" >
                                                                    <option value="">choose</option>
                                                                    {foreach  $users as $one}
                                                                    {if $one.role_id eq 6}
                                                                    <option value="{$one.user_id}" {if $one.user_id eq $transfer->nurse_id}selected{/if}>{$one.name}</option>
                                                                    {/if}
                                                                    {/foreach}
                                                                </select>
                                                            </div>
                                                            </div>
                                                        </div>


                                                        <div class="form-group col-md-4">
                                                            <label class="col-md-4 txtl">Type</label>
                                                            <div class="col-md-7">
                                                                <div class="radio-list">
                                                                    <label class="radio-inline">
                                                                        <input type="radio" name="emp_th_type" value="0" {if 0 eq $transfer->emp_th_type}checked{/if} > Fresh </label>
                                                                    <label class="radio-inline">
                                                                        <input type="radio" name="emp_th_type"  value="1" {if 1 eq $transfer->emp_th_type}checked{/if}> Freeze </label>
                                                                </div>
                                                            </div>
                                                        </div>




                                                        <div class="clearfix"></div>
                                                        <div class="col-md-12">


                                                            <table>
                                                                <thead>
                                                                    <tr>
                                                                        <th>
                                                                            No of embryos
                                                                        </th>
                                                                        <th>
                                                                            1
                                                                        </th>
                                                                        <th>
                                                                            2
                                                                        </th>
                                                                        <th>
                                                                            3
                                                                        </th>
                                                                        <th>
                                                                            4
                                                                        </th>


                                                                    </tr>
                                                                </thead>
                                                                <tbody>
                                                                    <tr>
                                                                        <td >
                                                                            <span style="font-weight: bold;" >  Stage</span>
                                                                        </td>

                                                                        <td>
                                                                                {foreach  $stages as $one}
                                                                            {if $transfer->stage1 eq $one->id}<label >{$one->stage}</label>{/if}
                                                                                {/foreach}
                                                                        </td>
                                                                        <td>
                                                                                {foreach  $stages as $one}
                                                                            {if $transfer->stage2 eq $one->id}<label> {$one->stage}</label>{/if}
                                                                                {/foreach}
                                                                        </td>
                                                                        <td>
                                                                                {foreach  $stages as $one}
                                                                            {if $transfer->stage3 eq $one->id}<label >{$one->stage}</label>{/if}
                                                                                {/foreach}
                                                                        </td>
                                                                        <td>
                                                                                {foreach  $stages as $one}
                                                                            {if $transfer->stage4 eq $one->id}<label >{$one->stage}</label>{/if}
                                                                                {/foreach}
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td>
                                                                            <span style="font-weight: bold;" > Grade </span>
                                                                        </td>

                                                                        <td>
                                                                                {foreach  $grades as $one}
                                                                            {if $transfer->grade1 eq $one->id}<label >{$one->grade}</label>{/if}
                                                                                {/foreach}
                                                                        </td>
                                                                        <td>
                                                                            {foreach  $grades as $one}
                                                                            {if $transfer->grade2 eq $one->id}<label >{$one->grade}</label>{/if}
                                                                            {/foreach}
                                                                        </td>
                                                                        <td>
                                                                            {foreach  $grades as $one}
                                                                            {if $transfer->grade3 eq $one->id}<label >{$one->grade}</label>{/if}
                                                                            {/foreach}
                                                                        </td>
                                                                        <td>
                                                                            {foreach  $grades as $one}
                                                                            {if $transfer->grade4 eq $one->id}<label >{$one->grade}</label>{/if}
                                                                            {/foreach}
                                                                        </td>
                                                                    </tr>
                                                                </tbody>
                                                            </table>

                                                        </div>
                                                    </div>
                                                    <div class="clearfix"></div>
                                                    <hr>
                                                    <div class="caption font-green-haze col-md-4">
                                                        <span class="caption-subject bold "> Embryo Transfer Characterization</span>
                                                    </div>
                                                    <div class="col-md-12">

                                                        <table>
                                                            <thead>
                                                                <tr>
                                                                    <th>
                                                                        Catheter Type
                                                                    </th>
                                                                    <th>
                                                                        Difficulty
                                                                    </th>
                                                                    <th>
                                                                        Blood
                                                                    </th>
                                                                    <th>
                                                                        Duration
                                                                    </th>
                                                                    <th>
                                                                        Jet Place
                                                                    </th>
                                                                    <th>
                                                                        L.A.H
                                                                    </th>
                                                                    <th>
                                                                        Type
                                                                    </th>
                                                                    <th>
                                                                        Day
                                                                    </th>
                                                                </tr>
                                                            </thead>
                                                            <tbody>
                                                                <tr>
                                                                    <td>
                                                                            {foreach  $embryocathetertype as $one}
                                                                        {if $transfer->catheter_type eq $one->id}<label >{$one->name}</label>{/if}
                                                                            {/foreach}
                                                                    </td>
                                                                    <td>
                                                                            {foreach  $embryodifficulty as $one}
                                                                        {if $transfer->difficulty eq $one->id}<label>{$one->name}</label>{/if}
                                                                            {/foreach}
                                                                    </td>
                                                                    <td>
                                                                            {foreach  $embryoblood as $one}
                                                                        {if $transfer->blood eq $one->id}<label >{$one->name}</label>{/if}
                                                                            {/foreach}
                                                                    </td>
                                                                    <td>
                                                                        <label >{$transfer->duration}</label>
                                                                    </td>
                                                                    <td>
                                                                            {foreach  $embryojetplace as $one}
                                                                        {if $transfer->jet_place eq $one->id} <label>{$one->name}</label>{/if}
                                                                            {/foreach}
                                                                    </td>
                                                                    <td>
                                                                            {foreach  $embryolah as $one}
                                                                        {if $transfer->lah eq $one->id}<label>{$one->name}</label>{/if}
                                                                            {/foreach}
                                                                    </td>
                                                                    <td>
                                                                            {foreach  $embryotype as $one}
                                                                        {if $transfer->type eq $one->id}<label>{$one->name}</label>{/if}
                                                                            {/foreach}
                                                                    </td>
                                                                    <td>
                                                                            {foreach  $day_array as $one}
                                                                        {if $transfer->day eq $one}<label>{$one}</label>{/if}
                                                                            {/foreach}
                                                                    </td>

                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>
                                                    <div class="clearfix"></div>
                                                    <div class="col-md-12">
                                                        <div class="form-group">
                                                            <label class="col-md-2 control-label">Notes:</label>
                                                            <div class="col-md-10">
                                                                <textarea class="form-control " rows="2"  id='notes' name='notes' placeholder="Enter more text" data-id="" data-colName="" data-tableName="" >{$transfer->notes}</textarea>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>

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

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

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


                                        </form>
                                    </div>

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

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


        </div>
    </div>
</div>
<div class="clearfix"></div>
<div id="vvv"></div>
<input type="hidden" id="embryoslab" value="1">


<script>


    $(".amrpop,input[type='text']:not(.datepicker),textarea").hover(function () {
        var pop_value = $(this).val();
        $(this).attr({
            "data-toggle": "popover",
            "data-trigger": "hover",
            "data-placement": "bottom",
            "data-content": pop_value
        });
        $(this).popover("show");
    });

</script>