<table id="example442" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
    <thead>
        <tr>
            <th></th>
            <th>ID</th>
            <th>Mrd. No</th>
            <th>Patient Name</th>
            <th>Operation Date</th>
            <th>Advice</th>

        </tr>
    </thead>
    <tbody>
        @php $i=1;@endphp
        @foreach($data as $result)
        <tr>
            <td><input type="checkbox" id="checkid2{{$result->id}}" onclick="checkPostPone2({{$result->id}})"
                    value="{{$result->id}}"></td>
            <input type="hidden" id="chechvalue2{{$result->id}}" name="chechvalue[]" value="0">
            <input type="hidden" id="otid2{{$result->id}}" name="otid[]" value="{{$result->id}}">
            <td>{{$result->id}}</td>
            <td>{{$result->MrdNo}}</td>
            <td>{{$result->PatientName}}</td>
            <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->ScheduleDate)))}}</td>
            <td style="white-space: pre-wrap;">{{$result->Advice}}</td>

        </tr>
        @endforeach
        <input type="hidden" id="ProcId2" name="ProcedureId[]" value="">
    </tbody>
</table>
<script type="text/javascript">
function checkPostPone2(id) {
    if ($('#checkid2' + id).prop('checked') == true) {
        $('#chechvalue2' + id).val(1)
    } else {
        $('#chechvalue2' + id).val(0);
    }
}
$(document).ready(function() {
    $('#example442').DataTable({
        "scrollX": true,
        dom: 'Bfrtip',
        "pageLength": 200,
        "order": [
            [0, "desc"]
        ],
        buttons: [

            'excelHtml5',
            'print'

        ]
    });

  
});
</script>