
<div class="page-content-wrapper">
    <div class="page-content all">
        <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-cogs"></i>Exit Reports
                        </div>

                        
                        <div class="actions">
                            <a href="#" id="addNewEndRecord" class="btn btn-default btn-sm"><i class="fa fa-plus"></i> Add </a>

                        </div>
                    </div>

                    <input type="hidden" id="patientId" value="{$patientId}">
                    <input type="hidden" id="controllName" value="{$controllname}"/>

                    <div class="portlet-body">
                        <div>
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                    <tr>

                                        <th style="width:9%;">End Date</th>
                                        <th>End Reason</th>
                                        <th>Notes</th>
                                        {if $programSetting->displaydoctorname == 1}<th  style="width: 9%;">Doctor Name</th>{/if}

                                    </tr>
                                </thead>
                                <tbody id="endReportsBody">
                                    
                                    {assign var=m value=1}
                                    {foreach $endedVisits as $single}

                                    <tr>

                                 
                                       
                                        <td><input type="text" class="form-control datepicker updateElementVisit" readonly="" data-colName="enddate" data-id="{$single->id}"  data-tableName="endvisitreports" value="{$single->enddate}"/></td>
                                        
                                        <td><textarea class="form-control updateElementVisit txtc" rows="2" data-id="{$single->id}" data-colName="reason" data-tableName="endvisitreports" placeholder="Enter more text" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="{$single->reason}">{$single->reason}</textarea></td>
                                        
                                        <td><textarea class="form-control updateElementVisit txtc" rows="2" data-id="{$single->id}" data-colName="notes" data-tableName="endvisitreports" placeholder="Enter more text" data-toggle="popover" data-trigger="hover" data-placement="bottom" data-content="{$single->notes}">{$single->notes}</textarea></td>
                                        {if $programSetting->displaydoctorname == 1}<td>{$single->doctorName}</td>{/if}
                                    </tr>
                                    {capture assign = m}{$m+1}{/capture}
                                    {/foreach}

                                </tbody>

                            </table>
                            
                            
                        </div>
                         <input type="hidden"  id="showDoctor" value="{$programSetting->displaydoctorname}">
                        <input type="hidden"  id="doctorName" value="{$doctorName}">
                        <input type="hidden"  id="today" value="{$today}">
                    </div>
                </div>
            </div>
        </div>




