Ver Fonte

Merge branch 'dev' of rav.triplestart.com:jmudaka/stagfe2 into dev

Josh há 3 anos atrás
pai
commit
12703da139

+ 1 - 0
app/Models/Pro.php

@@ -128,6 +128,7 @@ class Pro extends Model
                     ->where('pro_id', $myId)
                     ->orWhereNull('pro_id');
             })
+            ->orderBy('shortcut')
             ->get();
         return $shortcuts;
     }

+ 2 - 75
resources/views/app/patient/note/dashboard.blade.php

@@ -463,78 +463,7 @@
         <div class="card-body p-0">
             <div class="note-container">
                 @if($isVisitTemplateBased && !$doesVisitTemplateUiConfigExist)
-                <div class="note-lhs-tree pb-4" id="note-lhs-tree">
-                    <?php
-                    $previousHeading = null;
-                    $previousSubHeading = null;
-                    ?>
-                    @foreach($note->segments as $segment)
-                        <?php
-                        if ($segment->subheading !== $previousSubHeading) {
-                            if (!empty($previousSubHeading)) {
-                                echo '</div></div>'; // <!-- end the previous parent section -->
-                            }
-                            if (!empty($segment->subheading)) {
-                                echo '<div class="note-tree-node note-tree-heading">' .
-                                    '<a class="c-pointer">' . $segment->subheading . '</a>' .
-                                    '<div class="note-tree-children">'; // <!-- open new node -->
-                            }
-                            $previousSubHeading = $segment->subheading;
-                        }
-                        if ($segment->heading !== $previousHeading) {
-                            if (!empty($previousHeading)) {
-                                echo '</div></div>'; // <!-- end the previous parent section -->
-                            }
-                            if (!empty($segment->heading)) {
-                                echo '<div class="note-tree-node note-tree-heading">' .
-                                    '<a class="c-pointer">' . $segment->heading . '</a>' .
-                                    '<div class="note-tree-children">'; // <!-- open new node -->
-                            }
-                            $previousHeading = $segment->heading;
-                        }
-                        echo '<div class="note-tree-node">' .
-                            '<a native target="_top" ' .
-                            'data-segment-uid="' . $segment->uid . '" ' .
-                            'data-segment-internal-name="' . $segment->segmentTemplate->internal_name . '" ' .
-                            'href="#" ' .
-                            'class="' . ($segment->display_title === 'MedRisk Vigilence' || $segment->subheading === 'Lifestyle' ? 'd-none' : '') . '">' . $segment->display_title . '</a>' .
-                            '</div>';
-                        ?>
-                    @endforeach
-                    <?php
-                    if (!empty($previousSubHeading)) {
-                        echo '</div></div>'; // <!-- close any open parent section -->
-                    }
-                    if (!empty($previousHeading)) {
-                        echo '</div></div>'; // <!-- close any open parent section -->
-                    }
-                    ?>
-
-                    <hr>
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Prescriptions" href="#">ERx &amp; Orders</a></div>
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="CM Setup" href="#">Chronic Care Management</a></div>
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="RM Setup" href="#">RM Setup</a></div>
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Vitals Settings" href="#">Vitals Settings</a></div>
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Supply Orders Summary" href="#">Supply Orders Summary</a></div>
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="ICDs" href="#">ICDs</a></div>
-                        @if($pro->pro_type === 'ADMIN')
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Bills & Claims Summary" href="#">Bills & Claims Summary</a></div>
-                        @endif
-                        @if($note->method === 'IN_CLINIC' || $pro->pro_type === 'ADMIN')
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Pro/Payer Settings" href="#">Pro/Payer Settings</a></div>
-                        @endif
-                        @if($pro->pro_type === 'ADMIN' || ($note->hcpPro && $pro->id === $note->hcpPro->id))
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="HCP Bills" href="#">HCP Bills</a></div>
-                        @endif
-                        @if($pro->pro_type === 'ADMIN' || ($note->allyPro && $pro->id === $note->allyPro->id))
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="NA Bills" href="#">NA Bills</a></div>
-                        @endif
-                        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Claims" href="#">Claims</a></div>
-                        @if($note->is_signed_by_hcp)
-                        <div class="note-tree-node mb-3"><a native="" target="_top" data-non-segment-target="Addendums" href="#">Addendums</a></div>
-                        @endif
-
-                </div>
+                    @include('app.patient.note.lhs-tree')
                 @endif
                 <div class="note-rhs-content">
                 <div>
@@ -2535,9 +2464,7 @@
 
                 </div>
                 @if($isVisitTemplateBased && !$note->is_signed_by_hcp)
-                    <div class="note-rhs-sidebar border-left" id="note-rhs-sidebar">
-                        @include('app.patient.note.rhs-sidebar')
-                    </div>
+                    @include('app.patient.note.rhs-sidebar')
                 @endif
             </div>
         </div>

+ 72 - 0
resources/views/app/patient/note/lhs-tree.blade.php

@@ -0,0 +1,72 @@
+<div class="note-lhs-tree pb-4" id="note-lhs-tree">
+    <?php
+    $previousHeading = null;
+    $previousSubHeading = null;
+    ?>
+    @foreach($note->segments as $segment)
+        <?php
+        if ($segment->subheading !== $previousSubHeading) {
+            if (!empty($previousSubHeading)) {
+                echo '</div></div>'; // <!-- end the previous parent section -->
+            }
+            if (!empty($segment->subheading)) {
+                echo '<div class="note-tree-node note-tree-heading">' .
+                    '<a class="c-pointer">' . $segment->subheading . '</a>' .
+                    '<div class="note-tree-children">'; // <!-- open new node -->
+            }
+            $previousSubHeading = $segment->subheading;
+        }
+        if ($segment->heading !== $previousHeading) {
+            if (!empty($previousHeading)) {
+                echo '</div></div>'; // <!-- end the previous parent section -->
+            }
+            if (!empty($segment->heading)) {
+                echo '<div class="note-tree-node note-tree-heading">' .
+                    '<a class="c-pointer">' . $segment->heading . '</a>' .
+                    '<div class="note-tree-children">'; // <!-- open new node -->
+            }
+            $previousHeading = $segment->heading;
+        }
+        echo '<div class="note-tree-node">' .
+            '<a native target="_top" ' .
+            'data-segment-uid="' . $segment->uid . '" ' .
+            'data-segment-internal-name="' . $segment->segmentTemplate->internal_name . '" ' .
+            'href="#" ' .
+            'class="' . ($segment->display_title === 'MedRisk Vigilence' || $segment->subheading === 'Lifestyle' ? 'd-none' : '') . '">' . $segment->display_title . '</a>' .
+            '</div>';
+        ?>
+    @endforeach
+    <?php
+    if (!empty($previousSubHeading)) {
+        echo '</div></div>'; // <!-- close any open parent section -->
+    }
+    if (!empty($previousHeading)) {
+        echo '</div></div>'; // <!-- close any open parent section -->
+    }
+    ?>
+
+    <hr>
+    <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Prescriptions" href="#">ERx &amp; Orders</a></div>
+    <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="CM Setup" href="#">Chronic Care Management</a></div>
+    <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="RM Setup" href="#">RM Setup</a></div>
+    <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Vitals Settings" href="#">Vitals Settings</a></div>
+    <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Supply Orders Summary" href="#">Supply Orders Summary</a></div>
+    <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="ICDs" href="#">ICDs</a></div>
+    @if($pro->pro_type === 'ADMIN')
+        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Bills & Claims Summary" href="#">Bills & Claims Summary</a></div>
+    @endif
+    @if($note->method === 'IN_CLINIC' || $pro->pro_type === 'ADMIN')
+        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Pro/Payer Settings" href="#">Pro/Payer Settings</a></div>
+    @endif
+    @if($pro->pro_type === 'ADMIN' || ($note->hcpPro && $pro->id === $note->hcpPro->id))
+        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="HCP Bills" href="#">HCP Bills</a></div>
+    @endif
+    @if($pro->pro_type === 'ADMIN' || ($note->allyPro && $pro->id === $note->allyPro->id))
+        <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="NA Bills" href="#">NA Bills</a></div>
+    @endif
+    <div class="note-tree-node"><a native="" target="_top" data-non-segment-target="Claims" href="#">Claims</a></div>
+    @if($note->is_signed_by_hcp)
+        <div class="note-tree-node mb-3"><a native="" target="_top" data-non-segment-target="Addendums" href="#">Addendums</a></div>
+    @endif
+
+</div>

+ 117 - 115
resources/views/app/patient/note/rhs-sidebar.blade.php

@@ -1,122 +1,123 @@
-<?php
-$allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
-$medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
-$supplements = \App\Models\Point::getPointsOfCategory($patient, "SUPPLEMENT");
-$problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
-$goals = \App\Models\Point::getPointsOfCategory($patient, "GOAL");
-$prescriptions = $patient->prescriptionsCreatedInNote($note);
-?>
-<div id="active-allergies" class="p-2 border-bottom c-pointer on-hover-aliceblue"
-     open-in-stag-popup
-     mc-initer="allergies-center-{{$note->id}}"
-     title="Allergies Center"
-     popup-style="wide overflow-visible"
-     href="/allergies-center/{{$patient->uid}}/{{$note->uid}}">
-    <div class="font-weight-bold mb-2">
-        Allergies
-        <i class="fa fa-bolt text-primary ml-1"></i>
+<div class="note-rhs-sidebar border-left" id="note-rhs-sidebar">
+    <?php
+    $allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
+    $medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
+    $supplements = \App\Models\Point::getPointsOfCategory($patient, "SUPPLEMENT");
+    $problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
+    $goals = \App\Models\Point::getPointsOfCategory($patient, "GOAL");
+    $prescriptions = $patient->prescriptionsCreatedInNote($note);
+    ?>
+    <div id="active-allergies" class="p-2 border-bottom c-pointer on-hover-aliceblue"
+         open-in-stag-popup
+         mc-initer="allergies-center-{{$note->id}}"
+         title="Allergies Center"
+         popup-style="wide overflow-visible"
+         href="/allergies-center/{{$patient->uid}}/{{$note->uid}}">
+        <div class="font-weight-bold mb-2">
+            Allergies
+            <i class="fa fa-bolt text-primary ml-1"></i>
+        </div>
+        @if($allergies && count($allergies))
+            @foreach($allergies as $allergy)
+                <?php $rel = $allergy->relevanceToNote($note); ?>
+                <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
+                    <span class="mr-1">•</span>
+                    <span>{{$allergy->data->name}}</span>
+                </div>
+            @endforeach
+        @else
+            <span class="px-1 text-secondary">None</span>
+        @endif
     </div>
-    @if($allergies && count($allergies))
-        @foreach($allergies as $allergy)
-            <?php $rel = $allergy->relevanceToNote($note); ?>
-            <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
-                <span class="mr-1">•</span>
-                <span>{{$allergy->data->name}}</span>
-            </div>
-        @endforeach
-    @else
-        <span class="px-1 text-secondary">None</span>
-    @endif
-</div>
-<div id="active-medications" class="p-2 border-bottom c-pointer on-hover-aliceblue"
-     open-in-stag-popup
-     mc-initer="medications-center-{{$note->id}}"
-     title="Medications Center"
-     popup-style="wide overflow-visible"
-     href="/medications-center/{{$patient->uid}}/{{$note->uid}}">
-    <div class="font-weight-bold mb-2">
-        Medications
-        <i class="fa fa-bolt text-primary ml-1"></i>
+    <div id="active-medications" class="p-2 border-bottom c-pointer on-hover-aliceblue"
+         open-in-stag-popup
+         mc-initer="medications-center-{{$note->id}}"
+         title="Medications Center"
+         popup-style="wide overflow-visible"
+         href="/medications-center/{{$patient->uid}}/{{$note->uid}}">
+        <div class="font-weight-bold mb-2">
+            Medications
+            <i class="fa fa-bolt text-primary ml-1"></i>
+        </div>
+        @if($medications && count($medications))
+            @foreach($medications as $medication)
+                <?php $rel = $medication->relevanceToNote($note); ?>
+                <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
+                    <span class="mr-1">•</span>
+                    <span>{{$medication->data->name}}</span>
+                </div>
+            @endforeach
+        @else
+            <span class="px-1 text-secondary">None</span>
+        @endif
     </div>
-    @if($medications && count($medications))
-        @foreach($medications as $medication)
-            <?php $rel = $medication->relevanceToNote($note); ?>
-            <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
-                <span class="mr-1">•</span>
-                <span>{{$medication->data->name}}</span>
-            </div>
-        @endforeach
-    @else
-        <span class="px-1 text-secondary">None</span>
-    @endif
-</div>
-<div id="active-supplements" class="p-2 border-bottom c-pointer on-hover-aliceblue"
-     open-in-stag-popup
-     mc-initer="supplements-center-{{$note->id}}"
-     title="Supplements Center"
-     popup-style="wide overflow-visible"
-     href="/supplements-center/{{$patient->uid}}/{{$note->uid}}">
-    <div class="font-weight-bold mb-2">
-        Supplements
-        <i class="fa fa-bolt text-primary ml-1"></i>
+    <div id="active-supplements" class="p-2 border-bottom c-pointer on-hover-aliceblue"
+         open-in-stag-popup
+         mc-initer="supplements-center-{{$note->id}}"
+         title="Supplements Center"
+         popup-style="wide overflow-visible"
+         href="/supplements-center/{{$patient->uid}}/{{$note->uid}}">
+        <div class="font-weight-bold mb-2">
+            Supplements
+            <i class="fa fa-bolt text-primary ml-1"></i>
+        </div>
+        @if($supplements && count($supplements))
+            @foreach($supplements as $supplement)
+                <?php $rel = $supplement->relevanceToNote($note); ?>
+                <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
+                    <span class="mr-1">•</span>
+                    <span>{{$supplement->data->name}}</span>
+                </div>
+            @endforeach
+        @else
+            <span class="px-1 text-secondary">None</span>
+        @endif
     </div>
-    @if($supplements && count($supplements))
-        @foreach($supplements as $supplement)
-            <?php $rel = $supplement->relevanceToNote($note); ?>
-            <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
-                <span class="mr-1">•</span>
-                <span>{{$supplement->data->name}}</span>
-            </div>
-        @endforeach
-    @else
-        <span class="px-1 text-secondary">None</span>
-    @endif
-</div>
-<div id="active-problems" class="p-2 border-bottom c-pointer on-hover-aliceblue"
-     open-in-stag-popup
-     mc-initer="problems-center-{{$note->id}}"
-     title="Problems Center"
-     popup-style="wide overflow-visible"
-     href="/problems-center/{{$patient->uid}}/{{$note->uid}}">
-    <div class="font-weight-bold mb-2">
-        Problems
-        <i class="fa fa-bolt text-primary ml-1"></i>
+    <div id="active-problems" class="p-2 border-bottom c-pointer on-hover-aliceblue"
+         open-in-stag-popup
+         mc-initer="problems-center-{{$note->id}}"
+         title="Problems Center"
+         popup-style="wide overflow-visible"
+         href="/problems-center/{{$patient->uid}}/{{$note->uid}}">
+        <div class="font-weight-bold mb-2">
+            Problems
+            <i class="fa fa-bolt text-primary ml-1"></i>
+        </div>
+        @if($problems && count($problems))
+            @foreach($problems as $problem)
+                <?php $rel = $problem->relevanceToNote($note); ?>
+                <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
+                    <span class="mr-1">•</span>
+                    <span>{{$problem->data->name}}</span>
+                </div>
+            @endforeach
+        @else
+            <span class="px-1 text-secondary">None</span>
+        @endif
     </div>
-    @if($problems && count($problems))
-        @foreach($problems as $problem)
-            <?php $rel = $problem->relevanceToNote($note); ?>
-            <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
-                <span class="mr-1">•</span>
-                <span>{{$problem->data->name}}</span>
-            </div>
-        @endforeach
-    @else
-        <span class="px-1 text-secondary">None</span>
-    @endif
-</div>
-<div id="active-goals" class="p-2 border-bottom c-pointer on-hover-aliceblue"
-     open-in-stag-popup
-     mc-initer="goals-center-{{$note->id}}"
-     title="Goals Center"
-     popup-style="wide overflow-visible"
-     href="/goals-center/{{$patient->uid}}/{{$note->uid}}">
-    <div class="font-weight-bold mb-2">
-        Goals
-        <i class="fa fa-bolt text-primary ml-1"></i>
+    <div id="active-goals" class="p-2 border-bottom c-pointer on-hover-aliceblue"
+         open-in-stag-popup
+         mc-initer="goals-center-{{$note->id}}"
+         title="Goals Center"
+         popup-style="wide overflow-visible"
+         href="/goals-center/{{$patient->uid}}/{{$note->uid}}">
+        <div class="font-weight-bold mb-2">
+            Goals
+            <i class="fa fa-bolt text-primary ml-1"></i>
+        </div>
+        @if($goals && count($goals))
+            @foreach($goals as $goal)
+                <?php $rel = $goal->relevanceToNote($note); ?>
+                <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
+                    <span class="mr-1">•</span>
+                    <span>{{$goal->data->goal}}</span>
+                </div>
+            @endforeach
+        @else
+            <span class="px-1 text-secondary">None</span>
+        @endif
     </div>
-    @if($goals && count($goals))
-        @foreach($goals as $goal)
-            <?php $rel = $goal->relevanceToNote($note); ?>
-            <div class="d-inline-flex align-items-baseline px-1 {{$rel ? 'bg-warning-mellow' : ''}}">
-                <span class="mr-1">•</span>
-                <span>{{$goal->data->goal}}</span>
-            </div>
-        @endforeach
-    @else
-        <span class="px-1 text-secondary">None</span>
-    @endif
-</div>
-<div id="note-prescriptions" class="p-2 border-bottom c-pointer on-hover-aliceblue" data-non-segment-target="Prescriptions">
+    <div id="note-prescriptions" class="p-2 border-bottom c-pointer on-hover-aliceblue" data-non-segment-target="Prescriptions">
     <div class="font-weight-bold mb-2">
         ERx &amp; Orders
     </div>
@@ -155,4 +156,5 @@ $prescriptions = $patient->prescriptionsCreatedInNote($note);
     @else
         <span class="px-1 text-secondary">None</span>
     @endif
-</div>
+</div>
+</div>

+ 0 - 1
resources/views/app/patient/note/segment.blade.php

@@ -174,7 +174,6 @@
 
     </div>
 
-    <!-- popup hack for LS segments -->
     <?php if(!$isLSSegment): ?>
 
     <div class="d-none if-not-edit inset-comment summary-container {{$iName === 'medrisk_vigilence' ? 'px-0' : ''}}">

+ 0 - 1
resources/views/app/patient/note/segment_script.blade.php

@@ -340,7 +340,6 @@
                 debouncedSaver(this);
             });
 
-            // NOTE: this doesn't work yet
             $(document).off('rich-text-input.auto-save-rich-text-input', '.visit-segment.edit[data-segment-template-name] [visit-moe] form [note-rte]');
             $(document).on('rich-text-input.auto-save-rich-text-input', '.visit-segment.edit[data-segment-template-name] [visit-moe] form [note-rte]', function () {
                 debouncedSaver(this);

+ 1 - 1
resources/views/layouts/patient.blade.php

@@ -3,7 +3,7 @@
 /** @var \App\Models\Client $patient */
 ?>
 <?php
-$trimLayout = false;
+$trimLayout = true;
 $routeName = request()->route()->getName();
 $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note && !!$note->visitTemplate);
 ?>