print-note-v2.blade.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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;">
  84. @if($note->hcpCompanyPro)
  85. {{ $note->hcpCompanyPro->company->name }}
  86. @else
  87. Scholar Medical Group
  88. @endif
  89. </div>
  90. @if($patient->mcp)
  91. <div style="margin-bottom: 3px; font-size: 16px;font-weight:bold;">{{ $patient->mcp->displayName() }}</div>
  92. @endif
  93. <div style="margin-bottom: 3px; font-size: 16px;font-weight:bold;">133 Rollins Ave, Suite 3 Rockville, MD 20852</div>
  94. <div style="margin-bottom: 3px; font-size: 16px;font-weight:bold;">
  95. <div style="width:auto;margin-right:10px; display:inline-block">Phone: 202-935-1033</div>
  96. <div style="width:auto;margin-right:10px; display:inline-block">NPI#: 1639796428</div>
  97. </div>
  98. </div>
  99. <div style="margin-bottom: 0; font-family: sans-serif">
  100. <div>
  101. <div style="display:inline-block; margin-bottom: 3px; font-size: 18px;font-weight:bold;">{{ $patient->displayName() }}</div>
  102. <div style="display:inline-block;font-size:16px;">DOB: {{friendly_date_time($patient->dob, false,null,true)}}</div>
  103. <div style="display: inline-block;font-size:16px;margin-left:7px;">{{$patient->age_in_years}} year old,</div>
  104. <div style="display: inline-block;font-size:16px;margin-left:0px;">{{$patient->sex}}</div>
  105. </div>
  106. <div style="display: inline-block;font-size:16px;margin-bottom:3px;">{{@$patient->mailing_address_line1 ? $patient->mailing_address_line1 : ''}}</div>
  107. <div style="font-size:16px;margin-bottom:3px;">
  108. {{@$patient->mailing_address_city ? $patient->mailing_address_city : ''}}
  109. {{@$patient->mailing_address_state ? $patient->mailing_address_state : ''}}
  110. {{@$patient->mailing_address_zip ? $patient->mailing_address_zip : ''}}
  111. </div>
  112. <div style="font-size:16px;margin-bottom:3px;">
  113. @if($patient->phone_home)
  114. <div style="display: inline-block;margin-right:10px;font-size:16px;">Home Phone: {{$patient->phone_home}}</div>
  115. @endif
  116. @if($patient->cell_number)
  117. <div style="display: inline-block;margin-right:10px;font-size:16px;">Cell Phone: {{$patient->cell_number}}</div>
  118. @endif
  119. @if($patient->email_address)
  120. <div style="display: inline-block;margin-right:10px;font-size:16px;">Email: {{$patient->email_address}}</div>
  121. @endif
  122. </div>
  123. </div>
  124. <div style="margin-bottom: 0; font-family: sans-serif">
  125. <div style="text-align: right;font-size:16px;line-height: 22px;">Visit Date: {{friendly_date($note->effective_dateest)}}</div>
  126. </div>
  127. <!-- header grey bar -->
  128. @if(false)
  129. <table style="background-color: #d9d9d9; border: 1px solid #d9d9d9; width: 100%; font-family: sans-serif" border="0">
  130. <tr>
  131. <td style="width: 50%; text-align: left; font-weight:bold; padding: 0.5rem 1rem;">Tele-Audio Visit</td>
  132. <td style="width: 50%; text-align: right; font-weight:bold; padding: 0.5rem 1rem;">
  133. @if($note->new_or_fu_or_na === "NEW")
  134. New
  135. @elseif($note->new_or_fu_or_na === "FU")
  136. Follow-up
  137. @else
  138. {{$note->new_or_fu_or_na}}
  139. @endif
  140. Televisit Note
  141. </td>
  142. </tr>
  143. </table>
  144. @endif
  145. <main role="main" class="stag-content px-0 mcp-theme-1">
  146. @yield('content')
  147. </main><!-- /.container -->
  148. <!-- signature -->
  149. <?php
  150. $bills = \App\Models\Bill::where('note_id', $note->id)
  151. ->where('bill_service_type', 'NOTE')
  152. ->where('code', 'Treatment Services')
  153. ->where('is_cancelled', false)
  154. ->where('hcp_pro_id', $note->hcpPro->id)
  155. ->get();
  156. $totalSeconds = 0;
  157. foreach ($bills as $bill) {
  158. $totalSeconds += $bill->number_of_units * 3600;
  159. }
  160. ?>
  161. <div style="padding: 1rem; padding-bottom: 0;">
  162. <p><b style="font-size: 18px">Signature</b></p>
  163. <table style="border: 0; width: 100%;" border="0" cellspacing="0" cellpadding="0">
  164. <tr style="background-color: #d9d9d9">
  165. <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>
  166. <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>
  167. <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>
  168. </tr>
  169. <tr>
  170. <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="20%">{{friendly_date($note->effective_dateest)}}</td>
  171. <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="30%">Treatment Services</td>
  172. <td style="padding: 0.25rem 0.5rem; vertical-align: top" width="50%">133 Rollins Ave, Suite 3, Rockville, MD 20852</td>
  173. </tr>
  174. <tr style="background-color: #d9d9d9">
  175. <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>
  176. <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>
  177. <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>
  178. </tr>
  179. <tr>
  180. <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="20%">{{round($totalSeconds/60)}} minutes</td>
  181. <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="30%">{{$note->hcpPro->displayName()}}</td>
  182. <td style="border-bottom: 1px solid #222; padding: 0.25rem 0.5rem; vertical-align: top" width="50%">
  183. @if($note->is_signed_by_hcp)
  184. <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/lFSvsCpbXmGHI2Tuz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bXHk/jHNwU5Jf/FR4o0KvJhCpaPF2K5c6DOKAMdVaBfCpZEk+Uq1eblhHyZIQb4My35NVUq1UL0WzBWoSkO62FICvYS11Wptv1NKHoHauzTxydBrNmKjuTRC9ilRqkv05DvMtuGd8PRFeFGEwxzSr78FOyx08pNw7N3oagcKFRmf5A84YHjKkLk0QnYL65QWbDi/1Yp7na61OwFxH3hA4uC2CPbLNbwvvRY1tYfdFGvwJFrc9NXRqWzPhoHfvd9kDyJmxZ2Rp6dAz8Z72NnA2VHi+0qVHVlmswdGGRnkDyhWYOVXZ0mL8MLp1qJMUHsLyv8qrWrU6Xbgj54GkSW6m+GK3rrm4I9dMpMn3VnLakObDbBAedsNSeYMcmaIHkSl1V318zYf1b9m9VK1chHQqsjRqvtcImsM8I4FxQEhN+319fmdldAQfuqB/tZseHtSE8lpjqiyBRr3QEjfRskT3rqvFWZlFNM3GzD7Q1WNDx32z2rXdXsc4eC390TN8uyzARQqMFRvX2a0Ylo80SdMvXuZ5Keh2cazfTcrYwEtIhnSv72FNS65ZoKLzq/OlNWv8WP2dzmeR0ayTOaLJDsRnarHc55GI0AWGCfZj90KfOlNnetz/Y1jwVj9Y4pNrmTva9TYV62AkJvwSsnzJLwIG3WK1x63dfnwoHXY6tyQ/0RxB47o9zEKASkfw2XqNfiUJpWa09UzfT7/4xOWmqw6Snx3Q5EJeBfxAKp1UNODm8AAAAASUVORK5CYII="
  185. style="height: 10px">
  186. Signed
  187. @else
  188. <span style="color: red; font-weight:bold;">No</span>
  189. @endif
  190. </td>
  191. </tr>
  192. </table>
  193. @if($note->is_signed_by_hcp)
  194. <table style="border: 0; width: 100%; font-size: 12px" border="0">
  195. <tr>
  196. <td style="vertical-align: top; width: 50%; text-align: left">
  197. Printed on: {{friendly_date_time(date('Y-m-d H:i:s'))}}
  198. <br>
  199. Note created using: Endochart
  200. </td>
  201. <td style="vertical-align: top; width: 50%; text-align: right">
  202. <div style="text-align: right; font-size: 13px; padding-top: 2px">Signed electronically on {{friendlier_date_time($note->signed_by_hcp_at)}}</div>
  203. </td>
  204. </tr>
  205. </table>
  206. @endif
  207. </div>
  208. <div class="no-print" style="padding-top: 1rem; text-align: center"><a id="save_btn" href="#">Save</a></div>
  209. <div style="padding-top: 2rem; text-align: center">********</div>
  210. </div>
  211. <script>
  212. $(document).ready(function(){
  213. let saveBtn = document.querySelector('#save_btn');
  214. let content = document.querySelector('html');
  215. let contentHTML = content.outerHTML;
  216. let noteUid = content.getAttribute('note-uid');
  217. setInterval(function(){
  218. try {
  219. submitToBackend(noteUid, contentHTML);
  220. }catch(e){
  221. console.log(e)
  222. }
  223. }, 10000);
  224. saveBtn.addEventListener('click', () => {
  225. submitToBackend(noteUid, contentHTML)
  226. //send this to java
  227. //create note_print record with versioned history
  228. //on note show a list of note prints to admins
  229. //allow opening a note print on its own tab with note print id means update existing
  230. //auto save as you edit to local storage. flush local storage when you hit save
  231. });
  232. })
  233. function submitToBackend(noteUid, content){
  234. console.log("saving...")
  235. console.log(noteUid);
  236. console.log(content);
  237. }
  238. </script>
  239. </body>
  240. </html>