<?php if ($point->last_child_review_point_id && $point->last_child_review_data): ?>
    <?php $parsedReview = json_decode($point->last_child_review_data); ?>
    <span class="screen-only">
        <?php if(@$childHeading): ?>
            <span class="on-hover-opaque font-weight-bold mr-2 c-pointer upsert-rp-trigger font-underline"><?= $childHeading ?></span>
        <?php endif; ?>
        <?php if ($point->last_child_review_point_scoped_note_id === $patient->core_note_id): ?>
            <span class="text-sm text-secondary">(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 text-secondary">(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 elseif($point->last_child_review_creator_pro_first_name || $point->last_child_review_creator_pro_last_name): ?>
                                by <?= implode(' ', [$point->last_child_review_creator_pro_first_name, $point->last_child_review_creator_pro_last_name]); ?>
                            <?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 class="inline-html-container ml-3 mt-1">
        <div><?= @$parsedReview->value ?></div>
    </div>
<?php endif; ?>
