Kaynağa Gözat

Typical daya / lifestyle segment

Vijayakrishnan 3 yıl önce
ebeveyn
işleme
e13c8904fb

+ 2 - 2
js-dev/mc.js

@@ -590,12 +590,12 @@ window.saveVisitForm = function(_trigger, _silent = false, _close = false, _done
                 // if /api/visitPoint/upsertChildReview - refresh subjective_general_v2
                 // if /api/visitPoint/upsertChildPlan - refresh plan_free_text_v2
                 if(form.attr('url') === '/api/visitPoint/upsertChildReview') {
-                    if(!form.is('.frm-review-plan-lifestyle') && !form.is('.frm-upsert-review-plan-nutrition')) {
+                    if(!form.is('.frm-review-plan-lifestyle') && !form.is('.frm-upsert-review-plan-nutrition') && !form.is('.frm-upsert-review-typical-day-ls')) {
                         $('.visit-segment[data-segment-template-name="subjective_general_v2"]').find('.refresh-segment').trigger('click');
                     }
                 }
                 else if(form.attr('url') === '/api/visitPoint/upsertChildPlan') {
-                    if(!form.is('.frm-review-plan-lifestyle') && !form.is('.frm-upsert-review-plan-nutrition')) {
+                    if(!form.is('.frm-review-plan-lifestyle') && !form.is('.frm-upsert-review-plan-nutrition') && !form.is('.frm-upsert-review-typical-day-ls')) {
                         $('.visit-segment[data-segment-template-name="plan_free_text_v2"]').find('.refresh-segment').trigger('click');
                     }
                 }

+ 1 - 0
resources/views/app/patient/note/dashboard_script.blade.php

@@ -225,6 +225,7 @@
                             if(newEffectiveTop < prevEffectiveTop) {
                                 docRoot.scrollTop(docRoot.scrollTop() - (prevEffectiveTop - newEffectiveTop));
                             }
+                            editParent.trigger('edit-mode-activated');
                         }
 
                         let visitTreeLink = $('.note-tree-node a[data-segment-internal-name="' + editParent.attr('data-segment-template-name') + '"]');

+ 17 - 12
resources/views/app/patient/note/segment_script.blade.php

@@ -336,29 +336,34 @@
             }, 500);
 
             // auto save for segments with edit-mode
-            $(document).off('input.auto-save-input', '.visit-segment.edit[data-segment-template-name] [visit-moe] form input[type="text"]');
-            $(document).on('input.auto-save-input', '.visit-segment.edit[data-segment-template-name] [visit-moe] form input[type="text"]', function () {
+            $(document).off('input.auto-save-input', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form input[type="text"]');
+            $(document).on('input.auto-save-input', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form input[type="text"]', function () {
                 debouncedSaver(this);
             });
-            $(document).off('change.auto-save-select-change', '.visit-segment.edit[data-segment-template-name] [visit-moe] form select');
-            $(document).on('change.auto-save-select-change', '.visit-segment.edit[data-segment-template-name] [visit-moe] form select', function () {
+            $(document).off('change.auto-save-select-change', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form select');
+            $(document).on('change.auto-save-select-change', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form select', function () {
                 debouncedSaver(this);
             });
-            $(document).off('change.auto-save-checkbox-change', '.visit-segment.edit[data-segment-template-name] [visit-moe] form input[type="checkbox"]');
-            $(document).on('change.auto-save-checkbox-change', '.visit-segment.edit[data-segment-template-name] [visit-moe] form input[type="checkbox"]', function () {
+            $(document).off('change.auto-save-checkbox-change', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form input[type="checkbox"]');
+            $(document).on('change.auto-save-checkbox-change', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form input[type="checkbox"]', function () {
                 debouncedSaver(this);
             });
-            $(document).off('change.auto-save-radio-change', '.visit-segment.edit[data-segment-template-name] [visit-moe] form input[type="radio"]');
-            $(document).on('change.auto-save-radio-change', '.visit-segment.edit[data-segment-template-name] [visit-moe] form input[type="radio"]', function () {
+            $(document).off('change.auto-save-radio-change', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form input[type="radio"]');
+            $(document).on('change.auto-save-radio-change', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form input[type="radio"]', function () {
                 debouncedSaver(this);
             });
-            $(document).off('input.auto-save-textarea-input', '.visit-segment.edit[data-segment-template-name] [visit-moe] form textarea');
-            $(document).on('input.auto-save-textarea-input', '.visit-segment.edit[data-segment-template-name] [visit-moe] form textarea', function () {
+            $(document).off('input.auto-save-textarea-input', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form textarea');
+            $(document).on('input.auto-save-textarea-input', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form textarea', function () {
                 debouncedSaver(this);
             });
 
-            $(document).off('rich-text-input.auto-save-rich-text-input', '.visit-segment.edit[data-segment-template-name] [visit-moe] form [note-rte]');
-            $(document).on('rich-text-input.auto-save-rich-text-input', '.visit-segment.edit[data-segment-template-name] [visit-moe] form [note-rte]', function () {
+            $(document).off('rich-text-input.auto-save-rich-text-input', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form [note-rte]');
+            $(document).on('rich-text-input.auto-save-rich-text-input', '.visit-segment.edit[data-segment-template-name] [visit-moe]:not([no-auto-save]) form [note-rte]', function () {
+                debouncedSaver(this);
+            });
+
+            $(document).off('save-trigger.auto-save-input', '.visit-segment.edit[data-segment-template-name] [visit-moe][no-auto-save] form input[type="hidden"]');
+            $(document).on('save-trigger.auto-save-input', '.visit-segment.edit[data-segment-template-name] [visit-moe][no-auto-save] form input[type="hidden"]', function () {
                 debouncedSaver(this);
             });
         }

+ 291 - 0
resources/views/app/patient/segment-templates/typical_day_lifestyle/edit.blade.php

@@ -0,0 +1,291 @@
+<?php
+$point = App\Models\Point::getOrCreateOnlyTopLevelPointOfCategory($note, 'TYPICAL_DAY_LIFESTYLE', $sessionKey, true);
+$contentData = [
+    "lines" => [
+        [
+            "S" => '',
+            "I" => '',
+            "P" => '',
+        ]
+    ],
+    "estimated_daily_calories" => [
+        "S" => '',
+        "I" => '',
+        "P" => '',
+    ],
+    "estimated_daily_protein_grams" => [
+        "S" => '',
+        "I" => '',
+        "P" => '',
+    ],
+    "estimated_daily_vegetable_servings" => [
+        "S" => '',
+        "I" => '',
+        "P" => '',
+    ],
+    "estimated_daily_hours_of_sleep" => [
+        "S" => '',
+        "I" => '',
+        "P" => '',
+    ]
+];
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $point->lastChildReview->data;
+}
+?>
+
+<div visit-moe no-auto-save close-on-save close-on-cancel class="d-block p-3">
+    <form show url="/api/visitPoint/upsertChildReview" class="mcp-theme-1 frm-upsert-review-typical-day-ls">
+        <input type="hidden" name="uid" value="<?= $point->uid ?>">
+        <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
+        <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
+        <input type="hidden" name="data" value="{{json_encode($contentData)}}">
+
+        <p class="mb-2 font-weight-bold">Typical Day</p>
+
+        <table class="table table-sm table-bordered mb-2 stag-sheet allow-row-addition mb-3" lines>
+            <thead class="bg-light">
+            <tr>
+                <th class="border-bottom-0 text-secondary width-30px"></th>
+                <th class="border-bottom-0 text-secondary">Subjective</th>
+                <th class="border-bottom-0 text-secondary w-50">Impression & Plan</th>
+            </tr>
+            </thead>
+            <tbody>
+                @foreach(@$contentData["lines"] as $line)
+                    <tr>
+                        <td class="align-middle text-center bg-light"><a href="#" class="delete-line"><i class="fa fa-trash-alt on-hover-opaque text-danger"></i></a></td>
+                        <td><textarea rows="1" key="S">{{$line['S']}}</textarea></td>
+                        <td><textarea rows="1" key="P">{{$line['P']}}</textarea></td>
+                    </tr>
+                @endforeach
+            </tbody>
+        </table>
+
+        <p class="mb-2 font-weight-bold">Daily Aggregates</p>
+
+        <table class="table table-sm table-bordered mb-2 stag-sheet" aggregates>
+            <thead class="bg-light">
+            <tr>
+                <th class="border-bottom-0 text-secondary width-200px">Subject</th>
+                <th class="border-bottom-0 text-secondary">Current</th>
+                <th class="border-bottom-0 text-secondary w-50">Target</th>
+            </tr>
+            </thead>
+            <tbody>
+                <tr>
+                    <td class="pl-1 align-middle bg-light">Est. Daily Calories</td>
+                    <td><textarea rows="1" key="estimated_daily_calories->S">{{@$contentData["estimated_daily_calories"]["S"]}}</textarea></td>
+                    <td><textarea rows="1" key="estimated_daily_calories->P">{{@$contentData["estimated_daily_calories"]["P"]}}</textarea></td>
+                </tr>
+                <tr>
+                    <td class="pl-1 align-middle bg-light">Est. Daily Protein Grams</td>
+                    <td><textarea rows="1" key="estimated_daily_protein_grams->S">{{@$contentData["estimated_daily_protein_grams"]["S"]}}</textarea></td>
+                    <td><textarea rows="1" key="estimated_daily_protein_grams->P">{{@$contentData["estimated_daily_protein_grams"]["P"]}}</textarea></td>
+                </tr>
+                <tr>
+                    <td class="pl-1 align-middle bg-light">Est. Daily Vegetable Servings</td>
+                    <td><textarea rows="1" key="estimated_daily_vegetable_servings->S">{{@$contentData["estimated_daily_vegetable_servings"]["S"]}}</textarea></td>
+                    <td><textarea rows="1" key="estimated_daily_vegetable_servings->P">{{@$contentData["estimated_daily_vegetable_servings"]["P"]}}</textarea></td>
+                </tr>
+                <tr>
+                    <td class="pl-1 align-middle bg-light">Est. Daily Hours Of Sleep</td>
+                    <td><textarea rows="1" key="estimated_daily_hours_of_sleep->S">{{@$contentData["estimated_daily_hours_of_sleep"]["S"]}}</textarea></td>
+                    <td><textarea rows="1" key="estimated_daily_hours_of_sleep->P">{{@$contentData["estimated_daily_hours_of_sleep"]["P"]}}</textarea></td>
+                </tr>
+            </tbody>
+        </table>
+
+        <div class="pt-2">
+            <button submit class="btn btn-sm btn-primary mr-2"><i class="fa fa-save"></i></button>
+            <div class="d-inline-flex align-self-stretch align-items-center">
+                <span class="autosave-indicator saving text-sm text-secondary">Saving changes &hellip;</span>
+                <span class="autosave-indicator saved text-sm text-secondary">
+                    <i class="fa fa-check"></i>
+                    Saved
+                </span>
+            </div>
+        </div>
+    </form>
+</div>
+<style>
+    .stag-sheet tbody tr td {
+        padding: 0;
+    }
+    .stag-sheet tbody tr td textarea {
+        border: 1px solid transparent;
+        resize: none;
+        width: 100%;
+        outline: none;
+        margin: 0;
+        display: block;
+        padding: 3px;
+        min-height: 28px;
+    }
+    .stag-sheet tbody tr td textarea:focus,
+    .stag-sheet tbody tr td textarea:focus-visible {
+        border: 1px solid steelblue;
+    }
+</style>
+<script>
+    window.segmentInitializers.<?= $segment->segmentTemplate->internal_name ?> = function () {
+        let parentSegment = $('[data-segment-template-name="<?= $segment->segmentTemplate->internal_name ?>"] ');
+
+        function getRowBefore(_tr) {
+            return _tr.prev();
+        }
+
+        function moveToPrevRowInput(_td) {
+            let tr = getRowBefore(_td.closest('tr'));
+            tr.find('td:eq(' + _td.index() + ') textarea').first().focus();
+        }
+
+        function getRowAfter(_tr) {
+            return _tr.next();
+        }
+
+        function getOrCreateRowAfter(_tr) {
+            let tr = getRowAfter(_tr);
+            if(!tr.length) {
+                tr = newRow().insertAfter(_tr);
+            }
+            return tr;
+        }
+
+        function newRow() {
+            return $('<tr><td class="align-middle text-center bg-light"><a href="#" class="delete-line"><i class="fa fa-trash-alt on-hover-opaque text-danger"></i></a></td>' +
+                '<td><textarea rows="1" key="S"></textarea></td>' +
+                '<td><textarea rows="1" key="P"></textarea></td></tr>');
+        }
+
+        function moveToNextRowInput(_td, _forceCreate = false) {
+            let tr = _forceCreate ? getOrCreateRowAfter(_td.closest('tr')) : getRowAfter(_td.closest('tr'));
+            if(tr.length) {
+                tr.find('td:eq(' + _td.index() + ') textarea').first().focus();
+            }
+        }
+
+        function moveToPrevInput(_td) {
+            _td.prev().find('textarea').first().focus();
+        }
+
+        function moveToNextInput(_td) {
+            _td.next().find('textarea').first().focus();
+        }
+
+        function generateData(_parentSegment) {
+            let data = {};
+            let lines = [];
+            _parentSegment.find('.stag-sheet[lines] tbody tr').each(function() {
+                let line = {};
+                $(this).find('textarea').each(function() {
+                    line[$(this).attr('key')] = this.value;
+                });
+                lines.push(line);
+            });
+            data.lines = lines;
+            data.estimated_daily_calories = {
+                S: _parentSegment.find('.stag-sheet[aggregates] textarea[key="estimated_daily_calories->S"]').val(),
+                P: _parentSegment.find('.stag-sheet[aggregates] textarea[key="estimated_daily_calories->P"]').val()
+            };
+            data.estimated_daily_protein_grams = {
+                S: _parentSegment.find('.stag-sheet[aggregates] textarea[key="estimated_daily_protein_grams->S"]').val(),
+                P: _parentSegment.find('.stag-sheet[aggregates] textarea[key="estimated_daily_protein_grams->P"]').val()
+            };
+            data.estimated_daily_vegetable_servings = {
+                S: _parentSegment.find('.stag-sheet[aggregates] textarea[key="estimated_daily_vegetable_servings->S"]').val(),
+                P: _parentSegment.find('.stag-sheet[aggregates] textarea[key="estimated_daily_vegetable_servings->P"]').val()
+            };
+            data.estimated_daily_hours_of_sleep = {
+                S: _parentSegment.find('.stag-sheet[aggregates] textarea[key="estimated_daily_hours_of_sleep->S"]').val(),
+                P: _parentSegment.find('.stag-sheet[aggregates] textarea[key="estimated_daily_hours_of_sleep->P"]').val()
+            };
+            return JSON.stringify(data);
+        }
+
+        function autoSave() {
+            parentSegment.find('[name="data"]').val(generateData(parentSegment));
+            parentSegment.find('[name="data"]').trigger('save-trigger');
+        }
+
+        parentSegment
+            .off('keydown', '.stag-sheet textarea')
+            .on('keydown', '.stag-sheet textarea', function(_e) {
+                console.log(_e.which);
+                console.log(this.selectionStart, this.selectionEnd);
+                console.log(this.value.length);
+                switch (_e.which) {
+                    case 13: // ENTER: If shift NOT pressed, move to next row same column
+                        if (!_e.shiftKey) {
+                            moveToNextRowInput($(this).closest('td'), $(this).closest('.stag-sheet').is('.allow-row-addition'));
+                            return false;
+                        }
+                        break;
+                    case 38: // UP: If caret already at 0, move up to prev row same column
+                        if (this.selectionStart === this.selectionEnd && this.selectionStart === 0) {
+                            moveToPrevRowInput($(this).closest('td'));
+                            return false;
+                        }
+                        break;
+                    case 40: // DOWN: If caret already at end, move down to next row same column
+                        if (this.selectionStart === this.selectionEnd && this.selectionStart === this.value.length) {
+                            moveToNextRowInput($(this).closest('td'));
+                            return false;
+                        }
+                        break;
+                    case 37: // LEFT: If caret already at 0, move left to prev column
+                        if (this.selectionStart === this.selectionEnd && this.selectionStart === 0) {
+                            moveToPrevInput($(this).closest('td'));
+                            return false;
+                        }
+                        break;
+                    case 39: // DOWN: If caret already at end, move right to next column
+                        if (this.selectionStart === this.selectionEnd && this.selectionStart === this.value.length) {
+                            moveToNextInput($(this).closest('td'));
+                            return false;
+                        }
+                        break;
+                    case 8: // BACKSPACE: If caret already at 0, move left to prev column
+                        break;
+                }
+
+            });
+
+        parentSegment
+            .off('input paste cut change', '.stag-sheet textarea')
+            .on('input paste cut change', '.stag-sheet textarea', function() {
+                autoSave();
+            });
+
+        parentSegment
+            .off('click.delete-line', '.stag-sheet .delete-line')
+            .on('click.delete-line', '.stag-sheet .delete-line', function() {
+                let tr = $(this).closest('tr');
+                let isFirst = (tr.index() === 0);
+                if(isFirst) {
+                    newRow().insertAfter(tr);
+                }
+                tr.remove();
+                autoSave();
+                return false;
+            });
+
+        parentSegment.find('.stag-sheet textarea').each(function() {
+            this.style.minHeight = "calc(1.5em + .5rem + 2px)";
+            this.style.height = "calc(1.5em + .5rem + 2px)";
+            this.style.height = (this.scrollHeight)+"px";
+        });
+
+        parentSegment
+            .off('edit-mode-activated')
+            .on('edit-mode-activated', function() {
+                parentSegment.find('.stag-sheet textarea').each(function() {
+                    this.style.minHeight = "calc(1.5em + .5rem + 2px)";
+                    this.style.height = "calc(1.5em + .5rem + 2px)";
+                    this.style.height = (this.scrollHeight)+"px";
+                });
+            });
+
+    };
+</script>

+ 73 - 0
resources/views/app/patient/segment-templates/typical_day_lifestyle/log.blade.php

@@ -0,0 +1,73 @@
+<?php
+
+use App\Models\Point;
+
+$point = Point::getOnlyTopLevelPointOfCategory($note, 'TYPICAL_DAY_LIFESTYLE', true);
+
+if($point) {
+    ?> <div class="popup-content-container px-3"> <?php
+    foreach ($point->childReviews as $childReview) {
+        $contentData = $parsed = false;
+        if ($childReview->data) {
+            $childReview->data = json_decode($childReview->data, true);
+            $contentData = $parsed = $childReview->data;
+            ?>
+            <div class="mb-1 font-weight-bold">{{$childReview->creatorPro->displayName()}} - {{friendly_date($childReview->note->effective_dateest)}}</div>
+            <div class="pl-3 bg-light border p-3 mb-3">
+                <p class="mb-2 font-weight-bold">Typical Day</p>
+                @if(@$contentData["lines"] && count($contentData["lines"]))
+                    <table class="table table-sm table-bordered mb-3">
+                        <thead class="bg-light">
+                        <tr>
+                            <th class="border-bottom-0 text-secondary">Subjective</th>
+                            <th class="border-bottom-0 text-secondary w-50">Impression & Plan</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        @foreach(@$contentData["lines"] as $line)
+                            <tr>
+                                <td><pre class="m-0">{{$line['S']}}</pre></td>
+                                <td><pre class="m-0">{{$line['P']}}</pre></td>
+                            </tr>
+                        @endforeach
+                        </tbody>
+                    </table>
+                @endif
+                <p class="mb-2 font-weight-bold">Daily Aggregates</p>
+                <table class="table table-sm table-bordered mb-2">
+                    <thead class="bg-light">
+                    <tr>
+                        <th class="border-bottom-0 text-secondary width-200px">Subject</th>
+                        <th class="border-bottom-0 text-secondary">Current</th>
+                        <th class="border-bottom-0 text-secondary w-50">Target</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr>
+                        <td class="pl-1 align-middle bg-light">Est. Daily Calories</td>
+                        <td><pre class="m-0">{{@$contentData["estimated_daily_calories"]["S"]}}</pre></td>
+                        <td><pre class="m-0">{{@$contentData["estimated_daily_calories"]["P"]}}</pre></td>
+                    </tr>
+                    <tr>
+                        <td class="pl-1 align-middle bg-light">Est. Daily Protein Grams</td>
+                        <td><pre class="m-0">{{@$contentData["estimated_daily_protein_grams"]["S"]}}</pre></td>
+                        <td><pre class="m-0">{{@$contentData["estimated_daily_protein_grams"]["P"]}}</pre></td>
+                    </tr>
+                    <tr>
+                        <td class="pl-1 align-middle bg-light">Est. Daily Vegetable Servings</td>
+                        <td><pre class="m-0">{{@$contentData["estimated_daily_vegetable_servings"]["S"]}}</pre></td>
+                        <td><pre class="m-0">{{@$contentData["estimated_daily_vegetable_servings"]["P"]}}</pre></td>
+                    </tr>
+                    <tr>
+                        <td class="pl-1 align-middle bg-light">Est. Daily Hours Of Sleep</td>
+                        <td><pre class="m-0">{{@$contentData["estimated_daily_hours_of_sleep"]["S"]}}</pre></td>
+                        <td><pre class="m-0">{{@$contentData["estimated_daily_hours_of_sleep"]["P"]}}</pre></td>
+                    </tr>
+                    </tbody>
+                </table>
+            </div> <?php
+        }
+    }
+    ?> </div> <?php
+}
+?>

+ 92 - 0
resources/views/app/patient/segment-templates/typical_day_lifestyle/summary.blade.php

@@ -0,0 +1,92 @@
+<?php
+$point = App\Models\Point::getOrCreateOnlyTopLevelPointOfCategory($note, 'TYPICAL_DAY_LIFESTYLE', $sessionKey, true);
+$contentData = [
+    "lines" => [
+        [
+            "S" => '',
+            "I" => '',
+            "P" => '',
+        ]
+    ],
+    "estimated_daily_calories" => [
+        "S" => '',
+        "I" => '',
+        "P" => '',
+    ],
+    "estimated_daily_protein_grams" => [
+        "S" => '',
+        "I" => '',
+        "P" => '',
+    ],
+    "estimated_daily_vegetable_servings" => [
+        "S" => '',
+        "I" => '',
+        "P" => '',
+    ],
+    "estimated_daily_hours_of_sleep" => [
+        "S" => '',
+        "I" => '',
+        "P" => '',
+    ]
+];
+if ($point->lastChildReview && $point->lastChildReview->data) {
+    $point->lastChildReview->data = json_decode($point->lastChildReview->data, true);
+    $contentData = $point->lastChildReview->data;
+}
+?>
+<div class="events-none form-read-mode">
+    <p class="mb-2 font-weight-bold">Typical Day</p>
+
+    @if(@$contentData["lines"] && count($contentData["lines"]))
+        <table class="table table-sm table-bordered mb-3">
+            <thead class="bg-light">
+            <tr>
+                <th class="border-bottom-0 text-secondary">Subjective</th>
+                <th class="border-bottom-0 text-secondary w-50">Impression & Plan</th>
+            </tr>
+            </thead>
+            <tbody>
+            @foreach(@$contentData["lines"] as $line)
+                <tr>
+                    <td><pre class="m-0">{{$line['S']}}</pre></td>
+                    <td><pre class="m-0">{{$line['P']}}</pre></td>
+                </tr>
+            @endforeach
+            </tbody>
+        </table>
+    @endif
+
+    <p class="mb-2 font-weight-bold">Daily Aggregates</p>
+
+    <table class="table table-sm table-bordered mb-2">
+        <thead class="bg-light">
+        <tr>
+            <th class="border-bottom-0 text-secondary width-200px">Subject</th>
+            <th class="border-bottom-0 text-secondary">Current</th>
+            <th class="border-bottom-0 text-secondary w-50">Target</th>
+        </tr>
+        </thead>
+        <tbody>
+        <tr>
+            <td class="pl-1 align-middle bg-light">Est. Daily Calories</td>
+            <td><pre class="m-0">{{@$contentData["estimated_daily_calories"]["S"]}}</pre></td>
+            <td><pre class="m-0">{{@$contentData["estimated_daily_calories"]["P"]}}</pre></td>
+        </tr>
+        <tr>
+            <td class="pl-1 align-middle bg-light">Est. Daily Protein Grams</td>
+            <td><pre class="m-0">{{@$contentData["estimated_daily_protein_grams"]["S"]}}</pre></td>
+            <td><pre class="m-0">{{@$contentData["estimated_daily_protein_grams"]["P"]}}</pre></td>
+        </tr>
+        <tr>
+            <td class="pl-1 align-middle bg-light">Est. Daily Vegetable Servings</td>
+            <td><pre class="m-0">{{@$contentData["estimated_daily_vegetable_servings"]["S"]}}</pre></td>
+            <td><pre class="m-0">{{@$contentData["estimated_daily_vegetable_servings"]["P"]}}</pre></td>
+        </tr>
+        <tr>
+            <td class="pl-1 align-middle bg-light">Est. Daily Hours Of Sleep</td>
+            <td><pre class="m-0">{{@$contentData["estimated_daily_hours_of_sleep"]["S"]}}</pre></td>
+            <td><pre class="m-0">{{@$contentData["estimated_daily_hours_of_sleep"]["P"]}}</pre></td>
+        </tr>
+        </tbody>
+    </table>
+</div>