@if(!count($precautions))
    <span class="d-block no-suggest-items">No geriatric precautions!</span>
@else
    <div class="d-flex px-2 py-1 bg-white border-bottom align-items-baseline">
        <span>Count: <b>{{count($precautions)}}</b></span>
        <a href="#" class="text-sm ml-auto" onclick="$(this).parent().next('table').toggle(); return false;">Toggle</a>
    </div>
    <table class="table table-sm table-striped table-bordered" style="display: none">
        <thead>
        <tr>
            <th>Desc</th>
            <th>Severity</th>
            <th>Narrative</th>
        </tr>
        </thead>
        <tbody>
        @foreach($precautions as $precaution)
            <tr>
                <td>{{$precaution->geri_desc}}</td>
                <td>{{$precaution->geri_sl == 1 ? 'Contraindication' : 'Management or Monitoring Precaution'}}</td>
                <td>{{$precaution->geri_narrative}}</td>
            </tr>
        @endforeach
        </tbody>
    </table>
@endif

