|
@@ -0,0 +1,45 @@
|
|
|
|
+<?php
|
|
|
|
+$infoLines = json_decode($patient->info_lines);
|
|
|
|
+$infoLines = !$infoLines ? [] : $infoLines;
|
|
|
|
+$rows = [];
|
|
|
|
+foreach ($infoLines as $category => $lines):
|
|
|
|
+ if ($category === "care_team"):
|
|
|
|
+ foreach ($lines as $line):
|
|
|
|
+ $rows[] = '<label class="d-flex align-items-center current-careteam-item mb-1 c-pointer">' .
|
|
|
|
+ '<input type="checkbox" checked class="my-0 mr-2">' .
|
|
|
|
+ '<span><b>' . $line->contentText . '</b>' .
|
|
|
|
+ (isset($line->contentDetail->{"Specialty"}) ? '<span class="text-secondary"> / </span>' . @$line->contentDetail->{"Specialty"} : '') .
|
|
|
|
+ (isset($line->contentDetail->{"Next Appointment"}) ? '<span class="text-secondary mx-1"> / </span>' . @$line->contentDetail->{"Next Appointment"} : '') .
|
|
|
|
+ '</span></label>';
|
|
|
|
+ endforeach;
|
|
|
|
+ endif;
|
|
|
|
+endforeach;
|
|
|
|
+?>
|
|
|
|
+
|
|
|
|
+<div moe class="position-relative d-none if-edit ml-3 pl-3 border-left">
|
|
|
|
+ <a start show href="#">Current Care Team</a>
|
|
|
|
+ <form url="/no-op" class="current-careteam-form">
|
|
|
|
+ <div class="min-width-300px">
|
|
|
|
+ <?= implode("", $rows) ?>
|
|
|
|
+ <div class="mt-2 mb-0">
|
|
|
|
+ <button class="btn btn-primary btn-sm mr-1" type="button" onclick="return applySelectedCareTeam()">Apply</button>
|
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ function applySelectedCareTeam() {
|
|
|
|
+ let html = [];
|
|
|
|
+ $('.current-careteam-item input:checkbox:checked').each(function() {
|
|
|
|
+ html.push('<p>' + $(this).next().html() + '</p>');
|
|
|
|
+ });
|
|
|
|
+ $('.current-careteam-form').hide();
|
|
|
|
+ hideMask();
|
|
|
|
+ hideMoeFormMask();
|
|
|
|
+ $('.ql-editor[contenteditable]:visible').first().html(html.join('')).focus();
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+
|