patient.blade.php 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  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.client-primary-coverages') === 0 ? 'active' : '' }}"
  242. href="{{ route('patients.view.client-primary-coverages', $patient) }}">Client Primary Coverage</a>
  243. </li>
  244. <li class="nav-item">
  245. <a class="nav-link {{ strpos($routeName, 'patients.view.claims-resolver') === 0 ? 'active' : '' }}"
  246. href="{{ route('patients.view.claims-resolver', $patient) }}">Claims Resolver</a>
  247. </li>
  248. @endif
  249. <li class="nav-item">
  250. <a class="nav-link {{ strpos($routeName, 'patients.view.accounts') === 0 ? 'active' : '' }}"
  251. href="{{ route('patients.view.accounts', $patient) }}">Linked Accounts</a>
  252. </li>
  253. </ul>
  254. <div class="mt-3 mcp-theme-1">
  255. @yield('left-nav-content')
  256. </div>
  257. </div>
  258. </nav>
  259. @endif
  260. <main role="main" class="w-100">
  261. @if($pro->is_enrolled_as_mcp && !$patient->mcp)
  262. <div class="alert alert-info bg-white mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
  263. <div class="font-size-16">
  264. <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
  265. This patient currently does not have an MCP assigned.
  266. </div>
  267. <div class="mt-3 d-flex align-items-center">
  268. <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>
  269. <div class="in-conv-confirmed d-none align-items-center">
  270. <i class="fa fa-chevron-right mx-3 text-secondary"></i>
  271. <div moe class=" hide-inside-popup">
  272. <a href="" start show class="btn btn-primary font-weight-bold text-white">
  273. Assign myself as the MCP for this patient
  274. </a>
  275. <form url="/api/client/putMcp" class="mcp-theme-1">
  276. <input type="hidden" name="uid" value="{{$patient->uid}}">
  277. <input type="hidden" name="mcpProUid" value="{{$pro->uid}}">
  278. <p>Are you sure?</p>
  279. <div>
  280. <button submit class="btn btn-sm btn-primary mr-2">
  281. Submit
  282. </button>
  283. <button cancel class="btn btn-sm btn-default border">
  284. Cancel
  285. </button>
  286. </div>
  287. </form>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. @endif
  293. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $patient->is_mcp_onboarding_active === 'NO')
  294. <div class="alert alert-warning mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
  295. <div class="font-weight-bold text-dark font-size-16">MCP onboarding is not active for this patient.</div>
  296. <div class="text-secondary p-2 border mt-2 bg-light">
  297. <div class="font-weight-bold">{{$patient->why_is_mcp_onboarding_not_active_category}}</div>
  298. <div>{{$patient->why_is_mcp_onboarding_not_active_memo}}</div>
  299. </div>
  300. </div>
  301. @endif
  302. <div class="card mt-3" id="patient-header">
  303. <div class="card-header py-1 hide-inside-ticket-popup">
  304. <?php
  305. $thumbnail = $patient->profile_picture_base64;
  306. $initials = !$thumbnail ? substr($patient->name_first, 0, 1) . substr($patient->name_last, 0, 1) : '';
  307. $online = $patient->is_online ? 'online' : '';
  308. $patientName = implode(', ', array_filter([$patient->name_last, $patient->name_first]));
  309. $confirmedCell = empty($patient->cell_number) ? '-' : $patient->cell_number;
  310. $confirmedEmail = empty($patient->email_address) ? '-' : $patient->email_address;
  311. $location = implode(', ', array_filter([$patient->home_address_city, $patient->home_address_state]));
  312. $location = empty($location) ? '-' : $location;
  313. $mcpName = $patient->mcp ? implode(', ', array_filter([$patient->mcp->name_last, $patient->mcp->name_first])) : null;
  314. $cmName = $patient->cm ? implode(', ', array_filter([$patient->cm->name_last, $patient->cm->name_first])) : null;
  315. $memberSince = date_diff(date_create($patient->created_at), date_create('now'))->days;
  316. if ($memberSince > 30) $memberSince = date('F, Y', strtotime($patient->created_at));
  317. else if ($memberSince > 1) $memberSince .= ' days ago';
  318. else if ($memberSince === 1) $memberSince = 'yesterday';
  319. else if ($memberSince === 0) $memberSince = 'today';
  320. ?>
  321. <div class=z>
  322. <div class=header>
  323. @if($patient->is_duplicate)
  324. <div class="alert alert-secondary border-dark mcp-theme-1">
  325. <span class="text-dark">This chart is a duplicate of&nbsp;</span>
  326. <a class="font-weight-bold"
  327. href="/patients/view/{{ $patient->duplicateOf->uid }}">
  328. {{ $patient->duplicateOf->displayName() }}
  329. </a>
  330. </div>
  331. @endif
  332. <div class=hbox>
  333. <div class="screen-only mr-1 patient-presence-indicator thumbnail {{$online}}"
  334. data-patient-uid="{{$patient->uid}}"
  335. style="background-image:<?=$thumbnail?>"><?=$initials?></div>
  336. {{--<div>
  337. <div @if($patient->is_microphone_available)style="color:green" @else style="color:gray" @endif>
  338. <i class="fa fa-microphone"></i>
  339. </div>
  340. <div @if($patient->is_camera_available)style="color:green" @else style="color:gray" @endif>
  341. <i class="fa fa-video"></i>
  342. </div>
  343. </div>--}}
  344. <section>
  345. <div class=hbox>
  346. <h4>{{$patientName}}</h4>
  347. <i class=chart>[#{{$patient->chart_number}}]</i>
  348. </div>
  349. <div class=separators>
  350. <div>{{friendly_date_time($patient->dob, false,null, true)}}({{$patient->age_in_years}}
  351. y.o {{$patient->sex}})
  352. </div>
  353. <div>
  354. <?php
  355. $coverageStatus = $patient->getPrimaryCoverageStatus();
  356. $coverage = $patient->getPrimaryCoverage();
  357. ?>
  358. @if($coverageStatus === 'YES')
  359. Covered <i class="fa fa-check-circle text-success"></i>
  360. @elseif($coverageStatus === 'NO')
  361. Not Covered <i class="fa fa-times text-danger"></i>
  362. @else
  363. Unknown <i
  364. class="fa fa-exclamation-triangle text-warning-mellow"></i>
  365. @endif
  366. @if($coverage)
  367. &nbsp;
  368. {{$coverage->toString()}}
  369. @endif
  370. @if($pro->pro_type === 'ADMIN')
  371. &nbsp;
  372. <a href="{{route('patients.view.client-primary-coverages', ['patient' => $patient])}}">View</a>
  373. @endif
  374. </div>
  375. </div>
  376. <div class="screen-only">
  377. <div class=separators>
  378. <div>Joined <?=$memberSince?></div>
  379. <div><label>MCP:</label> {{$mcpName}}
  380. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $pro->pro_type == 'ADMIN')
  381. <div moe class="ml-2 hide-inside-popup">
  382. <a start show><i class="fa fa-edit"></i></a>
  383. <form url="/api/client/putMcp" class="mcp-theme-1">
  384. <input type="hidden" name="uid" value="{{$patient->uid}}">
  385. <div class="mb-2">
  386. <label class="text-secondary text-sm">MCP Pro</label>
  387. <select name="mcpProUid" provider-search data-pro-uid="{{ @$patient->mcp->uid }}"
  388. class="form-control form-control-sm">
  389. <option value=""> --select--</option>
  390. @foreach($pros as $iPro)
  391. <option
  392. value="{{$iPro->uid}}" {{ $patient->mcp && $iPro->uid === $patient->mcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  393. @endforeach
  394. </select>
  395. </div>
  396. <div>
  397. <button submit class="btn btn-sm btn-primary mr-1">
  398. Submit
  399. </button>
  400. <button cancel class="btn btn-sm btn-default border">
  401. Cancel
  402. </button>
  403. </div>
  404. </form>
  405. </div>
  406. @if($patient->mcp)
  407. <div moe class="ml-2 hide-inside-popup">
  408. <a start show><i class="fa fa-times"></i></a>
  409. <form url="/api/client/removeMcp" class="mcp-theme-1">
  410. <input type="hidden" name="uid" value="{{$patient->uid}}">
  411. <div class="mb-2">
  412. <label class="text-secondary text-sm">Remove MCP Pro</label>
  413. </div>
  414. <div>
  415. <button submit class="btn btn-sm btn-primary mr-1">Submit
  416. </button>
  417. <button cancel class="btn btn-sm btn-default border">
  418. Cancel
  419. </button>
  420. </div>
  421. </form>
  422. </div>
  423. @endif
  424. @endif
  425. </div>
  426. </div>
  427. <div>
  428. @if($patient->has_mcp_done_onboarding_visit !== 'YES')
  429. <span class="text-dark d-inline-flex align-items-center">
  430. <span class="mr-2">
  431. <i class="fa fa-exclamation-triangle"></i>
  432. MCP Onboarding Visit Pending
  433. </span>
  434. </span>
  435. <span moe class="hide-inside-popup">
  436. <a start show><i class="fa fa-edit"></i></a>
  437. <form url="/api/client/updateMcpOnboardingVisitInfo" class="mcp-theme-1">
  438. <input type="hidden" name="uid" value="{{$patient->uid}}">
  439. <div class="mb-2">
  440. <select name="hasMcpDoneOnboardingVisit"
  441. class="form-control form-control-sm"
  442. onchange="toggleDisabledAsNeeded(this, 'YES', 'if-visit-done')">
  443. <option value="">-- Select Status --</option>
  444. <option value="YES" {{ $patient->has_mcp_done_onboarding_visit === 'YES' ? 'selected' : '' }}>YES</option>
  445. <option value="NO" {{ $patient->has_mcp_done_onboarding_visit === 'NO' ? 'selected' : '' }}>NO</option>
  446. <option value="UNKNOWN" {{ $patient->has_mcp_done_onboarding_visit === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
  447. </select>
  448. </div>
  449. <div class="mb-2">
  450. <input type="date"
  451. class="if-visit-done form-control form-control-sm" disabled
  452. name="mcpOnboardingVisitDate" value="{{ date('Y-m-d') }}"
  453. max="{{ date('Y-m-d') }}">
  454. </div>
  455. <div class="mb-2">
  456. <select name="mcpOnboardingVisitNoteUid" disabled
  457. class="form-control form-control-sm if-visit-done"
  458. onchange="if(this.value === '-- create --') createNewNote('{{$patient->uid}}', '{{$pro->uid}}', '{{date('Y-m-d')}}');">
  459. <option value="">-- Visit Note --</option>
  460. <?php $notes = \App\Models\Note::where('client_id', $patient->id)->get() ?>
  461. @foreach ($notes as $note)
  462. @if(!empty($note->title) && $note->client_id === $patient->id && !$note->is_cancelled)
  463. <option
  464. {{ $patient->mcp_onboarding_visit_note_id === $note->id ? 'selected' : '' }}
  465. value="{{$note->uid}}">{{$note->title}} ({{friendly_date_time($note->effective_dateest, false)}})</option>
  466. @endif
  467. @endforeach
  468. {{--<option value="-- create --">-- Create Note --</option>--}}
  469. </select>
  470. </div>
  471. <div class="mb-2 if-note-outside-system">
  472. <textarea class="form-control form-control-sm"
  473. name="reasonOnboardingVisitNoteOutsideSystem"
  474. placeholder="Visit note outside the system reason"
  475. spellcheck="false" data-gramm="false"></textarea>
  476. </div>
  477. <div>
  478. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  479. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  480. </div>
  481. </form>
  482. </span>
  483. @else
  484. <span class="text-dark d-inline-flex align-items-center">
  485. <span class="mr-2 text-secondary">
  486. <i class="fa fa-check text-sm"></i>
  487. MCP Onboarding Visit Completed
  488. </span>
  489. </span>
  490. @endif
  491. </div>
  492. <div>
  493. <label>Physician:</label> {{$patient->pcp ? $patient->pcp->displayName() : '-' }}
  494. @if($pro->pro_type == 'ADMIN')
  495. <div moe class="ml-2 hide-inside-popup">
  496. <a start show><i class="fa fa-edit"></i></a>
  497. <form url="/api/client/putPhysicianPro" class="mcp-theme-1">
  498. <input type="hidden" name="uid" value="{{$patient->uid}}">
  499. <div class="mb-2">
  500. <label class="text-secondary text-sm">Physician Pro</label>
  501. <select provider-search data-pro-uid="{{ @$patient->pcp->uid }}"
  502. name="physicianProUid"
  503. class="form-control form-control-sm">
  504. <option value=""> --select--</option>
  505. @foreach($pros as $iPro)
  506. <option
  507. value="{{$iPro->uid}}" {{ $patient->pcp && $iPro->uid === $patient->pcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  508. @endforeach
  509. </select>
  510. </div>
  511. <div>
  512. <button submit class="btn btn-sm btn-primary mr-1">Submit
  513. </button>
  514. <button cancel class="btn btn-sm btn-default border">
  515. Cancel
  516. </button>
  517. </div>
  518. </form>
  519. </div>
  520. @if($patient->pcp)
  521. <div moe class="ml-2 hide-inside-popup">
  522. <a start show><i class="fa fa-times"></i></a>
  523. <form url="/api/client/removePhysicianPro" class="mcp-theme-1">
  524. <input type="hidden" name="uid" value="{{$patient->uid}}">
  525. <div class="mb-2">
  526. <label class="text-secondary text-sm">Remove Physician Pro</label>
  527. </div>
  528. <div>
  529. <button submit class="btn btn-sm btn-primary mr-1">Submit
  530. </button>
  531. <button cancel class="btn btn-sm btn-default border">
  532. Cancel
  533. </button>
  534. </div>
  535. </form>
  536. </div>
  537. @endif
  538. @endif
  539. </div>
  540. <div>
  541. <label>Nurse:</label> {{$patient->defaultNaPro ? $patient->defaultNaPro->displayName() : '-' }}
  542. @if($pro->pro_type == 'ADMIN')
  543. <div moe class="ml-2 hide-inside-popup">
  544. <a start show><i class="fa fa-edit"></i></a>
  545. <form url="/api/client/putDefaultNaPro" class="mcp-theme-1">
  546. <input type="hidden" name="uid" value="{{$patient->uid}}">
  547. <div class="mb-2">
  548. <label class="text-secondary text-sm">Nurse Pro</label>
  549. <select provider-search data-pro-uid="{{ @$patient->defaultNaPro->uid }}"
  550. name="defaultNaProUid"
  551. class="form-control form-control-sm">
  552. <option value=""> --select--</option>
  553. @foreach($pros as $iPro) <?php continue; ?>
  554. <option
  555. value="{{$iPro->uid}}" {{ $patient->defaultNaPro && $iPro->uid === $patient->defaultNaPro->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  556. @endforeach
  557. </select>
  558. </div>
  559. <div>
  560. <button submit class="btn btn-sm btn-primary mr-1">Submit
  561. </button>
  562. <button cancel class="btn btn-sm btn-default border">
  563. Cancel
  564. </button>
  565. </div>
  566. </form>
  567. </div>
  568. @if($patient->defaultNaPro)
  569. <div moe class="ml-2 hide-inside-popup">
  570. <a start show><i class="fa fa-times"></i></a>
  571. <form url="/api/client/removeDefaultNaPro" class="mcp-theme-1">
  572. <input type="hidden" name="uid" value="{{$patient->uid}}">
  573. <div class="mb-2">
  574. <label class="text-secondary text-sm">Remove Nurse Pro</label>
  575. </div>
  576. <div>
  577. <button submit class="btn btn-sm btn-primary mr-1">Submit
  578. </button>
  579. <button cancel class="btn btn-sm btn-default border">
  580. Cancel
  581. </button>
  582. </div>
  583. </form>
  584. </div>
  585. @endif
  586. @endif
  587. </div>
  588. </div>
  589. </section>
  590. {{--<section>
  591. <div>
  592. <label>Next Appt:</label>
  593. <?php
  594. $nextAppointment = $patient->nextMcpAppointment();
  595. $startTime = false;
  596. $endTime = false;
  597. if($nextAppointment) {
  598. $startTime = date('H:i', strtotime($nextAppointment->start_time));
  599. $endTime = date('H:i', strtotime($nextAppointment->end_time));
  600. $nextAppointment = date('Y-m-d', strtotime($nextAppointment->start_time));
  601. }
  602. ?>
  603. {{$nextAppointment ? friendly_date_time($nextAppointment . ($startTime ? ' ' . $startTime : ''), true, '') : '-'}}
  604. <span moe relative class="ml-1">
  605. <a start show><i class="fa fa-edit"></i></a>
  606. <form url="/api/appointment/create" class="mcp-theme-1" right>
  607. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  608. <input type="hidden" name="title" value="MCP Appointment">
  609. <div class="mb-2">
  610. <label class="text-secondary text-sm">Pro</label>
  611. <select name="proUid" class="form-control form-control-sm">
  612. <option value=""> --select-- </option>
  613. @foreach($pros as $iPro)
  614. <option value="{{$iPro->uid}}" {{ $iPro->uid === $pro->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  615. @endforeach
  616. </select>
  617. </div>
  618. <div class="mb-2">
  619. <label class="text-secondary text-sm">Date</label>
  620. <input type="date" name="date" min="{{ date('Y-m-d') }}"
  621. value="{{ $nextAppointment ? $nextAppointment : date('Y-m-d') }}"
  622. class="form-control form-control-sm">
  623. </div>
  624. <div class="mb-2">
  625. <label class="text-secondary text-sm">Start Time</label>
  626. <input type="time" name="startTime" class="form-control form-control-sm"
  627. value="{{ $startTime ? $startTime : '' }}">
  628. </div>
  629. <div class="mb-2">
  630. <label class="text-secondary text-sm">End Time</label>
  631. <input type="time" name="endTime" class="form-control form-control-sm"
  632. value="{{ $endTime ? $endTime : '' }}">
  633. </div>
  634. <div>
  635. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  636. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  637. </div>
  638. </form>
  639. </span>
  640. </div>
  641. <div>
  642. <label>CM:</label> {{ $patient->is_enrolled_in_cm === 'YES' ? 'Yes' : 'No' }}
  643. <label class="ml-2">RM:</label> {{ $patient->is_enrolled_in_rm === 'YES' ? 'Yes' : 'No' }}
  644. </div>
  645. </section>--}}
  646. <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-4">
  647. <div moe>
  648. <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;Note
  649. </button>
  650. <form url="/api/note/createUsingTemplate"
  651. redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
  652. class="mcp-theme-1">
  653. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  654. @if($pro->is_hcp)
  655. <input type="hidden" name="hcpProUid" value="{{$pro->uid}}">
  656. @else
  657. <input type="hidden" name="naProUid" value="{{$pro->uid}}">
  658. @endif
  659. <input type="hidden" name="effectiveDateEST" value="{{date("Y-m-d")}}">
  660. <input type="hidden" name="effectiveTime" value="{{date("h:i")}}">
  661. <input type="hidden" name="title" id="note-create-title" value="">
  662. <div class="form-group mb-2">
  663. <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
  664. <select name="noteTemplateUid" class="form-control form-control-sm"
  665. onchange="$('#note-create-title').val($(this).find('option:selected').text())"
  666. required>
  667. <option value=""> --select--</option>
  668. @foreach($pro->noteTemplates as $noteTemplate)
  669. <?php $nT = $noteTemplate->template(); ?>
  670. <option value="{{$nT->uid}}">{{$nT->title}}</option>
  671. @endforeach
  672. </select>
  673. </div>
  674. <div class="mb-2">
  675. <label for="" class="text-secondary text-sm mb-1">Method *</label>
  676. <select name="method" class="form-control form-control-sm note-method-select" required>
  677. <option value="AUDIO">Audio</option>
  678. <option value="VIDEO">Video</option>
  679. <option value="IN_CLINIC">In-Clinic</option>
  680. <option value="HOUSE_CALL">House Call</option>
  681. </select>
  682. </div>
  683. <div class="form-group if-in-clinic">
  684. <label for="" class="text-secondary text-sm mb-1">Location</label>
  685. <select name="hcpCompanyLocationUid" class="form-control">
  686. <option value=""></option>
  687. @foreach($pro->companyLocations() as $location)
  688. <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
  689. @endforeach
  690. </select>
  691. </div>
  692. <div class="form-group m-0">
  693. <button submit class="btn btn-primary btn-sm">submit</button>
  694. </div>
  695. </form>
  696. </div>
  697. <div>
  698. <div moe relative>
  699. <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;SMS
  700. </button>
  701. <form url="/api/clientSms/createOutgoing" right class="mcp-theme-1">
  702. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  703. <div class="mb-2">
  704. <label for="" class="text-sm text-secondary mb-1">Cell
  705. Number</label>
  706. <input type="text" class="form-control form-control-sm"
  707. name="cellNumber" value="{{$patient->cell_number}}">
  708. </div>
  709. <div class="mb-2">
  710. <label for=""
  711. class="text-sm text-secondary mb-1">Message</label>
  712. <textarea type="text" class="form-control form-control-sm"
  713. name="message"></textarea>
  714. </div>
  715. <div class="d-flex align-items-center">
  716. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  717. <button class="btn btn-sm btn-default mr-2 border" cancel>
  718. Cancel
  719. </button>
  720. </div>
  721. </form>
  722. </div>
  723. </div>
  724. <div>
  725. <span moe relative class="">
  726. <button start show title="SMS check-in link to the patient">Send&nbsp;<i
  727. class="on-hover-opaque fa fa-paper-plane text-secondary"></i></button>
  728. <form url="/api/client/sendCheckInTokenViaSmsOrEmail" right
  729. class="mcp-theme-1">
  730. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  731. <p class="small min-width-200px mb-2">Send Check-In link to patient?</p>
  732. <div class="mb-2">
  733. <label for=""
  734. class="text-sm text-secondary mb-1">Cell Number</label>
  735. <input type="text" class="form-control input-sm" name="cellNumber"
  736. value="{{$patient->cell_number}}">
  737. </div>
  738. <div class="mb-2">
  739. <label for=""
  740. class="text-sm text-secondary mb-1">Email address</label>
  741. <input type="text" class="form-control input-sm" name="emailAddress"
  742. value="{{$patient->email_address}}">
  743. </div>
  744. <div class="d-flex align-items-center">
  745. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  746. <button class="btn btn-sm btn-default mr-2 border"
  747. cancel>Cancel</button>
  748. </div>
  749. </form>
  750. </span>
  751. </div>
  752. </section>
  753. <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-1">
  754. @if($performer->pro->pro_type == 'ADMIN')
  755. <div>
  756. <button class="col-2-button" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')">Check Video</button>
  757. </div>
  758. @endif
  759. <div>
  760. <button class="col-2-button" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')">Join Video</button>
  761. </div>
  762. <div class="">
  763. @if($pro->isWorkingOnClient($patient))
  764. {{-- stop work on client --}}
  765. <div moe>
  766. <form url="/api/proClientWork/KillRunningWorkForSelf"
  767. class="mcp-theme-1" show>
  768. <input type="hidden" name="uid" value="{{$patient->uid}}">
  769. <div>
  770. <button class="col-2-button" submit><i class="fa fa-stop text-secondary"></i>&nbsp;Work:
  771. Stop
  772. </button>
  773. </div>
  774. </form>
  775. </div>
  776. @else
  777. {{-- start work on client --}}
  778. <div moe>
  779. <form url="/api/proClientWork/create" class="mcp-theme-1" show>
  780. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  781. <div>
  782. <button class="col-2-button" submit><i class="fa fa-play text-secondary"></i>&nbsp;Work:
  783. Start
  784. </button>
  785. </div>
  786. </form>
  787. </div>
  788. @endif
  789. </div>
  790. <div class="mr-auto">
  791. @if($pro->isWorkingOnClient($patient))
  792. <div class="d-flex align-items-center">
  793. @if($patient->active_mcp_request_id)
  794. {{-- kill mcp request for client --}}
  795. <div moe relative class="">
  796. <button href="" start show class="col-2-button"><i
  797. class="fa fa-times text-danger"></i>&nbsp;MCP Req.
  798. </button>
  799. <form url="/api/mcpRequest/kill" class="mcp-theme-1" right>
  800. <input type="hidden" name="clientUid"
  801. value="{{$patient->uid}}">
  802. <p>Kill the MCP Request for this patient?</p>
  803. <div>
  804. <button submit class="btn btn-sm btn-primary mr-2">
  805. Yes
  806. </button>
  807. <button cancel
  808. class="btn btn-sm btn-default border">Cancel
  809. </button>
  810. </div>
  811. </form>
  812. </div>
  813. @else
  814. {{-- create mcp request for client --}}
  815. <div moe relative class="">
  816. <button href="" start show class="col-2-button"><i
  817. class="fa fa-plus text-sm text-secondary"></i>&nbsp;MCP
  818. Req.
  819. </button>
  820. <form url="/api/mcpRequest/createAsPro" class="mcp-theme-1"
  821. right>
  822. <p>Create an MCP Request for this patient?</p>
  823. <div>
  824. <button submit class="btn btn-sm btn-primary mr-2">
  825. Yes
  826. </button>
  827. <button cancel
  828. class="btn btn-sm btn-default border">Cancel
  829. </button>
  830. </div>
  831. </form>
  832. </div>
  833. @endif
  834. </div>
  835. @endif
  836. </div>
  837. </section>
  838. <ul class="vbox ml-auto mt-2 align-self-start patient-header-address">
  839. <li class="d-flex align-items-start">
  840. <span class="aligned-icon">
  841. <i class="fa fa-map-marker-alt" aria-hidden="true"></i>
  842. </span>
  843. <div class="position-relative">
  844. <?php
  845. $addressParts = [];
  846. if (!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
  847. if (!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
  848. $addressParts = implode(", ", $addressParts) . "<br/>";
  849. $addressPart2 = [];
  850. if (!!$patient->mailing_address_city) $addressPart2[] = $patient->mailing_address_city;
  851. if (!!$patient->mailing_address_state) $addressPart2[] = $patient->mailing_address_state;
  852. $addressParts .= implode(", ", $addressPart2);
  853. echo $addressParts;
  854. ?>
  855. {{ $patient->mailing_address_zip ? $patient->mailing_address_zip : '' }}
  856. @if($patient->mailing_address_memo)
  857. <span class="position-relative c-pointer text-center stag-tooltip ml-2">
  858. <i class="fa fa-info-circle"></i>
  859. <div
  860. class="position-absolute bg-white border rounded p-2 stag-tooltip-content">
  861. <div class="text-left font-weight-bold pb-1">Special Instructions</div>
  862. <div
  863. class="text-left font-weight-normal">{{$patient->mailing_address_memo}}</div>
  864. </div>
  865. </span>
  866. @endif
  867. </div>
  868. </li>
  869. @if($patient->cell_number)
  870. <li>
  871. <span class="aligned-icon">
  872. <i class="fa fa-phone-alt" aria-hidden="true"></i>
  873. </span>
  874. {{$patient->cell_number}}
  875. <span class="small text-secondary ml-1">
  876. {{ $patient->cell_number_memo ? '(' . $patient->cell_number_memo . ')' : '' }}
  877. </span>
  878. </li>
  879. @endif
  880. @if($patient->phone_home)
  881. <li>
  882. <span class="aligned-icon"><i class="fa fa-home" aria-hidden="true"></i></span>
  883. {{$patient->phone_home}}
  884. </li>
  885. @endif
  886. <li class="{{empty($confirmedEmail) || $confirmedEmail === '-' ? 'screen-only' : ''}}">
  887. <span class="aligned-icon"><i class="fa fa-envelope" aria-hidden="true"></i></span>
  888. {{$confirmedEmail}}
  889. </li>
  890. <li class="screen-only hide-inside-popup">
  891. <span class="aligned-icon text-primary">
  892. <i class="fa fa-link" aria-hidden="true"></i>
  893. </span>
  894. <?php $numLinkedAccounts = $patient->linkedAccounts ? count($patient->linkedAccounts) : 0; ?>
  895. <a href="{{route('patients.view.accounts', ['patient' => $patient])}}">
  896. {{ $numLinkedAccounts === 0 ? 'No' : $numLinkedAccounts }}
  897. account{{ $numLinkedAccounts === 1 ? '' : 's' }} linked
  898. </a>
  899. </li>
  900. </ul>
  901. </div>
  902. </div>
  903. </div> <!-- z -->
  904. </div>
  905. @if($pro->pro_type === 'ADMIN')
  906. <div class="screen-only card-header py-2 d-flex align-items-center mcp-theme-1 bg-aliceblue">
  907. <b class="">Tags ({{count($patient->clientTags)}}):</b>
  908. @foreach($patient->clientTags as $tag)
  909. <div class="d-inline-flex align-items-center ml-2 py-1 px-2 rounded bg-aliceblue text-info">
  910. <span class="text-sm">{{$tag->tag}}</span>
  911. <div moe relative class="ml-2">
  912. <a href="" start show><i class="fa fa-times text-secondary on-hover-opaque"></i></a>
  913. <form url="/api/clientTag/cancel" class="mcp-theme-1 min-width-200px">
  914. <input type="hidden" name="uid" value="{{$tag->uid}}">
  915. <p class="text-nowrap text-dark">Cancel this tag?</p>
  916. <div>
  917. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  918. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  919. </div>
  920. </form>
  921. </div>
  922. </div>
  923. @endforeach
  924. <div moe relative class="ml-2">
  925. <a href="" start show class="text-sm">+ Add</a>
  926. <form url="/api/clientTag/create" class="mcp-theme-1">
  927. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  928. <div class="mb-2">
  929. <label class="text-secondary text-sm">Tag</label>
  930. <input type="text" class="form-control form-control-sm"
  931. name="tag"
  932. placeholder="Tag" required>
  933. </div>
  934. <div>
  935. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  936. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  937. </div>
  938. </form>
  939. </div>
  940. </div>
  941. @endif
  942. {{--<div class="text-container border-bottom d-flex align-items-center mcp-theme-1 px-3">
  943. @if($patient->mcp_pro_id !== $pro->id && $patient->active_mcp_request_id)
  944. <div moe relative class="ml-2">
  945. <a href="" start show class="btn btn-sm btn-success text-white font-weight-bold small">Claim as MCP</a>
  946. <form url="/api/mcpRequest/claim" class="mcp-theme-1" right>
  947. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  948. <p>Claim this patient?</p>
  949. <div>
  950. <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
  951. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  952. </div>
  953. </form>
  954. </div>
  955. @endif
  956. </div>--}}
  957. <div class="card-body">
  958. {{--<h1 class="h3">@yield('section-title')</h1>--}}
  959. <div class="mcp-theme-1">
  960. @yield('inner-content')
  961. </div>
  962. </div>
  963. </div>
  964. </main>
  965. </div>
  966. </div>
  967. <script>
  968. (function() {
  969. function init() {
  970. $('.note-method-select').change(function() {
  971. let form = $(this).closest('form');
  972. if(this.value === 'IN_CLINIC') {
  973. form.find('.if-in-clinic').show();
  974. }
  975. else {
  976. form.find('.if-in-clinic').hide();
  977. }
  978. });
  979. $('.note-method-select').each(function() {
  980. let form = $(this).closest('form');
  981. if(this.value === 'IN_CLINIC') {
  982. form.find('.if-in-clinic').show();
  983. }
  984. else {
  985. form.find('.if-in-clinic').hide();
  986. }
  987. });
  988. }
  989. addMCInitializer('patient-add-note-popup', init, '#patient-header')
  990. }).call(window);
  991. </script>
  992. <script>
  993. (function() {
  994. function init() {
  995. $('#sidebarMenu')
  996. .off('scroll')
  997. .on('scroll', function() {
  998. localStorage.sidebarMenuScrollTop = $(this).scrollTop();
  999. });
  1000. if(localStorage.sidebarMenuScrollTop) {
  1001. $('#sidebarMenu').scrollTop(+localStorage.sidebarMenuScrollTop);
  1002. }
  1003. }
  1004. addMCInitializer('sidebarMenu', init, '#sidebarMenu')
  1005. }).call(window);
  1006. </script>
  1007. @endsection