print-note-v2.blade.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <!doctype html>
  2. <html lang="en" note-uid="{{$note->uid}}" >
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport"
  6. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <meta charset="utf-8">
  9. <meta name="viewport" content="width=device-width, initial-scale=1">
  10. <title>{{ config('app.name') }}</title>
  11. <!-- Fonts -->
  12. <link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
  13. <!-- <link href="{{ asset('bootstrap-4.5.0/css/bootstrap.css') }}" rel="stylesheet"> -->
  14. <link rel="stylesheet" href="/fontawesome-free-5.13.1-web/css/all.min.css">
  15. <link href="{{ asset('/css/app.css') }}?v={{config('app.asset_version')}}" rel="stylesheet">
  16. <link href="{{ asset('/css/style.css') }}?v={{config('app.asset_version')}}" rel="stylesheet">
  17. <link href="{{ asset('/css/yemi.css') }}?v={{config('app.asset_version')}}" rel="stylesheet">
  18. <link rel="stylesheet" href="{{ asset('/css/toastr.min.css') }}">
  19. <link href="{{asset('/css/z.css')}}?v={{config('app.asset_version')}}" rel=stylesheet>
  20. <!-- Styles -->
  21. {{-- inline bootstrap datepicker --}}
  22. {{-- <link href='/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css' rel="stylesheet">
  23. <script src='/bootstrap-datepicker/js/bootstrap-datepicker.min.js'></script>--}}
  24. <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  25. <script src="/js/jquery-3.5.1.min.js"></script>
  26. <style>
  27. html {
  28. -webkit-print-color-adjust: exact;
  29. height: auto;
  30. }
  31. /** Define the margins of your page **/
  32. @page {
  33. size: letter portrait;
  34. }
  35. @page {
  36. margin: 1cm;
  37. padding: 100px;
  38. @bottom-right {
  39. content: "My book" !important;
  40. font-size: 9pt;
  41. color: #333;
  42. }
  43. }
  44. footer {
  45. bottom: 0;
  46. left: 0;
  47. width: 100%;
  48. display: table-footer-group;
  49. }
  50. .page-number:before {
  51. content: counter(pages);
  52. }
  53. @media print
  54. {
  55. .no-print, .no-print *
  56. {
  57. display: none !important;
  58. }
  59. div {
  60. line-height: 1em;
  61. }
  62. }
  63. </style>
  64. </head>
  65. <body>
  66. <!--<footer>
  67. <table style="border: 0; width: 100%; font-size: 12px" border="0">
  68. <tr>
  69. <td style="vertical-align: top; width: 50%; text-align: left">
  70. Printed on: {{friendly_date_time(date('Y-m-d H:i:s'))}}
  71. <br>
  72. Note created using: Endochart
  73. </td>
  74. <td style="vertical-align: top; width: 50%; text-align: right">
  75. <div class="page-number"></div>
  76. </td>
  77. </tr>
  78. </table>
  79. </footer>-->
  80. <div style="margin: 0; padding: 1rem; font-family: serif" contenteditable="true">
  81. <!-- header/smg info -->
  82. <div style="text-align: center; margin-bottom: 1.5rem; font-family: sans-serif">
  83. <div style="margin-bottom: 3px; font-weight:bold; font-size: 43px;line-height:40px;">Scholar Medical Group</div>
  84. @if($patient->mcp)
  85. <div style="margin-bottom: 3px; font-size: 16px;font-weight:bold;">{{ $patient->mcp->displayName() }}</div>
  86. @endif
  87. <div style="margin-bottom: 3px; font-size: 16px;font-weight:bold;">133 Rollins Ave, Suite 3 Rockville, MD 20852</div>
  88. <div style="margin-bottom: 3px; font-size: 16px;font-weight:bold;">
  89. <div style="width:auto;margin-right:10px; display:inline-block">Phone: 202-935-1033</div>
  90. <div style="width:auto;margin-right:10px; display:inline-block">NPI#: 1639796428</div>
  91. </div>
  92. </div>
  93. <div style="margin-bottom: 0; font-family: sans-serif">
  94. <div>
  95. <div style="display:inline-block; margin-bottom: 3px; font-size: 18px;font-weight:bold;">{{ $patient->displayName() }}</div>
  96. <div style="display:inline-block;font-size:16px;">DOB: {{friendly_date_time($patient->dob, false,null,true)}}</div>
  97. <div style="display: inline-block;font-size:16px;margin-left:7px;">{{$patient->age_in_years}} year old,</div>
  98. <div style="display: inline-block;font-size:16px;margin-left:0px;">{{$patient->sex}}</div>
  99. </div>
  100. <div style="display: inline-block;font-size:16px;margin-bottom:3px;">{{@$patient->mailing_address_line1 ? $patient->mailing_address_line1 : ''}}</div>
  101. <div style="font-size:16px;margin-bottom:3px;">
  102. {{@$patient->mailing_address_city ? $patient->mailing_address_city : ''}}
  103. {{@$patient->mailing_address_state ? $patient->mailing_address_state : ''}}
  104. {{@$patient->mailing_address_zip ? $patient->mailing_address_zip : ''}}
  105. </div>
  106. <div style="font-size:16px;margin-bottom:3px;">
  107. @if($patient->phone_home)
  108. <div style="display: inline-block;margin-right:10px;font-size:16px;">Home Phone: {{$patient->phone_home}}</div>
  109. @endif
  110. @if($patient->cell_number)
  111. <div style="display: inline-block;margin-right:10px;font-size:16px;">Cell Phone: {{$patient->cell_number}}</div>
  112. @endif
  113. @if($patient->email_address)
  114. <div style="display: inline-block;margin-right:10px;font-size:16px;">Email: {{$patient->email_address}}</div>
  115. @endif
  116. </div>
  117. </div>
  118. <div style="margin-bottom: 0; font-family: sans-serif">
  119. <div style="text-align: right;font-size:16px;line-height: 22px;">Visit Date: {{friendly_date($note->effective_dateest)}}</div>
  120. </div>
  121. <!-- header grey bar -->
  122. @if(false)
  123. <table style="background-color: #d9d9d9; border: 1px solid #d9d9d9; width: 100%; font-family: sans-serif" border="0">
  124. <tr>
  125. <td style="width: 50%; text-align: left; font-weight:bold; padding: 0.5rem 1rem;">Tele-Audio Visit</td>
  126. <td style="width: 50%; text-align: right; font-weight:bold; padding: 0.5rem 1rem;">
  127. @if($note->new_or_fu_or_na === "NEW")
  128. New
  129. @elseif($note->new_or_fu_or_na === "FU")
  130. Follow-up
  131. @else
  132. {{$note->new_or_fu_or_na}}
  133. @endif
  134. Televisit Note
  135. </td>
  136. </tr>
  137. </table>
  138. @endif
  139. <main role="main" class="stag-content px-0 mcp-theme-1">
  140. @yield('content')
  141. </main><!-- /.container -->
  142. <!-- signature -->
  143. <?php
  144. $bills = \App\Models\Bill::where('note_id', $note->id)
  145. ->where('bill_service_type', 'NOTE')
  146. ->where('code', 'Treatment Services')
  147. ->where('is_cancelled', false)
  148. ->where('hcp_pro_id', $note->hcpPro->id)
  149. ->get();
  150. $totalSeconds = 0;
  151. foreach ($bills as $bill) {
  152. $totalSeconds += $bill->number_of_units * 3600;
  153. }
  154. ?>
  155. <div style="padding: 1rem; padding-bottom: 0;">
  156. <p><b style="font-size: 18px">Signature</b></p>
  157. <table style="border: 0; width: 100%;" border="0" cellspacing="0" cellpadding="0">
  158. <tr style="background-color: #d9d9d9">
  159. <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="20%">Date of Service</td>
  160. <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="30%">Service</td>
  161. <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="50%">Place of Service</td>
  162. </tr>
  163. <tr>
  164. <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="20%">{{friendly_date($note->effective_dateest)}}</td>
  165. <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="30%">Treatment Services</td>
  166. <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="50%">133 Rollins Ave, Suite 3, Rockville, MD 20852</td>
  167. </tr>
  168. <tr style="background-color: #d9d9d9">
  169. <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="20%">Total time spent</td>
  170. <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="30%">Provider (HCP)</td>
  171. <td style="font-weight:bold;border-top: 1px solid #222; border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="50%">Signature</td>
  172. </tr>
  173. <tr>
  174. <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="20%">{{round($totalSeconds/60)}} minutes</td>
  175. <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="30%">{{$note->hcpPro->displayName()}}</td>
  176. <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="50%">
  177. @if($note->is_signed_by_hcp)
  178. <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAIuHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjatZdrduM4DoX/cxWzBPEBglwOn+fMDmb584FSXEmqUp3qnoliS6ZpEsAFLi7d+s+/t/sXf6HU4JJoyTXni79UUw2Nh3Ldf/W8+yud9/MXnq/4/GHcvb4IDEXu8f6o7ZnfGJcfP3jbw/eP464834TyLOSvD1tH29me53sjGQ/3uE/PQnXdD7kWfW9qfxYaz8RjyvNKL7Pum312HwaUKE1hoxjCij5e573cFkR7+di41/NemOej8pxidNxi1GcxAvLBvbf7db0P0Icgvz25z9F/PX0KfmjPePwUy/zEiIdffuHl03h8bRPebxxfFoWPX/h8tZ/ceV57z7L3ur1rKRPR/GTUCbZ/W4aJnZDH87PMpbyEZz1X5SpsM4B8XuPqXMNXH0BlO5/89M1vv859+IGJKayg3EMYAGVjJWqoYUTDKdnld1DQm7GA5QjLgVmK4WWLP/vWs9/whZ2nZ2rwLOb5yZeX+92Xf3K5vYeFyF/lFSvsCpbXmGHI2TuzAMTvBzc5AX67Hvivd/lDqoKgnDAXHGxXv5fo4n/kVjw4R+YJ97uEvNP5LECI2FswxkcQuLKP4r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UL0WzBWoSkO62FICvYS11Wptv1NKHoHauzTxydBrNmKjuTRC9ilRqkv05DvMtuGd8PRFeFGEwxzSr78FOyx08pNw7N3oagcKFRmf5A84YHjKkLk0QnYL65QWbDi/1Yp7na61OwFxH3hA4uC2CPbLNbwvvRY1tYfdFGvwJFrc9NXRqWzPhoHfvd9kDyJmxZ2Rp6dAz8Z72NnA2VHi+0qVHVlmswdGGRnkDyhWYOVXZ0mL8MLp1qJMUHsLyv8qrWrU6Xbgj54GkSW6m+GK3rrm4I9dMpMn3VnLakObDbBAedsNSeYMcmaIHkSl1V318zYf1b9m9VK1chHQqsjRqvtcImsM8I4FxQEhN+319fmdldAQfuqB/tZseHtSE8lpjqiyBRr3QEjfRskT3rqvFWZlFNM3GzD7Q1WNDx32z2rXdXsc4eC390TN8uyzARQqMFRvX2a0Ylo80SdMvXuZ5Keh2cazfTcrYwEtIhnSv72FNS65ZoKLzq/OlNWv8WP2dzmeR0ayTOaLJDsRnarHc55GI0AWGCfZj90KfOlNnetz/Y1jwVj9Y4pNrmTva9TYV62AkJvwSsnzJLwIG3WK1x63dfnwoHXY6tyQ/0RxB47o9zEKASkfw2XqNfiUJpWa09UzfT7/4xOWmqw6Snx3Q5EJeBfxAKp1UNODm8AAAAASUVORK5CYII="
  179. style="height: 10px">
  180. Signed
  181. @else
  182. <span style="color: red; font-weight:bold;">No</span>
  183. @endif
  184. </td>
  185. </tr>
  186. </table>
  187. @if($note->is_signed_by_hcp)
  188. <table style="border: 0; width: 100%; font-size: 12px" border="0">
  189. <tr>
  190. <td style="vertical-align: top; width: 50%; text-align: left">
  191. Printed on: {{friendly_date_time(date('Y-m-d H:i:s'))}}
  192. <br>
  193. Note created using: Endochart
  194. </td>
  195. <td style="vertical-align: top; width: 50%; text-align: right">
  196. <div style="text-align: right; font-size: 13px; padding-top: 2px">Signed electronically on {{friendlier_date_time($note->signed_by_hcp_at)}}</div>
  197. </td>
  198. </tr>
  199. </table>
  200. @endif
  201. </div>
  202. <div class="no-print" style="padding-top: 1rem; text-align: center"><a id="save_btn" href="#">Save</a></div>
  203. <div style="padding-top: 2rem; text-align: center">********</div>
  204. </div>
  205. <script>
  206. $(document).ready(function(){
  207. let saveBtn = document.querySelector('#save_btn');
  208. let content = document.querySelector('html');
  209. let contentHTML = content.outerHTML;
  210. let noteUid = content.getAttribute('note-uid');
  211. setInterval(function(){
  212. try {
  213. submitToBackend(noteUid, contentHTML);
  214. }catch(e){
  215. console.log(e)
  216. }
  217. }, 10000);
  218. saveBtn.addEventListener('click', () => {
  219. submitToBackend(noteUid, contentHTML)
  220. //send this to java
  221. //create note_print record with versioned history
  222. //on note show a list of note prints to admins
  223. //allow opening a note print on its own tab with note print id means update existing
  224. //auto save as you edit to local storage. flush local storage when you hit save
  225. });
  226. })
  227. function submitToBackend(noteUid, content){
  228. console.log("saving...")
  229. console.log(noteUid);
  230. console.log(content);
  231. }
  232. </script>
  233. </body>
  234. </html>