patient.blade.php 53 KB

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