Samson Mutunga 3 years ago
parent
commit
16433addad

+ 38 - 0
public/css/style.css

@@ -2791,3 +2791,41 @@ body #vakata-dnd {
     font-size: 12px;
     font-size: 12px;
     background: rgba(240, 248, 255, 0.76);
     background: rgba(240, 248, 255, 0.76);
 }
 }
+
+.phq .btn-select {
+    padding: 5px 13px;
+    border-radius: 100%;
+}
+
+.phq .btn-blank {
+    opacity: .5;
+}
+
+.phq .btn-select:focus,
+.phq .btn-blank:focus {
+    box-shadow: none;
+}
+
+.phq .btn-select.active {
+    background-color: #28b4d9;
+    color: #fff;
+}
+
+.phq .plus {
+    position: relative;
+}
+
+.phq .plus::before {
+    content: '+';
+    position: absolute;
+    left: 0
+}
+
+.phq .table td,
+.phq .table th {
+    border-top-color: #000;
+}
+
+.phq .table thead th {
+    border-bottom: 0;
+}

+ 156 - 55
resources/views/app/patient/segment-templates/covid_follow-up/edit.blade.php

@@ -28,7 +28,7 @@ $contentData = [
         "ans_has_received_printed_cdc_mental_health_matrials" => null, // yes/no
         "ans_has_received_printed_cdc_mental_health_matrials" => null, // yes/no
         "ans_educated_patient_on_mental_health_screening" => null, // yes/no
         "ans_educated_patient_on_mental_health_screening" => null, // yes/no
         "ans_how_patient_is_doing_regarding_stress" => null,
         "ans_how_patient_is_doing_regarding_stress" => null,
-        "phq_score" => null,
+        "total_phq2" => null,
         "phq_action_taken" => null,
         "phq_action_taken" => null,
         "cdc_stress_emphasis_covid_19_effects" => null,
         "cdc_stress_emphasis_covid_19_effects" => null,
         "cdc_stress_emphasis_stressful_challenges" => null,
         "cdc_stress_emphasis_stressful_challenges" => null,
@@ -42,13 +42,13 @@ $contentData = [
 if (!!@$point->data) {
 if (!!@$point->data) {
         $contentData = $point->data;
         $contentData = $point->data;
 }
 }
-?>
 
 
+?>
 <div visit-moe close-on-save close-on-cancel class="d-block p-3">
 <div visit-moe close-on-save close-on-cancel class="d-block p-3">
-        <form show url="/api/visitPoint/<?= $endPoint ?>" class="mcp-theme-1">
+        <form id="visitNoteForm" show url="/api/visitPoint/<?= $endPoint ?>" class="mcp-theme-1">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
                 <input type="hidden" name="category" value="<?= $category ?>">
                 <input type="hidden" name="category" value="<?= $category ?>">
-                <input type="hidden" name="data" value="{{json_encode($contentData)}}">
+                <input id="mainData" type="hidden" name="data" value="{{json_encode($contentData)}}">
 
 
 
 
                 <div class="mb-2">
                 <div class="mb-2">
@@ -108,18 +108,16 @@ if (!!@$point->data) {
                 <hr class="my-3">
                 <hr class="my-3">
 
 
                 <div class="mb-2">
                 <div class="mb-2">
-                        <label class="mb-1">Have you reviewed CDC "<b>How to Protect Yourself & Others</b>" with the patient?</label>
-                        <div>
-                                <a href="https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/prevention.html" target="_blank">https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/prevention.html</a>
-                        </div>
-                        <div class="d-inline-flex ml-2 align-items-baseline pt-1">
-                                <label class="my-0 mr-3 d-flex align-items-center">
-                                        <input type="radio" data-name="ans_has_reviewed_printed_cdc_covid_matrials" name="ans_has_reviewed_printed_cdc_covid_matrials" {{@$contentData['ans_has_reviewed_printed_cdc_covid_matrials'] && @$contentData['ans_has_reviewed_printed_cdc_covid_matrials'] === 'yes' ? 'checked' : ''}} value="yes">
-                                        <span class="ml-1">Yes</span>
+                        <div class="d-flex align-items-start">
+                                <label class="d-flex align-items-baseline mb-2">
+                                        <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
+                                                <input type="checkbox" data-name="ans_has_reviewed_printed_cdc_covid_matrials" {{@($contentData['ans_has_reviewed_printed_cdc_covid_matrials'] ? 'checked' : '')}} cdc-stress-emphasis>
+                                        </div>
+                                        <span></span>
                                 </label>
                                 </label>
-                                <label class="my-0 mr-3 d-flex align-items-center">
-                                        <input type="radio" data-name="ans_has_reviewed_printed_cdc_covid_matrials" name="ans_has_reviewed_printed_cdc_covid_matrials" {{@$contentData['ans_has_reviewed_printed_cdc_covid_matrials'] && @$contentData['ans_has_reviewed_printed_cdc_covid_matrials'] === 'no' ? 'checked' : ''}} value="no">
-                                        <span class="ml-1">No</span>
+                                <label class="mr-3">Reviewed CDC "<b>How to Protect Yourself & Others</b>" with the patient
+                                        <br />
+                                        <a href="https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/prevention.html" target="_blank">https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/prevention.html</a>
                                 </label>
                                 </label>
                         </div>
                         </div>
                 </div>
                 </div>
@@ -129,12 +127,6 @@ if (!!@$point->data) {
                         <div>
                         <div>
                                 <label> Emphasis placed on:</label>
                                 <label> Emphasis placed on:</label>
                         </div>
                         </div>
-                        <label class="d-flex align-items-baseline mb-2">
-                                <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
-                                        <input type="checkbox" data-target="cdc-covid-emphasis" check-all />
-                                </div>
-                                <span class="font-weight-bold">Check ALL</span>
-                        </label>
 
 
                         <label class="d-flex align-items-baseline mb-2">
                         <label class="d-flex align-items-baseline mb-2">
                                 <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
                                 <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
@@ -259,11 +251,53 @@ if (!!@$point->data) {
                         </div>
                         </div>
                         <div class="mb-2">
                         <div class="mb-2">
                                 <label class="mb-1">How are you doing regarding stress?</label>
                                 <label class="mb-1">How are you doing regarding stress?</label>
-                                <input type="text" data-name="ans_how_patient_is_doing_regarding_stress" value="{{@$contentData['ans_how_patient_is_doing_regarding_stress']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                                <input id="stressChangeInput" type="text" data-name="ans_how_patient_is_doing_regarding_stress" value="{{@$contentData['ans_how_patient_is_doing_regarding_stress']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
                         </div>
                         </div>
-                        <div class="mb-2">
-                                <label class="mb-1">PHQ-2 score?</label>
-                                <input type="text" data-name="phq_score" value="{{@$contentData['phq_score']}}" class="form-control form-control-sm d-inline-block w-auto ml-2">
+                        <hr class="my-3">
+                        <div class="mb-2 phq">
+                                <div class="table-responsive">
+                                        <h6><b>Patient Health Questionnaire-2 (PHQ-2)</b></h6>
+                                        <table class="table">
+                                                <thead>
+                                                        <tr>
+                                                                <th>Over the last 2 weeks, how often have you been bothered by any of the following problems?</th>
+                                                                <th class="text-center">Not at all</th>
+                                                                <th class="text-center">Several days</th>
+                                                                <th class="text-center">More than half the days</th>
+                                                                <th class="text-center">Nearly every day</th>
+                                                        </tr>
+                                                </thead>
+                                                <tbody>
+                                                        <tr>
+                                                                <td>1. Little interest or pleasure in doing things</td>
+                                                                <td class="text-center"><button type="button" class="btn btn-blank">0</button></td>
+                                                                <td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select one_phq2 {{ @$contentData['no_interest_phq2'] == 1 ? 'active':'' }}" data-id="1">1</button></td>
+                                                                <td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select two_phq2 {{ @$contentData['no_interest_phq2'] == 2 ? 'active':'' }}" data-id="2">2</button></td>
+                                                                <td class="text-center"><button type="button" onclick="onValueChange(this, 'no_interest', 'phq2')" class="no_interest_phq2 btn btn-select three_phq2 {{ @$contentData['no_interest_phq2'] == 3 ? 'active':'' }}" data-id="3">3</button></td>
+                                                        </tr>
+                                                        <tr>
+                                                                <td>2. Feeling down, depressed, or hopeless</td>
+                                                                <td class="text-center"><button type="button" class="btn btn-blank">0</button></td>
+                                                                <td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select one_phq2 {{ @$contentData['depressed_phq2'] == 1 ? 'active':'' }}" data-id="1">1</button></td>
+                                                                <td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select two_phq2 {{ @$contentData['depressed_phq2'] == 2 ? 'active':'' }}" data-id="2">2</button></td>
+                                                                <td class="text-center"><button type="button" onclick="onValueChange(this, 'depressed', 'phq2')" class="depressed_phq2 btn btn-select three_phq2 {{ @$contentData['depressed_phq2'] == 3 ? 'active':'' }}" data-id="3">3</button></td>
+                                                        </tr>
+                                                        <tr>
+                                                                <td class="text-right"><em>For office coding:</em></td>
+                                                                <td class="text-center">0</td>
+                                                                <td class="text-center plus"><span id="first_phq2"><b><u><?= @$contentData['first_phq2'] ?? '____' ?></u></b></span></td>
+                                                                <td class="text-center plus"><span id="second_phq2"><b><u><?= @$contentData['second_phq2'] ?? '____' ?></u></b></span></td>
+                                                                <td class="text-center plus"><span id="third_phq2"><b><u><?= @$contentData['third_phq2'] ?? '____' ?></u></b></span></td>
+                                                        </tr>
+                                                        <tr>
+                                                                <td class="text-right" colspan="5">
+                                                                        <input type="hidden" name="total_phq2" data-name="total_phq2" value="{{ @$contentData['total_phq2'] }}">
+                                                                        <em>= Total Score</em> <span id="total_phq2"><b><u><?= @$contentData['total_phq2'] ?? '___' ?></u></b></span>
+                                                                </td>
+                                                        </tr>
+                                                </tbody>
+                                        </table>
+                                </div>
                         </div>
                         </div>
 
 
                         <div class="mb-2">
                         <div class="mb-2">
@@ -289,12 +323,6 @@ if (!!@$point->data) {
                         </div>
                         </div>
                         <div class="mb-2">
                         <div class="mb-2">
                                 <label class="mb-1">Reviewed “<b>CDC: Coping with Stress</b>” with patient. Went over the following points.</label>
                                 <label class="mb-1">Reviewed “<b>CDC: Coping with Stress</b>” with patient. Went over the following points.</label>
-                                <label class="d-flex align-items-baseline mb-2">
-                                        <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
-                                                <input type="checkbox" data-target="cdc-stress-emphasis" check-all />
-                                        </div>
-                                        <span class="font-weight-bold">Check ALL</span>
-                                </label>
 
 
                                 <label class="d-flex align-items-baseline mb-2">
                                 <label class="d-flex align-items-baseline mb-2">
                                         <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
                                         <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
@@ -326,22 +354,33 @@ if (!!@$point->data) {
                                         </div>
                                         </div>
                                         <span>Educated patient on healthy ways to cope with stress (as per CDC: Coping with Stress):</span>
                                         <span>Educated patient on healthy ways to cope with stress (as per CDC: Coping with Stress):</span>
                                 </label>
                                 </label>
-                                <div class="pl-3">
-                                        <ul>
-                                                <li>Take breaks from news and social media.</li>
-                                                <li>Take care of your body</li>
-                                                <li>Take deep breaths, stretch, or <a href="https://www.nccih.nih.gov/health/meditation-in-depth" target="_blank">meditate</a></li>
-                                                <li><a href="https://www.cdc.gov/nccdphp/dnpao/features/healthy-eating-tips/index.html" target="_blank">Try to eat healthy, well-balanced meals</a></li>
-                                                <li><a href="https://www.cdc.gov/physicalactivity/basics/index.htm" target="_blank">Exercise regularly</a></li>
-                                                <li><a href="https://www.cdc.gov/sleep/about_sleep/sleep_hygiene.html" target="_blank">Get plenty of sleep</a></li>
-                                                <li>Avoid <a href="https://www.cdc.gov/coronavirus/2019-ncov/daily-life-coping/stress-coping/alcohol-use.html" target="_blank">excessive alcohol, tobacco, and substance use</a></li>
-                                                <li>Continue with routine preventive measures (such as vaccinations, cancer screenings, etc.) as recommended by your healthcare provider</li>
-                                                <li>Get vaccinated with a COVID-19 vaccine</li>
-                                                <li>Make time to unwind — Try to do some other activities you enjoy</li>
-                                                <li>Connect with others — <a href="https://www.cdc.gov/howrightnow/talk" target="_blank">Talk with people</a> you trust about your concerns and how you are feeling</li>
-                                                <li>Connect with your community- or faith-based organizations — While social distancing measures are in place, try connecting online, through social media, or by phone or mail
-                                                </li>
-                                        </ul>
+                                <div class="pl-4">
+                                        <?php
+                                        $healthyWaysOptions = [
+                                                'take_break_from_social_media' => 'Take breaks from news and social media.',
+                                                'take_care_of_your_body' => 'Take care of your body',
+                                                'take_deep_breaths' => 'Take deep breaths, stretch, or meditate',
+                                                'try_to_eat_healthy' => 'Try to eat healthy, well-balanced meals',
+                                                'exercise_regularly' => 'Exercise regularly',
+                                                'get_plenty_of_sleep' => 'Get plenty of sleep',
+                                                'avoid_excessive_alcohol' => 'Avoid excessive alcohol, tobacco, and substance use',
+                                                'continue_with_routine_preventive_measures' => 'Continue with routine preventive measures (such as vaccinations, cancer screenings, etc.) as recommended by your healthcare provider',
+                                                'get_vaccinated_with_covid' => 'Get vaccinated with a COVID-19 vaccine',
+                                                'make_time_unwind' => 'Make time to unwind — Try to do some other activities you enjoy',
+                                                'connect_with_others' => 'Connect with others — Talk with people you trust about your concerns and how you are feeling',
+                                                'connect_with_your_community' => 'Connect with your community- or faith-based organizations — While social distancing measures are in place, try connecting online, through social media, or by phone or mail'
+                                        ];
+                                        ?>
+                                        <div class="">
+                                                @foreach($healthyWaysOptions as $hOptionKey => $hOptionLabel)
+                                                <label class="d-flex align-items-baseline mb-2">
+                                                        <div class="mr-2 align-self-stretch" style="padding-top: 2px;">
+                                                                <input type="checkbox" data-name="{{ $hOptionKey }}" {{@($contentData[$hOptionKey] ? 'checked' : '')}} cdc-stress-emphasis>
+                                                        </div>
+                                                        <span>{{ $hOptionLabel }}</span>
+                                                </label>
+                                                @endforeach
+                                        </div>
                                 </div>
                                 </div>
 
 
                         </div>
                         </div>
@@ -376,29 +415,91 @@ if (!!@$point->data) {
 </div>
 </div>
 
 
 <script>
 <script>
+        // PHQ
+        function phqSubmitChanges() {
+                var form = $('#visitNoteForm');
+                $.post('/api/visitPoint/upsertNoteSingleton', form.serializeArray(), function(response){
+                }, 'json');
+        }
+
+        function phqUpdateData(object) {
+                var mainDataInput = $('#mainData');
+                var mainData = mainDataInput.val();
+                try {
+                        mainData = JSON.parse(mainData);
+                } catch (e) {
+                        mainData = {};
+                }
+                var data = $.extend(mainData, object);
+                mainDataInput.val(JSON.stringify(data));
+                phqSubmitChanges(data);
+        }
+
+        function onValueChange(elem, category, phq_type) {
+                var btn = elem;
+                var name = category + '_' + phq_type;
+                var value = $(btn).data('id');
+                $('[name=' + name + ']').remove();
+                if ($(btn).hasClass('active')) {
+                        $(btn).removeClass('active');
+                        calculateChange(phq_type);
+                        return;
+                }
+                $('.' + name).removeClass('active');
+                $(btn).addClass('active');
+                $('.phq').append('<input type="hidden" data-name=' + name + ' name=' + name + ' value=' + value + ' />');
+                calculateChange(phq_type);
+                phqUpdateData({
+                        [name]: value
+                });
+        };
+
+        function calculateChange(phq_type) {
+                var first = $('.one_' + phq_type + '.active').length * 1;
+                var second = $('.two_' + phq_type + '.active').length * 2;
+                var third = $('.three_' + phq_type + '.active').length * 3;
+                var total = first + second + third;
+
+                var values = [first, second, third, total];
+                var labels = ['first', 'second', 'third', 'total'];
+                var object = {};
+                for (var i = 0; i < labels.length; i++) {
+                        var name = labels[i] + '_' + phq_type;
+                        var value = values[i];
+                        $('#' + name).html(value);
+                        $('[name=' + name + ']').remove();
+                        $('.phq').append('<input type="hidden" data-name=' + name + ' name=' + name + ' value=' + value + ' />');
+                        object[name] = value;
+                        phqUpdateData({
+                                [name]: value
+                        });
+                }
+        };
+        // PHQ
+
         (function() {
         (function() {
                 window.segmentInitializers.covidFollowUp = function() {
                 window.segmentInitializers.covidFollowUp = function() {
                         var covidFollowUp = {
                         var covidFollowUp = {
                                 parentSegment: $('[data-segment-template-name="<?= $segment->segmentTemplate->internal_name ?>"] '),
                                 parentSegment: $('[data-segment-template-name="<?= $segment->segmentTemplate->internal_name ?>"] '),
-                                initAutoCheckAll: function(){
+                                initAutoCheckAll: function() {
                                         var self = this;
                                         var self = this;
                                         var checkSegments = $('[check-all]');
                                         var checkSegments = $('[check-all]');
-                                        $.each(checkSegments, function(i, segment){
+                                        $.each(checkSegments, function(i, segment) {
                                                 var target = $(segment).data('target');
                                                 var target = $(segment).data('target');
-                                                var allChildrenCheckboxes = self.parentSegment.find('input[type=checkbox]['+target+']');
-                                                $(segment).click(function(){
+                                                var allChildrenCheckboxes = self.parentSegment.find('input[type=checkbox][' + target + ']');
+                                                $(segment).click(function() {
                                                         var checkAllInput = this;
                                                         var checkAllInput = this;
-                                                        var isChecked = checkAllInput.checked ? true:false;
+                                                        var isChecked = checkAllInput.checked ? true : false;
                                                         allChildrenCheckboxes.attr('checked', isChecked);
                                                         allChildrenCheckboxes.attr('checked', isChecked);
                                                 });
                                                 });
-                                                var allCheckedChildrenCheckboxes = self.parentSegment.find('input[type=checkbox]['+target+']:checked');
-                                                if(allChildrenCheckboxes.length === allCheckedChildrenCheckboxes.length){
+                                                var allCheckedChildrenCheckboxes = self.parentSegment.find('input[type=checkbox][' + target + ']:checked');
+                                                if (allChildrenCheckboxes.length === allCheckedChildrenCheckboxes.length) {
                                                         $(segment).attr('checked', true);
                                                         $(segment).attr('checked', true);
                                                 }
                                                 }
                                         });
                                         });
 
 
                                 },
                                 },
-                                init: function(){
+                                init: function() {
                                         this.initAutoCheckAll();
                                         this.initAutoCheckAll();
                                 }
                                 }
                         };
                         };

+ 77 - 84
resources/views/app/patient/segment-templates/covid_follow-up/summary.blade.php

@@ -11,7 +11,7 @@ $contentData = [
     "ans_has_received_printed_cdc_covid_matrials" => null, // yes/no
     "ans_has_received_printed_cdc_covid_matrials" => null, // yes/no
     "ans_has_signed_up_for_gvt_covid_kit" => null, // yes/no/not_sure
     "ans_has_signed_up_for_gvt_covid_kit" => null, // yes/no/not_sure
     "ans_apply_gvt_covid_kit_for_patient" => null, // yes/no/not_sure
     "ans_apply_gvt_covid_kit_for_patient" => null, // yes/no/not_sure
-    "ans_has_reviewed_printed_cdc_covid_matrials" => null, // yes/no,
+    "ans_has_reviewed_printed_cdc_covid_matrials" => null,
     "cdc_self_protection_emphasis_vaccination" => null,
     "cdc_self_protection_emphasis_vaccination" => null,
     "cdc_self_protection_emphasis_mask_wearing" => null,
     "cdc_self_protection_emphasis_mask_wearing" => null,
     "cdc_self_protection_emphasis_mask_wearing" => null,
     "cdc_self_protection_emphasis_mask_wearing" => null,
@@ -29,7 +29,7 @@ $contentData = [
     "ans_has_received_printed_cdc_mental_health_matrials" => null, // yes/no
     "ans_has_received_printed_cdc_mental_health_matrials" => null, // yes/no
     "ans_educated_patient_on_mental_health_screening" => null, // yes/no
     "ans_educated_patient_on_mental_health_screening" => null, // yes/no
     "ans_how_patient_is_doing_regarding_stress" => null,
     "ans_how_patient_is_doing_regarding_stress" => null,
-    "phq_score" => null,
+    "total_phq2" => null,
     "phq_action_taken" => null,
     "phq_action_taken" => null,
     "cdc_stress_emphasis_covid_19_effects" => null,
     "cdc_stress_emphasis_covid_19_effects" => null,
     "cdc_stress_emphasis_stressful_challenges" => null,
     "cdc_stress_emphasis_stressful_challenges" => null,
@@ -47,13 +47,11 @@ if (!!@$point->data) {
 
 
 <div class="events-none form-read-mode">
 <div class="events-none form-read-mode">
     <div class="mb-2">
     <div class="mb-2">
-        <label><b>{{ $patient->displayName() }}</b> is a <b>{{$patient->age_in_years }} year(s) </b> 
+        <label><b>{{ $patient->displayName() }}</b> is a <b>{{$patient->age_in_years }} y.o.</b>
             @if($patient->sex == 'M')
             @if($patient->sex == 'M')
-                <b>Male</b>
+            <b>M</b>
             @elseif($patient->sex == 'F')
             @elseif($patient->sex == 'F')
-                <b>Female</b>
-            @else
-                <b>(Unspecified Gender)</b>
+            <b>F</b>
             @endif
             @endif
             presenting for follow-up regarding CDC COVID-19 guidelines & ongoing medical care.</label>
             presenting for follow-up regarding CDC COVID-19 guidelines & ongoing medical care.</label>
     </div>
     </div>
@@ -61,26 +59,24 @@ if (!!@$point->data) {
     <div class="mb-2">
     <div class="mb-2">
         <h6><b><u>CDC: How to Protect Yourself & Others: Education</u></b></h6>
         <h6><b><u>CDC: How to Protect Yourself & Others: Education</u></b></h6>
         @if(@$contentData['ans_has_received_printed_cdc_covid_matrials'] == 'yes')
         @if(@$contentData['ans_has_received_printed_cdc_covid_matrials'] == 'yes')
-            Patient has received printed materials from CDC, “How to Protect Yourself & Others”.
+        Patient has received printed materials from CDC, “How to Protect Yourself & Others”.
         @elseif(@$contentData['ans_has_received_printed_cdc_covid_matrials'] == 'no')
         @elseif(@$contentData['ans_has_received_printed_cdc_covid_matrials'] == 'no')
-            Patient has not received printed materials from CDC, “How to Protect Yourself & Others”.
+        Patient has not received printed materials from CDC, “How to Protect Yourself & Others”.
         @else
         @else
-            
+
         @endif
         @endif
     </div>
     </div>
 
 
-    <hr class="my-3">
-
     <div class="mb-2">
     <div class="mb-2">
         <label>Asked patient if they have already signed up for government supplied COVID-19 home diagnostic kits? Patient replied:</label>
         <label>Asked patient if they have already signed up for government supplied COVID-19 home diagnostic kits? Patient replied:</label>
         @if(@$contentData['ans_has_signed_up_for_gvt_covid_kit'] == 'yes')
         @if(@$contentData['ans_has_signed_up_for_gvt_covid_kit'] == 'yes')
-            <?= segment_template_summary_value_display('Yes') ?>
+        <?= segment_template_summary_value_display('Yes') ?>
         @elseif(@$contentData['ans_has_signed_up_for_gvt_covid_kit'] == 'no')
         @elseif(@$contentData['ans_has_signed_up_for_gvt_covid_kit'] == 'no')
-            <?= segment_template_summary_value_display('No') ?>
+        <?= segment_template_summary_value_display('No') ?>
         @elseif(@$contentData['ans_has_signed_up_for_gvt_covid_kit'] == 'not_sure')
         @elseif(@$contentData['ans_has_signed_up_for_gvt_covid_kit'] == 'not_sure')
-            <?= segment_template_summary_value_display('Not Sure') ?>
+        <?= segment_template_summary_value_display('Not Sure') ?>
         @else
         @else
-            <?= segment_template_summary_value_display('') ?>
+        <?= segment_template_summary_value_display('') ?>
         @endif
         @endif
     </div>
     </div>
 
 
@@ -88,28 +84,26 @@ if (!!@$point->data) {
     <div class="mb-2">
     <div class="mb-2">
         <label>Asked patient if we can apply on CovidTests.gov for them? Patient replied:</label>
         <label>Asked patient if we can apply on CovidTests.gov for them? Patient replied:</label>
         @if(@$contentData['ans_apply_gvt_covid_kit_for_patient'] == 'yes')
         @if(@$contentData['ans_apply_gvt_covid_kit_for_patient'] == 'yes')
-            <?= segment_template_summary_value_display('Yes') ?>
+        <?= segment_template_summary_value_display('Yes') ?>
         @elseif(@$contentData['ans_apply_gvt_covid_kit_for_patient'] == 'no')
         @elseif(@$contentData['ans_apply_gvt_covid_kit_for_patient'] == 'no')
-            <?= segment_template_summary_value_display('No') ?>
+        <?= segment_template_summary_value_display('No') ?>
         @elseif(@$contentData['ans_apply_gvt_covid_kit_for_patient'] == 'not_sure')
         @elseif(@$contentData['ans_apply_gvt_covid_kit_for_patient'] == 'not_sure')
-            <?= segment_template_summary_value_display('Not Sure') ?>
+        <?= segment_template_summary_value_display('Not Sure') ?>
         @else
         @else
-            <?= segment_template_summary_value_display('') ?>
+        <?= segment_template_summary_value_display('') ?>
         @endif
         @endif
     </div>
     </div>
     @endif
     @endif
 
 
-    @if(@$contentData['ans_has_reviewed_printed_cdc_covid_matrials'] == 'yes')
-        <hr class="my-3">
-        <div class="mb-2">
-            <label>Reviewed “<b>CDC: How to Protect Yourself & Others</b>” with patient.</label>
-            <div>
+    @if(@$contentData['ans_has_reviewed_printed_cdc_covid_matrials'])
+    <div class="mb-2">
+        <label>Reviewed “<b>CDC: How to Protect Yourself & Others</b>” with patient.</label>
+        <div>
             <a href="https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/prevention.html" target="_blank">https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/prevention.html</a>
             <a href="https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/prevention.html" target="_blank">https://www.cdc.gov/coronavirus/2019-ncov/prevent-getting-sick/prevention.html</a>
-            </div>
         </div>
         </div>
+    </div>
     @endif
     @endif
 
 
-    <hr class="my-3">
     <div class="mb-2">
     <div class="mb-2">
         <label> Emphasis placed on:</label>
         <label> Emphasis placed on:</label>
         <ul>
         <ul>
@@ -152,79 +146,71 @@ if (!!@$point->data) {
         </ul>
         </ul>
     </div>
     </div>
 
 
-    <hr class="my-3">
     <div class="mb-2">
     <div class="mb-2">
         <label>Answered all questions relating to COVID-19.</label>
         <label>Answered all questions relating to COVID-19.</label>
         @if(@$contentData['ans_has_answered_all_covid_19_questions'] == 'yes')
         @if(@$contentData['ans_has_answered_all_covid_19_questions'] == 'yes')
-            <?= segment_template_summary_value_display('Patient verbalizes understanding.') ?>
+        <?= segment_template_summary_value_display('Patient verbalizes understanding.') ?>
         @elseif(@$contentData['ans_has_answered_all_covid_19_questions'] == 'no')
         @elseif(@$contentData['ans_has_answered_all_covid_19_questions'] == 'no')
-            <?= segment_template_summary_value_display('Patient verbalizes lack of understanding.') ?>
+        <?= segment_template_summary_value_display('Patient verbalizes lack of understanding.') ?>
         @else
         @else
-            <?= segment_template_summary_value_display('') ?>
+        <?= segment_template_summary_value_display('') ?>
         @endif
         @endif
     </div>
     </div>
 
 
-    <hr class="my-3">
     <div class="mb-2">
     <div class="mb-2">
         <h6><b><u>CDC: Coping with Stress - Mental Health Screening</b></u></h6>
         <h6><b><u>CDC: Coping with Stress - Mental Health Screening</b></u></h6>
     </div>
     </div>
     @if(@$contentData['ans_has_received_printed_cdc_mental_health_matrials'] == 'yes')
     @if(@$contentData['ans_has_received_printed_cdc_mental_health_matrials'] == 'yes')
-        <div class="mb-2">
-            <label>Patient has received printed materials from the CDC “<b>Coping with Stress</b>”.</label>
-            <div>
+    <div class="mb-2">
+        <label>Patient has received printed materials from the CDC “<b>Coping with Stress</b>”.</label>
+        <div>
             <a href="https://www.cdc.gov/mentalhealth/stress-coping/cope-with-stress/index.html" target="_blank">https://www.cdc.gov/mentalhealth/stress-coping/cope-with-stress/index.html</a>
             <a href="https://www.cdc.gov/mentalhealth/stress-coping/cope-with-stress/index.html" target="_blank">https://www.cdc.gov/mentalhealth/stress-coping/cope-with-stress/index.html</a>
-            </div>
         </div>
         </div>
+    </div>
     @elseif(@$contentData['ans_has_received_printed_cdc_mental_health_matrials'] == 'no')
     @elseif(@$contentData['ans_has_received_printed_cdc_mental_health_matrials'] == 'no')
-        <div class="mb-2">
-            <label>Patient has not received printed materials from the CDC “<b>Coping with Stress</b>”.</label>
-            <div>
+    <div class="mb-2">
+        <label>Patient has not received printed materials from the CDC “<b>Coping with Stress</b>”.</label>
+        <div>
             <a href="https://www.cdc.gov/mentalhealth/stress-coping/cope-with-stress/index.html" target="_blank">https://www.cdc.gov/mentalhealth/stress-coping/cope-with-stress/index.html</a>
             <a href="https://www.cdc.gov/mentalhealth/stress-coping/cope-with-stress/index.html" target="_blank">https://www.cdc.gov/mentalhealth/stress-coping/cope-with-stress/index.html</a>
-            </div>
         </div>
         </div>
+    </div>
     @endif
     @endif
 
 
     @if(@$contentData['ans_educated_patient_on_mental_health_screening'] == 'yes')
     @if(@$contentData['ans_educated_patient_on_mental_health_screening'] == 'yes')
-        <hr class="my-3">
-        <div class="mb-2">
-            <label>Educated patient that stress and mental health screening is important because 7 in 10 adults are reporting feelings of anxiety, sadness, and depression due to COVID-19.</label>
-        </div>
-    @endif
-    
-    @if(@$contentData['ans_has_received_printed_cdc_mental_health_matrials'] || @$contentData['ans_educated_patient_on_mental_health_screening'])
-    <hr class="my-3">
+    <div class="mb-2">
+        <label>Educated patient that stress and mental health screening is important because 7 in 10 adults are reporting feelings of anxiety, sadness, and depression due to COVID-19.</label>
+    </div>
     @endif
     @endif
+
     <div class="mb-2">
     <div class="mb-2">
         <label>Asked patient, how are you doing regarding stress? Patient replied:</label>
         <label>Asked patient, how are you doing regarding stress? Patient replied:</label>
         <?= segment_template_summary_value_display(@$contentData['ans_how_patient_is_doing_regarding_stress']) ?>
         <?= segment_template_summary_value_display(@$contentData['ans_how_patient_is_doing_regarding_stress']) ?>
     </div>
     </div>
 
 
-    <hr class="my-3">
     <div class="mb-2">
     <div class="mb-2">
         <label>Conducted PHQ-2 with patient. Patient score is:</label>
         <label>Conducted PHQ-2 with patient. Patient score is:</label>
-        <?= segment_template_summary_value_display(@$contentData['phq_score']) ?>
+        <?= segment_template_summary_value_display(@$contentData['total_phq2']) ?>
     </div>
     </div>
 
 
-    @if((int) @$contentData['phq_score'] > 3)
-        <ul>
-            @if(@$contentData['phq_action_taken'])
-                <li>
-                    @if(@$contentData['phq_action_taken'] == 'phq_administer_phq_9_now')
-                    Administer PHQ-9 now.
-                    @elseif(@$contentData['phq_action_taken'] == 'phq_schedule_phq_9_now')
-                    Schedule PHQ-9 now.
-                    @elseif(@$contentData['phq_action_taken'] == 'phq_schedule_phq_9_later')
-                    Schedule PHQ-9 later.
-                    @elseif(@$contentData['phq_action_taken'] == 'phq_refer_to_psych_np')
-                    Referral to Psych NP - “Stress Specialist”.
-                    @endif
-                </li>
+    @if((int) @$contentData['total_phq2'] > 3)
+    <ul>
+        @if(@$contentData['phq_action_taken'])
+        <li>
+            @if(@$contentData['phq_action_taken'] == 'phq_administer_phq_9_now')
+            Administer PHQ-9 now.
+            @elseif(@$contentData['phq_action_taken'] == 'phq_schedule_phq_9_now')
+            Schedule PHQ-9 now.
+            @elseif(@$contentData['phq_action_taken'] == 'phq_schedule_phq_9_later')
+            Schedule PHQ-9 later.
+            @elseif(@$contentData['phq_action_taken'] == 'phq_refer_to_psych_np')
+            Referral to Psych NP - “Stress Specialist”.
             @endif
             @endif
-        </ul>
+        </li>
+        @endif
+    </ul>
     @endif
     @endif
 
 
-    <hr class="my-3">
-    <div class="mb-2">
+    <div class="mb-2 d-none">
         <h6><b><u>OPTIONAL: Election to participate in PHQ-9:</u></b></h6>
         <h6><b><u>OPTIONAL: Election to participate in PHQ-9:</u></b></h6>
     </div>
     </div>
     <div class="mb-2">
     <div class="mb-2">
@@ -246,20 +232,28 @@ if (!!@$point->data) {
             @endif
             @endif
             @if(@$contentData['cdc_stress_emphasis_coping_with_stress'])
             @if(@$contentData['cdc_stress_emphasis_coping_with_stress'])
             <li>Educated patient on healthy ways to cope with stress (as per CDC: Coping with Stress):
             <li>Educated patient on healthy ways to cope with stress (as per CDC: Coping with Stress):
+                <?php
+                $healthyWaysOptions = [
+                    'take_break_from_social_media' => 'Take breaks from news and social media.',
+                    'take_care_of_your_body' => 'Take care of your body',
+                    'take_deep_breaths' => 'Take deep breaths, stretch, or meditate',
+                    'try_to_eat_healthy' => 'Try to eat healthy, well-balanced meals',
+                    'exercise_regularly' => 'Exercise regularly',
+                    'get_plenty_of_sleep' => 'Get plenty of sleep',
+                    'avoid_excessive_alcohol' => 'Avoid excessive alcohol, tobacco, and substance use',
+                    'continue_with_routine_preventive_measures' => 'Continue with routine preventive measures (such as vaccinations, cancer screenings, etc.) as recommended by your healthcare provider',
+                    'get_vaccinated_with_covid' => 'Get vaccinated with a COVID-19 vaccine',
+                    'make_time_unwind' => 'Make time to unwind — Try to do some other activities you enjoy',
+                    'connect_with_others' => 'Connect with others — Talk with people you trust about your concerns and how you are feeling',
+                    'connect_with_your_community' => 'Connect with your community- or faith-based organizations — While social distancing measures are in place, try connecting online, through social media, or by phone or mail'
+                ];
+                ?>
                 <ul>
                 <ul>
-                    <li>Take breaks from news and social media.</li>
-                    <li>Take care of your body</li>
-                    <li>Take deep breaths, stretch, or <a href="https://www.nccih.nih.gov/health/meditation-in-depth" target="_blank">meditate</a></li>
-                    <li><a href="https://www.cdc.gov/nccdphp/dnpao/features/healthy-eating-tips/index.html" target="_blank">Try to eat healthy, well-balanced meals</a></li>
-                    <li><a href="https://www.cdc.gov/physicalactivity/basics/index.htm" target="_blank">Exercise regularly</a></li>
-                    <li><a href="https://www.cdc.gov/sleep/about_sleep/sleep_hygiene.html" target="_blank">Get plenty of sleep</a></li>
-                    <li>Avoid <a href="https://www.cdc.gov/coronavirus/2019-ncov/daily-life-coping/stress-coping/alcohol-use.html" target="_blank">excessive alcohol, tobacco, and substance use</a></li>
-                    <li>Continue with routine preventive measures (such as vaccinations, cancer screenings, etc.) as recommended by your healthcare provider</li>
-                    <li>Get vaccinated with a COVID-19 vaccine</li>
-                    <li>Make time to unwind — Try to do some other activities you enjoy</li>
-                    <li>Connect with others — <a href="https://www.cdc.gov/howrightnow/talk" target="_blank">Talk with people</a> you trust about your concerns and how you are feeling</li>
-                    <li>Connect with your community- or faith-based organizations — While social distancing measures are in place, try connecting online, through social media, or by phone or mail
-                    </li>
+                @foreach($healthyWaysOptions as $hOptionKey => $hOptionLabel)
+                    @if(@$contentData[$hOptionKey])
+                    <li>{{ $hOptionLabel }}</li>
+                    @endif
+                    @endforeach
                 </ul>
                 </ul>
             </li>
             </li>
             @endif
             @endif
@@ -267,9 +261,8 @@ if (!!@$point->data) {
     </div>
     </div>
 
 
     @if(@$contentData['ans_hypertension_rpm_education'] == 'yes')
     @if(@$contentData['ans_hypertension_rpm_education'] == 'yes')
-    <hr class="my-3">
-    <h6><b><u>OPTIONAL: Election to enroll into hypertension RPM: (Requires H&P)</u></b></h6>
-    <p>Educated patient regarding AHA position statement on HTN & RPM, educated about availability  of CCM, informed patient about importance as per AHA position statement. Patient consents to RPM.</p>
+    <h6 class="d-none"><b><u>OPTIONAL: Election to enroll into hypertension RPM: (Requires H&P)</u></b></h6>
+    <p>Educated patient regarding AHA position statement on HTN & RPM, educated about availability of CCM, informed patient about importance as per AHA position statement. Patient consents to RPM.</p>
     <p>Remote patient monitoring (RPM) can empower patients to better manage their health and participate in their health care. When used by clinicians, RPM can provide a more holistic view of a patient’s health over time, increase visibility into a patient’s adherence to a treatment, and enable timely intervention before a costly care episode. Clinicians can strengthen their relationships with, and improve the experience of, their patients by using the data sent to them via RPM to develop a personalized care plan and to engage in joint decision-making to foster better outcomes. The American Heart Association supports initiatives that increase access to and incentivize the appropriate design and use of evidence-based remote patient monitoring technologies.</p>
     <p>Remote patient monitoring (RPM) can empower patients to better manage their health and participate in their health care. When used by clinicians, RPM can provide a more holistic view of a patient’s health over time, increase visibility into a patient’s adherence to a treatment, and enable timely intervention before a costly care episode. Clinicians can strengthen their relationships with, and improve the experience of, their patients by using the data sent to them via RPM to develop a personalized care plan and to engage in joint decision-making to foster better outcomes. The American Heart Association supports initiatives that increase access to and incentivize the appropriate design and use of evidence-based remote patient monitoring technologies.</p>
     @endif
     @endif
-</div>
+</div>