<?php
use App\Models\Point;

$category = 'MEDICATION_COMMENTS';

$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
$parsed = null;
if (!!@$point->data) {
    $parsed = json_decode($point->data);
}
?>
<div class="wrapping-pre-container">
    <?php
    if (!!$parsed && @$parsed->free_text) {
        echo $parsed->free_text;
    }
    else {
        echo "-";
    }
    ?>
</div>
@if(@$parsed->explained)
<div class="mt-2">
    <i class="fa fa-check"></i>
    Changes in medication were explained to patient, including purpose, dosage, directions, side effects, risks, benefits, and options.
</div>
@endif
