patient.blade.php 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931
  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. @if($performer->pro->pro_type == 'ADMIN')
  247. <li class="nav-item">
  248. <a class="nav-link {{ strpos($routeName, 'patients.view.client-pro-access') === 0 ? 'active' : '' }}"
  249. href="{{ route('patients.view.client-pro-access', ['patient' => $patient]) }}">Client Pro Access</a>
  250. </li>
  251. @endif
  252. <li class="nav-item">
  253. <a class="nav-link" href="/patients/view/{{ $patient->uid }}/intake">Intake</a>
  254. </li>
  255. <li class="nav-item">
  256. <a class="nav-link {{ strpos($routeName, 'patients.view.primary-coverage') === 0 ? 'active' : '' }}"
  257. href="{{ route('patients.view.primary-coverage', $patient) }}">Primary Coverage</a>
  258. </li>
  259. @if($performer->pro->pro_type == 'ADMIN' || $performer->pro->id == $patient->default_na_pro_id)
  260. <li class="nav-item">
  261. <a class="nav-link {{ strpos($routeName, 'patients.view.mcp-requests') === 0 ? 'active' : '' }}"
  262. href="{{ route('patients.view.mcp-requests', $patient) }}">MCP Requests</a>
  263. </li>
  264. <li class="nav-item">
  265. <a class="nav-link {{ strpos($routeName, 'patients.view.eligible-refreshes') === 0 ? 'active' : '' }}"
  266. href="{{ route('patients.view.eligible-refreshes', $patient) }}">Eligible Refreshes</a>
  267. </li>
  268. <li class="nav-item">
  269. <a class="nav-link {{ strpos($routeName, 'patients.view.insurance-coverage') === 0 ? 'active' : '' }}"
  270. href="{{ route('patients.view.insurance-coverage', $patient) }}">Insurance Coverage</a>
  271. </li>
  272. <li class="nav-item">
  273. <a class="nav-link {{ strpos($routeName, 'patients.view.claims-resolver') === 0 ? 'active' : '' }}"
  274. href="{{ route('patients.view.claims-resolver', $patient) }}">Claims Resolver</a>
  275. </li>
  276. @endif
  277. <li class="nav-item">
  278. <a class="nav-link {{ strpos($routeName, 'patients.view.accounts') === 0 ? 'active' : '' }}"
  279. href="{{ route('patients.view.accounts', $patient) }}">Linked Accounts</a>
  280. </li>
  281. </ul>
  282. <div class="mt-3 mcp-theme-1">
  283. @yield('left-nav-content')
  284. </div>
  285. </div>
  286. </nav>
  287. @endif
  288. <main role="main" class="w-100 {{$trimLayout || $isVisitNote ? 'p-0' : ''}}">
  289. @if($pro->is_enrolled_as_mcp && !$patient->mcp)
  290. <div class="alert alert-info bg-white mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup m-1">
  291. <div class="font-size-16">
  292. <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
  293. This patient currently does not have an MCP assigned.
  294. </div>
  295. <div class="mt-3 d-flex align-items-center">
  296. <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>
  297. <div class="in-conv-confirmed d-none align-items-center">
  298. <i class="fa fa-chevron-right mx-3 text-secondary"></i>
  299. <div moe class=" hide-inside-popup">
  300. <a href="" start show class="btn btn-primary font-weight-bold text-white">
  301. Assign myself as the MCP for this patient
  302. </a>
  303. <form url="/api/client/putMcp" class="mcp-theme-1">
  304. <input type="hidden" name="uid" value="{{$patient->uid}}">
  305. <input type="hidden" name="mcpProUid" value="{{$pro->uid}}">
  306. <p>Are you sure?</p>
  307. <div>
  308. <button submit class="btn btn-sm btn-primary mr-2">
  309. Submit
  310. </button>
  311. <button cancel class="btn btn-sm btn-default border">
  312. Cancel
  313. </button>
  314. </div>
  315. </form>
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. @endif
  321. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $patient->is_mcp_onboarding_active === 'NO')
  322. <div class="alert alert-warning mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
  323. <div class="font-weight-bold text-dark font-size-16">MCP onboarding is not active for this patient.</div>
  324. <div class="text-secondary p-2 border mt-2 bg-light">
  325. <div class="font-weight-bold">{{$patient->why_is_mcp_onboarding_not_active_category}}</div>
  326. <div>{{$patient->why_is_mcp_onboarding_not_active_memo}}</div>
  327. </div>
  328. </div>
  329. @endif
  330. <div class="card {{$trimLayout || $isVisitNote ? 'card m-0 border-0 rounded-0' : 'my-3'}}" id="patient-header">
  331. <div id="patient-header-content">
  332. <div class="card-header @if($patient->client_engagement_status_category == 'DUMMY') alert-warning @endif py-1 hide-inside-ticket-popup">
  333. <?php
  334. $thumbnail = $patient->profile_picture_base64;
  335. $initials = !$thumbnail ? substr($patient->name_first, 0, 1) . substr($patient->name_last, 0, 1) : '';
  336. $online = $patient->is_online ? 'online' : '';
  337. $patientName = implode(', ', array_filter([$patient->name_last, $patient->name_first]));
  338. $confirmedCell = empty($patient->cell_number) ? '-' : $patient->cell_number;
  339. $confirmedEmail = empty($patient->email_address) ? '-' : $patient->email_address;
  340. $location = implode(', ', array_filter([$patient->home_address_city, $patient->home_address_state]));
  341. $location = empty($location) ? '-' : $location;
  342. $mcpName = $patient->mcp ? implode(', ', array_filter([$patient->mcp->name_last, $patient->mcp->name_first])) : null;
  343. $cmName = $patient->cm ? implode(', ', array_filter([$patient->cm->name_last, $patient->cm->name_first])) : null;
  344. $memberSince = date_diff(date_create($patient->created_at), date_create('now'))->days;
  345. if ($memberSince > 30) $memberSince = date('F, Y', strtotime($patient->created_at));
  346. else if ($memberSince > 1) $memberSince .= ' days ago';
  347. else if ($memberSince === 1) $memberSince = 'yesterday';
  348. else if ($memberSince === 0) $memberSince = 'today';
  349. ?>
  350. <div class=z>
  351. <div class=header>
  352. @if($patient->is_duplicate)
  353. <div class="alert alert-secondary border-dark mcp-theme-1 screen-only">
  354. <span class="text-dark">This chart is a duplicate of&nbsp;</span>
  355. <a class="font-weight-bold"
  356. href="/patients/view/{{ $patient->duplicateOf->uid }}">
  357. {{ $patient->duplicateOf->displayName() }}
  358. </a>
  359. </div>
  360. @endif
  361. <div class="hbox mr-auto">
  362. {{--<div>
  363. <div @if($patient->is_microphone_available)style="color:green" @else style="color:gray" @endif>
  364. <i class="fa fa-microphone"></i>
  365. </div>
  366. <div @if($patient->is_camera_available)style="color:green" @else style="color:gray" @endif>
  367. <i class="fa fa-video"></i>
  368. </div>
  369. </div>--}}
  370. <section>
  371. <div class="hbox">
  372. <h4 class="pt-name">{{$patientName}}</h4>
  373. <div class="screen-only mr-1 patient-presence-indicator thumbnail {{$online}}"
  374. data-patient-uid="{{$patient->uid}}"
  375. style="background-image:<?=$thumbnail?>"><?=$initials?></div>
  376. <div class="d-inline-flex align-items-baseline">
  377. <i class="chart mr-2">#{{$patient->chart_number}}</i>
  378. <span class="on-hover-show d-inline-block on-hover-opaque">
  379. <i class="fa fa-info-circle ml-1 text-primary"></i>
  380. <div class="on-hover-content py-2 pl-3 text-nowrap">
  381. Joined <?=$memberSince?>
  382. @if($pro->pro_type === 'ADMIN')
  383. <div class="mt-1">
  384. Created by <b>{{$patient->creator ? $patient->creator->displayName() : '-'}}</b>
  385. </div>
  386. <div class="mt-1">
  387. Created on <b>{{friendly_date_time($patient->created_at)}}</b>
  388. </div>
  389. @endif
  390. </div>
  391. </span>
  392. </div>
  393. </div>
  394. <div class=separators>
  395. <div>{{friendly_date($patient->dob, false,null, true)}} ({{$patient->age_in_years}}
  396. y.o {{$patient->sex}})
  397. </div>
  398. @if($patient->getPrimaryCoverage() && $patient->getPrimaryCoverageStatus() === 'YES')
  399. <div class="text-nowrap screen-only">
  400. {{$patient->getPrimaryCoverage()->insuranceDisplayName()}}
  401. <span class="on-hover-show d-inline-block on-hover-opaque">
  402. <i class="fa fa-check-circle text-success"></i>
  403. <div class="on-hover-content py-2 pl-3 text-nowrap">
  404. Covered
  405. </div>
  406. </span>
  407. </div>
  408. @endif
  409. <div class="screen-only">
  410. <label>Status:</label>
  411. <b>{{$patient->client_engagement_status_category ? ucwords(strtolower(str_replace('_', ' ', $patient->client_engagement_status_category == 'DUMMY' ? 'Test Chart' : $patient->client_engagement_status_category))) : '-'}}</b>
  412. @if($pro->pro_type == 'ADMIN')
  413. <div moe class="ml-2 hide-inside-popup">
  414. <a start show><i class="fa fa-edit"></i></a>
  415. <form url="/api/client/updateClientEngagementAssessmentStatus" class="mcp-theme-1" target="#patient-header-content">
  416. <input type="hidden" name="uid" value="{{$patient->uid}}">
  417. <div class="mb-2">
  418. <label class="mb-1 text-secondary text-sm">Status</label>
  419. <select name="category" class="form-control form-control-sm">
  420. <option value=""> --select--</option>
  421. <option {{ $patient->client_engagement_status_category === 'ACTIVE' ? 'selected' : '' }} value="ACTIVE">Active</option>
  422. <option {{ $patient->client_engagement_status_category === 'INACTIVE' ? 'selected' : '' }} value="INACTIVE">Inactive</option>
  423. <option {{ $patient->client_engagement_status_category === 'ENTRY_ERROR' ? 'selected' : '' }} value="ENTRY_ERROR">Entry Error</option>
  424. <option {{ $patient->client_engagement_status_category === 'DUMMY' ? 'selected' : '' }} value="DUMMY">Test Chart</option>
  425. <option {{ $patient->client_engagement_status_category === 'DECEASED' ? 'selected' : '' }} value="DECEASED">Deceased</option>
  426. <option {{ $patient->client_engagement_status_category === 'DUPLICATE' ? 'selected' : '' }} value="DUPLICATE">Duplicate</option>
  427. <option {{ $patient->client_engagement_status_category === 'NO_LONGER_INTERESTED' ? 'selected' : '' }} value="NO_LONGER_INTERESTED">No Longer Interested</option>
  428. <option {{ $patient->client_engagement_status_category === 'BAD_RECORD' ? 'selected' : '' }} value="BAD_RECORD">Bad Record</option>
  429. </select>
  430. </div>
  431. <div class="mb-2">
  432. <label class="mb-1 text-secondary text-sm">Memo</label>
  433. <textarea class="form-control form-control-sm" name="memo"></textarea>
  434. </div>
  435. <div>
  436. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  437. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  438. </div>
  439. </form>
  440. </div>
  441. @endif
  442. </div>
  443. </div>
  444. <div class="screen-only">
  445. <div class=separators>
  446. <div>
  447. <label>MCP:</label> {{$mcpName}}
  448. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $pro->pro_type == 'ADMIN')
  449. <div moe class="ml-2 hide-inside-popup">
  450. <a start show><i class="fa fa-edit"></i></a>
  451. <form url="/api/client/putMcp" class="mcp-theme-1">
  452. <input type="hidden" name="uid" value="{{$patient->uid}}">
  453. <div class="mb-2">
  454. <label class="text-secondary text-sm">MCP Pro</label>
  455. <select name="mcpProUid" provider-search data-pro-uid="{{ @$patient->mcp->uid }}"
  456. class="form-control form-control-sm">
  457. <option value=""> --select--</option>
  458. @foreach($pros as $iPro)
  459. <option
  460. value="{{$iPro->uid}}" {{ $patient->mcp && $iPro->uid === $patient->mcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  461. @endforeach
  462. </select>
  463. </div>
  464. <div>
  465. <button submit class="btn btn-sm btn-primary mr-1">
  466. Submit
  467. </button>
  468. <button cancel class="btn btn-sm btn-default border">
  469. Cancel
  470. </button>
  471. </div>
  472. </form>
  473. </div>
  474. @if($patient->mcp)
  475. <div moe class="ml-2 hide-inside-popup">
  476. <a start show><i class="fa fa-times"></i></a>
  477. <form url="/api/client/removeMcp" class="mcp-theme-1">
  478. <input type="hidden" name="uid" value="{{$patient->uid}}">
  479. <div class="mb-2">
  480. <label class="text-secondary text-sm">Remove MCP Pro</label>
  481. </div>
  482. <div>
  483. <button submit class="btn btn-sm btn-primary mr-1">Submit
  484. </button>
  485. <button cancel class="btn btn-sm btn-default border">
  486. Cancel
  487. </button>
  488. </div>
  489. </form>
  490. </div>
  491. @endif
  492. @endif
  493. </div>
  494. <div>
  495. @if($patient->has_mcp_done_onboarding_visit !== 'YES')
  496. <span class="text-dark d-inline-flex align-items-center">
  497. <span class="mr-2">
  498. <i class="fa fa-exclamation-triangle"></i>
  499. MCP Onboarding Visit Pending
  500. </span>
  501. </span>
  502. <span moe class="hide-inside-popup">
  503. <a start show><i class="fa fa-edit"></i></a>
  504. <form url="/api/client/updateMcpOnboardingVisitInfo" class="mcp-theme-1">
  505. <input type="hidden" name="uid" value="{{$patient->uid}}">
  506. <div class="mb-2">
  507. <select name="hasMcpDoneOnboardingVisit"
  508. class="form-control form-control-sm"
  509. onchange="toggleDisabledAsNeeded(this, 'YES', 'if-visit-done')">
  510. <option value="">-- Select Status --</option>
  511. <option value="YES" {{ $patient->has_mcp_done_onboarding_visit === 'YES' ? 'selected' : '' }}>YES</option>
  512. <option value="NO" {{ $patient->has_mcp_done_onboarding_visit === 'NO' ? 'selected' : '' }}>NO</option>
  513. <option value="UNKNOWN" {{ $patient->has_mcp_done_onboarding_visit === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
  514. </select>
  515. </div>
  516. <div class="mb-2">
  517. <input type="date"
  518. class="if-visit-done form-control form-control-sm" disabled
  519. name="mcpOnboardingVisitDate" value="{{ date('Y-m-d') }}"
  520. max="{{ date('Y-m-d') }}">
  521. </div>
  522. <div class="mb-2">
  523. <select name="mcpOnboardingVisitNoteUid" disabled
  524. class="form-control form-control-sm if-visit-done"
  525. onchange="if(this.value === '-- create --') createNewNote('{{$patient->uid}}', '{{$pro->uid}}', '{{date('Y-m-d')}}');">
  526. <option value="">-- Visit Note --</option>
  527. <?php $notes = \App\Models\Note::where('client_id', $patient->id)->get() ?>
  528. @foreach ($notes as $note)
  529. @if(!empty($note->title) && $note->client_id === $patient->id && !$note->is_cancelled)
  530. <option
  531. {{ $patient->mcp_onboarding_visit_note_id === $note->id ? 'selected' : '' }}
  532. value="{{$note->uid}}">{{$note->hcpPro->displayName()}} ({{friendly_date_time($note->effective_dateest, false)}})</option>
  533. @endif
  534. @endforeach
  535. {{--<option value="-- create --">-- Create Note --</option>--}}
  536. </select>
  537. </div>
  538. <div class="mb-2 if-note-outside-system">
  539. <textarea class="form-control form-control-sm"
  540. name="reasonOnboardingVisitNoteOutsideSystem"
  541. placeholder="Visit note outside the system reason"
  542. spellcheck="false" data-gramm="false"></textarea>
  543. </div>
  544. <div>
  545. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  546. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  547. </div>
  548. </form>
  549. </span>
  550. @else
  551. <span class="text-dark d-inline-flex align-items-center">
  552. <span class="mr-2 text-secondary">
  553. <i class="fa fa-check text-sm"></i>
  554. MCP Onboarding Visit Completed
  555. </span>
  556. </span>
  557. @endif
  558. </div>
  559. </div>
  560. <div>
  561. <label>CC:</label> {{$patient->defaultNaPro ? $patient->defaultNaPro->displayName() : '-' }}
  562. @if($pro->pro_type == 'ADMIN')
  563. <div moe class="ml-2 hide-inside-popup">
  564. <a start show><i class="fa fa-edit"></i></a>
  565. <form url="/api/client/putDefaultNaPro" class="mcp-theme-1">
  566. <input type="hidden" name="uid" value="{{$patient->uid}}">
  567. <div class="mb-2">
  568. <label class="text-secondary text-sm">Care Coordinator</label>
  569. <select provider-search data-pro-uid="{{ @$patient->defaultNaPro->uid }}"
  570. name="defaultNaProUid"
  571. class="form-control form-control-sm">
  572. <option value=""> --select--</option>
  573. @foreach($pros as $iPro)
  574. <option
  575. value="{{$iPro->uid}}" {{ $patient->pcp && $iPro->uid === $patient->pcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  576. @endforeach
  577. </select>
  578. </div>
  579. <div>
  580. <button submit class="btn btn-sm btn-primary mr-1">Submit
  581. </button>
  582. <button cancel class="btn btn-sm btn-default border">
  583. Cancel
  584. </button>
  585. </div>
  586. </form>
  587. </div>
  588. @if($patient->pcp)
  589. <div moe class="ml-2 hide-inside-popup">
  590. <a start show><i class="fa fa-times"></i></a>
  591. <form url="/api/client/removeDefaultNaPro" class="mcp-theme-1">
  592. <input type="hidden" name="uid" value="{{$patient->uid}}">
  593. <div class="mb-2">
  594. <label class="text-secondary text-sm">Remove Care Coordinator</label>
  595. </div>
  596. <div>
  597. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  598. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  599. </div>
  600. </form>
  601. </div>
  602. @endif
  603. @endif
  604. </div>
  605. <?php $currentCareMonth = $patient->currentCareMonth(); ?>
  606. @if($currentCareMonth && $pro->id === $currentCareMonth->mcp_pro_id)
  607. <div class="">
  608. <?php $spoken = $currentCareMonth->has_anyone_interacted_with_client_about_rm_outside_note; ?>
  609. <span class="">Communicated this month:</span>
  610. <b class="{{$spoken ? 'text-success' : ''}}">
  611. {{$spoken ? 'Yes' : 'No'}}
  612. @if(!$spoken)
  613. <i class="fa fa-exclamation-triangle"></i>
  614. @else
  615. <i class="fa fa-check"></i>
  616. @endif
  617. </b>
  618. @if($currentCareMonth->mcp && $pro->id === $currentCareMonth->mcp->id)
  619. <div moe relative class="ml-1">
  620. <a href="#" start show class="text-sm">Toggle</a>
  621. <form url="/api/careMonth/setHasAnyoneInteractedWithClientAboutRmOutsideNoteTo{{$spoken ? 'False' : 'True'}}" right>
  622. <input type="hidden" name="uid" value="{{$currentCareMonth->uid}}">
  623. <p>Set to {{$spoken ? 'No' : 'Yes'}}?</p>
  624. <div class="d-flex align-items-center">
  625. <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
  626. <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
  627. </div>
  628. </form>
  629. </div>
  630. @endif
  631. </div>
  632. @endif
  633. </div>
  634. </section>
  635. <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-3 pl-3 border-left mcp-theme-1">
  636. <div>
  637. <div moe relative>
  638. <a href="#" start show class="d-flex align-items-baseline"><i class="fa fa-plus text-sm mr-1"></i><span>SMS</span></a>
  639. <form url="/api/clientSms/createOutgoing" right class="mcp-theme-1" noreload>
  640. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  641. <div class="mb-2">
  642. <label for="" class="text-sm text-secondary mb-1">Cell
  643. Number</label>
  644. <input type="text" class="form-control form-control-sm"
  645. name="cellNumber" value="{{$patient->cell_number}}">
  646. </div>
  647. <div class="mb-2">
  648. <label for=""
  649. class="text-sm text-secondary mb-1">Message</label>
  650. <textarea type="text" class="form-control form-control-sm"
  651. name="message"></textarea>
  652. </div>
  653. <div class="d-flex align-items-center">
  654. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  655. <button class="btn btn-sm btn-default mr-2 border" cancel>
  656. Cancel
  657. </button>
  658. </div>
  659. </form>
  660. </div>
  661. </div>
  662. <div>
  663. <span moe relative class="">
  664. <a href="#" start show class="d-flex align-items-baseline" title="SMS check-in link to the patient"><i class="fa fa-paper-plane text-sm mr-1"></i><span>Send</span></a>
  665. <form url="/api/client/sendCheckInTokenViaSmsOrEmail" right
  666. class="mcp-theme-1">
  667. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  668. <p class="small min-width-200px mb-2">Send Check-In link to patient?</p>
  669. <div class="mb-2">
  670. <label for=""
  671. class="text-sm text-secondary mb-1">Cell Number</label>
  672. <input type="text" class="form-control input-sm" name="cellNumber"
  673. value="{{$patient->cell_number}}">
  674. </div>
  675. <div class="mb-2">
  676. <label for=""
  677. class="text-sm text-secondary mb-1">Email address</label>
  678. <input type="text" class="form-control input-sm" name="emailAddress"
  679. value="{{$patient->email_address}}">
  680. </div>
  681. <div class="d-flex align-items-center">
  682. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  683. <button class="btn btn-sm btn-default mr-2 border"
  684. cancel>Cancel</button>
  685. </div>
  686. </form>
  687. </span>
  688. </div>
  689. @if($performer->pro->pro_type == 'ADMIN')
  690. <div>
  691. <a href="#" start show class="d-flex align-items-baseline" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')"><i class="fa fa-video text-sm mr-1"></i><span>Check</span></a>
  692. </div>
  693. @endif
  694. <div>
  695. <a href="#" start show class="d-flex align-items-baseline" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')"><i class="fa fa-video text-sm mr-1"></i><span>Join</span></a>
  696. </div>
  697. </section>
  698. @if(!$patient->getPrimaryCoverage() || $patient->getPrimaryCoverageStatus() !== 'YES')
  699. <section class="hide-inside-popup screen-only vbox align-self-start mt-2 mx-2">
  700. @include('app.patient.coverage-status')
  701. </section>
  702. @endif
  703. <section class="mr-4 align-self-start mt-2 ml-auto">
  704. <div>
  705. <label>Sticky Note:</label> <span class="text-secondary">{{$patient->sticky_note ?? '-' }}</span>
  706. <div moe relative wide class="ml-2 hide-inside-popup">
  707. <a start show><i class="fa fa-edit"></i></a>
  708. <form url="/api/client/updateStickyNote" class="mcp-theme-1" right>
  709. <input type="hidden" name="uid" value="{{$patient->uid}}">
  710. <div class="mb-2">
  711. <label class="text-secondary text-sm">Sticky Note</label>
  712. <textarea name="stickyNote" class="form-control" rows="8" cols="80">{{$patient->sticky_note}}</textarea>
  713. </div>
  714. <div>
  715. <button submit class="btn btn-sm btn-primary mr-1">Submit
  716. </button>
  717. <button cancel class="btn btn-sm btn-default border">
  718. Cancel
  719. </button>
  720. </div>
  721. </form>
  722. </div>
  723. </div>
  724. @if($pro->pro_type === 'ADMIN')
  725. <div>
  726. <label>Intake Data: - </label> <span class="text-secondary"></span>
  727. @include('app.patient.intake-data.patient-intake-data-form')
  728. </div>
  729. @endif
  730. </section>
  731. <ul class="vbox mt-2 align-self-start patient-header-address ">
  732. <li class="d-flex align-items-start">
  733. <span class="aligned-icon">
  734. <i class="fa fa-map-marker-alt" aria-hidden="true"></i>
  735. </span>
  736. <div class="position-relative">
  737. <?php
  738. $addressParts = [];
  739. if (!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
  740. if (!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
  741. $addressParts = implode(", ", $addressParts) . "<br/>";
  742. $addressPart2 = [];
  743. if (!!$patient->mailing_address_city) $addressPart2[] = $patient->mailing_address_city;
  744. if (!!$patient->mailing_address_state) $addressPart2[] = $patient->mailing_address_state;
  745. $addressParts .= implode(", ", $addressPart2);
  746. echo $addressParts;
  747. ?>
  748. {{ $patient->mailing_address_zip ? $patient->mailing_address_zip : '' }}
  749. @if($patient->mailing_address_memo)
  750. <span class="position-relative c-pointer text-center stag-tooltip ml-2">
  751. <i class="fa fa-info-circle"></i>
  752. <div
  753. class="position-absolute bg-white border rounded p-2 stag-tooltip-content">
  754. <div class="text-left font-weight-bold pb-1">Special Instructions</div>
  755. <div
  756. class="text-left font-weight-normal">{{$patient->mailing_address_memo}}</div>
  757. </div>
  758. </span>
  759. @endif
  760. </div>
  761. </li>
  762. @if($patient->cell_number)
  763. <li>
  764. <span class="aligned-icon">
  765. <i class="fa fa-phone-alt" aria-hidden="true"></i>
  766. </span>
  767. {{$patient->cell_number}}
  768. <span class="small text-secondary ml-1">
  769. {{ $patient->cell_number_memo ? '(' . $patient->cell_number_memo . ')' : '' }}
  770. </span>
  771. </li>
  772. @endif
  773. @if($patient->phone_home)
  774. <li>
  775. <span class="aligned-icon"><i class="fa fa-home" aria-hidden="true"></i></span>
  776. {{$patient->phone_home}}
  777. </li>
  778. @endif
  779. <li class="d-flex align-items-baseline">
  780. <div class="{{empty($confirmedEmail) || $confirmedEmail === '-' ? 'screen-only' : ''}}">
  781. <span class="aligned-icon">
  782. <i class="fa fa-envelope" aria-hidden="true"></i>
  783. </span>
  784. {{$confirmedEmail}}
  785. </div>
  786. <div class="d-inline-flex screen-only">
  787. <span class="mx-2 text-secondary text-sm">|</span>
  788. <span class="aligned-icon text-primary">
  789. <i class="fa fa-link" aria-hidden="true"></i>
  790. </span>
  791. <?php $numLinkedAccounts = $patient->linkedAccounts ? count($patient->linkedAccounts) : 0; ?>
  792. <a href="{{route('patients.view.accounts', ['patient' => $patient])}}">
  793. Accounts ({{$numLinkedAccounts}})
  794. </a>
  795. </div>
  796. </li>
  797. <li class="d-flex align-items-baseline">
  798. <div class="d-inline-flex screen-only">
  799. @include('app.patient.send_email')
  800. </div>
  801. </li>
  802. </ul>
  803. </div>
  804. </div>
  805. </div> <!-- z -->
  806. </div>
  807. </div>
  808. @if($pro->pro_type === 'ADMIN')
  809. <div class="screen-only card-header py-2 d-flex align-items-center mcp-theme-1 bg-aliceblue hide-inside-popup">
  810. <b class="">Tags ({{count($patient->clientTags)}}):</b>
  811. @foreach($patient->clientTags as $tag)
  812. <div class="d-inline-flex align-items-center ml-2 py-1 px-2 rounded bg-aliceblue text-info">
  813. <span class="text-sm">{{$tag->tag}}</span>
  814. <div moe relative class="ml-2">
  815. <a href="" start show><i class="fa fa-times text-secondary on-hover-opaque"></i></a>
  816. <form url="/api/clientTag/cancel" class="mcp-theme-1 min-width-200px">
  817. <input type="hidden" name="uid" value="{{$tag->uid}}">
  818. <p class="text-nowrap text-dark">Cancel this tag?</p>
  819. <div>
  820. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  821. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  822. </div>
  823. </form>
  824. </div>
  825. </div>
  826. @endforeach
  827. <div moe relative class="ml-2">
  828. <a href="" start show class="text-sm">+ Add</a>
  829. <form url="/api/clientTag/create" class="mcp-theme-1">
  830. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  831. <div class="mb-2">
  832. <label class="text-secondary text-sm">Tag</label>
  833. <input type="text" class="form-control form-control-sm"
  834. name="tag"
  835. placeholder="Tag" required>
  836. </div>
  837. <div>
  838. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  839. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  840. </div>
  841. </form>
  842. </div>
  843. </div>
  844. @endif
  845. {{--<div class="text-container border-bottom d-flex align-items-center mcp-theme-1 px-3">
  846. @if($patient->mcp_pro_id !== $pro->id && $patient->active_mcp_request_id)
  847. <div moe relative class="ml-2">
  848. <a href="" start show class="btn btn-sm btn-success text-white font-weight-bold small">Claim as MCP</a>
  849. <form url="/api/mcpRequest/claim" class="mcp-theme-1" right>
  850. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  851. <p>Claim this patient?</p>
  852. <div>
  853. <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
  854. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  855. </div>
  856. </form>
  857. </div>
  858. @endif
  859. </div>--}}
  860. <div class="card-body {{$routeName === 'patients.view.notes.view.dashboard' ? 'p-0' : ''}}">
  861. {{--<h1 class="h3">@yield('section-title')</h1>--}}
  862. <div class="mcp-theme-1">
  863. @yield('inner-content')
  864. </div>
  865. </div>
  866. </div>
  867. </main>
  868. </div>
  869. </div>
  870. <script>
  871. (function() {
  872. function init() {
  873. $('.note-method-select').change(function() {
  874. let form = $(this).closest('form');
  875. if(this.value === 'IN_CLINIC') {
  876. form.find('.if-in-clinic').show();
  877. }
  878. else {
  879. form.find('.if-in-clinic').hide();
  880. }
  881. });
  882. $('.note-method-select').each(function() {
  883. let form = $(this).closest('form');
  884. if(this.value === 'IN_CLINIC') {
  885. form.find('.if-in-clinic').show();
  886. }
  887. else {
  888. form.find('.if-in-clinic').hide();
  889. }
  890. });
  891. }
  892. addMCInitializer('patient-add-note-popup', init, '#patient-header')
  893. }).call(window);
  894. </script>
  895. <script>
  896. (function() {
  897. function init() {
  898. $('#sidebarMenu')
  899. .off('scroll')
  900. .on('scroll', function() {
  901. localStorage.sidebarMenuScrollTop = $(this).scrollTop();
  902. });
  903. if(localStorage.sidebarMenuScrollTop) {
  904. $('#sidebarMenu').scrollTop(+localStorage.sidebarMenuScrollTop);
  905. }
  906. }
  907. addMCInitializer('sidebarMenu', init, '#sidebarMenu')
  908. }).call(window);
  909. </script>
  910. @endsection