Browse Source

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

= 3 năm trước cách đây
mục cha
commit
c53498f0f7

+ 11 - 0
public/css/style.css

@@ -2350,6 +2350,7 @@ body.in-iframe .main-row > .sidebar {
 }
 .note-bottom-toolbar {
     bottom: 0;
+    z-index: 3;
 }
 .note-bottom-toolbar .nbt-container:hover {
     cursor: pointer;
@@ -2583,3 +2584,13 @@ table.table-xs tr td {
 {
     margin: 10mm 10mm 10mm 10mm;
 }
+.note-left-panel ~ .v-split {
+    height: 100%;
+    background: #DDD;
+    opacity: 1;
+    z-index: 2;
+    margin-left: -3px;
+    border-radius: 0;
+    margin-top: 0;
+    width: 6px;
+}

+ 6 - 0
resources/views/app/patient/allergies-center.blade.php

@@ -56,6 +56,9 @@ if(!@$summaryView) {
         <table class="table table-sm table-bordered bg-white mb-2 point-table read">
             <thead>
             <tr class="">
+                @if($patient->core_note_id !== $note->id)
+                    <th class="border-bottom-0 text-secondary text-center width-30px d-none">Rel.</th>
+                @endif
                 <th class="border-bottom-0 text-secondary">Name</th>
                 @if(!@$summaryView) <th class="border-bottom-0 text-secondary width-50px">Edit</th> @endif
                 <th class="border-bottom-0 text-secondary w-30">Subjective</th>
@@ -79,6 +82,9 @@ if(!@$summaryView) {
                 data-name-base64="{{!!@($allergy->data->name) ? base64_encode($allergy->data->name) : ''}}"
                 data-is-removed="{{$allergy->is_removed ? 1 : 0}}"
                 data-is-removed-due-to-entry-error="{{$allergy->is_removed_due_to_entry_error ? 1 : 0}}">
+                @if($patient->core_note_id !== $note->id)
+                    @include('app.patient.wizard-partials.relevance-column', ['point' => $point])
+                @endif
                 <td>
                     <div class="d-flex align-items-baseline">
                         @include('app.patient.wizard-partials.state-icon', ['point' => $allergy])

+ 0 - 1
resources/views/app/patient/care-month/_matrix.blade.php

@@ -407,7 +407,6 @@ foreach ($days as $k => $day) {
     </div>
     @include('app.patient.vitals-settings.bp-management-summary')
 </div>
-    <div class="min-height-300px"></div>
 </div>
 <script>
     (function() {

+ 4 - 4
resources/views/app/patient/care-month/dashboard.blade.php

@@ -681,13 +681,13 @@
                     @if($patient->has_rm_setup_been_performed)
                         <span class="text-nowrap text-success">
                             <i class="fa fa-check"></i>
-                            <b>Enrolled</b>
+                            <b>Performed</b>
                         </span>
                         <div moe class="ml-3">
                             <a href="" show start>Undo</a>
                             <form url="/api/careMonth/undoMarkRmSetupPerformed">
                                 <input type="hidden" name="uid" value="{{$careMonth->uid}}">
-                                <p>Un-enroll from RM?</p>
+                                <p>Mark RM Setup as not performed?</p>
                                 <div class="mb-0">
                                     <button class="btn btn-primary btn-sm" submit>Submit</button>
                                     <button class="btn btn-default border btn-sm" cancel>Cancel</button>
@@ -697,10 +697,10 @@
                     @else
                         <span class="text-nowrap text-warning-mellow">
                             <i class="fa fa-times"></i>
-                            <b>Not Enrolled</b>
+                            <b>Not Performed</b>
                         </span>
                         <div moe class="ml-3">
-                            <a href="" show start>Mark as enrolled</a>
+                            <a href="" show start>Mark RM setup as performed?</a>
                             <form url="/api/careMonth/markRmSetupPerformed">
                                 <input type="hidden" name="uid" value="{{$careMonth->uid}}">
                                 <p>Mark as enrolled into RM?</p>

+ 6 - 0
resources/views/app/patient/careteam-center.blade.php

@@ -18,6 +18,9 @@ list($careTeamMembers, $counts) = Point::getPointsOfCategoryExtended($patient, '
         <table class="table table-sm table-bordered bg-white mb-2 point-table read">
             <thead>
             <tr class="">
+                @if($patient->core_note_id !== $note->id)
+                    <th class="border-bottom-0 text-secondary text-center width-30px d-none">Rel.</th>
+                @endif
                 <th class="border-bottom-0 text-secondary">Name/Details</th>
                 @if(!@$summaryView) <th class="border-bottom-0 text-secondary width-50px">Edit</th> @endif
                 <th class="border-bottom-0 text-secondary w-30">Subjective</th>
@@ -39,6 +42,9 @@ list($careTeamMembers, $counts) = Point::getPointsOfCategoryExtended($patient, '
                 data-name-base64="{{!!@($careTeamMember->data->name) ? base64_encode($careTeamMember->data->name) : ''}}"
                 data-is-removed="{{$careTeamMember->is_removed ? 1 : 0}}"
                 data-is-removed-due-to-entry-error="{{$careTeamMember->is_removed_due_to_entry_error ? 1 : 0}}">
+                @if($patient->core_note_id !== $note->id)
+                    @include('app.patient.wizard-partials.relevance-column', ['point' => $point])
+                @endif
                 <td>
                     <div class="d-flex align-items-baseline">
                         @include('app.patient.wizard-partials.state-icon', ['point' => $careTeamMember])

+ 6 - 0
resources/views/app/patient/goals-center.blade.php

@@ -18,6 +18,9 @@ list($goals, $counts) = Point::getPointsOfCategoryExtended($patient, 'GOAL', $no
         <table class="table table-sm table-bordered bg-white mb-2 point-table read">
             <thead>
             <tr class="">
+                @if($patient->core_note_id !== $note->id)
+                    <th class="border-bottom-0 text-secondary text-center width-30px d-none">Rel.</th>
+                @endif
                 <th class="border-bottom-0 text-secondary">Goal</th>
                 @if(!@$summaryView) <th class="border-bottom-0 text-secondary width-50px">Edit</th> @endif
                 <th class="border-bottom-0 text-secondary w-30">Subjective</th>
@@ -38,6 +41,9 @@ list($goals, $counts) = Point::getPointsOfCategoryExtended($patient, 'GOAL', $no
                 data-name-base64="{{!!@($goal->data->goal) ? base64_encode($goal->data->goal) : ''}}"
                 data-is-removed="{{$goal->is_removed ? 1 : 0}}"
                 data-is-removed-due-to-entry-error="{{$goal->is_removed_due_to_entry_error ? 1 : 0}}">
+                @if($patient->core_note_id !== $note->id)
+                    @include('app.patient.wizard-partials.relevance-column', ['point' => $point])
+                @endif
                 <td>
                     <div class="d-flex align-items-baseline">
                         @include('app.patient.wizard-partials.state-icon', ['point' => $goal])

+ 6 - 0
resources/views/app/patient/medications-center.blade.php

@@ -47,6 +47,9 @@ if(!@$summaryView) {
         <table class="table table-sm table-bordered bg-white mb-2 point-table read">
             <thead>
             <tr class="">
+                @if($patient->core_note_id !== $note->id)
+                    <th class="border-bottom-0 text-secondary text-center width-30px d-none">Rel.</th>
+                @endif
                 <th class="border-bottom-0 text-secondary">Name</th>
                 @if(!@$summaryView) <th class="border-bottom-0 text-secondary width-50px">Edit</th> @endif
                 <th class="border-bottom-0 text-secondary w-30">Subjective</th>
@@ -70,6 +73,9 @@ if(!@$summaryView) {
                     data-name-base64="{{!!@($medication->data->name) ? base64_encode($medication->data->name) : ''}}"
                     data-is-removed="{{$medication->is_removed ? 1 : 0}}"
                     data-is-removed-due-to-entry-error="{{$medication->is_removed_due_to_entry_error ? 1 : 0}}">
+                    @if($patient->core_note_id !== $note->id)
+                        @include('app.patient.wizard-partials.relevance-column', ['point' => $point])
+                    @endif
                     <td>
                         <div class="d-flex align-items-baseline">
                             @include('app.patient.wizard-partials.state-icon', ['point' => $medication])

+ 119 - 17
resources/views/app/patient/note/dashboard.blade.php

@@ -539,22 +539,26 @@
                         $shortcuts = "";
                         $latestSectionTS = 0;
                         ?>
-                        <div class="{{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }} {{$isVisitTemplateBased && $note->visitTemplate->internal_name === 'soap_visit' ? 'w-30' : ''}}">
-                            @if($isVisitTemplateBased && $doesVisitTemplateLayoutExist)
-                                @include($visitLayoutPath)
-                            @elseif($isVisitTemplateBased && !$doesVisitTemplateUiConfigExist)
-                                @include('app.patient.note.note-segment-list')
-                            @elseif($isVisitTemplateBased && $doesVisitTemplateUiConfigExist)
-                                @include('app.patient.note.custom-visit')
-                            @else
-                                @include('app.patient.note.note-section-list')
-                            @endif
+                        <div class="{{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }} {{$isVisitTemplateBased && $note->visitTemplate->internal_name === 'soap_visit' ? 'w-30 border-right note-left-panel overflow-auto' : ''}}">
+                            <div class="min-width-300px">
+                                @if($isVisitTemplateBased && $doesVisitTemplateLayoutExist)
+                                    @include($visitLayoutPath)
+                                @elseif($isVisitTemplateBased && !$doesVisitTemplateUiConfigExist)
+                                    @include('app.patient.note.note-segment-list')
+                                @elseif($isVisitTemplateBased && $doesVisitTemplateUiConfigExist)
+                                    @include('app.patient.note.custom-visit')
+                                @else
+                                    @include('app.patient.note.note-section-list')
+                                @endif
+                            </div>
                         </div>
                         @if($isVisitTemplateBased && $note->visitTemplate->internal_name === 'soap_visit')
-                        <div class="w-70 border-left">
-                            @if($isVisitTemplateBased && !$note->is_signed_by_hcp)
-                                @include('app.patient.note.note-segment-list-rhs')
-                            @endif
+                        <div class="w-70 border-left note-right-panel overflow-auto">
+                            <div class="min-width-700px">
+                                @if($isVisitTemplateBased && !$note->is_signed_by_hcp)
+                                    @include('app.patient.note.note-segment-list-rhs')
+                                @endif
+                            </div>
                         </div>
                         @endif
                     </div>
@@ -625,8 +629,24 @@
                         <div class="d-inline-flex align-items-center flex-grow-1">
                             @if($patient->has_cm_setup_been_performed)
                                 <span class="text-nowrap text-success">
-                                    <i class="fa fa-check"></i>
-                                    <b>Performed</b>
+                                    @if($patient->cm_setup_note_id === $note->id)
+                                        <i class="fa fa-check"></i>
+                                        <b>Performed on this note</b>
+                                    @elseif($patient->cmSetupNote)
+                                        <i class="fa fa-check"></i>
+                                        <b>Performed on</b>
+                                        <span class="d-inline position-relative on-click-menu">
+                                            <span class="text-primary c-pointer">{{friendly_date($patient->cmSetupNote->effective_dateest)}}</span>
+                                            <div menu right class="bg-white border">
+                                                <a native target="_blank"
+                                                   href="<?= route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $patient->cmSetupNote]) ?>"
+                                                   class="px-2 py-1 d-block text-nowrap text-sm">Go to note</a>
+                                            </div>
+                                        </span>
+                                    @else
+                                        <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
+                                        <b class="text-warning-mellow">Performed, but CM setup note missing!</b>
+                                    @endif
                                 </span>
                                 @if($patient->mcp_pro_id === $pro->id || $pro->pro_type === 'ADMIN')
                                     <div moe class="ml-3">
@@ -768,7 +788,7 @@
                     </div>
 
                     @if($pro->pro_type === 'ADMIN' && $note->was_cm_setup_performed)
-                    <div class="d-flex align-items-baseline">
+                    <div class="d-flex align-items-baseline mb-3">
                         <span class="min-width-140px">Manager Signature:</span>
                         <div class="d-inline-flex align-items-center flex-grow-1">
                             @if($note->cm_setup_manager_signature_status !== 'SIGNED')
@@ -803,6 +823,78 @@
                     </div>
                     @endif
 
+                    @if($pro->id === $patient->mcp_pro_id && $note->was_cm_setup_performed)
+                    <div class="d-flex align-items-baseline">
+                        <span class="min-width-140px">MCP Signature:</span>
+                        <div class="d-inline-flex align-items-center flex-grow-1">
+                            @if($note->cm_setup_mcp_signature_status !== 'SIGNED')
+                                <div moe class="">
+                                    <a start show>Sign</a>
+                                    <form url="/api/note/updateCmSetupMcpSignatureStatus" class="mcp-theme-1">
+                                        <input type="hidden" name="uid" value="{{$note->uid}}">
+                                        <input type="hidden" name="mcpSignatureStatus" value="SIGNED">
+                                        <p>Sign CM Setup Performed as MCP?</p>
+                                        <div>
+                                            <button submit class="btn btn-sm btn-success mr-1">Sign</button>
+                                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            @else
+                                <b>SIGNED</b>
+                                <div moe class="ml-3">
+                                    <a start show>Undo</a>
+                                    <form url="/api/note/updateCmSetupMcpSignatureStatus" class="mcp-theme-1">
+                                        <input type="hidden" name="uid" value="{{$note->uid}}">
+                                        <input type="hidden" name="mcpSignatureStatus" value="">
+                                        <p>Undo sign as MCP for CM Setup Performed?</p>
+                                        <div>
+                                            <button submit class="btn btn-sm btn-primary mr-1">Sign</button>
+                                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            @endif
+                        </div>
+                    </div>
+                    @endif
+
+                    @if($pro->id === $patient->default_na_pro_id && $note->was_cm_setup_performed)
+                    <div class="d-flex align-items-baseline">
+                        <span class="min-width-140px">Care Coord. Sign.:</span>
+                        <div class="d-inline-flex align-items-center flex-grow-1">
+                            @if($note->cm_setup_na_signature_status !== 'SIGNED')
+                                <div moe class="">
+                                    <a start show>Sign</a>
+                                    <form url="/api/note/updateCmSetupNaSignatureStatus" class="mcp-theme-1">
+                                        <input type="hidden" name="uid" value="{{$note->uid}}">
+                                        <input type="hidden" name="naSignatureStatus" value="SIGNED">
+                                        <p>Sign CM Setup Performed as Care Coordinator?</p>
+                                        <div>
+                                            <button submit class="btn btn-sm btn-success mr-1">Sign</button>
+                                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            @else
+                                <b>SIGNED</b>
+                                <div moe class="ml-3">
+                                    <a start show>Undo</a>
+                                    <form url="/api/note/updateCmSetupNaSignatureStatus" class="mcp-theme-1">
+                                        <input type="hidden" name="uid" value="{{$note->uid}}">
+                                        <input type="hidden" name="naSignatureStatus" value="">
+                                        <p>Undo sign as Care Coordinator for CM Setup Performed?</p>
+                                        <div>
+                                            <button submit class="btn btn-sm btn-primary mr-1">Sign</button>
+                                            <button cancel class="btn btn-sm btn-default border">Cancel</button>
+                                        </div>
+                                    </form>
+                                </div>
+                            @endif
+                        </div>
+                    </div>
+                    @endif
+
                 </div>
 
                 <div class="p-3 border-bottom screen-only" data-non-segment-section="RM Setup">
@@ -2569,6 +2661,8 @@
     <script>
         (function() {
             function init() {
+                debugger
+                initVSplitter('stag-note', $('.note-left-panel'), $('.note-right-panel'));
                 @if($note->visitTemplate->internal_name !== 'soap_visit')
                 fixTreeTopAndHeight();
                 $(window).on('resize', fixTreeTopAndHeight);
@@ -2655,6 +2749,14 @@
             addMCInitializer('note-tree', init, '#note-lhs-tree');
         })();
     </script>
+    <script>
+        (function() {
+            function init() {
+                initVSplitter('stag-note', $('.note-left-panel'), $('.note-right-panel'));
+            }
+            addMCInitializer('note-splitter', init, '#note-single-header');
+        })();
+    </script>
     @endif
 @endsection
 @if(!$isVisitTemplateBased)

+ 6 - 0
resources/views/app/patient/problems-center.blade.php

@@ -64,6 +64,9 @@ if(!@$summaryView) {
         <table class="table table-sm table-bordered bg-white mb-2 point-table read">
             <thead>
             <tr class="">
+                @if($patient->core_note_id !== $note->id)
+                    <th class="border-bottom-0 text-secondary text-center width-30px d-none">Rel.</th>
+                @endif
                 <th class="border-bottom-0 text-secondary">Name</th>
                 @if(!@$summaryView) <th class="border-bottom-0 text-secondary width-50px">Edit</th> @endif
                 <th class="border-bottom-0 text-secondary w-30">Subjective/HPI</th>
@@ -87,6 +90,9 @@ if(!@$summaryView) {
                 data-name-base64="{{!!@($problem->data->name) ? base64_encode($problem->data->name) : ''}}"
                 data-is-removed="{{$problem->is_removed ? 1 : 0}}"
                 data-is-removed-due-to-entry-error="{{$problem->is_removed_due_to_entry_error ? 1 : 0}}">
+                @if($patient->core_note_id !== $note->id)
+                    @include('app.patient.wizard-partials.relevance-column', ['point' => $point])
+                @endif
                 <td>
                     <div class="d-flex align-items-baseline">
                         @include('app.patient.wizard-partials.state-icon', ['point' => $problem])

+ 1 - 1
resources/views/app/patient/wizard-partials/relevance-column.blade.php

@@ -1,4 +1,4 @@
-<td class="text-center">
+<td class="text-center d-none">
     <a href="#" class="toggle-relevance"
        data-relevant="{{$rel ? '1' : '0'}}"
        data-rel-uid="{{$rel ? $rel->uid : ''}}"

+ 2 - 0
resources/views/layouts/template.blade.php

@@ -467,6 +467,8 @@
     @endif
     <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.24/fc-3.3.2/fh-3.1.8/datatables.min.css"/>
     <script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.24/fc-3.3.2/fh-3.1.8/datatables.min.js"></script>
+    <link href="/v-splitter-px/v-splitter.css?v={{config('app.asset_version')}}" rel="stylesheet" >
+    <script src="/v-splitter-px/v-splitter.js?v={{config('app.asset_version')}}"></script>
 </body>
 
 </html>