|
@@ -0,0 +1,646 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use App\Models\Point;
|
|
|
+
|
|
|
+$category = 'SCA_SLEEP_STUDY_QUESTIONNAIRE';
|
|
|
+$endPoint = 'upsertNoteSingleton';
|
|
|
+
|
|
|
+$point = Point::getOrCreateOnlyTopLevelPointOfCategory($note, $category, $sessionKey, true);
|
|
|
+$contentData = [
|
|
|
+ 'name' => $point->client->displayName(),
|
|
|
+ 'phone' => $point->client->cell_number,
|
|
|
+ 'email_address' => $point->client->email_address,
|
|
|
+];
|
|
|
+if (!!@$point->data) {
|
|
|
+ $contentData = $point->data;
|
|
|
+}
|
|
|
+
|
|
|
+?>
|
|
|
+
|
|
|
+<div visit-moe close-on-save close-on-cancel class="d-block pb-2">
|
|
|
+ <style media="screen">
|
|
|
+ .hidden {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .subtitle {
|
|
|
+ font-weight: bold;
|
|
|
+ border-bottom: 1px solid #ddd;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+
|
|
|
+ <form show url="/api/visitPoint/<?= $endPoint ?>" class="mcp-theme-1 sbq-container">
|
|
|
+ <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
|
|
|
+ <input type="hidden" name="category" value="<?= $category ?>">
|
|
|
+ <input type="hidden" name="uid" value="<?= $point->uid ?>">
|
|
|
+ <input type="hidden" name="noteUid" value="<?= $note->uid ?>">
|
|
|
+ <input type="hidden" name="data" value="{{ json_encode($contentData) }}">
|
|
|
+
|
|
|
+ <!-- FORM -->
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-12 p-3 my-4 border">
|
|
|
+ <h4 class="subtitle mb-4">Sleep Care America Sleep Study Questionnaire</h4>
|
|
|
+ <form class="" action="index.html" method="post">
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Name</label>
|
|
|
+ <input type="text" class="form-control" name="name" data-name="name" value="{{ @$contentData['name'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="form-group col-lg-6 mb-3">
|
|
|
+ <label>Telephone</label>
|
|
|
+ <input type="text" class="form-control phone" name="phone" data-name="phone" value="{{ @$contentData['phone'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group col-lg-6 mb-3">
|
|
|
+ <label>Email Address</label>
|
|
|
+ <input type="text" class="form-control" name="email_address" data-name="email_address" value="{{ @$contentData['email_address'] }}">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Address</label>
|
|
|
+ <input type="text" class="form-control" name="address" data-name="address" value="{{ @$contentData['address'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="form-group col-lg-6 mb-3">
|
|
|
+ <label>Height (inches)</label>
|
|
|
+ <input type="text" class="form-control" name="height" data-name="height" value="{{ @$contentData['height'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group col-lg-6 mb-3">
|
|
|
+ <label>Weight (lbs)</label>
|
|
|
+ <input type="text" class="form-control" name="weight" data-name="weight" value="{{ @$contentData['weight'] }}">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Have you ever had a sleep study test before?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="onToggleChange('hst_before', 'radio', true)"
|
|
|
+ name="hst_before" data-name="hst_before" value="Yes" <?= @$contentData['hst_before'] === 'Yes' ? 'checked':'' ?> /> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="onToggleChange('hst_before', 'radio', false)"
|
|
|
+ name="hst_before" data-name="hst_before" value="No" <?= @$contentData['hst_before'] === 'No' ? 'checked':'' ?> /> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3 hidden hst_before ms-3">
|
|
|
+ <label>When and what was your diagnosis and prescribed treatment?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="yes_treatment" data-name="yes_treatment" value="CPAP" <?= @$contentData['yes_treatment'] === 'CPAP' ? 'checked':'' ?> /> CPAP
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="yes_treatment" data-name="yes_treatment" value="Oral" <?= @$contentData['yes_treatment'] === 'Oral' ? 'checked':'' ?> /> Oral Device
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Allergies Medications</label>
|
|
|
+ <input type="text" class="form-control" name="allergies_medication" data-name="allergies_medication" value="{{ @$contentData['allergies_medication'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Allergies Food</label>
|
|
|
+ <input type="text" class="form-control" name="allergies_food" data-name="allergies_food" value="{{ @$contentData['allergies_food'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Social History</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="social_history" data-name="social_history" value="married" <?= @$contentData['social_history'] === 'married' ? 'checked':'' ?>> Married
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="social_history" data-name="social_history" value="single" <?= @$contentData['social_history'] === 'single' ? 'checked':'' ?>> Single
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="social_history" data-name="social_history" value="separated" <?= @$contentData['social_history'] === 'separated' ? 'checked':'' ?>> Separated
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="social_history" data-name="social_history" value="divorced" <?= @$contentData['social_history'] === 'divorced' ? 'checked':'' ?>> Divorced
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Smoking History:</label>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <label>Years Smoked</label>
|
|
|
+ <input type="text" name="years_smoked" data-name="years_smoked" class="form-control" value="{{ @$contentData['years_smoked'] }}" />
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <label>Packs Per Day</label>
|
|
|
+ <input type="text" name="packs_per_day" data-name="packs_per_day" class="form-control" value="{{ @$contentData['packs_per_day'] }}" />
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <label>Cigarettes Per Day</label>
|
|
|
+ <input type="text" name="cigarettes_per_day" data-name="cigarettes_per_day" class="form-control" value="{{ @$contentData['cigarettes_per_day'] }}" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Alcohol Intake:</label>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <label>Drinks Per Day</label>
|
|
|
+ <input type="text" name="drinks_per_day" data-name="drinks_per_day" class="form-control" value="{{ @$contentData['drinks_per_day'] }}" />
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <label>Drinks Per Week</label>
|
|
|
+ <input type="text" name="drinks_per_week" data-name="drinks_per_week" class="form-control" value="{{ @$contentData['drinks_per_week'] }}" />
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <label>Drinks Per Month</label>
|
|
|
+ <input type="text" name="drinks_per_month" data-name="drinks_per_month" class="form-control" value="{{ @$contentData['drinks_per_month'] }}" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Current Medications: Name, Dose & Frequency</label>
|
|
|
+ <textarea name="current_medications" data-name="current_medications" class="form-control" rows="3">{{ @$contentData['current_medications'] }}</textarea>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Current Supplements</label>
|
|
|
+ <textarea name="current_supplements" data-name="current_supplements" class="form-control" rows="3">{{ @$contentData['current_supplements'] }}</textarea>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Past Surgeries (type and date):</label>
|
|
|
+ <input type="text" class="form-control" name="past_surgeries" data-name="past_surgeries" value="{{ @$contentData['past_surgeries'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Health Conditions: Please circle all that apply</label>
|
|
|
+ <div class="d-flex flex-column">
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="acid_reflux" data-name="acid_reflux" value="Yes" <?= @$contentData['acid_reflux'] ? 'checked':'' ?>> Acid Reflux
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="anxiety" data-name="anxiety" value="Yes" <?= @$contentData['anxiety'] ? 'checked':'' ?>> Anxiety
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="bruxism" data-name="bruxism" value="Yes" <?= @$contentData['bruxism'] ? 'checked':'' ?>> Bruxism (Teeth Grinding)
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="cognitive_difficulties" data-name="cognitive_difficulties" value="Yes" <?= @$contentData['cognitive_difficulties'] ? 'checked':'' ?>> Cognitive Difficulties
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="depression" data-name="depression" value="Yes" <?= @$contentData['depression'] ? 'checked':'' ?>> Depression
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="diabetes" data-name="diabetes" value="Yes" <?= @$contentData['diabetes'] ? 'checked':'' ?>> Diabetes
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="fatigue" data-name="fatigue" value="Yes" <?= @$contentData['fatigue'] ? 'checked':'' ?>
|
|
|
+ onchange="onToggleChange('fatigue', 'checkbox')"> Fatigue
|
|
|
+ <div class="form-group mb-0 mt-2 ps-3 hidden fatigue">
|
|
|
+ <label>What time of the day does this occur?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="fatigue_time" data-name="fatigue_time" value="morning" <?= @$contentData['fatigue_time'] === 'morning' ? 'checked':'' ?>> Morning
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="fatigue_time" data-name="fatigue_time" value="afternoon" <?= @$contentData['fatigue_time'] === 'afternoon' ? 'checked':'' ?>> Afternoon
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="fatigue_time" data-name="fatigue_time" value="evening" <?= @$contentData['fatigue_time'] === 'evening' ? 'checked':'' ?>> Evening
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="headaches" data-name="headaches" value="Yes" <?= @$contentData['headaches'] ? 'checked':'' ?>> Headaches
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="heart_disease" data-name="heart_disease" value="Yes" <?= @$contentData['heart_disease'] ? 'checked':'' ?>> Heart Disease
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="high_cholesterol" data-name="high_cholesterol" value="Yes" <?= @$contentData['high_cholesterol'] ? 'checked':'' ?>> High cholesterol
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="hypertension" data-name="hypertension" value="Yes" <?= @$contentData['hypertension'] ? 'checked':'' ?>> Hypertension
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="hypothyroidism" data-name="hypothyroidism" value="Yes" <?= @$contentData['hypothyroidism'] ? 'checked':'' ?>> Hypothyroidism
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="insomnia" data-name="insomnia" value="Yes" <?= @$contentData['insomnia'] ? 'checked':'' ?>> Insomnia
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="irritable_bowel_disorder" data-name="irritable_bowel_disorder" value="Yes" <?= @$contentData['irritable_bowel_disorder'] ? 'checked':'' ?>> Irritable Bowel Disorder
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="jaw_pain" data-name="jaw_pain" value="Yes" <?= @$contentData['jaw_pain'] ? 'checked':'' ?>> Jaw Pain
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="memory_concerns" data-name="memory_concerns" value="Yes" <?= @$contentData['memory_concerns'] ? 'checked':'' ?>> Memory Concerns
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="restless_leg_syndrome" data-name="restless_leg_syndrome" value="Yes" <?= @$contentData['restless_leg_syndrome'] ? 'checked':'' ?>> Restless Leg Syndrome
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="sexual_dysfunction" data-name="sexual_dysfunction" value="Yes" <?= @$contentData['sexual_dysfunction'] ? 'checked':'' ?>> Sexual Dysfunction
|
|
|
+ </label>
|
|
|
+ <label class="mb-2">
|
|
|
+ <input type="checkbox" name="weight_gain" data-name="weight_gain" value="Yes" <?= @$contentData['weight_gain'] ? 'checked':'' ?>
|
|
|
+ onchange="onToggleChange('weight_gain', 'checkbox')"> Weight gain
|
|
|
+ <div class="form-group mb-0 mt-2 ps-3 hidden weight_gain">
|
|
|
+ <label>How much weight did you gain?</label>
|
|
|
+ <input type="text" name="weight_gain_amount" data-name="weight_gain_amount" class="form-control"
|
|
|
+ value="{{ @$contentData['weight_gain_amount'] }}">
|
|
|
+ </div>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h5 class="mt-4 subtitle">Epworth</h5>
|
|
|
+ <p>How likely are you to doze or fall asleep in the following situations:</p>
|
|
|
+ <p>Score 0-3: 0= never 1=occasionally 2=often 3= all the time</p>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Sitting and reading</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="sitting_reading" data-name="sitting_reading" <?= @$contentData['sitting_reading'] === '0' ? 'checked':'' ?>
|
|
|
+ value="0"> 0
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="sitting_reading" data-name="sitting_reading" <?= @$contentData['sitting_reading'] === '1' ? 'checked':'' ?>
|
|
|
+ value="1"> 1
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="sitting_reading" data-name="sitting_reading" <?= @$contentData['sitting_reading'] === '2' ? 'checked':'' ?>
|
|
|
+ value="2"> 2
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="sitting_reading" data-name="sitting_reading" <?= @$contentData['sitting_reading'] === '3' ? 'checked':'' ?>
|
|
|
+ value="3"> 3
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Watching TV</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="watching_tv" data-name="watching_tv" <?= @$contentData['watching_tv'] === '0' ? 'checked':'' ?>
|
|
|
+ value="0"> 0
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="watching_tv" data-name="watching_tv" <?= @$contentData['watching_tv'] === '1' ? 'checked':'' ?>
|
|
|
+ value="1"> 1
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="watching_tv" data-name="watching_tv" <?= @$contentData['watching_tv'] === '2' ? 'checked':'' ?>
|
|
|
+ value="2"> 2
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="watching_tv" data-name="watching_tv" <?= @$contentData['watching_tv'] === '3' ? 'checked':'' ?>
|
|
|
+ value="3"> 3
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Sitting inactive in a public place (theatre, meeting)</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)"
|
|
|
+ name="sitting_inactive_public" data-name="sitting_inactive_public" value="0" <?= @$contentData['sitting_inactive_public'] === '0' ? 'checked':'' ?>> 0
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)"
|
|
|
+ name="sitting_inactive_public" data-name="sitting_inactive_public" value="1" <?= @$contentData['sitting_inactive_public'] === '1' ? 'checked':'' ?>> 1
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)"
|
|
|
+ name="sitting_inactive_public" data-name="sitting_inactive_public" value="2" <?= @$contentData['sitting_inactive_public'] === '2' ? 'checked':'' ?>> 2
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)"
|
|
|
+ name="sitting_inactive_public" data-name="sitting_inactive_public" value="3" <?= @$contentData['sitting_inactive_public'] === '3' ? 'checked':'' ?>> 3
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>As a passenger in a car for an hour without a break</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="car_passenger" data-name="car_passenger"
|
|
|
+ value="0" <?= @$contentData['car_passenger'] === '0' ? 'checked':'' ?>> 0
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="car_passenger" data-name="car_passenger"
|
|
|
+ value="1" <?= @$contentData['car_passenger'] === '1' ? 'checked':'' ?>> 1
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="car_passenger" data-name="car_passenger"
|
|
|
+ value="2" <?= @$contentData['car_passenger'] === '2' ? 'checked':'' ?>> 2
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="car_passenger" data-name="car_passenger"
|
|
|
+ value="3" <?= @$contentData['car_passenger'] === '3' ? 'checked':'' ?>> 3
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Sitting quietly after lunch without drinking alcohol</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="after_lunch" data-name="after_lunch"
|
|
|
+ value="0" <?= @$contentData['after_lunch'] === '0' ? 'checked':'' ?>> 0
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="after_lunch" data-name="after_lunch"
|
|
|
+ value="1" <?= @$contentData['after_lunch'] === '1' ? 'checked':'' ?>> 1
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="after_lunch" data-name="after_lunch"
|
|
|
+ value="2" <?= @$contentData['after_lunch'] === '2' ? 'checked':'' ?>> 2
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="after_lunch" data-name="after_lunch"
|
|
|
+ value="3" <?= @$contentData['after_lunch'] === '3' ? 'checked':'' ?>> 3
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Lying down to rest in the afternoon when circumstances permit</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="lying_down" data-name="lying_down"
|
|
|
+ value="0" <?= @$contentData['lying_down'] === '0' ? 'checked':'' ?>> 0
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="lying_down" data-name="lying_down"
|
|
|
+ value="1" <?= @$contentData['lying_down'] === '1' ? 'checked':'' ?>> 1
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="lying_down" data-name="lying_down"
|
|
|
+ value="2" <?= @$contentData['lying_down'] === '2' ? 'checked':'' ?>> 2
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="lying_down" data-name="lying_down"
|
|
|
+ value="3" <?= @$contentData['lying_down'] === '3' ? 'checked':'' ?>> 3
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Sitting and talking to someone</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="sitting_talking" data-name="sitting_talking"
|
|
|
+ value="0" <?= @$contentData['sitting_talking'] === '0' ? 'checked':'' ?>> 0
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="sitting_talking" data-name="sitting_talking"
|
|
|
+ value="1" <?= @$contentData['sitting_talking'] === '1' ? 'checked':'' ?>> 1
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="sitting_talking" data-name="sitting_talking"
|
|
|
+ value="2" <?= @$contentData['sitting_talking'] === '2' ? 'checked':'' ?>> 2
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="sitting_talking" data-name="sitting_talking"
|
|
|
+ value="3" <?= @$contentData['sitting_talking'] === '3' ? 'checked':'' ?>> 3
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>In a car, while stopped for a few minutes in traffic</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="car_traffic" data-name="car_traffic"
|
|
|
+ value="0" <?= @$contentData['car_traffic'] === '0' ? 'checked':'' ?>> 0
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="car_traffic" data-name="car_traffic"
|
|
|
+ value="1" <?= @$contentData['car_traffic'] === '1' ? 'checked':'' ?>> 1
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="car_traffic" data-name="car_traffic"
|
|
|
+ value="2" <?= @$contentData['car_traffic'] === '2' ? 'checked':'' ?>> 2
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="epWorthCalculator(this)" name="car_traffic" data-name="car_traffic"
|
|
|
+ value="3" <?= @$contentData['car_traffic'] === '3' ? 'checked':'' ?>> 3
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="form-group col-lg-4">
|
|
|
+ <label>Total</label>
|
|
|
+ <input type="number" name="total_epworth" data-name="total_epworth" disabled value="{{ @$contentData['total_epworth'] }}">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h5 class="mt-4 subtitle">OSA Questions</h5>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Do you snore?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="snore" data-name="snore" value="yes" <?= @$contentData['snore'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="snore" data-name="snore" value="no" <?= @$contentData['snore'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Is your snoring loud?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="snore_loud" data-name="snore_loud" value="yes" <?= @$contentData['snore_loud'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="snore_loud" data-name="snore_loud" value="no" <?= @$contentData['snore_loud'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Do you snore in every body position?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="snore_in_every_body_position" data-name="snore_in_every_body_position" value="yes" <?= @$contentData['snore_in_every_body_position'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="snore_in_every_body_position" data-name="snore_in_every_body_position" value="no" <?= @$contentData['snore_in_every_body_position'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Do you sleep on your back, side, stomach?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="sleeping_position" data-name="sleeping_position" value="back" <?= @$contentData['sleeping_position'] === 'back' ? 'checked':'' ?>> Back
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="sleeping_position" data-name="sleeping_position" value="side" <?= @$contentData['sleeping_position'] === 'side' ? 'checked':'' ?>> Side
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="sleeping_position" data-name="sleeping_position" value="stomach" <?= @$contentData['sleeping_position'] === 'stomach' ? 'checked':'' ?>> Stomach
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Is your snoring interrupted by pauses, gasps or choking?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="pauses_gaps" data-name="pauses_gaps" value="yes" <?= @$contentData['pauses_gaps'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="pauses_gaps" data-name="pauses_gaps" value="no" <?= @$contentData['pauses_gaps'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Have you been told that you have stopped breathing during sleep?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="snore_body_position" data-name="snore_body_position" value="yes" <?= @$contentData['snore_body_position'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="snore_body_position" data-name="snore_body_position" value="no" <?= @$contentData['snore_body_position'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Do you feel your sleep is not refreshing?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="onToggleChange('sleep_not_refreshing', 'radio', true)"
|
|
|
+ name="sleep_not_refreshing" data-name="sleep_not_refreshing" value="yes" <?= @$contentData['sleep_not_refreshing'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" onchange="onToggleChange('sleep_not_refreshing', 'radio', true)"
|
|
|
+ name="sleep_not_refreshing" data-name="sleep_not_refreshing" value="no" <?= @$contentData['sleep_not_refreshing'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group hidden sleep_not_refreshing ms-3">
|
|
|
+ <label>How many days a week do you wake up unrefreshed?</label>
|
|
|
+ <input type="text" name="freq_times_wakeup" data-name="freq_times_wakeup" class="form-control" value="{{ @$contentData['freq_times_wakeup'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>How would you rate your memory?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="memory_rate" data-name="memory_rate" value="excellent" <?= @$contentData['memory_rate'] === 'excellent' ? 'checked':'' ?>> Excellent
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="memory_rate" data-name="memory_rate" value="good" <?= @$contentData['memory_rate'] === 'good' ? 'checked':'' ?>> Good
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="memory_rate" data-name="memory_rate" value="fair" <?= @$contentData['memory_rate'] === 'fair' ? 'checked':'' ?>> Fair
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="memory_rate" data-name="memory_rate" value="poor" <?= @$contentData['memory_rate'] === 'poor' ? 'checked':'' ?>> Poor
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h5 class="mt-4 subtitle">Insomnia Questions</h5>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Do you have trouble falling asleep?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="trouble_falling_asleep" data-name="trouble_falling_asleep" value="yes" <?= @$contentData['trouble_falling_asleep'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="trouble_falling_asleep" data-name="trouble_falling_asleep" value="no" <?= @$contentData['trouble_falling_asleep'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>How long does it take you to fall asleep?</label>
|
|
|
+ <input type="text" name="duration_sleep" data-name="duration_sleep" class="form-control" value="{{ @$contentData['duration_sleep'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>How often do you wake up during the night?</label>
|
|
|
+ <input type="text" name="wake_during_night" data-name="wake_during_night" class="form-control" value="{{ @$contentData['wake_during_night'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Are you bothered by feeling down, anxious?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="anxious_bother" data-name="anxious_bother" value="yes" <?= @$contentData['anxious_bother'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="anxious_bother" data-name="anxious_bother" value="no" <?= @$contentData['anxious_bother'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group mb-3">
|
|
|
+ <label>Have you ever had an anxiety attack?</label>
|
|
|
+ <div>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="anxiety_attack" data-name="anxiety_attack" value="yes" <?= @$contentData['anxiety_attack'] === 'yes' ? 'checked':'' ?>> Yes
|
|
|
+ </label>
|
|
|
+ <label class="me-2">
|
|
|
+ <input type="radio" name="anxiety_attack" data-name="anxiety_attack" value="no" <?= @$contentData['anxiety_attack'] === 'no' ? 'checked':'' ?>> No
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <h5 class="mt-4 subtitle">Sleep Habits</h5>
|
|
|
+ <div class="row">
|
|
|
+ <div class="form-group col-lg-6 mb-3">
|
|
|
+ <label>Weekdays Bedtime</label>
|
|
|
+ <input type="text" name="weekday_bedtime" data-name="weekday_bedtime" class="form-control" value="{{ @$contentData['weekday_bedtime'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group col-lg-6 mb-3">
|
|
|
+ <label>Wake-up time</label>
|
|
|
+ <input type="text" name="weekday_wakeup" data-name="weekday_wakeup" class="form-control" value="{{ @$contentData['weekday_wakeup'] }}">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="form-group col-lg-6 mb-3">
|
|
|
+ <label>Weekends Bedtime</label>
|
|
|
+ <input type="text" name="weekends_bedtime" data-name="weekends_bedtime" class="form-control" value="{{ @$contentData['weekends_bedtime'] }}">
|
|
|
+ </div>
|
|
|
+ <div class="form-group col-lg-6 mb-3">
|
|
|
+ <label>Wake-up time</label>
|
|
|
+ <input type="text" name="weekends_wakeup" data-name="weekends_wakeup" class="form-control" value="{{ @$contentData['weekends_wakeup'] }}">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- FORM -->
|
|
|
+
|
|
|
+ <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 …</span>
|
|
|
+ <span class="autosave-indicator saved text-sm text-secondary">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ Saved
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+<script>
|
|
|
+ function onToggleChange(_field, _type, _bool) {
|
|
|
+ if (_type == 'checkbox') {
|
|
|
+ if ($('[name=' + _field + ']').prop('checked')) {
|
|
|
+ $('.' + _field).show();
|
|
|
+ } else {
|
|
|
+ $('.' + _field).hide();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (_type == 'radio') {
|
|
|
+ if (_bool) {
|
|
|
+ $('.' + _field).show();
|
|
|
+ } else {
|
|
|
+ $('.' + _field).hide();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ function epWorthCalculator(_elem) {
|
|
|
+ var arr = ['sitting_reading', 'watching_tv', 'sitting_inactive_public', 'car_passenger', 'after_lunch',
|
|
|
+ 'lying_down', 'sitting_talking', 'car_traffic'
|
|
|
+ ];
|
|
|
+ var total = 0;
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ var val = $('[name=' + arr[i] + ']:checked').val();
|
|
|
+ if (val) {
|
|
|
+ total += parseInt(val)
|
|
|
+ }
|
|
|
+ };
|
|
|
+ $('[name=total_epworth]').val(total);
|
|
|
+ }
|
|
|
+</script>
|