瀏覽代碼

Merge remote-tracking branch 'origin/master'

= 1 年之前
父節點
當前提交
bc2061cea5

+ 14 - 0
app/Http/Controllers/NoteController.php

@@ -121,6 +121,20 @@ class NoteController extends Controller
         return view("app.patient.note.print.print-legacy", compact('patient', 'note'));
     }
 
+    public function printV2(Request $request, Client $patient, Note $note) {
+        if($note->visitTemplate) {
+            return view("app.patient.note.print.print-v2", compact('patient', 'note'));
+        }
+        return view("app.patient.note.print.print-legacy", compact('patient', 'note'));
+    }
+
+    public function printV3(Request $request, Client $patient, Note $note) {
+        if($note->visitTemplate) {
+            return view("app.patient.note.print.print-v3", compact('patient', 'note'));
+        }
+        return view("app.patient.note.print.print-legacy", compact('patient', 'note'));
+    }
+
     public function resolve(Request $request, Client $patient, Note $note) {
         return view("app.patient.note.resolve", compact('patient', 'note'));
     }

+ 6 - 0
app/Models/CompanyClient.php

@@ -23,4 +23,10 @@ class CompanyClient extends Model
         return $this->hasMany(CompanyClientDocument::class, 'company_client_id', 'id')
             ->orderBy('created_at', 'desc');
     }
+
+    public function allowedDocuments()
+    {
+        return $this->hasMany(CompanyClientDocument::class, 'company_client_id', 'id')->where('is_removed', false)
+            ->orderBy('created_at', 'desc');
+    }
 }

+ 15 - 1
resources/views/app/patient/companies.blade.php

@@ -131,7 +131,7 @@
                             </span>
                             @if(count($linkedCompany->documents))
                                 <table class="table">
-                                    @foreach($linkedCompany->documents as $document)
+                                    @foreach($linkedCompany->allowedDocuments as $document)
                                         <tr>
                                             <td>
                                                 <a native target="_blank" href="/api/companyClientDocument/download/{{$document->uid}}">
@@ -154,6 +154,20 @@
                                                         </div>
                                                     </form>
                                                 </span>
+                                                <span moe class="ml-1" relative>
+                                                    <a class="" href="" show start><i class="fa fa-trash-alt text-danger"></i></a>
+                                                    <form url="/api/companyClientDocument/remove" right>
+                                                        <input type="hidden" name="uid" value="{{$document->uid}}">
+                                                        <div class="m-2">
+                                                            <label for="" class="control-label">Are you sure?</label>
+                                                        </div>
+
+                                                        <div class="mb-0">
+                                                            <button class="btn btn-primary btn-sm" submit>Remove</button>
+                                                            <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                                        </div>
+                                                    </form>
+                                                </span>
                                             </td>
                                         </tr>
                                     @endforeach

+ 5 - 0
resources/views/app/patient/note/dashboard.blade.php

@@ -443,7 +443,12 @@ use App\Models\Handout;
             @endif
 
             <div class="px-2 border-left screen-only">
+                {{-- NOTE --}}
+                {{-- v1. print-note --}}
+                {{-- v2. print-note-v2 --}}
+                {{-- v3. print-note-v3 --}}
                 <a href="{{route('print-note', ['patient' => $patient, 'note' => $note])}}" native target="_blank" class=""><i class="fa fa-print"></i></a>
+                <a href="{{route('print-note-v3', ['patient' => $patient, 'note' => $note])}}" native target="_blank" class="ml-2"><i class="fa fa-print"></i><sup class="text-danger" style="font-weight:bold;font-size: 10px;">NEW</sup></a>
                 @if($performer->pro->is_admin)
                     <a href="{{'/practice-management/notes-resolution-center-v2?uid='.$note->uid}}" target="_blank">NRC</a>
                 @endif

+ 225 - 0
resources/views/app/patient/note/note-segment-list-print-v2.blade.php

@@ -0,0 +1,225 @@
+<div class="segments-list note-segments-print-list {{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }}" id="note-segments-list">
+    <?php
+    $previousHeading = null;
+    $previousSubHeading = null;
+    $segments = $note->segments->filter(function ($_x) {
+        $ok = !!$_x->is_active && $_x->segmentTemplate->internal_name !== 'medrisk_vigilence' && strpos($_x->segmentTemplate->internal_name, 'lifestyle_') !== 0;
+        if ($ok) {
+            $content = $_x->summary_html;
+            if ($_x->accepted_suggestion_summary_html) {
+                $content = $_x->accepted_suggestion_summary_html;
+            }
+            $trimmed = trim(strip_tags($content));
+            $ok = ($trimmed !== '' && $trimmed !== '-');
+        }
+        return $ok;
+    });
+    $printSegments = [];
+    foreach ($segments as $segment) {
+        if ($segment->left_or_right !== 'RIGHT') {
+            $printSegments[] = $segment;
+        }
+    }
+    foreach ($segments as $segment) {
+        if ($segment->left_or_right === 'RIGHT') {
+            $printSegments[] = $segment;
+        }
+    }
+    ?>
+    <!-- -- -->
+    <div style="font-family: Arial, Helvetica, sans-serif;display: flex;width:100%;border-top:1px solid #333333;border-bottom:1px solid #333333;">
+        <div style="border-right:1px solid #333333;padding:10px;width:30%;vertical-align: top;height:auto;">
+            <div style="">
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Race: </span>{{ $patient->race ?? 'No race saved for patient' }}</div>
+                <?php
+                $canvasData = json_decode($patient->canvas_data);
+                ?>
+                @if($canvasData && @$canvasData->INTAKE_DATA)
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Ethnicity: </span>{{ $canvasData->INTAKE_DATA->ethnicity ?? 'No ethnicity for patient saved' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Height: </span>{{ $canvasData->INTAKE_DATA->height ?? 'No height for patient saved' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Weight: </span>{{ $canvasData->INTAKE_DATA->weight ?? 'No weight for patient saved' }}</div>
+                @endif
+
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Preferred Language: </span>{{ $patient->preferred_language ?? 'No preferred language saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Preferred Foreign Language: </span>{{ $patient->preferred_foreign_language ?? 'No preferred foreign language saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Other Languages: </span>{{ $patient->other_languages ?? 'No other languages saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Sticky Note: </span>{{ $patient->sticky_note ?? 'No sticky note saved for patient' }}</div>
+
+                <!-- Allergies -->
+                <?php
+                $allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Alergies:</div>
+                @if(count($allergies))
+                <ul>
+                    @foreach($allergies as $allergy)
+                    <li style="font-size: 16px;">{{ $allergy->data_name }}</li>
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known allergies</div>
+                @endif
+
+                <!-- Medications -->
+                <?php
+                $medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Medications:</div>
+                @if(count($medications))
+                <ul>
+                    @foreach($medications as $medication)
+                    <li style="font-size: 16px;">{{ $medication->data_name }}</li>
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known medications</div>
+                @endif
+
+                <!-- Problems -->
+                <?php
+                $problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Problems:</div>
+                @if(count($problems))
+                <ul>
+                    @foreach($problems as $problem)
+                    <li style="font-size: 16px;">{{ $problem->data_name }}</li>
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known problems</div>
+                @endif
+
+                <!-- Goals -->
+                <?php
+                $goals = \App\Models\Point::getPointsOfCategory($patient, "GOAL");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Goals:</div>
+                @if(count($goals))
+                <ul>
+                    @foreach($goals as $goal)
+                    <li style="font-size: 16px;">{{ $goal->data_name }}</li>
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known goals</div>
+                @endif
+
+            </div>
+        </div>
+        <div style="padding:10px;width:70%;vertical-align: top;height:auto;">
+            <div>
+                @foreach($printSegments as $segment)
+                @include('app.patient.note.segment-print')
+                @endforeach
+            </div>
+        </div>
+    </div>
+    <!-- -- -->
+</div>
+<script>
+    $(document).ready(function() {
+        $('.note-segments-print-list table.point-table').each(function() {
+            if (!$(this).find('tbody>tr').length) {
+                $(this).closest('.visit-segment').remove();
+            }
+            if ($(this).closest('.note_template_soap_visit').length) {
+                if (['nutrition', 'exercise', 'behavior'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) === -1) {
+                    convertPointTableToSimpleParas($(this));
+                } else {
+                    convertNEBTables($(this));
+                }
+            }
+        });
+        $('.note-segments-print-list table.table-cage').each(function() {
+            if ($(this).closest('.note_template_omega_soap_visit').length) {
+                if (['omega_allergies', 'omega_medications', 'omega_goals', 'omega_care_team', 'omega_subjective_system'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) !== -1) {
+                    convertCageTableToSimpleParas($(this), 'Subjective');
+                } else if (['omega_plan_system'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) !== -1) {
+                    convertCageTableToSimpleParas($(this), 'Plan');
+                }
+            }
+        });
+        if (isEmpty($('[data-segment-template-name="nutrition"] .summary-container'))) $('[data-segment-template-name="nutrition"]').remove();
+        if (isEmpty($('[data-segment-template-name="exercise"] .summary-container'))) $('[data-segment-template-name="exercise"]').remove();
+        if (isEmpty($('[data-segment-template-name="behavior"] .summary-container'))) $('[data-segment-template-name="behavior"]').remove();
+
+        function isEmpty(_el) {
+            return $.trim(_el.text().replaceAll('-', '')) === '';
+        }
+
+        function convertPointTableToSimpleParas(_table) {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if ($(this).find('>td').length > 1) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(1)').html()).appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">Subjective:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>').appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">Plan:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(3)').html() + '</div>').appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+
+        function convertCageTableToSimpleParas(_table, _label = 'Subjective') {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if ($(this).find('>td').length > 1) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(1)').html()).appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">' + _label + ':</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>').appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.grow-till-300px').removeClass('grow-till-300px');
+                    // newD.find('.text-sm.text-info').remove();
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+
+        function convertNEBTables(_table) {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if (!isEmpty($(this).find('td:eq(1)')) || !isEmpty($(this).find('td:eq(2)'))) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(0)').html())
+                        .append($('<p class="remove-if-empty-parent"/>').append('<b class="text-secondary">Current:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(1)').html() + '</div>'))
+                        .append($('<p class="remove-if-empty-parent"/>').append('<b class="text-secondary">Plan:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>'))
+                        .appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+    });
+</script>

+ 230 - 0
resources/views/app/patient/note/note-segment-list-print-v3.blade copy.php

@@ -0,0 +1,230 @@
+<div class="segments-list note-segments-print-list {{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }}" id="note-segments-list">
+    <?php
+    $previousHeading = null;
+    $previousSubHeading = null;
+    $segments = $note->segments->filter(function ($_x) {
+        $ok = !!$_x->is_active && $_x->segmentTemplate->internal_name !== 'medrisk_vigilence' && strpos($_x->segmentTemplate->internal_name, 'lifestyle_') !== 0;
+        if ($ok) {
+            $content = $_x->summary_html;
+            if ($_x->accepted_suggestion_summary_html) {
+                $content = $_x->accepted_suggestion_summary_html;
+            }
+            $trimmed = trim(strip_tags($content));
+            $ok = ($trimmed !== '' && $trimmed !== '-');
+        }
+        return $ok;
+    });
+    $printSegments = [];
+    foreach ($segments as $segment) {
+        if ($segment->left_or_right !== 'RIGHT') {
+            $printSegments[] = $segment;
+        }
+    }
+    foreach ($segments as $segment) {
+        if ($segment->left_or_right === 'RIGHT') {
+            $printSegments[] = $segment;
+        }
+    }
+    ?>
+    <!-- -- -->
+    <div style="font-family: Arial, Helvetica, sans-serif;display: flex;width:100%;border-top:1px solid #333333;border-bottom:1px solid #333333;">
+        <div style="border-right:1px solid #333333;padding:10px;width:30%;vertical-align: top;height:auto;">
+            <div style="">
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Race: </span>{{ $patient->race ?? 'No race saved for patient' }}</div>
+                <?php
+                $canvasData = json_decode($patient->canvas_data);
+                ?>
+                @if($canvasData && @$canvasData->INTAKE_DATA)
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Ethnicity: </span>{{ $canvasData->INTAKE_DATA->ethnicity ?? 'No ethnicity for patient saved' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Height: </span>{{ $canvasData->INTAKE_DATA->height ?? 'No height for patient saved' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Weight: </span>{{ $canvasData->INTAKE_DATA->weight ?? 'No weight for patient saved' }}</div>
+                @endif
+
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Preferred Language: </span>{{ $patient->preferred_language ?? 'No preferred language saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Preferred Foreign Language: </span>{{ $patient->preferred_foreign_language ?? 'No preferred foreign language saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Other Languages: </span>{{ $patient->other_languages ?? 'No other languages saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Sticky Note: </span>{{ $patient->sticky_note ?? 'No sticky note saved for patient' }}</div>
+
+                <!-- Allergies -->
+                <?php
+                $allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Alergies:</div>
+                @if(count($allergies))
+                <ul>
+                    @foreach($allergies as $allergy)
+                    <li style="font-size: 16px;">{{ $allergy->data_name }}</li>
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known allergies</div>
+                @endif
+
+                <!-- Medications -->
+                <?php
+                $medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Medications:</div>
+                @if(count($medications))
+                <ul>
+                    @foreach($medications as $medication)
+                    <li style="font-size: 16px;">{{ $medication->data_name }}</li>
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known medications</div>
+                @endif
+
+                <!-- Problems -->
+                <?php
+                $problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Problems:</div>
+                @if(count($problems))
+                <ul>
+                    @foreach($problems as $problem)
+                    <li style="font-size: 16px;">{{ $problem->data_name }}</li>
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known problems</div>
+                @endif
+
+                <!-- Goals -->
+                <?php
+                $goals = \App\Models\Point::getPointsOfCategory($patient, "GOAL");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Goals:</div>
+                @if(count($goals))
+                <ul>
+                    @foreach($goals as $goal)
+                    <li style="font-size: 16px;">{{ $goal->data_name }}</li>
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known goals</div>
+                @endif
+
+            </div>
+        </div>
+        <div style="padding:10px;width:70%;vertical-align: top;height:auto;">
+            <div>
+                @foreach($printSegments as $segment)
+                    <div>
+                        <div class="py-2 px-2 border-bottom font-size-16 font-weight-bold bg-light text-dark mt-4 border-top">{{$segment->heading}}</div>
+                        <div class="pl-3">
+                            @include('app.patient.note.segment-print-v3')
+                        </div>
+                    </div>                
+                @endforeach
+            </div>
+        </div>
+    </div>
+    <!-- -- -->
+</div>
+<script>
+    $(document).ready(function() {
+        $('.note-segments-print-list table.point-table').each(function() {
+            if (!$(this).find('tbody>tr').length) {
+                $(this).closest('.visit-segment').remove();
+            }
+            if ($(this).closest('.note_template_soap_visit').length) {
+                if (['nutrition', 'exercise', 'behavior'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) === -1) {
+                    convertPointTableToSimpleParas($(this));
+                } else {
+                    convertNEBTables($(this));
+                }
+            }
+        });
+        $('.note-segments-print-list table.table-cage').each(function() {
+            if ($(this).closest('.note_template_omega_soap_visit').length) {
+                if (['omega_allergies', 'omega_medications', 'omega_goals', 'omega_care_team', 'omega_subjective_system'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) !== -1) {
+                    convertCageTableToSimpleParas($(this), 'Subjective');
+                } else if (['omega_plan_system'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) !== -1) {
+                    convertCageTableToSimpleParas($(this), 'Plan');
+                }
+            }
+        });
+        if (isEmpty($('[data-segment-template-name="nutrition"] .summary-container'))) $('[data-segment-template-name="nutrition"]').remove();
+        if (isEmpty($('[data-segment-template-name="exercise"] .summary-container'))) $('[data-segment-template-name="exercise"]').remove();
+        if (isEmpty($('[data-segment-template-name="behavior"] .summary-container'))) $('[data-segment-template-name="behavior"]').remove();
+
+        function isEmpty(_el) {
+            return $.trim(_el.text().replaceAll('-', '')) === '';
+        }
+
+        function convertPointTableToSimpleParas(_table) {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if ($(this).find('>td').length > 1) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(1)').html()).appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">Subjective:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>').appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">Plan:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(3)').html() + '</div>').appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+
+        function convertCageTableToSimpleParas(_table, _label = 'Subjective') {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if ($(this).find('>td').length > 1) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(1)').html()).appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">' + _label + ':</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>').appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.grow-till-300px').removeClass('grow-till-300px');
+                    // newD.find('.text-sm.text-info').remove();
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+
+        function convertNEBTables(_table) {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if (!isEmpty($(this).find('td:eq(1)')) || !isEmpty($(this).find('td:eq(2)'))) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(0)').html())
+                        .append($('<p class="remove-if-empty-parent"/>').append('<b class="text-secondary">Current:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(1)').html() + '</div>'))
+                        .append($('<p class="remove-if-empty-parent"/>').append('<b class="text-secondary">Plan:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>'))
+                        .appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+    });
+</script>

+ 260 - 0
resources/views/app/patient/note/note-segment-list-print-v3.blade.php

@@ -0,0 +1,260 @@
+<div class="segments-list note-segments-print-list {{ $note->is_signed_by_hcp ? 'note-signed-by-hcp' : '' }}" id="note-segments-list">
+    <?php
+    $previousHeading = null;
+    $previousSubHeading = null;
+    $segments = $note->segments->filter(function ($_x) {
+        $ok = !!$_x->is_active && $_x->segmentTemplate->internal_name !== 'medrisk_vigilence' && strpos($_x->segmentTemplate->internal_name, 'lifestyle_') !== 0;
+        if ($ok) {
+            $content = $_x->summary_html;
+            if ($_x->accepted_suggestion_summary_html) {
+                $content = $_x->accepted_suggestion_summary_html;
+            }
+            $trimmed = trim(strip_tags($content));
+            $ok = ($trimmed !== '' && $trimmed !== '-');
+        }
+        return $ok;
+    });
+    $printSegments = [];
+    foreach ($segments as $segment) {
+        if ($segment->left_or_right !== 'RIGHT') {
+            $printSegments[] = $segment;
+        }
+    }
+    foreach ($segments as $segment) {
+        if ($segment->left_or_right === 'RIGHT') {
+            $printSegments[] = $segment;
+        }
+    }
+    ?>
+    <!-- -- -->
+    <div style="font-family: Arial, Helvetica, sans-serif;display: flex;width:100%;border-top:1px solid #333333;border-bottom:1px solid #333333;">
+        <div style="border-right:1px solid #333333;padding:10px;width:30%;vertical-align: top;height:auto;">
+            <div style="">
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Race: </span>{{ $patient->race ?? 'No race saved for patient' }}</div>
+                <?php
+                $canvasData = json_decode($patient->canvas_data);
+                ?>
+                @if($canvasData && @$canvasData->INTAKE_DATA)
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Ethnicity: </span>{{ $canvasData->INTAKE_DATA->ethnicity ?? 'No ethnicity for patient saved' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Height: </span>{{ $canvasData->INTAKE_DATA->height ?? 'No height for patient saved' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Weight: </span>{{ $canvasData->INTAKE_DATA->weight ?? 'No weight for patient saved' }}</div>
+                @endif
+
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Preferred Language: </span>{{ $patient->preferred_language ?? 'No preferred language saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Preferred Foreign Language: </span>{{ $patient->preferred_foreign_language ?? 'No preferred foreign language saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Other Languages: </span>{{ $patient->other_languages ?? 'No other languages saved for patient' }}</div>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Sticky Note: </span>{{ $patient->sticky_note ?? 'No sticky note saved for patient' }}</div>
+
+                <!-- Allergies -->
+                <?php
+                $allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Alergies:</div>
+                @if(count($allergies))
+                <ul>
+                    @foreach($allergies as $allergy)
+                        @if(@$allergy->data_name)
+                            <li style="font-size: 16px;margin-bottom:5px;">{{ $allergy->data_name }}</li>
+                        @else
+                            <?php
+                                $allergyData = @$allergy->data;
+                            ?>
+                            @if($allergyData)
+                                <li style="font-size: 16px;margin-bottom:5px;">{{ @$allergyData->name }}</li>
+                            @endif
+                        @endif
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known allergies</div>
+                @endif
+
+                <!-- Medications -->
+                <?php
+                $medications = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Medications:</div>
+                @if(count($medications))
+                <ul>
+                    @foreach($medications as $medication)
+                        @if(@$medication->data_name)
+                            <li style="font-size: 16px;margin-bottom:5px;">{{ $medication->data_name }}</li>
+                        @else
+                            <?php
+                                $medicationData = @$medication->data;
+                            ?>
+                            @if($medicationData)
+                                <li style="font-size: 16px;margin-bottom:5px;">{{ @$medicationData->name }}</li>
+                            @endif
+                        @endif
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known medications</div>
+                @endif
+
+                <!-- Problems -->
+                <?php
+                $problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Problems:</div>
+                @if(count($problems))
+                <ul>
+                    @foreach($problems as $problem)
+                        @if(@$problem->data_name)
+                            <li style="font-size: 16px;margin-bottom:5px;">{{ $problem->data_name }}</li>
+                        @else
+                            <?php
+                                $problemData = @$problem->data;
+                            ?>
+                            @if($problemData)
+                                <li style="font-size: 16px;margin-bottom:5px;">{{ @$problemData->name }}</li>
+                            @endif
+                        @endif
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known problems</div>
+                @endif
+
+                <!-- Goals -->
+                <?php
+                $goals = \App\Models\Point::getPointsOfCategory($patient, "GOAL");
+                ?>
+                <div style="font-size:16px;margin-bottom:10px;"><span style="font-weight: bold;font-size:16px;">Goals:</div>
+                @if(count($goals))
+                <ul>
+                    @foreach($goals as $goal)
+                        @if(@$goal->data_name)
+                            <li style="font-size: 16px;margin-bottom:5px;">{{ $goal->data_name }}</li>
+                        @else
+                            <?php
+                                $goalData = @$goal->data;
+                            ?>
+                            @if($goalData)
+                                <li style="font-size: 16px;margin-bottom:5px;">{{ @$goalData->goal }}</li>
+                            @endif
+                        @endif
+                    @endforeach
+                </ul>
+                @else
+                <div style="font-size: 16px;">Patient has no known goals</div>
+                @endif
+
+            </div>
+        </div>
+        <div style="padding: 1px 0;width:70%;vertical-align: top;height:auto;">
+            <div>
+                @include("app.patient.note.print.partials.print-sements")
+                
+            </div>
+        </div>
+    </div>
+    <!-- -- -->
+</div>
+<script>
+    $(document).ready(function() {
+        $('.note-segments-print-list table.point-table').each(function() {
+            if (!$(this).find('tbody>tr').length) {
+                $(this).closest('.visit-segment').remove();
+            }
+            if ($(this).closest('.note_template_soap_visit').length) {
+                if (['nutrition', 'exercise', 'behavior'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) === -1) {
+                    convertPointTableToSimpleParas($(this));
+                } else {
+                    convertNEBTables($(this));
+                }
+            }
+        });
+        $('.note-segments-print-list table.table-cage').each(function() {
+            if ($(this).closest('.note_template_omega_soap_visit').length) {
+                if (['omega_allergies', 'omega_medications', 'omega_goals', 'omega_care_team', 'omega_subjective_system'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) !== -1) {
+                    convertCageTableToSimpleParas($(this), 'Subjective');
+                } else if (['omega_plan_system'].indexOf($(this).closest('.visit-segment').attr('data-segment-template-name')) !== -1) {
+                    convertCageTableToSimpleParas($(this), 'Plan');
+                }
+            }
+        });
+        if (isEmpty($('[data-segment-template-name="nutrition"] .summary-container'))) $('[data-segment-template-name="nutrition"]').remove();
+        if (isEmpty($('[data-segment-template-name="exercise"] .summary-container'))) $('[data-segment-template-name="exercise"]').remove();
+        if (isEmpty($('[data-segment-template-name="behavior"] .summary-container'))) $('[data-segment-template-name="behavior"]').remove();
+
+        function isEmpty(_el) {
+            return $.trim(_el.text().replaceAll('-', '')) === '';
+        }
+
+        function convertPointTableToSimpleParas(_table) {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if ($(this).find('>td').length > 1) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(1)').html()).appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">Subjective:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>').appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">Plan:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(3)').html() + '</div>').appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+
+        function convertCageTableToSimpleParas(_table, _label = 'Subjective') {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if ($(this).find('>td').length > 1) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(1)').html()).appendTo(newD);
+                    $('<p class="pl-3 remove-if-empty-parent"/>').append('<b class="text-secondary">' + _label + ':</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>').appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.grow-till-300px').removeClass('grow-till-300px');
+                    // newD.find('.text-sm.text-info').remove();
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+
+        function convertNEBTables(_table) {
+            let parent = _table.parent();
+            parent.find('[if-edit-mode]').remove();
+            $(_table).find('tbody>tr').each(function() {
+                if (!isEmpty($(this).find('td:eq(1)')) || !isEmpty($(this).find('td:eq(2)'))) {
+                    let newD = $('<div class="mb-2"/>');
+                    $('<p class=""/>').html($(this).find('td:eq(0)').html())
+                        .append($('<p class="remove-if-empty-parent"/>').append('<b class="text-secondary">Current:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(1)').html() + '</div>'))
+                        .append($('<p class="remove-if-empty-parent"/>').append('<b class="text-secondary">Plan:</b>').append('<div class="d-inline-block pl-2 remove-if-empty">' + $(this).find('td:eq(2)').html() + '</div>'))
+                        .appendTo(newD);
+                    newD.appendTo(parent)
+                    newD.find('.text-sm.text-secondary, [if-edit-mode], i.fa').remove();
+                    newD.find('[if-read-mode]').show().addClass('d-inline-block');
+                    newD.find('.bg-warning-mellow.p-2.rounded').removeClass('bg-warning-mellow p-2 rounded');
+                    newD.find('.inline-html-container+.text-sm').remove();
+                    newD.find('.remove-if-empty').each(function() {
+                        if (isEmpty($(this))) {
+                            $(this).closest('.remove-if-empty-parent').remove();
+                        }
+                    });
+                }
+            });
+            $(_table).remove();
+        }
+    });
+</script>

+ 40 - 0
resources/views/app/patient/note/print/partials/print-sements.blade.php

@@ -0,0 +1,40 @@
+<?php  
+    $suggestionModeOn = false; 
+?> 
+<div class="segments-list" id="note-segments-list">
+    <?php
+    $previousHeading = null;
+    $previousSubHeading = null;
+    ?>
+    @foreach($note->segmentsLeft as $segment)
+        <?php
+        if ($segment->heading !== $previousHeading) {
+            if (!empty($previousHeading)) {
+                echo '</div></div>'; // <!-- end the previous parent section -->
+            }
+            if (!empty($segment->heading)) {
+
+	    ?>
+        <div class="note-content-node note-content-heading">
+            <div class="py-2 px-2 border-bottom font-size-16 font-weight-bold bg-light text-dark {{ $previousHeading ? 'mt-4 border-top' : '' }}">
+                {{ $segment->heading }}
+            </div>
+            <div class="note-content-children ml-5 border-left">
+                <!-- open new node -->
+            <?php
+            }
+                $previousHeading = $segment->heading;
+            }
+            ?>
+            <div class="{{$segment->segmentTemplate->internal_name === 'medrisk_vigilence' ? 'd-none' : ''}}">
+                @include('app.patient.note.print.partials.segment-slim')
+            </div>
+           
+    @endforeach
+    <?php
+    if (!empty($previousHeading)) {
+        echo '</div></div>'; // <!-- close any open parent section -->
+    }
+    ?>
+</div>
+

+ 57 - 0
resources/views/app/patient/note/print/partials/segment-slim.blade.php

@@ -0,0 +1,57 @@
+<?php
+$iName = $segment->segmentTemplate->internal_name;
+
+// if omega system segment - no only read mode
+$isOmegaSystemSegment = (strpos($iName, 'omega_') === 0 && substr($iName, -7) === '_system') && $iName !== 'omega_objective_system';
+$isOmegaHistorySegment = strpos($iName, 'omega_history_') === 0;
+?>
+
+<div class="border-bottom note-section visit-segment {{$isOmegaSystemSegment || $note->is_signed_by_hcp ? '' : 'edit-trigger'}}"
+     data-segment-uid="{{ $segment->uid }}"
+     data-segment-template-uid="{{ $segment->segmentTemplate->uid }}"
+     data-segment-template-name="{{ $segment->segmentTemplate->internal_name }}">
+
+    <div class="d-flex align-items-start bg-light text-dark {{$segment->heading ? 'p-1' : 'py-1 pr-1'}}">
+
+    <!-- title -->
+
+            <?php
+            $extraClass = $segment->heading ? 'min-width-110px max-width-110px' : 'min-width-140px pl-2';
+            ?>
+
+            @if(!!$segment->display_title)
+            <div class="text-dark font-weight-bold font-size-13 mr-2 {{$extraClass}} {{!$segment->is_active ? 'opacity-35' : ''}}">
+                @if($segment->display_title == 'Free Text')
+
+                @else
+                    {{$segment->display_title}}:
+                @endif
+            </div>
+            @endif
+
+            <div class="flex-grow-1">
+                @if($segment->is_active)
+                    <div class="d-none if-not-edit inset-comment summary-container">
+                        @if($note->is_signed_by_hcp && $segment->accepted_suggestion_summary_html)
+                            {!! $segment->accepted_suggestion_summary_html !!}
+                        @else
+                            {!! $segment->summary_html !!}
+                        @endif
+                    </div>
+
+                    <?php if($iName !== 'ros' && $iName !== 'omega_ros' && !$isOmegaHistorySegment) { ?>
+                    <div class="d-none if-edit edit-container">
+                        {!! $segment->edit_html !!}
+                    </div>
+                    <?php } ?>
+                @else
+                    <span class="text-warning-dark">Deactivated</span>
+                @endif
+            </div>
+
+    </div>
+
+
+
+
+</div>

+ 24 - 0
resources/views/app/patient/note/print/print-v2.blade.php

@@ -0,0 +1,24 @@
+<?php
+/** @var App\Models\Note $note */
+/** @var App\Models\Pro $pro */
+/** @var App\Models\Section $section */
+/** @var $allSections */
+?>
+@extends ('layouts.print-note-v2')
+
+@section('content')
+
+    <div class="note-print print-width">
+
+        <div class="card mb-0 {{ $note->is_cancelled ? 'cancelled-item' : '' }} border-0 rounded-0">
+
+            <div class="card-body p-0">
+                <div class="note_template_{{$note->visitTemplate ? $note->visitTemplate->internal_name : ''}}">
+                    @include('app.patient.note.note-segment-list-print-v2')
+                </div>
+            </div>
+        </div>
+
+    </div>
+
+@endsection

+ 24 - 0
resources/views/app/patient/note/print/print-v3.blade.php

@@ -0,0 +1,24 @@
+<?php
+/** @var App\Models\Note $note */
+/** @var App\Models\Pro $pro */
+/** @var App\Models\Section $section */
+/** @var $allSections */
+?>
+@extends ('layouts.print-note-v3')
+
+@section('content')
+
+    <div class="note-print print-width">
+
+        <div class="card mb-0 {{ $note->is_cancelled ? 'cancelled-item' : '' }} border-0 rounded-0">
+
+            <div class="card-body p-0">
+                <div class="note_template_{{$note->visitTemplate ? $note->visitTemplate->internal_name : ''}}">
+                    @include('app.patient.note.note-segment-list-print-v3')
+                </div>
+            </div>
+        </div>
+
+    </div>
+
+@endsection

+ 26 - 0
resources/views/app/patient/note/segment-print-v3.blade.php

@@ -0,0 +1,26 @@
+<?php $iName = $segment->segmentTemplate->internal_name; ?>
+<?php $isLSSegment = strpos($iName, 'lifestyle_') === 0; ?>
+<div class="note-section visit-segment mb-3 {{strpos($iName, 'lifestyle_') === 0 && $iName !== 'lifestyle_general' ? 'zero-height' : ''}}"
+     data-segment-uid="{{ $segment->uid }}"
+     data-segment-template-uid="{{ $segment->segmentTemplate->uid }}"
+     data-segment-template-name="{{ $segment->segmentTemplate->internal_name }}">
+
+    <div class="d-flex align-items-baseline">
+        <span class="font-weight-bold d-flex align-items-center {{$isLSSegment || $iName === 'medrisk_vigilence' ? '' : 'xxxmb-2'}}" style="">
+            {{$segment->display_title}}
+        </span>
+    </div>
+
+    <?php if(!$isLSSegment): ?>
+
+    <div class="inset-comment summary-container {{$iName === 'medrisk_vigilence' ? 'px-0' : 'p-2 pl-4'}}">
+        @if($note->is_signed_by_hcp && $segment->accepted_suggestion_summary_html)
+            {!! $segment->accepted_suggestion_summary_html !!}
+        @else
+            {!! $segment->summary_html !!}
+        @endif
+    </div>
+
+    <?php endif ?>
+
+</div>

文件差異過大導致無法顯示
+ 201 - 0
resources/views/layouts/print-note-v2.blade.php


文件差異過大導致無法顯示
+ 201 - 0
resources/views/layouts/print-note-v3.blade.php


+ 2 - 0
routes/web.php

@@ -799,6 +799,8 @@ Route::middleware('pro.auth')->group(function () {
     Route::get('/search-facility/json', 'HomeController@facilitySuggestJSON')->name('facilitySuggestJSON');
 
     Route::get('print-note/{patient}/{note}', 'NoteController@print')->name('print-note');
+    Route::get('print-note-v2/{patient}/{note}', 'NoteController@printV2')->name('print-note-v2');
+    Route::get('print-note-v3/{patient}/{note}', 'NoteController@printV3')->name('print-note-v3');
     Route::get('resolve-note/{patient}/{note}', 'NoteController@resolve')->name('resolve-note');
 
 });

部分文件因文件數量過多而無法顯示