<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-users"></i>Operations
                        </div>
                    </div>
                    <div class="portlet-body all">
                        <input type="hidden" id="reportPage" value="1"/>
                        <input type="hidden" id="tdate" value="{$today}">
                        <input type="hidden" id="controllName" value="Operations"/>
                        <input type="hidden" id="controllname" value="Operations"/>

                        <!--Begin Semen-->

                        <div class="row">
                            <div class="row clinick posre">
                                <div class="col-md-2">

                                </div>
                                 <div class="col-md-2">
                                     <div class="form-group">
                                        <label for="form_control" >  البحث باسم المريض  </label>
                                        <select  class="form-control select2me searchall" id="patientids" >
                                            <option value=""></option>
                                            {foreach $allPatient as $patient}
                                            <option value="{$patient->id}" >{$patient->wifename}/{$patient->statusno}</option>
                                            {/foreach}
                                        </select>
                                    </div>

                                </div>
                                <div class="col-md-3">
                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                        <input type="text" class="form-control datepicker today txtc searchall" id="fromdates" value="{$today}"/>
                                        <label for="form_control_1">Date from: </label>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="form-group form-md-line-input form-md-floating-label has-info">
                                        <input type="text" class="form-control datepicker tomoro txtc searchall" id="todates" value="{$today}"/>
                                        <label for="form_control_1">Date to: </label>
                                    </div>
                                </div>

                            </div>
                        </div>

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

                        <div class="portlet box white">
                            <div class="portlet-title">
                                <div class="actions">
                                    <a class="btn btn-default btn-sm" id="printe">
                                        <i class="fa fa-print"></i> Print </a>

                                </div>
                            </div>

                            <div class="portlet-body form" id="expectedDiv" style="margin: 0px 8px;">
                                <table class="table table-hover portlet light bg-inverse" id="controllpropr">
                                    <thead>
                                        <tr>
                                            <th  width="5%">No.</th>
                                            <th width="15%">
                                                Patient Name
                                            </th>
                                            <th width="15%">
                                                Operation  
                                            </th>
                                            <th width="5%">place</th>
                                            <th width="15%">date</th>
                                            <th width="15%">Histopath</th>
                                            <th width="10%">Cost</th>
                                            <th width="10%">note</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {assign var="i" value="1"}
                                        {foreach $allData as $data}
                                        <tr class="odd gradeX">
                                            <td >{$i}</td>
                                            <td><a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data->patientid}" target="_new">{$data->info->wifename}</a>
                                            </td>
                                            <td>
                                                {foreach $data->operationc as $data2}
                                                 {$data2->title} / 
                                                  {/foreach}
                                            </td>
                                            <td>
                                                {$data->placec->title}
                                            </td>
                                            <td>
                                                {$data->date}
                                            </td>
                                            <td>
                                                {foreach $data->histopathc as $data3}
                                                 {$data3->title} / 
                                                  {/foreach}
                                            </td>
                                            
                                            <td width="10%">
                                                <input type="text" name="cost" value="{$data->cost}"  data-id="{$data->id}"  data-table="operations" class="form-control digitsOnly" />
                                            </td> 
                                            <td>
                                                {$data->note}
                                            </td>
                                        </tr>
                                        {assign var="i" value={$i+1}}
                                        {/foreach}
                                        {assign var="i2" value=$i}
                                        {foreach $allData2 as $data}
                                        <tr class="odd gradeX">
                                            <td >{$i2}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data->patientid}" target="_new">{$data->info->wifename}</a>
                                            </td>
                                            <td>
                                                hysteroscopy
                                            </td>
                                            <td>
                                                {$data->copyplace->title}
                                            </td>
                                            <td>
                                                {$data->date}
                                            </td>
                                            <td>
                                                
                                            </td>
                                            
                                            <td width="10%"><input type="text" name="coast" value="{$data->coast}"  data-id="{$data->id}"  data-table="hysteroscopy" class="form-control digitsOnly" />
                                            </td> 
                                            <td>
                                                {$data->hysintervention}
                                            </td>
                                        </tr>
                                        {assign var="i2" value={$i2+1}}
                                        {/foreach}
                                        {assign var="i3" value=$i2}
                                        {foreach $allData3 as $data}
                                        <tr class="odd gradeX">
                                            <td >{$i3}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data->patientid}" target="_new">{$data->info->wifename}</a>
                                            </td>
                                            <td>
                                                laparoscopy
                                            </td>
                                            <td>
                                                {$data->laparplace->title}
                                            </td>
                                            <td>
                                                {$data->date}
                                            </td>
                                            <td>
                                                
                                            </td>
                                            
                                            <td width="10%"><input type="text" name="coast" value="{$data->coast}"  data-id="{$data->id}"  data-table="laparoscopy" class="form-control digitsOnly" />
                                            </td> 
                                            <td>
                                                {$data->lapintervention}
                                            </td>
                                        </tr>
                                        {assign var="i3" value={$i3+1}}
                                        {/foreach}
                                    </tbody>
                                </table>
                            </div>
                        </div>

                    </div>

                </div>

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

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

<div id="long" class="modal fade modal-scroll" tabindex="-1" data-replace="true">
    <div class="modal-dialog wds75">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close hidden-print" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"></h4>
            </div>
            <div class="modal-body printtable" id="printd">
                <center><h4 class="modal-title">EPC Date</h4></center>
                <table class="table table-hover portlet light bg-inverse tbl2prnt">
                    <thead>
                        <tr>
                            <th  width="5%">No.</th>
                                <th width="15%">
                                    Patient Name
                                </th>
                                <th width="15%">
                                    Operation  
                                </th>
                                <th width="5%">place</th>
                                <th width="15%">date</th>
                                <th width="15%">Histopath</th>
                                <th width="10%">Cost</th>
                                <th width="10%">note</th>
                    </tr>
                    </thead>
                    <tbody>
                        <tbody>
                                        {assign var="i" value="1"}
                                        {foreach $allData as $data}
                                        <tr class="odd gradeX">
                                            <td >{$i}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data->patientid}" target="_new">{$data->info->wifename}</a>
                                            </td>
                                            <td>
                                                {foreach $data->operationc as $data2}
                                                 {$data2->title} / 
                                                  {/foreach}
                                            </td>
                                            <td>
                                                {$data->placec->title}
                                            </td>
                                            <td>
                                                {$data->date}
                                            </td>
                                            <td>
                                                {foreach $data->histopathc as $data3}
                                                 {$data3->title} / 
                                                  {/foreach}
                                            </td>
                                            
                                            <td width="10%"><input type="text" name="cost" value="{$data->cost}"  data-id="{$data->id}"  data-table="operations" class="form-control digitsOnly" />
                                            </td> 
                                            <td>
                                                {$data->note}
                                            </td>
                                        </tr>
                                        {assign var="i" value={$i+1}}
                                        {/foreach}
                                        {assign var="i2" value=$i}
                                        {foreach $allData2 as $data}
                                        <tr class="odd gradeX">
                                            <td >{$i2}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data->patientid}" target="_new">{$data->info->wifename}</a>
                                            </td>
                                            <td>
                                                hysteroscopy
                                            </td>
                                            <td>
                                                {$data->copyplace->title}
                                            </td>
                                            <td>
                                                {$data->date}
                                            </td>
                                            <td>
                                                
                                            </td>
                                            
                                            <td width="10%"><input type="text" name="coast" value="{$data->coast}"  data-id="{$data->id}"  data-table="hysteroscopy" class="form-control digitsOnly" />
                                            </td> 
                                            <td>
                                               {$data->hysintervention} 
                                            </td>
                                        </tr>
                                        {assign var="i2" value={$i2+1}}
                                        {/foreach}
                                        {assign var="i3" value=$i2}
                                        {foreach $allData3 as $data}
                                        <tr class="odd gradeX">
                                            <td >{$i3}</td>
                                            <td>
                                                <a href="{$hosturl}/controllers/patienthistory.php?ac=show&patientid={$data->patientid}" target="_new">{$data->info->wifename}</a>
                                            </td>
                                            <td>
                                                laparoscopy
                                            </td>
                                            <td>
                                                {$data->laparplace->title}
                                            </td>
                                            <td>
                                                {$data->date}
                                            </td>
                                            <td>
                                                
                                            </td>
                                            
                                            <td width="10%"><input type="text" name="coast" value="{$data->coast}"  data-id="{$data->id}"  data-table="laparoscopy" class="form-control digitsOnly" />
                                            </td> 
                                            <td>
                                                {$data->lapintervention}
                                            </td>
                                        </tr>
                                        {assign var="i3" value={$i3+1}}
                                        {/foreach}
                                    </tbody>
                    </tbody>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn hidden-print">Close</button>
                <button type="button" id="print1" class="btn red hidden-print">print</button>
            </div>
        </div>
    </div>
</div>
