patient.blade.php 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926
  1. @extends(request()->input('popupmode') ? 'layouts.empty' : 'layouts.template')
  2. <?php
  3. /** @var \App\Models\Client $patient */
  4. ?>
  5. <?php
  6. $trimLayout = true;
  7. $routeName = request()->route()->getName();
  8. $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note && !!$note->visitTemplate);
  9. ?>
  10. <style media="screen">
  11. .pt-name {
  12. font-size: 1.5rem !important;
  13. }
  14. </style>
  15. @section('content')
  16. <div class="container-fluid h-100">
  17. <div class="main-row h-100 {{ !request()->input('popupmode') ? '' : 'px-0' }} {{$isVisitNote ? 'autohide-leftnav' : ''}}">
  18. @if(!request()->input('popupmode'))
  19. <nav id="sidebarMenu" class="d-block bg-light sidebar collapse px-0">
  20. <div class="sidebar-sticky pt-3">
  21. <ul class="nav flex-column mcp-theme-1">
  22. <li class="nav-item">
  23. <a class="nav-link {{ strpos($routeName, 'patients.view.dashboard') === 0 ? 'active' : '' }}"
  24. href="{{ route('patients.view.dashboard', ['patient' => $patient]) }}">Dashboard</a>
  25. </li>
  26. @if($performer->pro->pro_type == 'ADMIN')
  27. <li class="nav-item">
  28. <a class="nav-link {{ strpos($routeName, 'patients.view.migrate-canvas') === 0 ? 'active' : '' }}"
  29. href="{{ route('patients.view.migrate-canvas', ['patient' => $patient]) }}">Canvas Migrate</a>
  30. </li>
  31. <li class="nav-item">
  32. <a class="nav-link {{ strpos($routeName, 'patients.view.canvas') === 0 ? 'active' : '' }}"
  33. href="{{ route('patients.view.canvas', ['patient' => $patient]) }}">Canvas</a>
  34. </li>
  35. @endif
  36. <li class="nav-item">
  37. <a class="nav-link {{ strpos($routeName, 'patients.view.calendar') === 0 ? 'active' : '' }}"
  38. href="{{ route('patients.view.calendar', ['patient' => $patient]) }}">Calendar</a>
  39. </li>
  40. <li class="nav-item">
  41. <a class="nav-link {{ strpos($routeName, 'patients.view.appointments') === 0 ? 'active' : '' }}"
  42. href="{{ route('patients.view.appointments', ['patient' => $patient, 'forPro' => 'all', 'status' => 'all']) }}">Appointments</a>
  43. </li>
  44. {{--
  45. <li class="nav-item">
  46. <a class="nav-link {{ strpos($routeName, 'patients.view.programs') === 0 ? 'active' : '' }}"
  47. href="{{ route('patients.view.programs', ['patient' => $patient]) }}">Programs</a>
  48. </li>
  49. <li class="nav-item">
  50. <a class="nav-link {{ strpos($routeName, 'patients.view.flowsheets') === 0 ? 'active' : '' }}"
  51. href="{{ route('patients.view.flowsheets', ['patient' => $patient]) }}">Flowsheets</a>
  52. </li>
  53. --}}
  54. <li class="nav-item">
  55. <a class="nav-link {{ strpos($routeName, 'patients.view.vitals-settings') === 0 ? 'active' : '' }}"
  56. href="{{ route('patients.view.vitals-settings', ['patient' => $patient]) }}">Vitals Settings</a>
  57. </li>
  58. <li class="nav-item">
  59. <a class="nav-link {{ strpos($routeName, 'patients.view.vitals-graph') === 0 ? 'active' : '' }}"
  60. href="{{ route('patients.view.vitals-graph', ['patient' => $patient]) }}">Vitals Graph</a>
  61. </li>
  62. <li class="nav-item">
  63. <a class="nav-link {{ strpos($routeName, 'patients.view.care-months') === 0 ? 'active' : '' }}"
  64. href="{{ route('patients.view.care-months', ['patient' => $patient]) }}">Care Months</a>
  65. </li>
  66. <li class="nav-item">
  67. <a class="nav-link {{ strpos($routeName, 'patients.view.devices') === 0 ? 'active' : '' }}"
  68. href="{{ route('patients.view.devices', ['patient' => $patient]) }}">Devices</a>
  69. </li>
  70. <li class="nav-item">
  71. <a class="nav-link {{ strpos($routeName, 'patients.view.measurements') === 0 ? 'active' : '' }}"
  72. href="{{ route('patients.view.measurements', ['patient' => $patient]) }}">Measurements</a>
  73. </li>
  74. <li class="nav-item">
  75. <a class="nav-link {{ strpos($routeName, 'patients.view.notes') === 0 ? 'active' : '' }}"
  76. href="{{ route('patients.view.notes', ['patient' => $patient]) }}">Notes</a>
  77. </li>
  78. <li class="nav-item">
  79. <a class="nav-link {{ strpos($routeName, 'patients.view.generic-bills') === 0 ? 'active' : '' }}"
  80. href="{{ route('patients.view.generic-bills', ['patient' => $patient]) }}">Generic Bills</a>
  81. </li>
  82. <li class="nav-item">
  83. <a class="nav-link {{ strpos($routeName, 'patients.view.handouts') === 0 ? 'active' : '' }}"
  84. href="{{ route('patients.view.handouts', ['patient' => $patient]) }}">Handouts</a>
  85. </li>
  86. <li class="nav-item">
  87. <a class="nav-link {{ strpos($routeName, 'patients.view.rm-setup') === 0 ? 'active' : '' }}"
  88. href="{{ route('patients.view.rm-setup', ['patient' => $patient]) }}">RM Setup</a>
  89. </li>
  90. <?php /* <li class="nav-item">
  91. <a class="nav-link d-flex align-items-center {{ strpos($routeName, 'patients.view.action-items') === 0 ? 'active' : '' }}"
  92. native onclick="return false">
  93. <span class="text-dark">ERx/Orders</span>
  94. </a>
  95. <ul class="m-0 p-0 nav-child-list">
  96. <li class="nav-item">
  97. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-erx') === 0 ? 'active' : '' }}"
  98. href="{{ route('patients.view.action-items-erx', ['patient' => $patient]) }}">ERx</a>
  99. </li>
  100. <li class="nav-item">
  101. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-lab') === 0 ? 'active' : '' }}"
  102. href="{{ route('patients.view.action-items-lab', ['patient' => $patient]) }}">Lab</a>
  103. </li>
  104. <li class="nav-item">
  105. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-imaging') === 0 ? 'active' : '' }}"
  106. href="{{ route('patients.view.action-items-imaging', ['patient' => $patient]) }}">Imaging</a>
  107. </li>
  108. <li class="nav-item">
  109. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-equipment') === 0 ? 'active' : '' }}"
  110. href="{{ route('patients.view.action-items-equipment', ['patient' => $patient]) }}">Equipment</a>
  111. </li>
  112. </ul>
  113. </li> */ ?>
  114. <li class="nav-item">
  115. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-prescriptions') === 0 ? 'active' : '' }}"
  116. href="{{ route('patients.view.patient-prescriptions', ['patient' => $patient]) }}">ERx &amp; Orders</a>
  117. <?php /*
  118. <ul class="m-0 p-0 nav-child-list">
  119. <li class="nav-item">
  120. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === '' ? 'active' : '' }}"
  121. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => '']) }}">All</a>
  122. </li>
  123. <li class="nav-item">
  124. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'erx' ? 'active' : '' }}"
  125. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'erx']) }}">Drug</a>
  126. </li>
  127. <li class="nav-item">
  128. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'lab' ? 'active' : '' }}"
  129. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'lab']) }}">Lab</a>
  130. </li>
  131. <li class="nav-item">
  132. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'imaging' ? 'active' : '' }}"
  133. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'imaging']) }}">Imaging</a>
  134. </li>
  135. <li class="nav-item">
  136. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'referral' ? 'active' : '' }}"
  137. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'referral']) }}">Referral</a>
  138. </li>
  139. <li class="nav-item">
  140. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'supply' ? 'active' : '' }}"
  141. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'supply']) }}">Supply</a>
  142. </li>
  143. <li class="nav-item">
  144. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'other' ? 'active' : '' }}"
  145. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'other']) }}">Other</a>
  146. </li>
  147. </ul>
  148. */ ?>
  149. </li>
  150. <li class="nav-item">
  151. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 ? 'active' : '' }}"
  152. href="{{ route('patients.view.patient-tickets', ['patient' => $patient]) }}" title="Deprecated">ERx / Orders
  153. <span class="text-secondary text-sm pl-2">(dep)</span>
  154. </a>
  155. <ul class="m-0 p-0 nav-child-list">
  156. <li class="nav-item">
  157. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === '' ? 'active' : '' }}"
  158. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => '']) }}">All</a>
  159. </li>
  160. <li class="nav-item">
  161. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'erx' ? 'active' : '' }}"
  162. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'erx']) }}">ERx</a>
  163. </li>
  164. <li class="nav-item">
  165. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'lab' ? 'active' : '' }}"
  166. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'lab']) }}">Lab</a>
  167. </li>
  168. <li class="nav-item">
  169. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'imaging' ? 'active' : '' }}"
  170. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'imaging']) }}">Imaging</a>
  171. </li>
  172. <li class="nav-item">
  173. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'other' ? 'active' : '' }}"
  174. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'other']) }}">Other</a>
  175. </li>
  176. </ul>
  177. </li>
  178. <li class="nav-item">
  179. <a class="nav-link {{ strpos($routeName, 'patients.view.supply-orders') === 0 ? 'active' : '' }}"
  180. href="{{ route('patients.view.supply-orders', ['patient' => $patient]) }}">Supply Orders</a>
  181. </li>
  182. <li class="nav-item">
  183. <a class="nav-link {{ strpos($routeName, 'patients.view.shipments') === 0 ? 'active' : '' }}"
  184. href="{{ route('patients.view.shipments', ['patient' => $patient]) }}">Shipments</a>
  185. </li>
  186. <li class="nav-item">
  187. <a class="nav-link {{ strpos($routeName, 'patients.view.incoming-reports') === 0 ? 'active' : '' }}"
  188. href="{{ route('patients.view.incoming-reports', ['patient' => $patient]) }}">Incoming Reports</a>
  189. </li>
  190. <li class="nav-item">
  191. <a class="nav-link {{ strpos($routeName, 'patients.view.allergies') === 0 ? 'active' : '' }}"
  192. href="{{ route('patients.view.allergies', ['patient' => $patient]) }}">Allergies</a>
  193. </li>
  194. <li class="nav-item">
  195. <a class="nav-link {{ strpos($routeName, 'patients.view.medications') === 0 ? 'active' : '' }}"
  196. href="{{ route('patients.view.medications', ['patient' => $patient]) }}">Medications</a>
  197. </li>
  198. <li class="nav-item">
  199. <a class="nav-link {{ strpos($routeName, 'patients.view.dx-and-focus-areas') === 0 ? 'active' : '' }}"
  200. href="{{ route('patients.view.dx-and-focus-areas', ['patient' => $patient]) }}">Dx and
  201. Focus Areas</a>
  202. </li>
  203. <li class="nav-item">
  204. <a class="nav-link {{ strpos($routeName, 'patients.view.care-team') === 0 ? 'active' : '' }}"
  205. href="{{ route('patients.view.care-team', ['patient' => $patient]) }}">Care Team</a>
  206. </li>
  207. <li class="nav-item">
  208. <a class="nav-link {{ strpos($routeName, 'patients.view.history') === 0 ? 'active' : '' }}"
  209. href="{{ route('patients.view.history', ['patient' => $patient]) }}">History</a>
  210. </li>
  211. <li class="nav-item">
  212. <a class="nav-link {{ strpos($routeName, 'patients.view.memos') === 0 ? 'active' : '' }}"
  213. href="{{ route('patients.view.memos', ['patient' => $patient]) }}">Memos</a>
  214. </li>
  215. <li class="nav-item">
  216. <a class="nav-link {{ $routeName === 'patients.view.sms' ? 'active' : '' }}"
  217. href="{{ route('patients.view.sms', ['patient' => $patient]) }}">SMS</a>
  218. </li>
  219. <li class="nav-item">
  220. <a class="nav-link {{ strpos($routeName, 'patients.view.sms-numbers') === 0 ? 'active' : '' }}"
  221. href="{{ route('patients.view.sms-numbers', ['patient' => $patient]) }}">SMS Numbers</a>
  222. </li>
  223. <li class="nav-item">
  224. <a class="nav-link {{ strpos($routeName, 'patients.view.documents') === 0 ? 'active' : '' }}"
  225. href="{{ route('patients.view.documents', ['patient' => $patient]) }}">Documents</a>
  226. </li>
  227. <li class="nav-item">
  228. <a class="nav-link {{ strpos($routeName, 'patients.view.settings') === 0 ? 'active' : '' }}"
  229. href="{{ route('patients.view.settings', ['patient' => $patient]) }}">Settings</a>
  230. </li>
  231. <li class="nav-item">
  232. <a class="nav-link {{ strpos($routeName, 'patients.view.sms-reminders') === 0 ? 'active' : '' }}"
  233. href="{{ route('patients.view.sms-reminders', ['patient' => $patient]) }}">SMS Reminders</a>
  234. </li>
  235. <li class="nav-item">
  236. <a class="nav-link {{ strpos($routeName, 'patients.view.measurement-confirmation-numbers') === 0 ? 'active' : '' }}"
  237. href="{{ route('patients.view.measurement-confirmation-numbers', ['patient' => $patient]) }}">Meas. Conf. Numbers</a>
  238. </li>
  239. <li class="nav-item">
  240. <a class="nav-link {{ strpos($routeName, 'patients.view.pros') === 0 ? 'active' : '' }}"
  241. href="{{ route('patients.view.pros', ['patient' => $patient]) }}">Pros</a>
  242. </li>
  243. {{-- <li class="nav-item">--}}
  244. {{-- <a class="nav-link" href="/patients/view/{{ $patient->uid }}/intake">Intake</a>--}}
  245. {{-- </li>--}}
  246. @if($performer->pro->pro_type == 'ADMIN')
  247. <li class="nav-item">
  248. <a class="nav-link {{ strpos($routeName, 'patients.view.mcp-requests') === 0 ? 'active' : '' }}"
  249. href="{{ route('patients.view.mcp-requests', $patient) }}">MCP Requests</a>
  250. </li>
  251. <li class="nav-item">
  252. <a class="nav-link {{ strpos($routeName, 'patients.view.eligible-refreshes') === 0 ? 'active' : '' }}"
  253. href="{{ route('patients.view.eligible-refreshes', $patient) }}">Eligible Refreshes</a>
  254. </li>
  255. <li class="nav-item">
  256. <a class="nav-link {{ strpos($routeName, 'patients.view.insurance-coverage') === 0 ? 'active' : '' }}"
  257. href="{{ route('patients.view.insurance-coverage', $patient) }}">Insurance Coverage</a>
  258. </li>
  259. <li class="nav-item">
  260. <a class="nav-link {{ strpos($routeName, 'patients.view.primary-coverage') === 0 ? 'active' : '' }}"
  261. href="{{ route('patients.view.primary-coverage', $patient) }}">Primary Coverage</a>
  262. </li>
  263. <li class="nav-item">
  264. <a class="nav-link {{ strpos($routeName, 'patients.view.claims-resolver') === 0 ? 'active' : '' }}"
  265. href="{{ route('patients.view.claims-resolver', $patient) }}">Claims Resolver</a>
  266. </li>
  267. @endif
  268. <li class="nav-item">
  269. <a class="nav-link {{ strpos($routeName, 'patients.view.accounts') === 0 ? 'active' : '' }}"
  270. href="{{ route('patients.view.accounts', $patient) }}">Linked Accounts</a>
  271. </li>
  272. </ul>
  273. <div class="mt-3 mcp-theme-1">
  274. @yield('left-nav-content')
  275. </div>
  276. </div>
  277. </nav>
  278. @endif
  279. <main role="main" class="w-100 {{$trimLayout || $isVisitNote ? 'p-0' : ''}}">
  280. @if($pro->is_enrolled_as_mcp && !$patient->mcp)
  281. <div class="alert alert-info bg-white mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
  282. <div class="font-size-16">
  283. <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
  284. This patient currently does not have an MCP assigned.
  285. </div>
  286. <div class="mt-3 d-flex align-items-center">
  287. <button class="btn btn-info" onclick="$('.in-conv-confirmed').removeClass('d-none').addClass('d-inline-flex')">I am currently seeing or talking to this patient</button>
  288. <div class="in-conv-confirmed d-none align-items-center">
  289. <i class="fa fa-chevron-right mx-3 text-secondary"></i>
  290. <div moe class=" hide-inside-popup">
  291. <a href="" start show class="btn btn-primary font-weight-bold text-white">
  292. Assign myself as the MCP for this patient
  293. </a>
  294. <form url="/api/client/putMcp" class="mcp-theme-1">
  295. <input type="hidden" name="uid" value="{{$patient->uid}}">
  296. <input type="hidden" name="mcpProUid" value="{{$pro->uid}}">
  297. <p>Are you sure?</p>
  298. <div>
  299. <button submit class="btn btn-sm btn-primary mr-2">
  300. Submit
  301. </button>
  302. <button cancel class="btn btn-sm btn-default border">
  303. Cancel
  304. </button>
  305. </div>
  306. </form>
  307. </div>
  308. </div>
  309. </div>
  310. </div>
  311. @endif
  312. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $patient->is_mcp_onboarding_active === 'NO')
  313. <div class="alert alert-warning mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
  314. <div class="font-weight-bold text-dark font-size-16">MCP onboarding is not active for this patient.</div>
  315. <div class="text-secondary p-2 border mt-2 bg-light">
  316. <div class="font-weight-bold">{{$patient->why_is_mcp_onboarding_not_active_category}}</div>
  317. <div>{{$patient->why_is_mcp_onboarding_not_active_memo}}</div>
  318. </div>
  319. </div>
  320. @endif
  321. <div class="card {{$trimLayout || $isVisitNote ? 'card m-0 border-0 rounded-0' : 'my-3'}}" id="patient-header">
  322. <div id="patient-header-content">
  323. <div class="card-header @if($patient->client_engagement_status_category == 'DUMMY') alert-warning @endif py-1 hide-inside-ticket-popup">
  324. <?php
  325. $thumbnail = $patient->profile_picture_base64;
  326. $initials = !$thumbnail ? substr($patient->name_first, 0, 1) . substr($patient->name_last, 0, 1) : '';
  327. $online = $patient->is_online ? 'online' : '';
  328. $patientName = implode(', ', array_filter([$patient->name_last, $patient->name_first]));
  329. $confirmedCell = empty($patient->cell_number) ? '-' : $patient->cell_number;
  330. $confirmedEmail = empty($patient->email_address) ? '-' : $patient->email_address;
  331. $location = implode(', ', array_filter([$patient->home_address_city, $patient->home_address_state]));
  332. $location = empty($location) ? '-' : $location;
  333. $mcpName = $patient->mcp ? implode(', ', array_filter([$patient->mcp->name_last, $patient->mcp->name_first])) : null;
  334. $cmName = $patient->cm ? implode(', ', array_filter([$patient->cm->name_last, $patient->cm->name_first])) : null;
  335. $memberSince = date_diff(date_create($patient->created_at), date_create('now'))->days;
  336. if ($memberSince > 30) $memberSince = date('F, Y', strtotime($patient->created_at));
  337. else if ($memberSince > 1) $memberSince .= ' days ago';
  338. else if ($memberSince === 1) $memberSince = 'yesterday';
  339. else if ($memberSince === 0) $memberSince = 'today';
  340. ?>
  341. <div class=z>
  342. <div class=header>
  343. @if($patient->is_duplicate)
  344. <div class="alert alert-secondary border-dark mcp-theme-1">
  345. <span class="text-dark">This chart is a duplicate of&nbsp;</span>
  346. <a class="font-weight-bold"
  347. href="/patients/view/{{ $patient->duplicateOf->uid }}">
  348. {{ $patient->duplicateOf->displayName() }}
  349. </a>
  350. </div>
  351. @endif
  352. <div class="hbox mr-auto">
  353. {{--<div>
  354. <div @if($patient->is_microphone_available)style="color:green" @else style="color:gray" @endif>
  355. <i class="fa fa-microphone"></i>
  356. </div>
  357. <div @if($patient->is_camera_available)style="color:green" @else style="color:gray" @endif>
  358. <i class="fa fa-video"></i>
  359. </div>
  360. </div>--}}
  361. <section>
  362. <div class="hbox">
  363. <h4 class="pt-name">{{$patientName}}</h4>
  364. <div class="screen-only mr-1 patient-presence-indicator thumbnail {{$online}}"
  365. data-patient-uid="{{$patient->uid}}"
  366. style="background-image:<?=$thumbnail?>"><?=$initials?></div>
  367. <div class="d-inline-flex align-items-baseline">
  368. <i class="chart mr-2">#{{$patient->chart_number}}</i>
  369. <i class="fas fa-info-circle text-primary" data-toggle="tooltip" data-placement="right" title="Joined <?=$memberSince?>"></i>
  370. </div>
  371. </div>
  372. <div class=separators>
  373. <div>{{friendly_date_time($patient->dob, false,null, true)}} ({{$patient->age_in_years}}
  374. y.o {{$patient->sex}})
  375. </div>
  376. @if($patient->getPrimaryCoverage() && $patient->getPrimaryCoverageStatus() === 'YES')
  377. <div class="text-nowrap">
  378. <i class="fa fa-check-circle text-success" data-toggle="tooltip" data-placement="bottom" title="Covered"></i>
  379. {{$patient->getPrimaryCoverage()->insuranceDisplayName()}}
  380. </div>
  381. @endif
  382. <div>
  383. <label>Status:</label>
  384. <b>{{$patient->client_engagement_status_category ? ucwords(strtolower(str_replace('_', ' ', $patient->client_engagement_status_category == 'DUMMY' ? 'Test Chart' : $patient->client_engagement_status_category))) : '-'}}</b>
  385. </div>
  386. </div>
  387. <div class="screen-only">
  388. <div class=separators>
  389. <div>
  390. <label>MCP:</label> {{$mcpName}}
  391. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $pro->pro_type == 'ADMIN')
  392. <div moe class="ml-2 hide-inside-popup">
  393. <a start show><i class="fa fa-edit"></i></a>
  394. <form url="/api/client/putMcp" class="mcp-theme-1">
  395. <input type="hidden" name="uid" value="{{$patient->uid}}">
  396. <div class="mb-2">
  397. <label class="text-secondary text-sm">MCP Pro</label>
  398. <select name="mcpProUid" provider-search data-pro-uid="{{ @$patient->mcp->uid }}"
  399. class="form-control form-control-sm">
  400. <option value=""> --select--</option>
  401. @foreach($pros as $iPro)
  402. <option
  403. value="{{$iPro->uid}}" {{ $patient->mcp && $iPro->uid === $patient->mcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  404. @endforeach
  405. </select>
  406. </div>
  407. <div>
  408. <button submit class="btn btn-sm btn-primary mr-1">
  409. Submit
  410. </button>
  411. <button cancel class="btn btn-sm btn-default border">
  412. Cancel
  413. </button>
  414. </div>
  415. </form>
  416. </div>
  417. @if($patient->mcp)
  418. <div moe class="ml-2 hide-inside-popup">
  419. <a start show><i class="fa fa-times"></i></a>
  420. <form url="/api/client/removeMcp" class="mcp-theme-1">
  421. <input type="hidden" name="uid" value="{{$patient->uid}}">
  422. <div class="mb-2">
  423. <label class="text-secondary text-sm">Remove MCP Pro</label>
  424. </div>
  425. <div>
  426. <button submit class="btn btn-sm btn-primary mr-1">Submit
  427. </button>
  428. <button cancel class="btn btn-sm btn-default border">
  429. Cancel
  430. </button>
  431. </div>
  432. </form>
  433. </div>
  434. @endif
  435. @endif
  436. </div>
  437. <div>
  438. @if($patient->has_mcp_done_onboarding_visit !== 'YES')
  439. <span class="text-dark d-inline-flex align-items-center">
  440. <span class="mr-2">
  441. <i class="fa fa-exclamation-triangle"></i>
  442. MCP Onboarding Visit Pending
  443. </span>
  444. </span>
  445. <span moe class="hide-inside-popup">
  446. <a start show><i class="fa fa-edit"></i></a>
  447. <form url="/api/client/updateMcpOnboardingVisitInfo" class="mcp-theme-1">
  448. <input type="hidden" name="uid" value="{{$patient->uid}}">
  449. <div class="mb-2">
  450. <select name="hasMcpDoneOnboardingVisit"
  451. class="form-control form-control-sm"
  452. onchange="toggleDisabledAsNeeded(this, 'YES', 'if-visit-done')">
  453. <option value="">-- Select Status --</option>
  454. <option value="YES" {{ $patient->has_mcp_done_onboarding_visit === 'YES' ? 'selected' : '' }}>YES</option>
  455. <option value="NO" {{ $patient->has_mcp_done_onboarding_visit === 'NO' ? 'selected' : '' }}>NO</option>
  456. <option value="UNKNOWN" {{ $patient->has_mcp_done_onboarding_visit === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
  457. </select>
  458. </div>
  459. <div class="mb-2">
  460. <input type="date"
  461. class="if-visit-done form-control form-control-sm" disabled
  462. name="mcpOnboardingVisitDate" value="{{ date('Y-m-d') }}"
  463. max="{{ date('Y-m-d') }}">
  464. </div>
  465. <div class="mb-2">
  466. <select name="mcpOnboardingVisitNoteUid" disabled
  467. class="form-control form-control-sm if-visit-done"
  468. onchange="if(this.value === '-- create --') createNewNote('{{$patient->uid}}', '{{$pro->uid}}', '{{date('Y-m-d')}}');">
  469. <option value="">-- Visit Note --</option>
  470. <?php $notes = \App\Models\Note::where('client_id', $patient->id)->get() ?>
  471. @foreach ($notes as $note)
  472. @if(!empty($note->title) && $note->client_id === $patient->id && !$note->is_cancelled)
  473. <option
  474. {{ $patient->mcp_onboarding_visit_note_id === $note->id ? 'selected' : '' }}
  475. value="{{$note->uid}}">{{$note->hcpPro->displayName()}} ({{friendly_date_time($note->effective_dateest, false)}})</option>
  476. @endif
  477. @endforeach
  478. {{--<option value="-- create --">-- Create Note --</option>--}}
  479. </select>
  480. </div>
  481. <div class="mb-2 if-note-outside-system">
  482. <textarea class="form-control form-control-sm"
  483. name="reasonOnboardingVisitNoteOutsideSystem"
  484. placeholder="Visit note outside the system reason"
  485. spellcheck="false" data-gramm="false"></textarea>
  486. </div>
  487. <div>
  488. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  489. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  490. </div>
  491. </form>
  492. </span>
  493. @else
  494. <span class="text-dark d-inline-flex align-items-center">
  495. <span class="mr-2 text-secondary">
  496. <i class="fa fa-check text-sm"></i>
  497. MCP Onboarding Visit Completed
  498. </span>
  499. </span>
  500. @endif
  501. </div>
  502. </div>
  503. <div>
  504. <label>Physician:</label> {{$patient->pcp ? $patient->pcp->displayName() : '-' }}
  505. @if($pro->pro_type == 'ADMIN')
  506. <div moe class="ml-2 hide-inside-popup">
  507. <a start show><i class="fa fa-edit"></i></a>
  508. <form url="/api/client/putPhysicianPro" class="mcp-theme-1">
  509. <input type="hidden" name="uid" value="{{$patient->uid}}">
  510. <div class="mb-2">
  511. <label class="text-secondary text-sm">Physician Pro</label>
  512. <select provider-search data-pro-uid="{{ @$patient->pcp->uid }}"
  513. name="physicianProUid"
  514. class="form-control form-control-sm">
  515. <option value=""> --select--</option>
  516. @foreach($pros as $iPro)
  517. <option
  518. value="{{$iPro->uid}}" {{ $patient->pcp && $iPro->uid === $patient->pcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  519. @endforeach
  520. </select>
  521. </div>
  522. <div>
  523. <button submit class="btn btn-sm btn-primary mr-1">Submit
  524. </button>
  525. <button cancel class="btn btn-sm btn-default border">
  526. Cancel
  527. </button>
  528. </div>
  529. </form>
  530. </div>
  531. @if($patient->pcp)
  532. <div moe class="ml-2 hide-inside-popup">
  533. <a start show><i class="fa fa-times"></i></a>
  534. <form url="/api/client/removePhysicianPro" class="mcp-theme-1">
  535. <input type="hidden" name="uid" value="{{$patient->uid}}">
  536. <div class="mb-2">
  537. <label class="text-secondary text-sm">Remove Physician Pro</label>
  538. </div>
  539. <div>
  540. <button submit class="btn btn-sm btn-primary mr-1">Submit
  541. </button>
  542. <button cancel class="btn btn-sm btn-default border">
  543. Cancel
  544. </button>
  545. </div>
  546. </form>
  547. </div>
  548. @endif
  549. @endif
  550. </div>
  551. </div>
  552. </section>
  553. {{--<section>
  554. <div>
  555. <label>Next Appt:</label>
  556. <?php
  557. $nextAppointment = $patient->nextMcpAppointment();
  558. $startTime = false;
  559. $endTime = false;
  560. if($nextAppointment) {
  561. $startTime = date('H:i', strtotime($nextAppointment->start_time));
  562. $endTime = date('H:i', strtotime($nextAppointment->end_time));
  563. $nextAppointment = date('Y-m-d', strtotime($nextAppointment->start_time));
  564. }
  565. ?>
  566. {{$nextAppointment ? friendly_date_time($nextAppointment . ($startTime ? ' ' . $startTime : ''), true, '') : '-'}}
  567. <span moe relative class="ml-1">
  568. <a start show><i class="fa fa-edit"></i></a>
  569. <form url="/api/appointment/create" class="mcp-theme-1" right>
  570. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  571. <input type="hidden" name="title" value="MCP Appointment">
  572. <div class="mb-2">
  573. <label class="text-secondary text-sm">Pro</label>
  574. <select name="proUid" class="form-control form-control-sm">
  575. <option value=""> --select-- </option>
  576. @foreach($pros as $iPro)
  577. <option value="{{$iPro->uid}}" {{ $iPro->uid === $pro->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  578. @endforeach
  579. </select>
  580. </div>
  581. <div class="mb-2">
  582. <label class="text-secondary text-sm">Date</label>
  583. <input type="date" name="date" min="{{ date('Y-m-d') }}"
  584. value="{{ $nextAppointment ? $nextAppointment : date('Y-m-d') }}"
  585. class="form-control form-control-sm">
  586. </div>
  587. <div class="mb-2">
  588. <label class="text-secondary text-sm">Start Time</label>
  589. <input type="time" name="startTime" class="form-control form-control-sm"
  590. value="{{ $startTime ? $startTime : '' }}">
  591. </div>
  592. <div class="mb-2">
  593. <label class="text-secondary text-sm">End Time</label>
  594. <input type="time" name="endTime" class="form-control form-control-sm"
  595. value="{{ $endTime ? $endTime : '' }}">
  596. </div>
  597. <div>
  598. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  599. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  600. </div>
  601. </form>
  602. </span>
  603. </div>
  604. <div>
  605. <label>CM:</label> {{ $patient->is_enrolled_in_cm === 'YES' ? 'Yes' : 'No' }}
  606. <label class="ml-2">RM:</label> {{ $patient->is_enrolled_in_rm === 'YES' ? 'Yes' : 'No' }}
  607. </div>
  608. </section>--}}
  609. <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-4">
  610. @if(false)
  611. <div moe>
  612. <button class="col-2-button" start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;Note
  613. </button>
  614. <form url="/api/note/createUsingTemplate"
  615. redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
  616. class="mcp-theme-1">
  617. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  618. @if($pro->is_hcp)
  619. <input type="hidden" name="hcpProUid" value="{{$pro->uid}}">
  620. @else
  621. <input type="hidden" name="naProUid" value="{{$pro->uid}}">
  622. @endif
  623. <input type="hidden" name="effectiveDateEST" value="{{date("Y-m-d")}}">
  624. <input type="hidden" name="effectiveTime" value="{{date("h:i")}}">
  625. <input type="hidden" name="title" id="note-create-title" value="">
  626. <div class="form-group mb-2">
  627. <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
  628. <select name="noteTemplateUid" class="form-control form-control-sm"
  629. onchange="$('#note-create-title').val($(this).find('option:selected').text())"
  630. required>
  631. <option value=""> --select--</option>
  632. @foreach($pro->noteTemplates as $noteTemplate)
  633. <?php $nT = $noteTemplate->template(); ?>
  634. <option value="{{$nT->uid}}">{{$nT->title}}</option>
  635. @endforeach
  636. </select>
  637. </div>
  638. <div class="mb-2">
  639. <label for="" class="text-secondary text-sm mb-1">Method *</label>
  640. <select name="method" class="form-control form-control-sm note-method-select" required>
  641. <option value="AUDIO">Audio</option>
  642. <option value="VIDEO">Video</option>
  643. <option value="IN_CLINIC">In-Clinic</option>
  644. <option value="HOUSE_CALL">House Call</option>
  645. </select>
  646. </div>
  647. <div class="form-group if-in-clinic">
  648. <label for="" class="text-secondary text-sm mb-1">Location</label>
  649. <select name="hcpCompanyLocationUid" class="form-control">
  650. <option value=""></option>
  651. @foreach($pro->companyLocations() as $location)
  652. <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
  653. @endforeach
  654. </select>
  655. </div>
  656. <div class="form-group m-0">
  657. <button submit class="btn btn-primary btn-sm">submit</button>
  658. </div>
  659. </form>
  660. </div>
  661. @endif
  662. <div>
  663. <div moe relative>
  664. <button class="col-2-button" start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;SMS
  665. </button>
  666. <form url="/api/clientSms/createOutgoing" right class="mcp-theme-1" noreload>
  667. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  668. <div class="mb-2">
  669. <label for="" class="text-sm text-secondary mb-1">Cell
  670. Number</label>
  671. <input type="text" class="form-control form-control-sm"
  672. name="cellNumber" value="{{$patient->cell_number}}">
  673. </div>
  674. <div class="mb-2">
  675. <label for=""
  676. class="text-sm text-secondary mb-1">Message</label>
  677. <textarea type="text" class="form-control form-control-sm"
  678. name="message"></textarea>
  679. </div>
  680. <div class="d-flex align-items-center">
  681. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  682. <button class="btn btn-sm btn-default mr-2 border" cancel>
  683. Cancel
  684. </button>
  685. </div>
  686. </form>
  687. </div>
  688. </div>
  689. <div>
  690. <span moe relative class="">
  691. <button class="col-2-button" start show title="SMS check-in link to the patient"><i
  692. class="on-hover-opaque fa fa-paper-plane text-secondary"></i>&nbsp;Send</button>
  693. <form url="/api/client/sendCheckInTokenViaSmsOrEmail" right
  694. class="mcp-theme-1">
  695. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  696. <p class="small min-width-200px mb-2">Send Check-In link to patient?</p>
  697. <div class="mb-2">
  698. <label for=""
  699. class="text-sm text-secondary mb-1">Cell Number</label>
  700. <input type="text" class="form-control input-sm" name="cellNumber"
  701. value="{{$patient->cell_number}}">
  702. </div>
  703. <div class="mb-2">
  704. <label for=""
  705. class="text-sm text-secondary mb-1">Email address</label>
  706. <input type="text" class="form-control input-sm" name="emailAddress"
  707. value="{{$patient->email_address}}">
  708. </div>
  709. <div class="d-flex align-items-center">
  710. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  711. <button class="btn btn-sm btn-default mr-2 border"
  712. cancel>Cancel</button>
  713. </div>
  714. </form>
  715. </span>
  716. </div>
  717. @if($performer->pro->pro_type == 'ADMIN')
  718. <div>
  719. <button class="col-2-button" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')"><i
  720. class="on-hover-opaque fa fa-video text-secondary"></i>&nbsp;Check</button>
  721. </div>
  722. @endif
  723. <div>
  724. <button class="col-2-button" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')"><i
  725. class="on-hover-opaque fa fa-video text-secondary"></i>&nbsp;Join</button>
  726. </div>
  727. </section>
  728. @if(!$patient->getPrimaryCoverage() || $patient->getPrimaryCoverageStatus() !== 'YES')
  729. <section class="hide-inside-popup screen-only vbox align-self-start mt-2 mx-2">
  730. @include('app.patient.coverage-status')
  731. </section>
  732. @endif
  733. <ul class="vbox mt-2 align-self-start patient-header-address ml-auto">
  734. <li class="d-flex align-items-start">
  735. <span class="aligned-icon">
  736. <i class="fa fa-map-marker-alt" aria-hidden="true"></i>
  737. </span>
  738. <div class="position-relative">
  739. <?php
  740. $addressParts = [];
  741. if (!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
  742. if (!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
  743. $addressParts = implode(", ", $addressParts) . "<br/>";
  744. $addressPart2 = [];
  745. if (!!$patient->mailing_address_city) $addressPart2[] = $patient->mailing_address_city;
  746. if (!!$patient->mailing_address_state) $addressPart2[] = $patient->mailing_address_state;
  747. $addressParts .= implode(", ", $addressPart2);
  748. echo $addressParts;
  749. ?>
  750. {{ $patient->mailing_address_zip ? $patient->mailing_address_zip : '' }}
  751. @if($patient->mailing_address_memo)
  752. <span class="position-relative c-pointer text-center stag-tooltip ml-2">
  753. <i class="fa fa-info-circle"></i>
  754. <div
  755. class="position-absolute bg-white border rounded p-2 stag-tooltip-content">
  756. <div class="text-left font-weight-bold pb-1">Special Instructions</div>
  757. <div
  758. class="text-left font-weight-normal">{{$patient->mailing_address_memo}}</div>
  759. </div>
  760. </span>
  761. @endif
  762. </div>
  763. </li>
  764. @if($patient->cell_number)
  765. <li>
  766. <span class="aligned-icon">
  767. <i class="fa fa-phone-alt" aria-hidden="true"></i>
  768. </span>
  769. {{$patient->cell_number}}
  770. <span class="small text-secondary ml-1">
  771. {{ $patient->cell_number_memo ? '(' . $patient->cell_number_memo . ')' : '' }}
  772. </span>
  773. </li>
  774. @endif
  775. @if($patient->phone_home)
  776. <li>
  777. <span class="aligned-icon"><i class="fa fa-home" aria-hidden="true"></i></span>
  778. {{$patient->phone_home}}
  779. </li>
  780. @endif
  781. <li class="d-flex align-items-baseline">
  782. <div class="{{empty($confirmedEmail) || $confirmedEmail === '-' ? 'screen-only' : ''}}">
  783. <span class="aligned-icon">
  784. <i class="fa fa-envelope" aria-hidden="true"></i>
  785. </span>
  786. {{$confirmedEmail}}
  787. </div>
  788. <span class="mx-2 text-secondary text-sm">|</span>
  789. <div>
  790. <span class="aligned-icon text-primary">
  791. <i class="fa fa-link" aria-hidden="true"></i>
  792. </span>
  793. <?php $numLinkedAccounts = $patient->linkedAccounts ? count($patient->linkedAccounts) : 0; ?>
  794. <a href="{{route('patients.view.accounts', ['patient' => $patient])}}">
  795. Accounts ({{$numLinkedAccounts}})
  796. </a>
  797. </div>
  798. </li>
  799. </ul>
  800. </div>
  801. </div>
  802. </div> <!-- z -->
  803. </div>
  804. </div>
  805. @if($pro->pro_type === 'ADMIN')
  806. <div class="screen-only card-header py-2 d-flex align-items-center mcp-theme-1 bg-aliceblue hide-inside-popup">
  807. <b class="">Tags ({{count($patient->clientTags)}}):</b>
  808. @foreach($patient->clientTags as $tag)
  809. <div class="d-inline-flex align-items-center ml-2 py-1 px-2 rounded bg-aliceblue text-info">
  810. <span class="text-sm">{{$tag->tag}}</span>
  811. <div moe relative class="ml-2">
  812. <a href="" start show><i class="fa fa-times text-secondary on-hover-opaque"></i></a>
  813. <form url="/api/clientTag/cancel" class="mcp-theme-1 min-width-200px">
  814. <input type="hidden" name="uid" value="{{$tag->uid}}">
  815. <p class="text-nowrap text-dark">Cancel this tag?</p>
  816. <div>
  817. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  818. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  819. </div>
  820. </form>
  821. </div>
  822. </div>
  823. @endforeach
  824. <div moe relative class="ml-2">
  825. <a href="" start show class="text-sm">+ Add</a>
  826. <form url="/api/clientTag/create" class="mcp-theme-1">
  827. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  828. <div class="mb-2">
  829. <label class="text-secondary text-sm">Tag</label>
  830. <input type="text" class="form-control form-control-sm"
  831. name="tag"
  832. placeholder="Tag" required>
  833. </div>
  834. <div>
  835. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  836. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  837. </div>
  838. </form>
  839. </div>
  840. </div>
  841. @endif
  842. {{--<div class="text-container border-bottom d-flex align-items-center mcp-theme-1 px-3">
  843. @if($patient->mcp_pro_id !== $pro->id && $patient->active_mcp_request_id)
  844. <div moe relative class="ml-2">
  845. <a href="" start show class="btn btn-sm btn-success text-white font-weight-bold small">Claim as MCP</a>
  846. <form url="/api/mcpRequest/claim" class="mcp-theme-1" right>
  847. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  848. <p>Claim this patient?</p>
  849. <div>
  850. <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
  851. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  852. </div>
  853. </form>
  854. </div>
  855. @endif
  856. </div>--}}
  857. <div class="card-body {{$routeName === 'patients.view.notes.view.dashboard' ? 'p-0' : ''}}">
  858. {{--<h1 class="h3">@yield('section-title')</h1>--}}
  859. <div class="mcp-theme-1">
  860. @yield('inner-content')
  861. </div>
  862. </div>
  863. </div>
  864. </main>
  865. </div>
  866. </div>
  867. <script>
  868. (function() {
  869. function init() {
  870. $('.note-method-select').change(function() {
  871. let form = $(this).closest('form');
  872. if(this.value === 'IN_CLINIC') {
  873. form.find('.if-in-clinic').show();
  874. }
  875. else {
  876. form.find('.if-in-clinic').hide();
  877. }
  878. });
  879. $('.note-method-select').each(function() {
  880. let form = $(this).closest('form');
  881. if(this.value === 'IN_CLINIC') {
  882. form.find('.if-in-clinic').show();
  883. }
  884. else {
  885. form.find('.if-in-clinic').hide();
  886. }
  887. });
  888. // $('[data-toggle="tooltip"]').tooltip('hover');
  889. }
  890. addMCInitializer('patient-add-note-popup', init, '#patient-header')
  891. }).call(window);
  892. </script>
  893. <script>
  894. (function() {
  895. function init() {
  896. $('#sidebarMenu')
  897. .off('scroll')
  898. .on('scroll', function() {
  899. localStorage.sidebarMenuScrollTop = $(this).scrollTop();
  900. });
  901. if(localStorage.sidebarMenuScrollTop) {
  902. $('#sidebarMenu').scrollTop(+localStorage.sidebarMenuScrollTop);
  903. }
  904. $(function () {
  905. $('[data-toggle="tooltip"]').tooltip();
  906. });
  907. }
  908. addMCInitializer('sidebarMenu', init, '#sidebarMenu')
  909. }).call(window);
  910. </script>
  911. @endsection