patient.blade.php 50 KB

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