소스 검색

Note print feature

Vijayakrishnan 4 년 전
부모
커밋
b4678a952e

+ 17 - 0
public/css/style.css

@@ -1708,4 +1708,21 @@ form.non-interactive .form-content * {
 }
 .training-event .patient-avatar {
     border-color: #0d59af7d !important;
+}
+
+
+/* print-note */
+@media print {
+    .stag-content #sidebarMenu {
+        display: none !important;
+    }
+    .stag-content .main-row {
+        padding-left: 0 !important;
+    }
+    .stag-content [moe] {
+        display: none !important;
+    }
+    .stag-content .screen-only {
+        display: none !important;
+    }
 }

+ 13 - 8
resources/views/app/patient/note/dashboard.blade.php

@@ -36,15 +36,18 @@
     @endif
     --}}
 
-    <div id="note-single-header" class="pt-2 pb-3 d-flex align-items-start">
-        <h6 class="my-0 text-secondary d-flex align-items-start w-100">
+    <div id="note-single-header" class="pt-2 pb-3 d-flex align-items-start screen-only">
+        <h6 class="my-0 text-secondary d-flex align-items-center w-100">
             <a href="/patients/view/{{ $patient->uid }}/notes" class="small text-decoration-none mr-3">
                 <i class="fa fa-chevron-left"></i>
             </a>
-            <div class="mr-auto">
+            <div class="mr-auto d-inline-flex align-items-center">
                 <span class="text-dark font-weight-bold">Note
                     <span class="text-secondary font-weight-normal">{{ $note->is_cancelled ? '(CANCELLED)' : '' }}</span>
                 </span>
+                @if($pro->pro_type === 'ADMIN')
+                    <a href="#" class="print-note ml-3 btn btn-sm btn-primary text-white font-weight-bold invisible"><i class="fa fa-print"></i> Print</a>
+                @endif
             </div>
             @if($patient->has_mcp_done_onboarding_visit !== 'YES')
                 <div class="ml-auto">
@@ -922,7 +925,7 @@
                 @endif
 
                 @if($note->method === 'IN_CLINIC' || $pro->pro_type === 'ADMIN')
-                <div class="p-3 border-bottom">
+                <div class="p-3 border-bottom screen-only">
                     <div class="ml-auto d-inline-flex align-items-center">
 
                         <span class="text-secondary font-weight-bold">Pro:&nbsp;</span>
@@ -1555,7 +1558,7 @@
                 {{-- claims --}}
                 @if($pro->pro_type === 'ADMIN')
                 @if($note->claims->count())
-                    <div class="p-3">
+                    <div class="screen-only p-3">
                         <div class="d-flex align-items-center mb-2">
                             <p class="font-weight-bold text-secondary m-0">Claims</p>
                             @include('app/patient/note/_create-claim')
@@ -1916,7 +1919,7 @@
                         </table>
                     </div>
                 @else
-                    <div class="my-3 px-3 d-flex">
+                    <div class="screen-only my-3 px-3 d-flex">
                         <p class="font-weight-bold mb-0 text-secondary">No claims in this note</p>
                         @include('app/patient/note/_create-claim')
                     </div>
@@ -1924,7 +1927,7 @@
                 @endif
 
 
-                <div class="border-top p-3">
+                <div class="border-top p-3 screen-only">
                     @if($note->addendums->count())
                         <div class="">
                             <div class="d-flex align-items-center mb-2">
@@ -1986,7 +1989,9 @@
                     @endif
                 </div>
 
-                @include('app/patient/note/_cancel-signed-note')
+                <div class="screen-only">
+                    @include('app/patient/note/_cancel-signed-note')
+                </div>
 
 
             </div>

+ 9 - 0
resources/views/app/patient/note/dashboard_script.blade.php

@@ -5,6 +5,15 @@
 
             function init() {
 
+                // print note
+                $(document)
+                    .off('click.print', '.print-note')
+                    .on('click.print', '.print-note', () => {
+                        window.print();
+                        return false;
+                    });
+                $('.print-note').removeClass('invisible');
+
                 $('.note-method-select').change(function() {
                     let form = $(this).closest('form');
                     if(this.value === 'IN_CLINIC') {

+ 8 - 6
resources/views/layouts/patient.blade.php

@@ -279,7 +279,7 @@
                                     </div>
                                 @endif
                                 <div class=hbox>
-                                    <div class="mr-1 patient-presence-indicator thumbnail {{$online}}"
+                                    <div class="screen-only mr-1 patient-presence-indicator thumbnail {{$online}}"
                                          data-patient-uid="{{$patient->uid}}"
                                          style="background-image:<?=$thumbnail?>"><?=$initials?></div>
                                     {{--<div>
@@ -395,6 +395,7 @@
                                                 @endif
                                             </div>
                                         </div>
+                                        <div class="screen-only">
                                         <div class=separators>
                                             <div>Joined <?=$memberSince?></div>
                                             <div><label>MCP:</label> {{$mcpName}}
@@ -609,6 +610,7 @@
                                                 @endif
                                             @endif
                                         </div>
+                                        </div>
                                     </section>
                                     {{--<section>
                                         <div>
@@ -666,7 +668,7 @@
                                             <label class="ml-2">RM:</label> {{ $patient->is_enrolled_in_rm === 'YES' ? 'Yes' : 'No' }}
                                         </div>
                                     </section>--}}
-                                    <section class="vbox mt-2 align-self-start ml-4">
+                                    <section class="screen-only vbox mt-2 align-self-start ml-4">
                                         <div moe>
                                             <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;Note
                                             </button>
@@ -769,7 +771,7 @@
                                         </span>
                                         </div>
                                     </section>
-                                    <section class="vbox mt-2 align-self-start ml-1">
+                                    <section class="screen-only vbox mt-2 align-self-start ml-1">
                                         @if($performer->pro->pro_type == 'ADMIN')
                                         <div>
                                             <button class="col-2-button" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')">Check Video</button>
@@ -903,11 +905,11 @@
                                                 {{$patient->phone_home}}
                                             </li>
                                         @endif
-                                        <li>
+                                        <li class="{{empty($confirmedEmail) || $confirmedEmail === '-' ? 'screen-only' : ''}}">
                                             <span class="aligned-icon"><i class="fa fa-envelope" aria-hidden="true"></i></span>
                                             {{$confirmedEmail}}
                                         </li>
-                                        <li>
+                                        <li class="screen-only">
                                             <span class="aligned-icon text-primary">
                                                 <i class="fa fa-link" aria-hidden="true"></i>
                                             </span>
@@ -923,7 +925,7 @@
                         </div> <!-- z -->
                     </div>
                     @if($pro->pro_type === 'ADMIN')
-                        <div class="card-header py-2 d-flex align-items-center mcp-theme-1 bg-aliceblue">
+                        <div class="screen-only card-header py-2 d-flex align-items-center mcp-theme-1 bg-aliceblue">
                             <b class="">Tags ({{count($patient->clientTags)}}):</b>
                             @foreach($patient->clientTags as $tag)
                                 <div class="d-inline-flex align-items-center ml-2 py-1 px-2 rounded bg-aliceblue text-info">