patient.blade.php 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  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. <span class="on-hover-show d-inline-block on-hover-opaque">
  373. <i class="fa fa-info-circle ml-1 text-primary"></i>
  374. <div class="on-hover-content py-2 pl-3 text-nowrap">
  375. Joined <?=$memberSince?>
  376. @if($pro->pro_type === 'ADMIN')
  377. <div class="mt-1">
  378. Created by <b>{{$patient->creator ? $patient->creator->displayName() : '-'}}</b>
  379. </div>
  380. <div class="mt-1">
  381. Created on <b>{{friendly_date_time($patient->created_at)}}</b>
  382. </div>
  383. @endif
  384. </div>
  385. </span>
  386. </div>
  387. </div>
  388. <div class=separators>
  389. <div>{{friendly_date($patient->dob, false,null, true)}} ({{$patient->age_in_years}}
  390. y.o {{$patient->sex}})
  391. </div>
  392. @if($patient->getPrimaryCoverage() && $patient->getPrimaryCoverageStatus() === 'YES')
  393. <div class="text-nowrap screen-only">
  394. {{$patient->getPrimaryCoverage()->insuranceDisplayName()}}
  395. <span class="on-hover-show d-inline-block on-hover-opaque">
  396. <i class="fa fa-check-circle text-success"></i>
  397. <div class="on-hover-content py-2 pl-3 text-nowrap">
  398. Covered
  399. </div>
  400. </span>
  401. </div>
  402. @endif
  403. <div class="screen-only">
  404. <label>Status:</label>
  405. <b>{{$patient->client_engagement_status_category ? ucwords(strtolower(str_replace('_', ' ', $patient->client_engagement_status_category == 'DUMMY' ? 'Test Chart' : $patient->client_engagement_status_category))) : '-'}}</b>
  406. </div>
  407. </div>
  408. <div class="screen-only">
  409. <div class=separators>
  410. <div>
  411. <label>MCP:</label> {{$mcpName}}
  412. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $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/putMcp" class="mcp-theme-1">
  416. <input type="hidden" name="uid" value="{{$patient->uid}}">
  417. <div class="mb-2">
  418. <label class="text-secondary text-sm">MCP Pro</label>
  419. <select name="mcpProUid" provider-search data-pro-uid="{{ @$patient->mcp->uid }}"
  420. class="form-control form-control-sm">
  421. <option value=""> --select--</option>
  422. @foreach($pros as $iPro)
  423. <option
  424. value="{{$iPro->uid}}" {{ $patient->mcp && $iPro->uid === $patient->mcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  425. @endforeach
  426. </select>
  427. </div>
  428. <div>
  429. <button submit class="btn btn-sm btn-primary mr-1">
  430. Submit
  431. </button>
  432. <button cancel class="btn btn-sm btn-default border">
  433. Cancel
  434. </button>
  435. </div>
  436. </form>
  437. </div>
  438. @if($patient->mcp)
  439. <div moe class="ml-2 hide-inside-popup">
  440. <a start show><i class="fa fa-times"></i></a>
  441. <form url="/api/client/removeMcp" class="mcp-theme-1">
  442. <input type="hidden" name="uid" value="{{$patient->uid}}">
  443. <div class="mb-2">
  444. <label class="text-secondary text-sm">Remove MCP Pro</label>
  445. </div>
  446. <div>
  447. <button submit class="btn btn-sm btn-primary mr-1">Submit
  448. </button>
  449. <button cancel class="btn btn-sm btn-default border">
  450. Cancel
  451. </button>
  452. </div>
  453. </form>
  454. </div>
  455. @endif
  456. @endif
  457. </div>
  458. <div>
  459. @if($patient->has_mcp_done_onboarding_visit !== 'YES')
  460. <span class="text-dark d-inline-flex align-items-center">
  461. <span class="mr-2">
  462. <i class="fa fa-exclamation-triangle"></i>
  463. MCP Onboarding Visit Pending
  464. </span>
  465. </span>
  466. <span moe class="hide-inside-popup">
  467. <a start show><i class="fa fa-edit"></i></a>
  468. <form url="/api/client/updateMcpOnboardingVisitInfo" class="mcp-theme-1">
  469. <input type="hidden" name="uid" value="{{$patient->uid}}">
  470. <div class="mb-2">
  471. <select name="hasMcpDoneOnboardingVisit"
  472. class="form-control form-control-sm"
  473. onchange="toggleDisabledAsNeeded(this, 'YES', 'if-visit-done')">
  474. <option value="">-- Select Status --</option>
  475. <option value="YES" {{ $patient->has_mcp_done_onboarding_visit === 'YES' ? 'selected' : '' }}>YES</option>
  476. <option value="NO" {{ $patient->has_mcp_done_onboarding_visit === 'NO' ? 'selected' : '' }}>NO</option>
  477. <option value="UNKNOWN" {{ $patient->has_mcp_done_onboarding_visit === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
  478. </select>
  479. </div>
  480. <div class="mb-2">
  481. <input type="date"
  482. class="if-visit-done form-control form-control-sm" disabled
  483. name="mcpOnboardingVisitDate" value="{{ date('Y-m-d') }}"
  484. max="{{ date('Y-m-d') }}">
  485. </div>
  486. <div class="mb-2">
  487. <select name="mcpOnboardingVisitNoteUid" disabled
  488. class="form-control form-control-sm if-visit-done"
  489. onchange="if(this.value === '-- create --') createNewNote('{{$patient->uid}}', '{{$pro->uid}}', '{{date('Y-m-d')}}');">
  490. <option value="">-- Visit Note --</option>
  491. <?php $notes = \App\Models\Note::where('client_id', $patient->id)->get() ?>
  492. @foreach ($notes as $note)
  493. @if(!empty($note->title) && $note->client_id === $patient->id && !$note->is_cancelled)
  494. <option
  495. {{ $patient->mcp_onboarding_visit_note_id === $note->id ? 'selected' : '' }}
  496. value="{{$note->uid}}">{{$note->hcpPro->displayName()}} ({{friendly_date_time($note->effective_dateest, false)}})</option>
  497. @endif
  498. @endforeach
  499. {{--<option value="-- create --">-- Create Note --</option>--}}
  500. </select>
  501. </div>
  502. <div class="mb-2 if-note-outside-system">
  503. <textarea class="form-control form-control-sm"
  504. name="reasonOnboardingVisitNoteOutsideSystem"
  505. placeholder="Visit note outside the system reason"
  506. spellcheck="false" data-gramm="false"></textarea>
  507. </div>
  508. <div>
  509. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  510. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  511. </div>
  512. </form>
  513. </span>
  514. @else
  515. <span class="text-dark d-inline-flex align-items-center">
  516. <span class="mr-2 text-secondary">
  517. <i class="fa fa-check text-sm"></i>
  518. MCP Onboarding Visit Completed
  519. </span>
  520. </span>
  521. @endif
  522. </div>
  523. </div>
  524. <div>
  525. <label>Physician:</label> {{$patient->pcp ? $patient->pcp->displayName() : '-' }}
  526. @if($pro->pro_type == 'ADMIN')
  527. <div moe class="ml-2 hide-inside-popup">
  528. <a start show><i class="fa fa-edit"></i></a>
  529. <form url="/api/client/putPhysicianPro" class="mcp-theme-1">
  530. <input type="hidden" name="uid" value="{{$patient->uid}}">
  531. <div class="mb-2">
  532. <label class="text-secondary text-sm">Physician Pro</label>
  533. <select provider-search data-pro-uid="{{ @$patient->pcp->uid }}"
  534. name="physicianProUid"
  535. class="form-control form-control-sm">
  536. <option value=""> --select--</option>
  537. @foreach($pros as $iPro)
  538. <option
  539. value="{{$iPro->uid}}" {{ $patient->pcp && $iPro->uid === $patient->pcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  540. @endforeach
  541. </select>
  542. </div>
  543. <div>
  544. <button submit class="btn btn-sm btn-primary mr-1">Submit
  545. </button>
  546. <button cancel class="btn btn-sm btn-default border">
  547. Cancel
  548. </button>
  549. </div>
  550. </form>
  551. </div>
  552. @if($patient->pcp)
  553. <div moe class="ml-2 hide-inside-popup">
  554. <a start show><i class="fa fa-times"></i></a>
  555. <form url="/api/client/removePhysicianPro" class="mcp-theme-1">
  556. <input type="hidden" name="uid" value="{{$patient->uid}}">
  557. <div class="mb-2">
  558. <label class="text-secondary text-sm">Remove Physician Pro</label>
  559. </div>
  560. <div>
  561. <button submit class="btn btn-sm btn-primary mr-1">Submit
  562. </button>
  563. <button cancel class="btn btn-sm btn-default border">
  564. Cancel
  565. </button>
  566. </div>
  567. </form>
  568. </div>
  569. @endif
  570. @endif
  571. </div>
  572. </div>
  573. </section>
  574. <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-3 pl-3 border-left mcp-theme-1">
  575. <div>
  576. <div moe relative>
  577. <a href="#" start show class="d-flex align-items-baseline"><i class="fa fa-plus text-sm mr-1"></i><span>SMS</span></a>
  578. <form url="/api/clientSms/createOutgoing" right class="mcp-theme-1" noreload>
  579. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  580. <div class="mb-2">
  581. <label for="" class="text-sm text-secondary mb-1">Cell
  582. Number</label>
  583. <input type="text" class="form-control form-control-sm"
  584. name="cellNumber" value="{{$patient->cell_number}}">
  585. </div>
  586. <div class="mb-2">
  587. <label for=""
  588. class="text-sm text-secondary mb-1">Message</label>
  589. <textarea type="text" class="form-control form-control-sm"
  590. name="message"></textarea>
  591. </div>
  592. <div class="d-flex align-items-center">
  593. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  594. <button class="btn btn-sm btn-default mr-2 border" cancel>
  595. Cancel
  596. </button>
  597. </div>
  598. </form>
  599. </div>
  600. </div>
  601. <div>
  602. <span moe relative class="">
  603. <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>
  604. <form url="/api/client/sendCheckInTokenViaSmsOrEmail" right
  605. class="mcp-theme-1">
  606. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  607. <p class="small min-width-200px mb-2">Send Check-In link to patient?</p>
  608. <div class="mb-2">
  609. <label for=""
  610. class="text-sm text-secondary mb-1">Cell Number</label>
  611. <input type="text" class="form-control input-sm" name="cellNumber"
  612. value="{{$patient->cell_number}}">
  613. </div>
  614. <div class="mb-2">
  615. <label for=""
  616. class="text-sm text-secondary mb-1">Email address</label>
  617. <input type="text" class="form-control input-sm" name="emailAddress"
  618. value="{{$patient->email_address}}">
  619. </div>
  620. <div class="d-flex align-items-center">
  621. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  622. <button class="btn btn-sm btn-default mr-2 border"
  623. cancel>Cancel</button>
  624. </div>
  625. </form>
  626. </span>
  627. </div>
  628. @if($performer->pro->pro_type == 'ADMIN')
  629. <div>
  630. <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>
  631. </div>
  632. @endif
  633. <div>
  634. <a href="#" start show class="d-flex align-items-baseline" onclick="return openInRHS('/pro/meed/{{ $patient->uid }}')"><i class="fa fa-video text-sm mr-1"></i><span>Join</span></a>
  635. </div>
  636. </section>
  637. @if(!$patient->getPrimaryCoverage() || $patient->getPrimaryCoverageStatus() !== 'YES')
  638. <section class="hide-inside-popup screen-only vbox align-self-start mt-2 mx-2">
  639. @include('app.patient.coverage-status')
  640. </section>
  641. @endif
  642. <section class="mr-4 align-self-start mt-2 ml-auto">
  643. <label>Sticky Note:</label> <span class="text-secondary">{{$patient->sticky_note ?? '-' }}</span>
  644. <div moe relative wide class="ml-2 hide-inside-popup">
  645. <a start show><i class="fa fa-edit"></i></a>
  646. <form url="/api/client/updateStickyNote" class="mcp-theme-1" right>
  647. <input type="hidden" name="uid" value="{{$patient->uid}}">
  648. <div class="mb-2">
  649. <label class="text-secondary text-sm">Sticky Note</label>
  650. <textarea name="stickyNote" class="form-control" rows="8" cols="80"></textarea>
  651. </div>
  652. <div>
  653. <button submit class="btn btn-sm btn-primary mr-1">Submit
  654. </button>
  655. <button cancel class="btn btn-sm btn-default border">
  656. Cancel
  657. </button>
  658. </div>
  659. </form>
  660. </div>
  661. </section>
  662. <ul class="vbox mt-2 align-self-start patient-header-address ">
  663. <li class="d-flex align-items-start">
  664. <span class="aligned-icon">
  665. <i class="fa fa-map-marker-alt" aria-hidden="true"></i>
  666. </span>
  667. <div class="position-relative">
  668. <?php
  669. $addressParts = [];
  670. if (!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
  671. if (!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
  672. $addressParts = implode(", ", $addressParts) . "<br/>";
  673. $addressPart2 = [];
  674. if (!!$patient->mailing_address_city) $addressPart2[] = $patient->mailing_address_city;
  675. if (!!$patient->mailing_address_state) $addressPart2[] = $patient->mailing_address_state;
  676. $addressParts .= implode(", ", $addressPart2);
  677. echo $addressParts;
  678. ?>
  679. {{ $patient->mailing_address_zip ? $patient->mailing_address_zip : '' }}
  680. @if($patient->mailing_address_memo)
  681. <span class="position-relative c-pointer text-center stag-tooltip ml-2">
  682. <i class="fa fa-info-circle"></i>
  683. <div
  684. class="position-absolute bg-white border rounded p-2 stag-tooltip-content">
  685. <div class="text-left font-weight-bold pb-1">Special Instructions</div>
  686. <div
  687. class="text-left font-weight-normal">{{$patient->mailing_address_memo}}</div>
  688. </div>
  689. </span>
  690. @endif
  691. </div>
  692. </li>
  693. @if($patient->cell_number)
  694. <li>
  695. <span class="aligned-icon">
  696. <i class="fa fa-phone-alt" aria-hidden="true"></i>
  697. </span>
  698. {{$patient->cell_number}}
  699. <span class="small text-secondary ml-1">
  700. {{ $patient->cell_number_memo ? '(' . $patient->cell_number_memo . ')' : '' }}
  701. </span>
  702. </li>
  703. @endif
  704. @if($patient->phone_home)
  705. <li>
  706. <span class="aligned-icon"><i class="fa fa-home" aria-hidden="true"></i></span>
  707. {{$patient->phone_home}}
  708. </li>
  709. @endif
  710. <li class="d-flex align-items-baseline">
  711. <div class="{{empty($confirmedEmail) || $confirmedEmail === '-' ? 'screen-only' : ''}}">
  712. <span class="aligned-icon">
  713. <i class="fa fa-envelope" aria-hidden="true"></i>
  714. </span>
  715. {{$confirmedEmail}}
  716. </div>
  717. <div class="d-inline-flex screen-only">
  718. <span class="mx-2 text-secondary text-sm">|</span>
  719. <span class="aligned-icon text-primary">
  720. <i class="fa fa-link" aria-hidden="true"></i>
  721. </span>
  722. <?php $numLinkedAccounts = $patient->linkedAccounts ? count($patient->linkedAccounts) : 0; ?>
  723. <a href="{{route('patients.view.accounts', ['patient' => $patient])}}">
  724. Accounts ({{$numLinkedAccounts}})
  725. </a>
  726. </div>
  727. </li>
  728. </ul>
  729. </div>
  730. </div>
  731. </div> <!-- z -->
  732. </div>
  733. </div>
  734. @if($pro->pro_type === 'ADMIN')
  735. <div class="screen-only card-header py-2 d-flex align-items-center mcp-theme-1 bg-aliceblue hide-inside-popup">
  736. <b class="">Tags ({{count($patient->clientTags)}}):</b>
  737. @foreach($patient->clientTags as $tag)
  738. <div class="d-inline-flex align-items-center ml-2 py-1 px-2 rounded bg-aliceblue text-info">
  739. <span class="text-sm">{{$tag->tag}}</span>
  740. <div moe relative class="ml-2">
  741. <a href="" start show><i class="fa fa-times text-secondary on-hover-opaque"></i></a>
  742. <form url="/api/clientTag/cancel" class="mcp-theme-1 min-width-200px">
  743. <input type="hidden" name="uid" value="{{$tag->uid}}">
  744. <p class="text-nowrap text-dark">Cancel this tag?</p>
  745. <div>
  746. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  747. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  748. </div>
  749. </form>
  750. </div>
  751. </div>
  752. @endforeach
  753. <div moe relative class="ml-2">
  754. <a href="" start show class="text-sm">+ Add</a>
  755. <form url="/api/clientTag/create" class="mcp-theme-1">
  756. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  757. <div class="mb-2">
  758. <label class="text-secondary text-sm">Tag</label>
  759. <input type="text" class="form-control form-control-sm"
  760. name="tag"
  761. placeholder="Tag" required>
  762. </div>
  763. <div>
  764. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  765. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  766. </div>
  767. </form>
  768. </div>
  769. </div>
  770. @endif
  771. {{--<div class="text-container border-bottom d-flex align-items-center mcp-theme-1 px-3">
  772. @if($patient->mcp_pro_id !== $pro->id && $patient->active_mcp_request_id)
  773. <div moe relative class="ml-2">
  774. <a href="" start show class="btn btn-sm btn-success text-white font-weight-bold small">Claim as MCP</a>
  775. <form url="/api/mcpRequest/claim" class="mcp-theme-1" right>
  776. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  777. <p>Claim this patient?</p>
  778. <div>
  779. <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
  780. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  781. </div>
  782. </form>
  783. </div>
  784. @endif
  785. </div>--}}
  786. <div class="card-body {{$routeName === 'patients.view.notes.view.dashboard' ? 'p-0' : ''}}">
  787. {{--<h1 class="h3">@yield('section-title')</h1>--}}
  788. <div class="mcp-theme-1">
  789. @yield('inner-content')
  790. </div>
  791. </div>
  792. </div>
  793. </main>
  794. </div>
  795. </div>
  796. <script>
  797. (function() {
  798. function init() {
  799. $('.note-method-select').change(function() {
  800. let form = $(this).closest('form');
  801. if(this.value === 'IN_CLINIC') {
  802. form.find('.if-in-clinic').show();
  803. }
  804. else {
  805. form.find('.if-in-clinic').hide();
  806. }
  807. });
  808. $('.note-method-select').each(function() {
  809. let form = $(this).closest('form');
  810. if(this.value === 'IN_CLINIC') {
  811. form.find('.if-in-clinic').show();
  812. }
  813. else {
  814. form.find('.if-in-clinic').hide();
  815. }
  816. });
  817. }
  818. addMCInitializer('patient-add-note-popup', init, '#patient-header')
  819. }).call(window);
  820. </script>
  821. <script>
  822. (function() {
  823. function init() {
  824. $('#sidebarMenu')
  825. .off('scroll')
  826. .on('scroll', function() {
  827. localStorage.sidebarMenuScrollTop = $(this).scrollTop();
  828. });
  829. if(localStorage.sidebarMenuScrollTop) {
  830. $('#sidebarMenu').scrollTop(+localStorage.sidebarMenuScrollTop);
  831. }
  832. }
  833. addMCInitializer('sidebarMenu', init, '#sidebarMenu')
  834. }).call(window);
  835. </script>
  836. @endsection