<?php if ($point->last_child_review_point_id && $point->last_child_review_data): ?>
    <?php $parsedReview = json_decode($point->last_child_review_data); ?>
    <div class="<?= $point->last_child_review_point_scoped_note_id === $note->id ? 'bg-warning-mellow p-2 rounded' : '' ?>">
        <div class="inline-html-container">
            <?php if(@$parsedReview->value): ?>
                <div><b class="text-sm">Freq:</b> <?= trim(strip_tags($parsedReview->value)) ?></div>
            <?php endif; ?>
            <?php if(@$parsedReview->experience): ?>
                <div><b class="text-sm">Experience:</b> <?= $parsedReview->experience ?></div>
            <?php endif; ?>
        </div>
        <span class="screen-only">
        <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
            <span class="text-sm">(updated on the patient's chart)</span>
        <?php else: ?>
            <?php if ($point->last_child_review_point_scoped_note_id === $note->id): ?>
                <span class="text-sm">(updated on this note)</span>
            <?php else: ?>
                <?php if(!@$summaryView): ?>
                    <div class="d-inline position-relative on-click-menu">
                        <span class="text-sm text-secondary c-pointer">
                            <?= relative_friendly_date($point->last_child_review_effective_date) ?>
                            <?php if($point->last_child_review_creator): ?>
                                by <?= $point->last_child_review_creator ?>
                            <?php endif; ?>
                        </span>
                        <div menu right class="bg-white border">
                            <a native target="_blank"
                               href="/patients/view/<?= $patient->uid ?>/notes/view/<?= $point->last_child_review_note_uid ?>"
                               class="px-2 py-1 d-block text-nowrap text-sm">Go to note</a>
                        </div>
                    </div>
                <?php else: ?>
                    <span class="text-sm text-secondary">
                        <?= relative_friendly_date($point->last_child_review_effective_date) ?>
                        <?php if($point->last_child_review_creator): ?>
                            by <?= $point->last_child_review_creator ?>
                        <?php endif; ?>
                    </span>
                <?php endif; ?>
            <?php endif; ?>
        <?php endif; ?>
        </span>
    </div>
<?php else: ?>
    <div class="inline-html-container text-secondary text-sm">-</div>
<?php endif; ?>
