Kaynağa Gözat

ROS updates

Vijayakrishnan 3 yıl önce
ebeveyn
işleme
7da1e93ca6

+ 10 - 9
resources/views/app/patient/segment-templates/ros/edit.blade.php

@@ -193,13 +193,6 @@ $fields = [
     ]
 ];
 
-$customFields = $pro->canvasCustomItems('pmhx');
-$customFields = array_map(function($_item) {
-    return $_item['label'];
-}, $customFields->toArray());
-
-if(!$customFields) $customFields = [];
-
 $point = Point::getGlobalSingletonOfCategory($patient, 'ROS', true);
 
 $contentData = $parsed = ($point && @$point->data && !@($point->data['free_text'])) ? $point->data : false;
@@ -246,9 +239,9 @@ for ($i = 0; $i < count($fields); $i++) {
                                 <div class="font-weight-bold mb-2">{{ $head }}</div>
                                 <div class="d-flex flex-nowrap align-items-center mb-1">
                                     <span class="rspace"><i class="fa fa-plus-circle text-success on-hover-opaque"></i></span>
-                                    <span class="rspace"><i class="fa fa-minus-circle text-danger on-hover-opaque"></i></span>
+                                    <span class="rspace ros-minus-all c-pointer" data-category="{{$head}}"><i class="fa fa-minus-circle text-danger on-hover-opaque"></i></span>
                                 </div>
-                                <div class="mb-3">
+                                <div class="mb-3 ros-category" data-category="{{$head}}">
                                     @for($k = 0; $k < count($values); $k++)
                                         <?php $fName = $head . '_' . sanitize_field_name($values[$k]); ?>
                                         <div class="d-flex align-items-stretch mb-1">
@@ -369,6 +362,14 @@ for ($i = 0; $i < count($fields); $i++) {
                         '</div>').appendTo(buttonContainer);
 
                     buttonContainer.insertAfter(titleElem);
+
+                    $('#edit-ros-container')
+                        .off('click.ros-minus-all')
+                        .on('click.ros-minus-all', '.ros-minus-all[data-category]', function() {
+                            let category = $(this).attr('data-category');
+                            $('.ros-category[data-category="' + category + '"]').find('input[type="radio"][value="-"]').click();
+                            return false;
+                        });
                 },
                 watch: {
                     $data: {

+ 7 - 0
resources/views/app/patient/segment-templates/ros/summary.blade.php

@@ -201,6 +201,13 @@ $point = Point::getGlobalSingletonOfCategory($patient, 'ROS', true);
 if ($point && @$point->data && !@($point->data['free_text'])) {
     $contentData = $point->data;
 
+    if(!!@$contentData['declaration']) {
+        echo '<div class="mb-2">';
+        echo '<i class="fa fa-check"></i>&nbsp;';
+        echo "Except for the systems documented in the HPI or detailed below, all other systems were reviewed and negative.";
+        echo '</div>';
+    }
+
     for ($i = 0; $i < count($fields); $i++) {
         foreach($fields[$i] as $head => $values) {
             for($k = 0; $k < count($values); $k++) {