Explorar el Código

Styles update - sca sleep questionnaire

Samson Mutunga hace 1 año
padre
commit
573aa1e2ce

+ 101 - 81
resources/views/app/patient/segment-templates/sca_sleep_study_questionnaire/summary.blade.php

@@ -7,73 +7,85 @@ $endPoint = 'upsertNoteSingleton';
 
 $point = Point::getOrCreateOnlyTopLevelPointOfCategory($note, $category, $sessionKey, true);
 $formFields = [
-    'name' => [ 'label' => 'name'],
-    'phone' => [ 'label' => 'Telephone'],
-    'email_address' => [ 'label' => 'email_address'],
-    'address' => [ 'label' => 'address'],
-    'height' => [ 'label' => 'Height (inches)'],
-    'weight' => [ 'label' => 'Weight (lbs)'],
-    'hst_before' => [ 'label' => 'Have you ever had a sleep study test before?'],
-    'yes_treatment' => [ 'label' => 'When and what was your diagnosis and prescribed treatment?'],
-    'allergies_medication' => [ 'label' => 'allergies_medication'],
-    'allergies_food' => [ 'label' => 'allergies_food'],
-    'social_history' => [ 'label' => 'social_history'],
-    'years_smoked' => [ 'label' => 'years_smoked'],
-    'packs_per_day' => [ 'label' => 'packs_per_day'],
-    'cigarettes_per_day' => [ 'label' => 'cigarettes_per_day'],
-    'drinks_per_day' => [ 'label' => 'Alcohol drinks_per_day'],
-    'drinks_per_week' => [ 'label' => 'Alcohol drinks_per_week'],
-    'drinks_per_month' => [ 'label' => 'Alcohol drinks_per_month'],
-    'current_medications' => [ 'label' => 'Current Medications: Name, Dose & Frequency'],
-    'current_supplements' => [ 'label' => 'current_supplements'],
-    'past_surgeries' => [ 'label' => 'Past Surgeries (type and date)'],
-    'acid_reflux' => [ 'label' => 'acid_reflux', 'checkbox' => true],
-    'anxiety' => [ 'label' => 'anxiety', 'checkbox' => true],
-    'bruxism' => [ 'label' => 'bruxism', 'checkbox' => true],
-    'cognitive_difficulties' => [ 'label' => 'cognitive_difficulties', 'checkbox' => true],
-    'depression' => [ 'label' => 'depression', 'checkbox' => true],
-    'diabetes' => [ 'label' => 'diabetes', 'checkbox' => true],
-    'fatigue' => [ 'label' => 'fatigue', 'checkbox' => true],
-    'fatigue_time' => [ 'label' => 'fatigue_time'],
-    'headaches' => [ 'label' => 'headaches', 'checkbox' => true],
-    'heart_disease' => [ 'label' => 'heart_disease', 'checkbox' => true],
-    'high_cholesterol' => [ 'label' => 'high_cholesterol', 'checkbox' => true],
-    'hypertension' => [ 'label' => 'hypertension', 'checkbox' => true],
-    'hypothyroidism' => [ 'label' => 'hypothyroidism', 'checkbox' => true],
-    'insomnia' => [ 'label' => 'insomnia', 'checkbox' => true],
-    'irritable_bowel_disorder' => [ 'label' => 'irritable_bowel_disorder', 'checkbox' => true],
-    'jaw_pain' => [ 'label' => 'jaw_pain', 'checkbox' => true],
-    'memory_concerns' => [ 'label' => 'memory_concerns', 'checkbox' => true],
-    'restless_leg_syndrome' => [ 'label' => 'restless_leg_syndrome', 'checkbox' => true],
-    'sexual_dysfunction' => [ 'label' => 'sexual_dysfunction', 'checkbox' => true],
-    'weight_gain' => [ 'label' => 'weight_gain', 'checkbox' => true],
-    'weight_gain_amount' => [ 'label' => 'weight_gain_amount'],
-    'sitting_reading' => [ 'label' => 'sitting_reading'],
-    'watching_tv' => [ 'label' => 'watching_tv'],
-    'sitting_inactive_public' => [ 'label' => 'sitting_inactive_public'],
-    'car_passenger' => [ 'label' => 'As a passenger in a car for an hour without a break'],
-    'after_lunch' => [ 'label' => 'Sitting quietly after lunch without drinking alcohol'],
-    'lying_down' => [ 'label' => 'Lying down to rest in the afternoon when circumstances permit'],
-    'sitting_talking' => [ 'label' => 'Sitting and talking to someone'],
-    'car_traffic' => [ 'label' => 'In a car, while stopped for a few minutes in traffic'],
-    'total_epworth' => [ 'label' => 'total_epworth score'],
-    'snore' => [ 'label' => 'Do you snore?'],
-    'snore_loud' => [ 'label' => 'Is your snoring loud?'],
-    'snore_in_every_body_position' => [ 'label' => 'Do you snore in every body position?'],
-    'pauses_gaps' => [ 'label' => 'Is your snoring interrupted by pauses, gasps or choking?'],
-    'sleeping_position' => [ 'label' => 'Do you sleep on your back, side, stomach?'],
-    'sleep_not_refreshing' => [ 'label' => 'Do you feel your sleep is not refreshing?'],
-    'freq_times_wakeup' => [ 'label' => 'freq_times_wakeup'],
-    'memory_rate' => [ 'label' => 'How would you rate your memory?'],
-    'trouble_falling_asleep' => [ 'label' => 'Do you have trouble falling asleep?'],
-    'duration_sleep' => [ 'label' => 'How long does it take you to fall asleep?'],
-    'wake_during_night' => [ 'label' => 'How often do you wake up during the night?'],
-    'anxious_bother' => [ 'label' => 'Are you bothered by feeling down, anxious?'],
-    'anxiety_attack' => [ 'label' => 'anxiety_attack'],
-    'weekday_bedtime' => [ 'label' => 'weekday_bedtime'],
-    'weekday_wakeup' => [ 'label' => 'weekday_wakeup'],
-    'weekends_bedtime' => [ 'label' => 'weekends_bedtime'],
-    'weekends_wakeup' => [ 'label' => 'weekends_wakeup'],
+    'Section 1: Demographics' => [
+        'name' => [ 'label' => 'name'],
+        'phone' => [ 'label' => 'Telephone'],
+        'email_address' => [ 'label' => 'email_address'],
+        'address' => [ 'label' => 'address'],
+        'height' => [ 'label' => 'Height (inches)'],
+        'weight' => [ 'label' => 'Weight (lbs)'],
+    ],
+    'Section 2:' => [
+        'hst_before' => [ 'label' => 'Have you ever had a sleep study test before?'],
+        'yes_treatment' => [ 'label' => 'When and what was your diagnosis and prescribed treatment?'],
+        'allergies_medication' => [ 'label' => 'allergies_medication'],
+        'allergies_food' => [ 'label' => 'allergies_food'],
+        'social_history' => [ 'label' => 'social_history'],
+        'years_smoked' => [ 'label' => 'years_smoked'],
+        'packs_per_day' => [ 'label' => 'packs_per_day'],
+        'cigarettes_per_day' => [ 'label' => 'cigarettes_per_day'],
+        'drinks_per_day' => [ 'label' => 'Alcohol drinks_per_day'],
+        'drinks_per_week' => [ 'label' => 'Alcohol drinks_per_week'],
+        'drinks_per_month' => [ 'label' => 'Alcohol drinks_per_month'],
+        'current_medications' => [ 'label' => 'Current Medications: Name, Dose & Frequency'],
+        'current_supplements' => [ 'label' => 'current_supplements'],
+        'past_surgeries' => [ 'label' => 'Past Surgeries (type and date)'],
+    ],
+    'Section 3: Health Conditions' => [
+        'acid_reflux' => [ 'label' => 'acid_reflux', 'checkbox' => true],
+        'anxiety' => [ 'label' => 'anxiety', 'checkbox' => true],
+        'bruxism' => [ 'label' => 'bruxism', 'checkbox' => true],
+        'cognitive_difficulties' => [ 'label' => 'cognitive_difficulties', 'checkbox' => true],
+        'depression' => [ 'label' => 'depression', 'checkbox' => true],
+        'diabetes' => [ 'label' => 'diabetes', 'checkbox' => true],
+        'fatigue' => [ 'label' => 'fatigue', 'checkbox' => true],
+        'fatigue_time' => [ 'label' => 'fatigue_time'],
+        'headaches' => [ 'label' => 'headaches', 'checkbox' => true],
+        'heart_disease' => [ 'label' => 'heart_disease', 'checkbox' => true],
+        'high_cholesterol' => [ 'label' => 'high_cholesterol', 'checkbox' => true],
+        'hypertension' => [ 'label' => 'hypertension', 'checkbox' => true],
+        'hypothyroidism' => [ 'label' => 'hypothyroidism', 'checkbox' => true],
+        'insomnia' => [ 'label' => 'insomnia', 'checkbox' => true],
+        'irritable_bowel_disorder' => [ 'label' => 'irritable_bowel_disorder', 'checkbox' => true],
+        'jaw_pain' => [ 'label' => 'jaw_pain', 'checkbox' => true],
+        'memory_concerns' => [ 'label' => 'memory_concerns', 'checkbox' => true],
+        'restless_leg_syndrome' => [ 'label' => 'restless_leg_syndrome', 'checkbox' => true],
+        'sexual_dysfunction' => [ 'label' => 'sexual_dysfunction', 'checkbox' => true],
+        'weight_gain' => [ 'label' => 'weight_gain', 'checkbox' => true],
+        'weight_gain_amount' => [ 'label' => 'weight_gain_amount'],
+    ],
+    'Section 4: Epworth' => [
+        'sitting_reading' => [ 'label' => 'sitting_reading'],
+        'watching_tv' => [ 'label' => 'watching_tv'],
+        'sitting_inactive_public' => [ 'label' => 'sitting_inactive_public'],
+        'car_passenger' => [ 'label' => 'As a passenger in a car for an hour without a break'],
+        'after_lunch' => [ 'label' => 'Sitting quietly after lunch without drinking alcohol'],
+        'lying_down' => [ 'label' => 'Lying down to rest in the afternoon when circumstances permit'],
+        'sitting_talking' => [ 'label' => 'Sitting and talking to someone'],
+        'car_traffic' => [ 'label' => 'In a car, while stopped for a few minutes in traffic'],
+        'total_epworth' => [ 'label' => 'total_epworth score'],
+    ],
+    'Section 5: OSA Questions' => [
+        'snore' => [ 'label' => 'Do you snore?'],
+        'snore_loud' => [ 'label' => 'Is your snoring loud?'],
+        'snore_in_every_body_position' => [ 'label' => 'Do you snore in every body position?'],
+        'pauses_gaps' => [ 'label' => 'Is your snoring interrupted by pauses, gasps or choking?'],
+        'sleeping_position' => [ 'label' => 'Do you sleep on your back, side, stomach?'],
+        'sleep_not_refreshing' => [ 'label' => 'Do you feel your sleep is not refreshing?'],
+        'freq_times_wakeup' => [ 'label' => 'freq_times_wakeup'],
+        'memory_rate' => [ 'label' => 'How would you rate your memory?'],
+    ],
+    'Section 6: Insomnia Questions' => [
+        'trouble_falling_asleep' => [ 'label' => 'Do you have trouble falling asleep?'],
+        'duration_sleep' => [ 'label' => 'How long does it take you to fall asleep?'],
+        'wake_during_night' => [ 'label' => 'How often do you wake up during the night?'],
+        'anxious_bother' => [ 'label' => 'Are you bothered by feeling down, anxious?'],
+        'anxiety_attack' => [ 'label' => 'anxiety_attack'],
+        'weekday_bedtime' => [ 'label' => 'weekday_bedtime'],
+        'weekday_wakeup' => [ 'label' => 'weekday_wakeup'],
+        'weekends_bedtime' => [ 'label' => 'weekends_bedtime'],
+        'weekends_wakeup' => [ 'label' => 'weekends_wakeup'],
+    ]
 ];
 $contentData = [
     'name' => $point->client->displayName(),
@@ -86,20 +98,28 @@ if (!!@$point->data) {
 ?>
 
 <table class="table table-sm table-bordered mb-2">
+    @foreach($formFields as $groupKey=>$details)
+    <thead style="background-color: #efefef;">
+        <tr>
+            <th colspan="2">{{ $groupKey }}</th>
+        </tr>
+    </thead>
     <tbody>
-    @foreach($formFields as $key=>$detail)
-    <tr>
-        <td class="pl-1 align-middle bg-light width-250px">
-            <div class="mb-1">{{ toHumanReadable($detail['label']) }}</div>
-        </td>
-        <td class="font-weight-bold">
-            @if(@$detail['checkbox'])
-                {{ @$contentData[$key] ? 'Yes': '---' }}
-            @else
-                {{ @$contentData[$key] }}
-            @endif
-        </td>
-    </tr>
-    @endforeach
+        @foreach($details as $key=>$detail)
+            <tr>
+                <td class="pl-1 align-middle bg-light width-250px">
+                    <div class="mb-1">{{ toHumanReadable($detail['label']) }}</div>
+                </td>
+                <td class="font-weight-bold">
+                    @if(@$detail['checkbox'])
+                        {{ @$contentData[$key] ? 'Yes': '---' }}
+                    @else
+                        {{ @$contentData[$key] }}
+                    @endif
+                </td>
+            </tr>
+        @endforeach
     </tbody>
+    @endforeach
+    
 </table>