patient.blade.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. @extends(request()->input('popupmode') ? 'layouts.empty' : 'layouts.template')
  2. <?php
  3. /** @var \App\Models\Client $patient */
  4. ?>
  5. <?php
  6. $trimLayout = true;
  7. $routeName = request()->route()->getName();
  8. $leanLeftNav = ($routeName === 'patients.view.notes.view.dashboard' && @$note && !!$note->visitTemplate) || ($routeName === 'patients.view.sleep-study');
  9. $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1);
  10. ?>
  11. <style media="screen">
  12. .pt-name {
  13. font-size: 1.5rem !important;
  14. }
  15. </style>
  16. @section('content')
  17. <div class="container-fluid h-100 popup-content-container">
  18. <div class="main-row h-100 {{ !request()->input('popupmode') ? '' : 'px-0' }} {{$leanLeftNav ? 'autohide-leftnav' : ''}}">
  19. @if(!request()->input('popupmode'))
  20. <nav id="sidebarMenu" class="d-block bg-light sidebar collapse px-0">
  21. <div class="sidebar-sticky pt-3">
  22. <ul class="nav flex-column mcp-theme-1">
  23. <li class="nav-item">
  24. <a class="nav-link {{ strpos($routeName, 'patients.view.dashboard') === 0 ? 'active' : '' }}" href="{{ route('patients.view.dashboard', ['patient' => $patient]) }}">Dashboard</a>
  25. </li>
  26. @if($performer->pro->pro_type == 'ADMIN' && $isOldClient)
  27. <li class="nav-item">
  28. <a class="nav-link {{ strpos($routeName, 'patients.view.migrate-canvas') === 0 ? 'active' : '' }}" href="{{ route('patients.view.migrate-canvas', ['patient' => $patient]) }}">Canvas Migrate</a>
  29. </li>
  30. <li class="nav-item">
  31. <a class="nav-link {{ strpos($routeName, 'patients.view.canvas') === 0 ? 'active' : '' }}" href="{{ route('patients.view.canvas', ['patient' => $patient]) }}">Canvas</a>
  32. </li>
  33. @endif
  34. <li class="nav-item">
  35. @if($pro->pro_type === 'ADMIN' && $patient->mcp)
  36. <a class="nav-link {{ strpos($routeName, 'patients.view.calendar') === 0 ? 'active' : '' }}" href="{{ route('patients.view.calendar', ['patient' => $patient]) }}?opUid={{$patient->mcp->uid}}">Calendar</a>
  37. @else
  38. <a class="nav-link {{ strpos($routeName, 'patients.view.calendar') === 0 ? 'active' : '' }}" href="{{ route('patients.view.calendar', ['patient' => $patient]) }}">Calendar</a>
  39. @endif
  40. </li>
  41. @if($pro->pro_type === 'ADMIN')
  42. <li class="nav-item">
  43. <a class="nav-link {{ strpos($routeName, 'patients.view.invoicing-') === 0 ? 'active' : '' }}" href="{{ route('patients.view.invoicing-companies', ['patient' => $patient]) }}" title="Deprecated">Invoicing</a>
  44. </li>
  45. @endif
  46. <li class="nav-item">
  47. <a class="nav-link {{ strpos($routeName, 'patients.view.appointments') === 0 ? 'active' : '' }}" href="{{ route('patients.view.appointments', ['patient' => $patient, 'forPro' => 'all', 'status' => 'all']) }}">Appointments</a>
  48. </li>
  49. {{--
  50. <li class="nav-item">
  51. <a class="nav-link {{ strpos($routeName, 'patients.view.programs') === 0 ? 'active' : '' }}"
  52. href="{{ route('patients.view.programs', ['patient' => $patient]) }}">Programs</a>
  53. </li>
  54. <li class="nav-item">
  55. <a class="nav-link {{ strpos($routeName, 'patients.view.flowsheets') === 0 ? 'active' : '' }}" href="{{ route('patients.view.flowsheets', ['patient' => $patient]) }}">Flowsheets</a>
  56. </li>
  57. --}}
  58. <li class="nav-item">
  59. <a class="nav-link {{ strpos($routeName, 'patients.view.vitals-settings') === 0 ? 'active' : '' }}" href="{{ route('patients.view.vitals-settings', ['patient' => $patient]) }}">Vitals Settings</a>
  60. </li>
  61. <li class="nav-item">
  62. <a class="nav-link {{ strpos($routeName, 'patients.view.vitals-graph') === 0 ? 'active' : '' }}" href="{{ route('patients.view.vitals-graph', ['patient' => $patient]) }}">Vitals Graph</a>
  63. </li>
  64. <li class="nav-item">
  65. <a class="nav-link {{ strpos($routeName, 'patients.view.sleep-study') === 0 ? 'active' : '' }}" href="{{ route('patients.view.sleep-study', ['patient' => $patient]) }}">Sleep Study</a>
  66. </li>
  67. <li class="nav-item">
  68. <a class="nav-link {{ strpos($routeName, 'patients.view.care-months') === 0 ? 'active' : '' }}" href="{{ route('patients.view.care-months', ['patient' => $patient]) }}">Care Months</a>
  69. </li>
  70. <li class="nav-item">
  71. <a class="nav-link {{ strpos($routeName, 'patients.view.measurements') === 0 ? 'active' : '' }}" href="{{ route('patients.view.measurements', ['patient' => $patient]) }}">Measurements</a>
  72. </li>
  73. <li class="nav-item">
  74. <a class="nav-link {{ strpos($routeName, 'patients.view.notes') === 0 ? 'active' : '' }}" href="{{ route('patients.view.notes', ['patient' => $patient]) }}">Notes</a>
  75. </li>
  76. <li class="nav-item">
  77. <a class="nav-link {{ strpos($routeName, 'patients.view.generic-bills') === 0 ? 'active' : '' }}" href="{{ route('patients.view.generic-bills', ['patient' => $patient]) }}">Admin. Bills</a>
  78. </li>
  79. <li class="nav-item">
  80. <a class="nav-link {{ strpos($routeName, 'patients.view.handouts') === 0 ? 'active' : '' }}" href="{{ route('patients.view.handouts', ['patient' => $patient]) }}">Handouts</a>
  81. </li>
  82. <li class="nav-item">
  83. <a class="nav-link {{ strpos($routeName, 'patients.view.rm-setup') === 0 ? 'active' : '' }}" href="{{ route('patients.view.rm-setup', ['patient' => $patient]) }}">Remote Monitoring</a>
  84. </li>
  85. <li class="nav-item">
  86. <a class="nav-link {{ strpos($routeName, 'patients.view.rtm') === 0 ? 'active' : '' }}" href="{{ route('patients.view.rtm', $patient) }}">RTM</a>
  87. </li>
  88. <?php /* <li class="nav-item">
  89. <a class="nav-link d-flex align-items-center {{ strpos($routeName, 'patients.view.action-items') === 0 ? 'active' : '' }}"
  90. native onclick="return false">
  91. <span class="text-dark">ERx/Orders</span>
  92. </a>
  93. <ul class="m-0 p-0 nav-child-list">
  94. <li class="nav-item">
  95. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-erx') === 0 ? 'active' : '' }}"
  96. href="{{ route('patients.view.action-items-erx', ['patient' => $patient]) }}">ERx</a>
  97. </li>
  98. <li class="nav-item">
  99. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-lab') === 0 ? 'active' : '' }}"
  100. href="{{ route('patients.view.action-items-lab', ['patient' => $patient]) }}">Lab</a>
  101. </li>
  102. <li class="nav-item">
  103. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-imaging') === 0 ? 'active' : '' }}"
  104. href="{{ route('patients.view.action-items-imaging', ['patient' => $patient]) }}">Imaging</a>
  105. </li>
  106. <li class="nav-item">
  107. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-equipment') === 0 ? 'active' : '' }}"
  108. href="{{ route('patients.view.action-items-equipment', ['patient' => $patient]) }}">Equipment</a>
  109. </li>
  110. </ul>
  111. </li> */ ?>
  112. <li class="nav-item">
  113. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-prescriptions') === 0 ? 'active' : '' }}" href="{{ route('patients.view.patient-prescriptions', ['patient' => $patient]) }}">ERx &amp; Orders</a>
  114. <?php /*
  115. <ul class="m-0 p-0 nav-child-list">
  116. <li class="nav-item">
  117. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === '' ? 'active' : '' }}"
  118. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => '']) }}">All</a>
  119. </li>
  120. <li class="nav-item">
  121. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'erx' ? 'active' : '' }}"
  122. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'erx']) }}">Drug</a>
  123. </li>
  124. <li class="nav-item">
  125. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'lab' ? 'active' : '' }}"
  126. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'lab']) }}">Lab</a>
  127. </li>
  128. <li class="nav-item">
  129. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'imaging' ? 'active' : '' }}"
  130. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'imaging']) }}">Imaging</a>
  131. </li>
  132. <li class="nav-item">
  133. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'referral' ? 'active' : '' }}"
  134. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'referral']) }}">Referral</a>
  135. </li>
  136. <li class="nav-item">
  137. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'supply' ? 'active' : '' }}"
  138. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'supply']) }}">Supply</a>
  139. </li>
  140. <li class="nav-item">
  141. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'other' ? 'active' : '' }}"
  142. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'other']) }}">Other</a>
  143. </li>
  144. </ul>
  145. */ ?>
  146. </li>
  147. <li class="nav-item">
  148. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === '' ? 'active' : '' }}" href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => '']) }}">Tickets</a>
  149. </li>
  150. @if($isOldClient && 0)
  151. <li class="nav-item">
  152. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 ? 'active' : '' }}" href="{{ route('patients.view.patient-tickets', ['patient' => $patient]) }}" title="Deprecated">ERx / Orders
  153. <span class="text-secondary text-sm pl-2">(dep)</span>
  154. </a>
  155. <ul class="m-0 p-0 nav-child-list">
  156. <li class="nav-item">
  157. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === '' ? 'active' : '' }}" href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => '']) }}">All</a>
  158. </li>
  159. <li class="nav-item">
  160. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'erx' ? 'active' : '' }}" href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'erx']) }}">ERx</a>
  161. </li>
  162. <li class="nav-item">
  163. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'lab' ? 'active' : '' }}" href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'lab']) }}">Lab</a>
  164. </li>
  165. <li class="nav-item">
  166. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'imaging' ? 'active' : '' }}" href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'imaging']) }}">Imaging</a>
  167. </li>
  168. <li class="nav-item">
  169. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'other' ? 'active' : '' }}" href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'other']) }}">Other</a>
  170. </li>
  171. </ul>
  172. </li>
  173. @endif
  174. <li class="nav-item">
  175. <a class="nav-link {{ strpos($routeName, 'patients.view.supply-orders') === 0 ? 'active' : '' }}" href="{{ route('patients.view.supply-orders', ['patient' => $patient]) }}">Supply Orders</a>
  176. </li>
  177. <li class="nav-item">
  178. <a class="nav-link {{ strpos($routeName, 'patients.view.shipments') === 0 ? 'active' : '' }}" href="{{ route('patients.view.shipments', ['patient' => $patient]) }}">Shipments</a>
  179. </li>
  180. <li class="nav-item">
  181. <a class="nav-link {{ strpos($routeName, 'patients.view.incoming-reports') === 0 ? 'active' : '' }}" href="{{ route('patients.view.incoming-reports', ['patient' => $patient]) }}">Incoming Reports</a>
  182. </li>
  183. <li class="nav-item">
  184. <a class="nav-link {{ strpos($routeName, 'patients.view.allergies') === 0 ? 'active' : '' }}" href="{{ route('patients.view.allergies', ['patient' => $patient]) }}">Allergies</a>
  185. </li>
  186. <li class="nav-item">
  187. <a class="nav-link {{ strpos($routeName, 'patients.view.medications') === 0 ? 'active' : '' }}" href="{{ route('patients.view.medications', ['patient' => $patient]) }}">Medications</a>
  188. </li>
  189. <li class="nav-item">
  190. <a class="nav-link {{ strpos($routeName, 'patients.view.dx-and-focus-areas') === 0 ? 'active' : '' }}" href="{{ route('patients.view.dx-and-focus-areas', ['patient' => $patient]) }}">Dx and
  191. Focus Areas</a>
  192. </li>
  193. <li class="nav-item">
  194. <a class="nav-link {{ strpos($routeName, 'patients.view.care-team') === 0 ? 'active' : '' }}" href="{{ route('patients.view.care-team', ['patient' => $patient]) }}">Care Team</a>
  195. </li>
  196. <li class="nav-item">
  197. <a class="nav-link {{ strpos($routeName, 'patients.view.history') === 0 ? 'active' : '' }}" href="{{ route('patients.view.history', ['patient' => $patient]) }}">History</a>
  198. </li>
  199. <li class="nav-item">
  200. <a class="nav-link {{ strpos($routeName, 'patients.view.memos') === 0 ? 'active' : '' }}" href="{{ route('patients.view.memos', ['patient' => $patient]) }}">Memos</a>
  201. </li>
  202. <li class="nav-item">
  203. <a class="nav-link {{ $routeName === 'patients.view.sms' ? 'active' : '' }}" 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' : '' }}" href="{{ route('patients.view.sms-numbers', ['patient' => $patient]) }}">SMS Numbers</a>
  207. </li>
  208. <li class="nav-item">
  209. <a class="nav-link {{ $routeName === 'patients.view.outgoing-sms-log' ? 'active' : '' }}" href="{{ route('patients.view.outgoing-sms-log', ['patient' => $patient]) }}">Outgoing SMS Log</a>
  210. </li>
  211. <li class="nav-item">
  212. <a class="nav-link {{ strpos($routeName, 'patients.view.documents') === 0 ? 'active' : '' }}" href="{{ route('patients.view.documents', ['patient' => $patient]) }}">Documents</a>
  213. </li>
  214. <li class="nav-item">
  215. <a class="nav-link {{ strpos($routeName, 'patients.view.settings') === 0 ? 'active' : '' }}" 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' : '' }}" href="{{ route('patients.view.sms-reminders', ['patient' => $patient]) }}">SMS Reminders</a>
  219. </li>
  220. <li class="nav-item">
  221. <a class="nav-link {{ strpos($routeName, 'patients.view.measurement-confirmation-numbers') === 0 ? 'active' : '' }}" href="{{ route('patients.view.measurement-confirmation-numbers', ['patient' => $patient]) }}">Meas. Conf. Numbers</a>
  222. </li>
  223. <li class="nav-item">
  224. <a class="nav-link {{ strpos($routeName, 'patients.view.pros') === 0 ? 'active' : '' }}" href="{{ route('patients.view.pros', ['patient' => $patient]) }}">Pros</a>
  225. </li>
  226. @if($performer->pro->pro_type == 'ADMIN')
  227. <li class="nav-item">
  228. <a class="nav-link {{ strpos($routeName, 'patients.view.pro-changes') === 0 ? 'active' : '' }}" href="{{ route('patients.view.pro-changes', ['patient' => $patient]) }}">Client Pro Changes</a>
  229. </li>
  230. <li class="nav-item">
  231. <a class="nav-link {{ strpos($routeName, 'patients.view.client-pro-access') === 0 ? 'active' : '' }}" href="{{ route('patients.view.client-pro-access', ['patient' => $patient]) }}">Client Pro Access</a>
  232. </li>
  233. <li class="nav-item">
  234. <a class="nav-link {{ strpos($routeName, 'patients.view.client-documents') === 0 ? 'active' : '' }}" href="{{ route('patients.view.client-documents', ['patient' => $patient]) }}">Client Documents</a>
  235. </li>
  236. @endif
  237. <li class="nav-item">
  238. <a class="nav-link" href="/patients/view/{{ $patient->uid }}/intake">Intake</a>
  239. </li>
  240. <li class="nav-item">
  241. <a class="nav-link {{ strpos($routeName, 'patients.view.primary-coverage') === 0 ? 'active' : '' }}" href="{{ route('patients.view.primary-coverage', $patient) }}">Primary Coverage</a>
  242. </li>
  243. @if($performer->pro->pro_type == 'ADMIN' || $performer->pro->id == $patient->default_na_pro_id)
  244. <li class="nav-item">
  245. <a class="nav-link {{ strpos($routeName, 'patients.view.insurance-coverage') === 0 ? 'active' : '' }}" href="{{ route('patients.view.insurance-coverage-history', $patient) }}">Insurance Coverage History</a>
  246. </li>
  247. @if($performer->pro->pro_type == 'ADMIN')
  248. <li class="nav-item">
  249. <a class="nav-link {{ strpos($routeName, 'patients.view.mcp-requests') === 0 ? 'active' : '' }}" href="{{ route('patients.view.mcp-requests', $patient) }}">MCP Requests</a>
  250. </li>
  251. <li class="nav-item">
  252. <a class="nav-link {{ strpos($routeName, 'patients.view.eligible-refreshes') === 0 ? 'active' : '' }}" href="{{ route('patients.view.eligible-refreshes', $patient) }}">Eligible Refreshes</a>
  253. </li>
  254. <li class="nav-item">
  255. <a class="nav-link {{ strpos($routeName, 'patients.view.claims-resolver') === 0 ? 'active' : '' }}" href="{{ route('patients.view.claims-resolver', $patient) }}">Claims Resolver</a>
  256. </li>
  257. @endif
  258. @endif
  259. <li class="nav-item">
  260. <a class="nav-link {{ strpos($routeName, 'patients.view.accounts') === 0 ? 'active' : '' }}" href="{{ route('patients.view.accounts', $patient) }}">Linked Accounts</a>
  261. </li>
  262. @if($performer->pro->pro_type == 'ADMIN')
  263. <li class="nav-item">
  264. <a class="nav-link {{ strpos($routeName, 'patients.view.companies') === 0 ? 'active' : '' }}" href="{{ route('patients.view.companies', $patient) }}">Linked Companies</a>
  265. </li>
  266. @endif
  267. <li class="nav-item">
  268. <a class="nav-link {{ $routeName === 'patients.view.review-requests' ? 'active' : '' }}" href="{{ route('patients.view.review-requests', ['patient' => $patient]) }}">Review Requests</a>
  269. </li>
  270. <li class="nav-item">
  271. <a class="nav-link {{ $routeName === 'patients.view.messages' ? 'active' : '' }}" href="{{ route('patients.view.messages', ['patient' => $patient]) }}">Messages</a>
  272. </li>
  273. </ul>
  274. <div class="mt-3 mcp-theme-1">
  275. @yield('left-nav-content')
  276. </div>
  277. </div>
  278. </nav>
  279. @endif
  280. <main role="main" class="w-100 {{$trimLayout || $leanLeftNav ? 'p-0' : ''}}">
  281. @if($pro->is_enrolled_as_mcp && !$patient->mcp)
  282. <div class="d-flex align-items-center alert alert-info bg-white mcp-theme-1 p-3 hide-inside-ticket-popup m-1">
  283. <div class="font-size-16 mr-3">
  284. <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
  285. This patient currently does not have an MCP assigned.
  286. </div>
  287. <div class="d-flex align-items-center">
  288. <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>
  289. <div class="in-conv-confirmed d-none align-items-center">
  290. <i class="fa fa-chevron-right mx-3 text-secondary"></i>
  291. <div moe class=" hide-inside-popup">
  292. <a href="" start show class="btn btn-primary font-weight-bold text-white">
  293. Assign myself as the MCP for this patient
  294. </a>
  295. <form url="/api/client/putMcp" class="mcp-theme-1">
  296. <input type="hidden" name="uid" value="{{$patient->uid}}">
  297. <input type="hidden" name="mcpProUid" value="{{$pro->uid}}">
  298. <p>Are you sure?</p>
  299. <div>
  300. <button submit class="btn btn-sm btn-primary mr-2">
  301. Submit
  302. </button>
  303. <button cancel class="btn btn-sm btn-default border">
  304. Cancel
  305. </button>
  306. </div>
  307. </form>
  308. </div>
  309. </div>
  310. </div>
  311. </div>
  312. @endif
  313. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $patient->is_mcp_onboarding_active === 'NO')
  314. <div class="alert alert-warning mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
  315. <div class="font-weight-bold text-dark font-size-16">MCP onboarding is not active for this patient.</div>
  316. <div class="text-secondary p-2 border mt-2 bg-light">
  317. <div class="font-weight-bold">{{$patient->why_is_mcp_onboarding_not_active_category}}</div>
  318. <div>{{$patient->why_is_mcp_onboarding_not_active_memo}}</div>
  319. </div>
  320. </div>
  321. @endif
  322. <div class="card {{$trimLayout || $leanLeftNav ? 'card m-0 border-0 rounded-0' : 'my-3'}}" id="patient-header">
  323. <div id="patient-header-content">
  324. <div class="@if($patient->client_engagement_status_category == 'DUMMY') alert-warning @endif hide-inside-ticket-popup">
  325. @include('layouts.patient-header')
  326. </div>
  327. </div>
  328. <?php $iCM = $patient->isAwaitingRMCommunicationFromMCP(); ?>
  329. @if($iCM !== FALSE)
  330. <div class="d-block mb-2 mx-2 p-2 alert alert-warning mcp-theme-1 border border-warning text-dark rounded-0 ">
  331. <span class="font-size-13">
  332. <i class="fa fa-exclamation-triangle mr-1"></i>
  333. This patient has not had RPM-related interactive communication this month. Please document interactive time
  334. @if(request()->route()->getName() === 'patients.view.care-months.view.dashboard' && @$careMonth && @$careMonth->id === $iCM->id)
  335. here.
  336. @else
  337. <a href="{{route('patients.view.care-months.view.dashboard', ['patient' => $patient, 'careMonth' => $iCM])}}"
  338. class="font-weight-bold d-inline">here</a>.
  339. @endif
  340. </span>
  341. </div>
  342. @endif
  343. @if($pro->pro_type === 'ADMIN')
  344. <div class="screen-only p-2 d-flex align-items-start justify-content-between mcp-theme-1 bg-aliceblue hide-inside-popup border-top">
  345. <div class="d-flex align-items-center">
  346. <b class="">Tags ({{count($patient->clientTags)}}):</b>
  347. @foreach($patient->clientTags as $tag)
  348. <div class="d-inline-flex align-items-center ml-2 py-1 px-2 rounded bg-aliceblue text-info">
  349. <span class="text-sm">{{$tag->tag}}</span>
  350. <div moe relative class="ml-2">
  351. <a href="" start show><i class="fa fa-times text-secondary on-hover-opaque"></i></a>
  352. <form url="/api/clientTag/cancel" class="mcp-theme-1 min-width-200px">
  353. <input type="hidden" name="uid" value="{{$tag->uid}}">
  354. <p class="text-nowrap text-dark">Cancel this tag?</p>
  355. <div>
  356. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  357. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  358. </div>
  359. </form>
  360. </div>
  361. </div>
  362. @endforeach
  363. <div moe relative class="ml-2">
  364. <a href="" start show class="text-sm">+ Add</a>
  365. <form url="/api/clientTag/create" class="mcp-theme-1">
  366. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  367. <div class="mb-2">
  368. <label class="text-secondary text-sm">Tag</label>
  369. <input type="text" class="form-control form-control-sm" name="tag" placeholder="Tag" required>
  370. </div>
  371. <div>
  372. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  373. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  374. </div>
  375. </form>
  376. </div>
  377. <div class="ml-3">
  378. <div class="d-flex align-items-center">
  379. <b class="mr-2">Partners ({{ count($patient->companyClients) }}):</b>
  380. <div class="d-flex align-items-center mr-2">
  381. @foreach($patient->companyClients as $companyClient)
  382. <span class="mr-2">
  383. {{$companyClient->company->name}}
  384. <div moe class="d-inline-block">
  385. <a start show><i class="fa fa-times text-secondary on-hover-opaque"></i></a>
  386. <form url="/api/companyClient/deactivate" class="mcp-theme-1">
  387. <input type="hidden" name="uid" value="{{$companyClient->uid}}">
  388. <div class="form-group">
  389. <p>Are you sure?</p>
  390. </div>
  391. <div>
  392. <button submit class="btn btn-sm btn-primary mr-1">Submit
  393. </button>
  394. <button cancel class="btn btn-sm btn-default border">
  395. Cancel
  396. </button>
  397. </div>
  398. </form>
  399. </div>
  400. </span>
  401. @endforeach
  402. </div>
  403. <div>
  404. <div moe>
  405. <a start show><i class="fa fa-edit"></i> Link company</a>
  406. <form url="/api/companyClient/create" class="mcp-theme-1">
  407. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  408. <div class="form-group">
  409. <label class="control-label">Company </label>
  410. <select name="companyUid" class="form-control">
  411. @if(isset($companies))
  412. @foreach($companies as $company)
  413. <option value="{{$company->uid}}">{{$company->name}}</option>
  414. @endforeach
  415. @endif
  416. </select>
  417. </div>
  418. <div>
  419. <button submit class="btn btn-sm btn-primary mr-1">Submit
  420. </button>
  421. <button cancel class="btn btn-sm btn-default border">
  422. Cancel
  423. </button>
  424. </div>
  425. </form>
  426. </div>
  427. </div>
  428. </div>
  429. </div>
  430. </div>
  431. <div class="d-flex">
  432. <span class="mr-2"><b>Best Time to Call:</b> {{ $patient->best_time_to_call ?? '-' }}</span>
  433. @include('app.patient.partials.update-best-time-to-call')
  434. </div>
  435. </div>
  436. @endif
  437. <div class="card-body {{$routeName === 'patients.view.notes.view.dashboard' ? 'p-0' : ''}} border-top">
  438. {{--<h1 class="h3">@yield('section-title')</h1>--}}
  439. <div class="mcp-theme-1">
  440. @yield('inner-content')
  441. </div>
  442. </div>
  443. </div>
  444. </main>
  445. </div>
  446. </div>
  447. <script>
  448. (function() {
  449. function init() {
  450. $('.note-method-select').change(function() {
  451. let form = $(this).closest('form');
  452. if (this.value === 'IN_CLINIC') {
  453. form.find('.if-in-clinic').show();
  454. } else {
  455. form.find('.if-in-clinic').hide();
  456. }
  457. });
  458. $('.note-method-select').each(function() {
  459. let form = $(this).closest('form');
  460. if (this.value === 'IN_CLINIC') {
  461. form.find('.if-in-clinic').show();
  462. } else {
  463. form.find('.if-in-clinic').hide();
  464. }
  465. });
  466. }
  467. addMCInitializer('patient-add-note-popup', init, '#patient-header')
  468. }).call(window);
  469. </script>
  470. <script>
  471. (function() {
  472. function init() {
  473. let sbMenu = $('#sidebarMenu');
  474. sbMenu
  475. .off('scroll')
  476. .on('scroll', function() {
  477. localStorage.sidebarMenuScrollTop = $(this).scrollTop();
  478. });
  479. if(localStorage.sidebarMenuScrollTop) {
  480. sbMenu.scrollTop(+localStorage.sidebarMenuScrollTop);
  481. let sbMenuPos = sbMenu.offset(),
  482. activeItem = sbMenu.find('.nav-item>.nav-link.active').first(),
  483. activeItemPos = activeItem.offset();
  484. if(activeItem.length) {
  485. if(activeItemPos.top < sbMenuPos.top || (activeItemPos.top + activeItem.outerHeight(true)) > (sbMenuPos.top + sbMenu.outerHeight(true))) {
  486. activeItem[0].scrollIntoView({behavior : "auto", block: "nearest"});
  487. }
  488. }
  489. }
  490. }
  491. addMCInitializer('sidebarMenu', init, '#sidebarMenu')
  492. }).call(window);
  493. </script>
  494. @endsection