patient.blade.php 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019
  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. {{--
  648. <div moe>
  649. <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;Note
  650. </button>
  651. <form url="/api/note/createUsingTemplate"
  652. redir="/patients/view/{{$patient->uid}}/notes/view/[data]"
  653. class="mcp-theme-1">
  654. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  655. @if($pro->is_hcp)
  656. <input type="hidden" name="hcpProUid" value="{{$pro->uid}}">
  657. @else
  658. <input type="hidden" name="naProUid" value="{{$pro->uid}}">
  659. @endif
  660. <input type="hidden" name="effectiveDateEST" value="{{date("Y-m-d")}}">
  661. <input type="hidden" name="effectiveTime" value="{{date("h:i")}}">
  662. <input type="hidden" name="title" id="note-create-title" value="">
  663. <div class="form-group mb-2">
  664. <label for="" class="text-secondary text-sm mb-1">Note Template *</label>
  665. <select name="noteTemplateUid" class="form-control form-control-sm"
  666. onchange="$('#note-create-title').val($(this).find('option:selected').text())"
  667. required>
  668. <option value=""> --select--</option>
  669. @foreach($pro->noteTemplates as $noteTemplate)
  670. <?php $nT = $noteTemplate->template(); ?>
  671. <option value="{{$nT->uid}}">{{$nT->title}}</option>
  672. @endforeach
  673. </select>
  674. </div>
  675. <div class="mb-2">
  676. <label for="" class="text-secondary text-sm mb-1">Method *</label>
  677. <select name="method" class="form-control form-control-sm note-method-select" required>
  678. <option value="AUDIO">Audio</option>
  679. <option value="VIDEO">Video</option>
  680. <option value="IN_CLINIC">In-Clinic</option>
  681. <option value="HOUSE_CALL">House Call</option>
  682. </select>
  683. </div>
  684. <div class="form-group if-in-clinic">
  685. <label for="" class="text-secondary text-sm mb-1">Location</label>
  686. <select name="hcpCompanyLocationUid" class="form-control">
  687. <option value=""></option>
  688. @foreach($pro->companyLocations() as $location)
  689. <option value="{{$location->uid}}">{{$location->line1}} {{$location->city}}</option>
  690. @endforeach
  691. </select>
  692. </div>
  693. <div class="form-group m-0">
  694. <button submit class="btn btn-primary btn-sm">submit</button>
  695. </div>
  696. </form>
  697. </div> --}}
  698. <div>
  699. <div moe relative>
  700. <button start show><i class="fa fa-plus text-sm text-secondary"></i>&nbsp;SMS
  701. </button>
  702. <form url="/api/clientSms/createOutgoing" right class="mcp-theme-1">
  703. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  704. <div class="mb-2">
  705. <label for="" class="text-sm text-secondary mb-1">Cell
  706. Number</label>
  707. <input type="text" class="form-control form-control-sm"
  708. name="cellNumber" value="{{$patient->cell_number}}">
  709. </div>
  710. <div class="mb-2">
  711. <label for=""
  712. class="text-sm text-secondary mb-1">Message</label>
  713. <textarea type="text" class="form-control form-control-sm"
  714. name="message"></textarea>
  715. </div>
  716. <div class="d-flex align-items-center">
  717. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  718. <button class="btn btn-sm btn-default mr-2 border" cancel>
  719. Cancel
  720. </button>
  721. </div>
  722. </form>
  723. </div>
  724. </div>
  725. <div>
  726. <span moe relative class="">
  727. <button start show title="SMS check-in link to the patient">Send&nbsp;<i
  728. class="on-hover-opaque fa fa-paper-plane text-secondary"></i></button>
  729. <form url="/api/client/sendCheckInTokenViaSmsOrEmail" right
  730. class="mcp-theme-1">
  731. <input type="hidden" name="uid" value="{{ $patient->uid }}">
  732. <p class="small min-width-200px mb-2">Send Check-In link to patient?</p>
  733. <div class="mb-2">
  734. <label for=""
  735. class="text-sm text-secondary mb-1">Cell Number</label>
  736. <input type="text" class="form-control input-sm" name="cellNumber"
  737. value="{{$patient->cell_number}}">
  738. </div>
  739. <div class="mb-2">
  740. <label for=""
  741. class="text-sm text-secondary mb-1">Email address</label>
  742. <input type="text" class="form-control input-sm" name="emailAddress"
  743. value="{{$patient->email_address}}">
  744. </div>
  745. <div class="d-flex align-items-center">
  746. <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
  747. <button class="btn btn-sm btn-default mr-2 border"
  748. cancel>Cancel</button>
  749. </div>
  750. </form>
  751. </span>
  752. </div>
  753. </section>
  754. <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-1">
  755. @if($performer->pro->pro_type == 'ADMIN')
  756. <div>
  757. <button class="col-2-button" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')">Check Video</button>
  758. </div>
  759. @endif
  760. <div>
  761. <button class="col-2-button" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')">Join Video</button>
  762. </div>
  763. {{--
  764. <div class="">
  765. @if($pro->isWorkingOnClient($patient))
  766. <div moe>
  767. <form url="/api/proClientWork/KillRunningWorkForSelf"
  768. class="mcp-theme-1" show>
  769. <input type="hidden" name="uid" value="{{$patient->uid}}">
  770. <div>
  771. <button class="col-2-button" submit><i class="fa fa-stop text-secondary"></i>&nbsp;Work:
  772. Stop
  773. </button>
  774. </div>
  775. </form>
  776. </div>
  777. @else
  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. --}}
  791. <div class="mr-auto">
  792. @if($pro->isWorkingOnClient($patient))
  793. <div class="d-flex align-items-center">
  794. @if($patient->active_mcp_request_id)
  795. {{-- kill mcp request for client --}}
  796. <div moe relative class="">
  797. <button href="" start show class="col-2-button"><i
  798. class="fa fa-times text-danger"></i>&nbsp;MCP Req.
  799. </button>
  800. <form url="/api/mcpRequest/kill" class="mcp-theme-1" right>
  801. <input type="hidden" name="clientUid"
  802. value="{{$patient->uid}}">
  803. <p>Kill the MCP Request for this patient?</p>
  804. <div>
  805. <button submit class="btn btn-sm btn-primary mr-2">
  806. Yes
  807. </button>
  808. <button cancel
  809. class="btn btn-sm btn-default border">Cancel
  810. </button>
  811. </div>
  812. </form>
  813. </div>
  814. @else
  815. {{-- create mcp request for client --}}
  816. <div moe relative class="">
  817. <button href="" start show class="col-2-button"><i
  818. class="fa fa-plus text-sm text-secondary"></i>&nbsp;MCP
  819. Req.
  820. </button>
  821. <form url="/api/mcpRequest/createAsPro" class="mcp-theme-1"
  822. right>
  823. <p>Create an MCP Request for this patient?</p>
  824. <div>
  825. <button submit class="btn btn-sm btn-primary mr-2">
  826. Yes
  827. </button>
  828. <button cancel
  829. class="btn btn-sm btn-default border">Cancel
  830. </button>
  831. </div>
  832. </form>
  833. </div>
  834. @endif
  835. </div>
  836. @endif
  837. </div>
  838. </section>
  839. <ul class="vbox ml-auto mt-2 align-self-start patient-header-address">
  840. <li class="d-flex align-items-start">
  841. <span class="aligned-icon">
  842. <i class="fa fa-map-marker-alt" aria-hidden="true"></i>
  843. </span>
  844. <div class="position-relative">
  845. <?php
  846. $addressParts = [];
  847. if (!!$patient->mailing_address_line1) $addressParts[] = $patient->mailing_address_line1;
  848. if (!!$patient->mailing_address_line2) $addressParts[] = $patient->mailing_address_line2;
  849. $addressParts = implode(", ", $addressParts) . "<br/>";
  850. $addressPart2 = [];
  851. if (!!$patient->mailing_address_city) $addressPart2[] = $patient->mailing_address_city;
  852. if (!!$patient->mailing_address_state) $addressPart2[] = $patient->mailing_address_state;
  853. $addressParts .= implode(", ", $addressPart2);
  854. echo $addressParts;
  855. ?>
  856. {{ $patient->mailing_address_zip ? $patient->mailing_address_zip : '' }}
  857. @if($patient->mailing_address_memo)
  858. <span class="position-relative c-pointer text-center stag-tooltip ml-2">
  859. <i class="fa fa-info-circle"></i>
  860. <div
  861. class="position-absolute bg-white border rounded p-2 stag-tooltip-content">
  862. <div class="text-left font-weight-bold pb-1">Special Instructions</div>
  863. <div
  864. class="text-left font-weight-normal">{{$patient->mailing_address_memo}}</div>
  865. </div>
  866. </span>
  867. @endif
  868. </div>
  869. </li>
  870. @if($patient->cell_number)
  871. <li>
  872. <span class="aligned-icon">
  873. <i class="fa fa-phone-alt" aria-hidden="true"></i>
  874. </span>
  875. {{$patient->cell_number}}
  876. <span class="small text-secondary ml-1">
  877. {{ $patient->cell_number_memo ? '(' . $patient->cell_number_memo . ')' : '' }}
  878. </span>
  879. </li>
  880. @endif
  881. @if($patient->phone_home)
  882. <li>
  883. <span class="aligned-icon"><i class="fa fa-home" aria-hidden="true"></i></span>
  884. {{$patient->phone_home}}
  885. </li>
  886. @endif
  887. <li class="{{empty($confirmedEmail) || $confirmedEmail === '-' ? 'screen-only' : ''}}">
  888. <span class="aligned-icon"><i class="fa fa-envelope" aria-hidden="true"></i></span>
  889. {{$confirmedEmail}}
  890. </li>
  891. <li class="screen-only hide-inside-popup">
  892. <span class="aligned-icon text-primary">
  893. <i class="fa fa-link" aria-hidden="true"></i>
  894. </span>
  895. <?php $numLinkedAccounts = $patient->linkedAccounts ? count($patient->linkedAccounts) : 0; ?>
  896. <a href="{{route('patients.view.accounts', ['patient' => $patient])}}">
  897. {{ $numLinkedAccounts === 0 ? 'No' : $numLinkedAccounts }}
  898. account{{ $numLinkedAccounts === 1 ? '' : 's' }} linked
  899. </a>
  900. </li>
  901. </ul>
  902. </div>
  903. </div>
  904. </div> <!-- z -->
  905. </div>
  906. @if($pro->pro_type === 'ADMIN')
  907. <div class="screen-only card-header py-2 d-flex align-items-center mcp-theme-1 bg-aliceblue">
  908. <b class="">Tags ({{count($patient->clientTags)}}):</b>
  909. @foreach($patient->clientTags as $tag)
  910. <div class="d-inline-flex align-items-center ml-2 py-1 px-2 rounded bg-aliceblue text-info">
  911. <span class="text-sm">{{$tag->tag}}</span>
  912. <div moe relative class="ml-2">
  913. <a href="" start show><i class="fa fa-times text-secondary on-hover-opaque"></i></a>
  914. <form url="/api/clientTag/cancel" class="mcp-theme-1 min-width-200px">
  915. <input type="hidden" name="uid" value="{{$tag->uid}}">
  916. <p class="text-nowrap text-dark">Cancel this tag?</p>
  917. <div>
  918. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  919. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  920. </div>
  921. </form>
  922. </div>
  923. </div>
  924. @endforeach
  925. <div moe relative class="ml-2">
  926. <a href="" start show class="text-sm">+ Add</a>
  927. <form url="/api/clientTag/create" class="mcp-theme-1">
  928. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  929. <div class="mb-2">
  930. <label class="text-secondary text-sm">Tag</label>
  931. <input type="text" class="form-control form-control-sm"
  932. name="tag"
  933. placeholder="Tag" required>
  934. </div>
  935. <div>
  936. <button submit class="btn btn-sm btn-primary mr-2">Submit</button>
  937. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  938. </div>
  939. </form>
  940. </div>
  941. </div>
  942. @endif
  943. {{--<div class="text-container border-bottom d-flex align-items-center mcp-theme-1 px-3">
  944. @if($patient->mcp_pro_id !== $pro->id && $patient->active_mcp_request_id)
  945. <div moe relative class="ml-2">
  946. <a href="" start show class="btn btn-sm btn-success text-white font-weight-bold small">Claim as MCP</a>
  947. <form url="/api/mcpRequest/claim" class="mcp-theme-1" right>
  948. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  949. <p>Claim this patient?</p>
  950. <div>
  951. <button submit class="btn btn-sm btn-primary mr-2">Yes</button>
  952. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  953. </div>
  954. </form>
  955. </div>
  956. @endif
  957. </div>--}}
  958. <div class="card-body">
  959. {{--<h1 class="h3">@yield('section-title')</h1>--}}
  960. <div class="mcp-theme-1">
  961. @yield('inner-content')
  962. </div>
  963. </div>
  964. </div>
  965. </main>
  966. </div>
  967. </div>
  968. <script>
  969. (function() {
  970. function init() {
  971. $('.note-method-select').change(function() {
  972. let form = $(this).closest('form');
  973. if(this.value === 'IN_CLINIC') {
  974. form.find('.if-in-clinic').show();
  975. }
  976. else {
  977. form.find('.if-in-clinic').hide();
  978. }
  979. });
  980. $('.note-method-select').each(function() {
  981. let form = $(this).closest('form');
  982. if(this.value === 'IN_CLINIC') {
  983. form.find('.if-in-clinic').show();
  984. }
  985. else {
  986. form.find('.if-in-clinic').hide();
  987. }
  988. });
  989. }
  990. addMCInitializer('patient-add-note-popup', init, '#patient-header')
  991. }).call(window);
  992. </script>
  993. <script>
  994. (function() {
  995. function init() {
  996. $('#sidebarMenu')
  997. .off('scroll')
  998. .on('scroll', function() {
  999. localStorage.sidebarMenuScrollTop = $(this).scrollTop();
  1000. });
  1001. if(localStorage.sidebarMenuScrollTop) {
  1002. $('#sidebarMenu').scrollTop(+localStorage.sidebarMenuScrollTop);
  1003. }
  1004. }
  1005. addMCInitializer('sidebarMenu', init, '#sidebarMenu')
  1006. }).call(window);
  1007. </script>
  1008. @endsection