patient.blade.php 50 KB

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