{if $type == "ussimple"}
<tr>
    <td>
        <input type="checkbox" class="usPrint" id="usPrint{$gUs->id}"  name="pic[]"  value="{$gUs->id}"/>
    </td>
    <!--    <td>
            {$itr}
        </td>-->
    <td>
        <input type="text" class="form-control datepicker updateElement" readonly="" placeholder="Date" data-colName="date" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->date}"/>
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="Day" data-colName="day" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->day}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="R.No" data-colName="ovraylno" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovraylno}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="R.size" data-colName="ovraylsize" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovraylsize}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="L.No" data-colName="ovrayrno" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovrayrno}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="L.size" data-colName="ovrayrsize" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovrayrsize}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="Endo" data-colName="endo" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->endo}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="Notes" data-colName="notes" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->notes}">
    </td>

    <td>
        <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$gUs->id}" style=" float: left;" href="#" data-link="gyna" data-fn="delgynaus">
            <i class="fa fa-close"></i>
        </a>
    </td>
    <td class="bold">
        {if $programSettingData->displaydoctorname eq 1}{$gUs->doctorname}{/if}
    </td>
</tr>
<!----------------------------------------------------------------------------------------------------------------------------------------------------->
{else if $type == "uscomplete"}

<tr>
    <td>
        <input type="checkbox" class="usPrint" id="usPrint{$gUs->id}"  name="pic[]"  value="{$gUs->id}"/>
    </td>
    <td>
        {$itr}
    </td>
    <td>
        <input type="text" class="form-control datepicker updateElement" readonly="" placeholder="Date" data-colName="date" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->date}"/>
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="Day" data-colName="day" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->day}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="Endo" data-colName="endo" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->endo}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="L" data-colName="uterusl" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->uterusl}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="W" data-colName="uterusw" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->uterusw}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="V" data-colName="uterusv" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->uterusv}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="L" data-colName="cervixl" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->cervixl}">
    </td>

    <td>
        <input type="text" class="form-control updateElement" placeholder="W" data-colName="cervixw" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->cervixw}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="V" data-colName="cervixv" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->cervixv}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="L" data-colName="ovrayll" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovrayll}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="W" data-colName="ovraylw" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovraylw}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="V" data-colName="ovraylv" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovraylv}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="L" data-colName="ovrayrl" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovrayrl}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="W" data-colName="ovrayrw" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovrayrw}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="V" data-colName="ovrayrv" data-id="{$gUs->id}"  data-tableName="gynaus" value="{$gUs->ovrayrv}">
    </td>
    <td>
        <a href="#"  class="btn green btn-block btn-xs addLTovary" data-type="add" id="addLTovary{$gUs->id}" data-id="{$gUs->id}"> ADD </a>
    </td>
    <td>
        <a href="#"  class="btn green btn-block btn-xs addRtovary" data-type="add" id="addRtovary{$gUs->id}" data-id="{$gUs->id}"> ADD </a>
    </td>
    <td>
        <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$gUs->id}" style=" float: left;" href="#" data-link="gyna" data-fn="delgynaus">
            <i class="fa fa-close"></i>
        </a>
    </td>
    <td class="bold">
        {if $programSettingData->displaydoctorname eq 1}{$gUs->doctorname}{/if}
    </td>
</tr>
<!----------------------------------------------------------------------------------------------------------------------------------------------------->
{else if $type == "usantenatal"}
<!----------------------------------------------------------------------------------------------------------------------------------------------------->
{else if $type == "drug"}
<tr>
    <td>
        <select class="form-control xx dcat " id="dcat{$itr}" name="dcat{$itr}"  data-itr="{$itr}"  data-placeholder="Select..."  >
            <option value="">Choose Category</option>
            {foreach $allDrugcats as $cat}
            <option value="{$cat['drugcat']}">{$cat['drugcat']}</option>
            {/foreach}
        </select>
    </td>
    <td>
        <select class="form-control xx dname updateElement" id="dname{$itr}" data-createNew="0" data-id="{$gynaDrug->id}" data-colName="drugid" data-tableName="gynadrugs" data-itr="{$itr}" data-placeholder="Select..."  >
            <option value="">Choose Drug</option>
            {foreach $drugs as $drug}
            <option value="{$drug['id']}">{$drug['drugname']} </option>
            {/foreach}
        </select>
    </td>
    <td>
        <select class="form-control xx dtype updateElement" id="dtype{$itr}" data-id="{$gynaDrug->id}" data-colName="drugtype" data-tableName="gynadrugs" data-itr="{$itr}" data-placeholder="Select..."  >
            <option value="">Choose Form</option>
            {foreach $allDrugTypes as $type}
            <option value="{$type['drugtype']}">{$type['drugtype']}</option>
            {/foreach}
        </select>
    </td>
    <td>
        <select class="form-control xx ddos updateElement" id="ddos{$itr}" data-id="{$gynaDrug->id}" data-colName="drugdos" data-tableName="gynadrugs" data-itr="{$itr}" data-placeholder="Select..."  >
            <option value="">choose dose </option>
            {foreach $allDrugDoses as $dos}
            <option value="{$dos['drugdos']}">{$dos['drugdos']}</option>
            {/foreach}
        </select>
    </td>
    {if $programSettingData->presquantity eq 1}
    <td id="drugQuantity{$itr}">
        -                                                            
    </td>
    {/if}
    <td>
        <a class="btn grey-cascade btn-xs deletemsgEX" data-id="{$gynaDrug->id}" style=" float: left;" href="#" data-link="gyna" data-fn="addprescription">
            <i class="fa fa-close"></i>
        </a>
    </td>
</tr>
<!----------------------------------------------------------------------------------------------------------------------------------------------------->
{else if $type == "ltovary" ||  $type == "rtovary"}

{if $status == "add"}
<input type="hidden" class="form-control" id="gynaUsId" value="{$gynaUsId}" >

{else if $status == "show"}
{foreach $focils as $fo}
<tr>
    <td>
        <input type="text" class="form-control updateElement" placeholder="Name" data-colName="name" data-id="{$fo->id}"  data-tableName="gynausficils" value="{$fo->name}">
    </td>

    <td>
        <input type="text" class="form-control updateElement" placeholder="Length" data-colName="length" data-id="{$fo->id}"  data-tableName="gynausficils" value="{$fo->length}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="Width" data-colName="width" data-id="{$fo->id}"  data-tableName="gynausficils" value="{$fo->width}">
    </td>
    <td>
        <input type="text" class="form-control updateElement" placeholder="Volume" data-colName="volume" data-id="{$fo->id}"  data-tableName="gynausficils" value="{$fo->volume}">
    </td>
</tr>
{/foreach}

{/if}

<!----------------------------------------------------------------------------------------------------------------------------------------------------->
{/if}





{literal}
<script type="text/javascript" >
    var itr = $('#drugItr').val();
    if ($().select2)
    {
        $('#dcat' + itr).select2({placeholder: "Select", allowClear: true});
        $('#dname' + itr).select2({placeholder: "Select", allowClear: true});
        $('#dtype' + itr).select2({placeholder: "Select", allowClear: true});
        $('#ddos' + itr).select2({placeholder: "Select", allowClear: true});
    }

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