patient.blade.php 50 KB

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