ソースを参照

masks & respirators

Samson Mutunga 3 年 前
コミット
6145e21e05

+ 83 - 82
resources/views/app/patient/segment-templates/masks_and_respirators/summary.blade.php

@@ -1,77 +1,78 @@
 <?php
 
 use App\Models\Point;
+
 $segmentSections = [
-	[
-		'heading' => 'Key Messages',
-		'points' => [
-			[
-				'key' => 'any_mask_better_than_no_mask',
-				'text' => 'Masking is a critical public health tool for preventing spread of COVID-19, and it is important to remember that any mask is better than no mask.',
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'masks_effective_at_reducing_virus',
-				'text' => 'Masks and respirators are effective at reducing transmission of SARS-CoV-2, the virus that causes COVID-19, when worn consistently and correctly.',
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'wear_the_best_mask_you_can',
-				'text' => "The key is: what will you wear that's most protective, but also wear consistently.",
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'more_protective_may_be_uncomfortable',
-				'text' => 'Some masks and respirators offer higher levels of protection than others, and some may be harder to tolerate or wear consistently than others.',
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'importance_with_risk_and_age',
-				'text' => 'This becomes more important if you are over 65 or have any medical conditions like HBP or DM that increase risk of COVID severity.',
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'what_are_you_currently_wearing',
-				'text' => 'What are you currently wearing / how often / how often replaced?',
-				'type' => 'textarea'
-			],
-			[
-				'key' => 'what_is_the_best_mask_you_will_wear_consistently',
-				'text' => 'What is the most most protective mask that you will wear consistently?',
-				'type' => 'text'
-			]
-		]
-	],
-	[
-		'heading' => 'Follow-Up',
-		'points' => [
-			[
-				'key' => 'n95_recommended',
-				'text' => 'N95 recommended.',
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'ensure_tight_fit',
-				'text' => 'Check for gaps by cupping your hands around the outside edges of the mask.',
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'check_airflow',
-				'text' => 'Make sure no air is flowing from the area near your eyes or from the sides of the mask.',
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'warm_air_check',
-				'text' => 'If the mask has a good fit, you will feel warm air come through the front of the mask and may be able to see the mask material move in and out with each breath.',
-				'type' => 'checkbox'
-			],
-			[
-				'key' => 'send_n95',
-				'text' => 'Send N95 samples if appropriate.',
-				'type' => 'readonly'
-			]
-		]
-	]
+    [
+        'heading' => 'Key Messages',
+        'points' => [
+            [
+                'key' => 'any_mask_better_than_no_mask',
+                'text' => 'Masking is a critical public health tool for preventing spread of COVID-19, and it is important to remember that any mask is better than no mask.',
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'masks_effective_at_reducing_virus',
+                'text' => 'Masks and respirators are effective at reducing transmission of SARS-CoV-2, the virus that causes COVID-19, when worn consistently and correctly.',
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'wear_the_best_mask_you_can',
+                'text' => "The key is: what will you wear that's most protective, but also wear consistently.",
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'more_protective_may_be_uncomfortable',
+                'text' => 'Some masks and respirators offer higher levels of protection than others, and some may be harder to tolerate or wear consistently than others.',
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'importance_with_risk_and_age',
+                'text' => 'This becomes more important if you are over 65 or have any medical conditions like HBP or DM that increase risk of COVID severity.',
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'what_are_you_currently_wearing',
+                'text' => 'What are you currently wearing / how often / how often replaced?',
+                'type' => 'textarea'
+            ],
+            [
+                'key' => 'what_is_the_best_mask_you_will_wear_consistently',
+                'text' => 'What is the most most protective mask that you will wear consistently?',
+                'type' => 'text'
+            ]
+        ]
+    ],
+    [
+        'heading' => 'Follow-Up',
+        'points' => [
+            [
+                'key' => 'n95_recommended',
+                'text' => 'N95 recommended.',
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'ensure_tight_fit',
+                'text' => 'Check for gaps by cupping your hands around the outside edges of the mask.',
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'check_airflow',
+                'text' => 'Make sure no air is flowing from the area near your eyes or from the sides of the mask.',
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'warm_air_check',
+                'text' => 'If the mask has a good fit, you will feel warm air come through the front of the mask and may be able to see the mask material move in and out with each breath.',
+                'type' => 'checkbox'
+            ],
+            [
+                'key' => 'send_n95',
+                'text' => 'Send N95 samples if appropriate.',
+                'type' => 'readonly'
+            ]
+        ]
+    ]
 ];
 
 $category = 'MASKS_AND_RESPIRATORS';
@@ -82,18 +83,18 @@ $point = Point::where('added_in_segment_id', $segment->id)->where('category', $c
 
 $contentData = [];
 
-foreach($segmentSections as $segmentSection){
-	foreach($segmentSection['points'] as $sectionPoint){
-		if($sectionPoint['type'] == 'text'){
-			$contentData[$sectionPoint['key']] = '';
-		}elseif($sectionPoint['type'] == 'textarea'){
-			$contentData[$sectionPoint['key']] = '';
-		}elseif($sectionPoint['type'] == 'checkbox'){
-			$contentData[$sectionPoint['key']] = null;
-		}else{
-			$contentData[$sectionPoint['key']] = '';
-		}
-	}
+foreach ($segmentSections as $segmentSection) {
+    foreach ($segmentSection['points'] as $sectionPoint) {
+        if ($sectionPoint['type'] == 'text') {
+            $contentData[$sectionPoint['key']] = '';
+        } elseif ($sectionPoint['type'] == 'textarea') {
+            $contentData[$sectionPoint['key']] = '';
+        } elseif ($sectionPoint['type'] == 'checkbox') {
+            $contentData[$sectionPoint['key']] = null;
+        } else {
+            $contentData[$sectionPoint['key']] = '';
+        }
+    }
 }