|
@@ -28,7 +28,7 @@ $contentData = [
|
|
|
"ans_has_received_printed_cdc_mental_health_matrials" => null, // yes/no
|
|
|
"ans_educated_patient_on_mental_health_screening" => null, // yes/no
|
|
|
"ans_how_patient_is_doing_regarding_stress" => null,
|
|
|
- "phq_score" => null,
|
|
|
+ "total_phq2" => null,
|
|
|
"phq_action_taken" => null,
|
|
|
"cdc_stress_emphasis_covid_19_effects" => null,
|
|
|
"cdc_stress_emphasis_stressful_challenges" => null,
|
|
@@ -42,13 +42,13 @@ $contentData = [
|
|
|
if (!!@$point->data) {
|
|
|
$contentData = $point->data;
|
|
|
}
|
|
|
-?>
|
|
|
|
|
|
+?>
|
|
|
<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="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">
|
|
@@ -108,18 +108,16 @@ if (!!@$point->data) {
|
|
|
<hr class="my-3">
|
|
|
|
|
|
<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 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>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -129,12 +127,6 @@ if (!!@$point->data) {
|
|
|
<div>
|
|
|
<label> Emphasis placed on:</label>
|
|
|
</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">
|
|
|
<div class="mr-2 align-self-stretch" style="padding-top: 2px;">
|
|
@@ -259,11 +251,53 @@ if (!!@$point->data) {
|
|
|
</div>
|
|
|
<div class="mb-2">
|
|
|
<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 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 class="mb-2">
|
|
@@ -289,12 +323,6 @@ if (!!@$point->data) {
|
|
|
</div>
|
|
|
<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="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">
|
|
|
<div class="mr-2 align-self-stretch" style="padding-top: 2px;">
|
|
@@ -326,22 +354,33 @@ if (!!@$point->data) {
|
|
|
</div>
|
|
|
<span>Educated patient on healthy ways to cope with stress (as per CDC: Coping with Stress):</span>
|
|
|
</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>
|
|
@@ -376,29 +415,91 @@ if (!!@$point->data) {
|
|
|
</div>
|
|
|
|
|
|
<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() {
|
|
|
window.segmentInitializers.covidFollowUp = function() {
|
|
|
var covidFollowUp = {
|
|
|
parentSegment: $('[data-segment-template-name="<?= $segment->segmentTemplate->internal_name ?>"] '),
|
|
|
- initAutoCheckAll: function(){
|
|
|
+ initAutoCheckAll: function() {
|
|
|
var self = this;
|
|
|
var checkSegments = $('[check-all]');
|
|
|
- $.each(checkSegments, function(i, segment){
|
|
|
+ $.each(checkSegments, function(i, segment) {
|
|
|
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 isChecked = checkAllInput.checked ? true:false;
|
|
|
+ var isChecked = checkAllInput.checked ? true : false;
|
|
|
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);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
},
|
|
|
- init: function(){
|
|
|
+ init: function() {
|
|
|
this.initAutoCheckAll();
|
|
|
}
|
|
|
};
|