<?php

use App\Models\Point;

$category = 'INFORMED_CONSENT';
$endPoint = 'upsertNoteSingleton';

$point = Point::where('added_in_note_id', $note->id)->where('category', $category)->orderBy('id', 'DESC')->first();
$contentData = [
    "informed_consent" => false
];
if (!!@$point->data) {
    $contentData = json_decode($point->data, true);
}
?>

<div class="d-flex align-items-baseline">
    @if(!@($contentData["informed_consent"]))
        <div class="align-self-stretch min-width-30px text-left">
            <i class="fa fa-exclamation-triangle"></i>
        </div>
    @endif
    <div class="flex-grow-1">
    @if(@($contentData["informed_consent"]))
        <div>
            <div>This is a {{$note->method}} visit that was performed on {{friendly_date($note->effective_dateest)}}. Verbal consent to participate was obtained.</div>
            <!-- <div>This visit occurred during the Coronavirus (COVID-19) Public Health Emergency.</div> -->
            <div>I discussed with the patient the nature of our visit, that:</div>
            <div class="ml-3">- I would evaluate the patient and recommend diagnostics and treatments based on my assessment.</div>
            <div class="ml-3">- Our sessions are not being recorded, and that personal health information is protected.</div>
            <div class="ml-3">- Our team would provide follow-up care in person if/when the patient needs it.</div>
            <div class="ml-3">- No physical exam was performed due to the remote nature of this evaluation.</div>
        </div>
    @else
        <div>Please click here to document informed consent.</div>
    @endif
    </div>
</div>
