patient.blade.php 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  1. @extends(request()->input('popupmode') ? 'layouts.empty' : 'layouts.template')
  2. <?php
  3. /** @var \App\Models\Client $patient */
  4. ?>
  5. @section('content')
  6. <div class="container-fluid h-100">
  7. <div class="main-row h-100 {{ !request()->input('popupmode') ? '' : 'px-0' }}">
  8. @if(!request()->input('popupmode'))
  9. <nav id="sidebarMenu" class="d-md-block bg-light sidebar collapse px-0">
  10. <div class="sidebar-sticky pt-3">
  11. <ul class="nav flex-column mcp-theme-1">
  12. <?php $routeName = request()->route()->getName(); ?>
  13. <li class="nav-item">
  14. <a class="nav-link {{ strpos($routeName, 'patients.view.dashboard') === 0 ? 'active' : '' }}"
  15. href="{{ route('patients.view.dashboard', ['patient' => $patient]) }}">Dashboard</a>
  16. </li>
  17. <li class="nav-item">
  18. <a class="nav-link {{ strpos($routeName, 'patients.view.calendar') === 0 ? 'active' : '' }}"
  19. href="{{ route('patients.view.calendar', ['patient' => $patient]) }}">Calendar</a>
  20. </li>
  21. <li class="nav-item">
  22. <a class="nav-link {{ strpos($routeName, 'patients.view.appointments') === 0 ? 'active' : '' }}"
  23. href="{{ route('patients.view.appointments', ['patient' => $patient, 'forPro' => 'all', 'status' => 'all']) }}">Appointments</a>
  24. </li>
  25. <li class="nav-item">
  26. <a class="nav-link {{ strpos($routeName, 'patients.view.programs') === 0 ? 'active' : '' }}"
  27. href="{{ route('patients.view.programs', ['patient' => $patient]) }}">Programs</a>
  28. </li>
  29. <li class="nav-item">
  30. <a class="nav-link {{ strpos($routeName, 'patients.view.flowsheets') === 0 ? 'active' : '' }}"
  31. href="{{ route('patients.view.flowsheets', ['patient' => $patient]) }}">Flowsheets</a>
  32. </li>
  33. <li class="nav-item">
  34. <a class="nav-link {{ strpos($routeName, 'patients.view.vitals-settings') === 0 ? 'active' : '' }}"
  35. href="{{ route('patients.view.vitals-settings', ['patient' => $patient]) }}">Vitals Settings</a>
  36. </li>
  37. <li class="nav-item">
  38. <a class="nav-link {{ strpos($routeName, 'patients.view.vitals-graph') === 0 ? 'active' : '' }}"
  39. href="{{ route('patients.view.vitals-graph', ['patient' => $patient]) }}">Vitals Graph</a>
  40. </li>
  41. <li class="nav-item">
  42. <a class="nav-link {{ strpos($routeName, 'patients.view.care-months') === 0 ? 'active' : '' }}"
  43. href="{{ route('patients.view.care-months', ['patient' => $patient]) }}">Care Months</a>
  44. </li>
  45. <li class="nav-item">
  46. <a class="nav-link {{ strpos($routeName, 'patients.view.devices') === 0 ? 'active' : '' }}"
  47. href="{{ route('patients.view.devices', ['patient' => $patient]) }}">Devices</a>
  48. </li>
  49. <li class="nav-item">
  50. <a class="nav-link {{ strpos($routeName, 'patients.view.measurements') === 0 ? 'active' : '' }}"
  51. href="{{ route('patients.view.measurements', ['patient' => $patient]) }}">Measurements</a>
  52. </li>
  53. <li class="nav-item">
  54. <a class="nav-link {{ strpos($routeName, 'patients.view.notes') === 0 ? 'active' : '' }}"
  55. href="{{ route('patients.view.notes', ['patient' => $patient]) }}">Notes</a>
  56. </li>
  57. <li class="nav-item">
  58. <a class="nav-link {{ strpos($routeName, 'patients.view.generic-bills') === 0 ? 'active' : '' }}"
  59. href="{{ route('patients.view.generic-bills', ['patient' => $patient]) }}">Generic Bills</a>
  60. </li>
  61. <li class="nav-item">
  62. <a class="nav-link {{ strpos($routeName, 'patients.view.sections') === 0 ? 'active' : '' }}"
  63. href="{{ route('patients.view.sections', ['patient' => $patient]) }}">Sections</a>
  64. </li>
  65. <li class="nav-item">
  66. <a class="nav-link {{ strpos($routeName, 'patients.view.handouts') === 0 ? 'active' : '' }}"
  67. href="{{ route('patients.view.handouts', ['patient' => $patient]) }}">Handouts</a>
  68. </li>
  69. <li class="nav-item">
  70. <a class="nav-link {{ strpos($routeName, 'patients.view.rm-setup') === 0 ? 'active' : '' }}"
  71. href="{{ route('patients.view.rm-setup', ['patient' => $patient]) }}">RM Setup</a>
  72. </li>
  73. <?php /* <li class="nav-item">
  74. <a class="nav-link d-flex align-items-center {{ strpos($routeName, 'patients.view.action-items') === 0 ? 'active' : '' }}"
  75. native onclick="return false">
  76. <span class="text-dark">ERx/Orders</span>
  77. </a>
  78. <ul class="m-0 p-0 nav-child-list">
  79. <li class="nav-item">
  80. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-erx') === 0 ? 'active' : '' }}"
  81. href="{{ route('patients.view.action-items-erx', ['patient' => $patient]) }}">ERx</a>
  82. </li>
  83. <li class="nav-item">
  84. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-lab') === 0 ? 'active' : '' }}"
  85. href="{{ route('patients.view.action-items-lab', ['patient' => $patient]) }}">Lab</a>
  86. </li>
  87. <li class="nav-item">
  88. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-imaging') === 0 ? 'active' : '' }}"
  89. href="{{ route('patients.view.action-items-imaging', ['patient' => $patient]) }}">Imaging</a>
  90. </li>
  91. <li class="nav-item">
  92. <a class="nav-link {{ strpos($routeName, 'patients.view.action-items-equipment') === 0 ? 'active' : '' }}"
  93. href="{{ route('patients.view.action-items-equipment', ['patient' => $patient]) }}">Equipment</a>
  94. </li>
  95. </ul>
  96. </li> */ ?>
  97. <li class="nav-item">
  98. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-prescriptions') === 0 ? 'active' : '' }}"
  99. href="{{ route('patients.view.patient-prescriptions', ['patient' => $patient]) }}">ERx &amp; Orders</a>
  100. <?php /*
  101. <ul class="m-0 p-0 nav-child-list">
  102. <li class="nav-item">
  103. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === '' ? 'active' : '' }}"
  104. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => '']) }}">All</a>
  105. </li>
  106. <li class="nav-item">
  107. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'erx' ? 'active' : '' }}"
  108. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'erx']) }}">Drug</a>
  109. </li>
  110. <li class="nav-item">
  111. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'lab' ? 'active' : '' }}"
  112. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'lab']) }}">Lab</a>
  113. </li>
  114. <li class="nav-item">
  115. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'imaging' ? 'active' : '' }}"
  116. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'imaging']) }}">Imaging</a>
  117. </li>
  118. <li class="nav-item">
  119. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'referral' ? 'active' : '' }}"
  120. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'referral']) }}">Referral</a>
  121. </li>
  122. <li class="nav-item">
  123. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'supply' ? 'active' : '' }}"
  124. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'supply']) }}">Supply</a>
  125. </li>
  126. <li class="nav-item">
  127. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-erx') === 0 && @$type === 'other' ? 'active' : '' }}"
  128. href="{{ route('patients.view.patient-erx', ['patient' => $patient, 'type' => 'other']) }}">Other</a>
  129. </li>
  130. </ul>
  131. */ ?>
  132. </li>
  133. <li class="nav-item">
  134. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 ? 'active' : '' }}"
  135. title="Deprecated"
  136. href="{{ route('patients.view.patient-tickets', ['patient' => $patient]) }}">ERx / Orders <span class="text-secondary text-sm"></span>(dep)</a>
  137. <ul class="m-0 p-0 nav-child-list">
  138. <li class="nav-item">
  139. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === '' ? 'active' : '' }}"
  140. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => '']) }}">All</a>
  141. </li>
  142. <li class="nav-item">
  143. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'erx' ? 'active' : '' }}"
  144. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'erx']) }}">ERx</a>
  145. </li>
  146. <li class="nav-item">
  147. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'lab' ? 'active' : '' }}"
  148. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'lab']) }}">Lab</a>
  149. </li>
  150. <li class="nav-item">
  151. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'imaging' ? 'active' : '' }}"
  152. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'imaging']) }}">Imaging</a>
  153. </li>
  154. <li class="nav-item">
  155. <a class="nav-link {{ strpos($routeName, 'patients.view.patient-tickets') === 0 && @$type === 'other' ? 'active' : '' }}"
  156. href="{{ route('patients.view.patient-tickets', ['patient' => $patient, 'type' => 'other']) }}">Other</a>
  157. </li>
  158. </ul>
  159. </li>
  160. <li class="nav-item">
  161. <a class="nav-link {{ strpos($routeName, 'patients.view.supply-orders') === 0 ? 'active' : '' }}"
  162. href="{{ route('patients.view.supply-orders', ['patient' => $patient]) }}">Supply Orders</a>
  163. </li>
  164. <li class="nav-item">
  165. <a class="nav-link {{ strpos($routeName, 'patients.view.shipments') === 0 ? 'active' : '' }}"
  166. href="{{ route('patients.view.shipments', ['patient' => $patient]) }}">Shipments</a>
  167. </li>
  168. <li class="nav-item">
  169. <a class="nav-link {{ strpos($routeName, 'patients.view.incoming-reports') === 0 ? 'active' : '' }}"
  170. href="{{ route('patients.view.incoming-reports', ['patient' => $patient]) }}">Incoming Reports</a>
  171. </li>
  172. <li class="nav-item">
  173. <a class="nav-link {{ strpos($routeName, 'patients.view.allergies') === 0 ? 'active' : '' }}"
  174. href="{{ route('patients.view.allergies', ['patient' => $patient]) }}">Allergies</a>
  175. </li>
  176. <li class="nav-item">
  177. <a class="nav-link {{ strpos($routeName, 'patients.view.medications') === 0 ? 'active' : '' }}"
  178. href="{{ route('patients.view.medications', ['patient' => $patient]) }}">Medications</a>
  179. </li>
  180. <li class="nav-item">
  181. <a class="nav-link {{ strpos($routeName, 'patients.view.dx-and-focus-areas') === 0 ? 'active' : '' }}"
  182. href="{{ route('patients.view.dx-and-focus-areas', ['patient' => $patient]) }}">Dx and
  183. Focus Areas</a>
  184. </li>
  185. <li class="nav-item">
  186. <a class="nav-link {{ strpos($routeName, 'patients.view.care-team') === 0 ? 'active' : '' }}"
  187. href="{{ route('patients.view.care-team', ['patient' => $patient]) }}">Care Team</a>
  188. </li>
  189. <li class="nav-item">
  190. <a class="nav-link {{ strpos($routeName, 'patients.view.history') === 0 ? 'active' : '' }}"
  191. href="{{ route('patients.view.history', ['patient' => $patient]) }}">History</a>
  192. </li>
  193. <li class="nav-item">
  194. <a class="nav-link {{ strpos($routeName, 'patients.view.memos') === 0 ? 'active' : '' }}"
  195. href="{{ route('patients.view.memos', ['patient' => $patient]) }}">Memos</a>
  196. </li>
  197. <li class="nav-item">
  198. <a class="nav-link {{ $routeName === 'patients.view.sms' ? 'active' : '' }}"
  199. href="{{ route('patients.view.sms', ['patient' => $patient]) }}">SMS</a>
  200. </li>
  201. <li class="nav-item">
  202. <a class="nav-link {{ strpos($routeName, 'patients.view.sms-numbers') === 0 ? 'active' : '' }}"
  203. href="{{ route('patients.view.sms-numbers', ['patient' => $patient]) }}">SMS Numbers</a>
  204. </li>
  205. <li class="nav-item">
  206. <a class="nav-link {{ strpos($routeName, 'patients.view.documents') === 0 ? 'active' : '' }}"
  207. href="{{ route('patients.view.documents', ['patient' => $patient]) }}">Documents</a>
  208. </li>
  209. <li class="nav-item">
  210. <a class="nav-link {{ strpos($routeName, 'patients.view.settings') === 0 ? 'active' : '' }}"
  211. href="{{ route('patients.view.settings', ['patient' => $patient]) }}">Settings</a>
  212. </li>
  213. <li class="nav-item">
  214. <a class="nav-link {{ strpos($routeName, 'patients.view.sms-reminders') === 0 ? 'active' : '' }}"
  215. href="{{ route('patients.view.sms-reminders', ['patient' => $patient]) }}">SMS Reminders</a>
  216. </li>
  217. <li class="nav-item">
  218. <a class="nav-link {{ strpos($routeName, 'patients.view.measurement-confirmation-numbers') === 0 ? 'active' : '' }}"
  219. href="{{ route('patients.view.measurement-confirmation-numbers', ['patient' => $patient]) }}">Meas. Conf. Numbers</a>
  220. </li>
  221. <li class="nav-item">
  222. <a class="nav-link {{ strpos($routeName, 'patients.view.pros') === 0 ? 'active' : '' }}"
  223. href="{{ route('patients.view.pros', ['patient' => $patient]) }}">Pros</a>
  224. </li>
  225. {{-- <li class="nav-item">--}}
  226. {{-- <a class="nav-link" href="/patients/view/{{ $patient->uid }}/intake">Intake</a>--}}
  227. {{-- </li>--}}
  228. @if($performer->pro->pro_type == 'ADMIN')
  229. <li class="nav-item">
  230. <a class="nav-link {{ strpos($routeName, 'patients.view.mcp-requests') === 0 ? 'active' : '' }}"
  231. href="{{ route('patients.view.mcp-requests', $patient) }}">MCP Requests</a>
  232. </li>
  233. <li class="nav-item">
  234. <a class="nav-link {{ strpos($routeName, 'patients.view.eligible-refreshes') === 0 ? 'active' : '' }}"
  235. href="{{ route('patients.view.eligible-refreshes', $patient) }}">Eligible Refreshes</a>
  236. </li>
  237. <li class="nav-item">
  238. <a class="nav-link {{ strpos($routeName, 'patients.view.insurance-coverage') === 0 ? 'active' : '' }}"
  239. href="{{ route('patients.view.insurance-coverage', $patient) }}">Insurance Coverage</a>
  240. </li>
  241. <li class="nav-item">
  242. <a class="nav-link {{ strpos($routeName, 'patients.view.client-primary-coverages') === 0 ? 'active' : '' }}"
  243. href="{{ route('patients.view.client-primary-coverages', $patient) }}">Client Primary Coverage</a>
  244. </li>
  245. <li class="nav-item">
  246. <a class="nav-link {{ strpos($routeName, 'patients.view.claims-resolver') === 0 ? 'active' : '' }}"
  247. href="{{ route('patients.view.claims-resolver', $patient) }}">Claims Resolver</a>
  248. </li>
  249. @endif
  250. <li class="nav-item">
  251. <a class="nav-link {{ strpos($routeName, 'patients.view.accounts') === 0 ? 'active' : '' }}"
  252. href="{{ route('patients.view.accounts', $patient) }}">Linked Accounts</a>
  253. </li>
  254. </ul>
  255. <div class="mt-3 mcp-theme-1">
  256. @yield('left-nav-content')
  257. </div>
  258. </div>
  259. </nav>
  260. @endif
  261. <main role="main" class="w-100">
  262. @if($pro->is_enrolled_as_mcp && !$patient->mcp)
  263. <div class="alert alert-info bg-white mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
  264. <div class="font-size-16">
  265. <i class="fa fa-exclamation-triangle text-warning-mellow"></i>
  266. This patient currently does not have an MCP assigned.
  267. </div>
  268. <div class="mt-3 d-flex align-items-center">
  269. <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>
  270. <div class="in-conv-confirmed d-none align-items-center">
  271. <i class="fa fa-chevron-right mx-3 text-secondary"></i>
  272. <div moe class=" hide-inside-popup">
  273. <a href="" start show class="btn btn-primary font-weight-bold text-white">
  274. Assign myself as the MCP for this patient
  275. </a>
  276. <form url="/api/client/putMcp" class="mcp-theme-1">
  277. <input type="hidden" name="uid" value="{{$patient->uid}}">
  278. <input type="hidden" name="mcpProUid" value="{{$pro->uid}}">
  279. <p>Are you sure?</p>
  280. <div>
  281. <button submit class="btn btn-sm btn-primary mr-2">
  282. Submit
  283. </button>
  284. <button cancel class="btn btn-sm btn-default border">
  285. Cancel
  286. </button>
  287. </div>
  288. </form>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. @endif
  294. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $patient->is_mcp_onboarding_active === 'NO')
  295. <div class="alert alert-warning mt-3 mcp-theme-1 p-3 hide-inside-ticket-popup">
  296. <div class="font-weight-bold text-dark font-size-16">MCP onboarding is not active for this patient.</div>
  297. <div class="text-secondary p-2 border mt-2 bg-light">
  298. <div class="font-weight-bold">{{$patient->why_is_mcp_onboarding_not_active_category}}</div>
  299. <div>{{$patient->why_is_mcp_onboarding_not_active_memo}}</div>
  300. </div>
  301. </div>
  302. @endif
  303. <div class="card mt-3" id="patient-header">
  304. <div class="card-header py-1 hide-inside-ticket-popup">
  305. <?php
  306. $thumbnail = $patient->profile_picture_base64;
  307. $initials = !$thumbnail ? substr($patient->name_first, 0, 1) . substr($patient->name_last, 0, 1) : '';
  308. $online = $patient->is_online ? 'online' : '';
  309. $patientName = implode(', ', array_filter([$patient->name_last, $patient->name_first]));
  310. $confirmedCell = empty($patient->cell_number) ? '-' : $patient->cell_number;
  311. $confirmedEmail = empty($patient->email_address) ? '-' : $patient->email_address;
  312. $location = implode(', ', array_filter([$patient->home_address_city, $patient->home_address_state]));
  313. $location = empty($location) ? '-' : $location;
  314. $mcpName = $patient->mcp ? implode(', ', array_filter([$patient->mcp->name_last, $patient->mcp->name_first])) : null;
  315. $cmName = $patient->cm ? implode(', ', array_filter([$patient->cm->name_last, $patient->cm->name_first])) : null;
  316. $memberSince = date_diff(date_create($patient->created_at), date_create('now'))->days;
  317. if ($memberSince > 30) $memberSince = date('F, Y', strtotime($patient->created_at));
  318. else if ($memberSince > 1) $memberSince .= ' days ago';
  319. else if ($memberSince === 1) $memberSince = 'yesterday';
  320. else if ($memberSince === 0) $memberSince = 'today';
  321. ?>
  322. <div class=z>
  323. <div class=header>
  324. @if($patient->is_duplicate)
  325. <div class="alert alert-secondary border-dark mcp-theme-1">
  326. <span class="text-dark">This chart is a duplicate of&nbsp;</span>
  327. <a class="font-weight-bold"
  328. href="/patients/view/{{ $patient->duplicateOf->uid }}">
  329. {{ $patient->duplicateOf->displayName() }}
  330. </a>
  331. </div>
  332. @endif
  333. <div class=hbox>
  334. <div class="screen-only mr-1 patient-presence-indicator thumbnail {{$online}}"
  335. data-patient-uid="{{$patient->uid}}"
  336. style="background-image:<?=$thumbnail?>"><?=$initials?></div>
  337. {{--<div>
  338. <div @if($patient->is_microphone_available)style="color:green" @else style="color:gray" @endif>
  339. <i class="fa fa-microphone"></i>
  340. </div>
  341. <div @if($patient->is_camera_available)style="color:green" @else style="color:gray" @endif>
  342. <i class="fa fa-video"></i>
  343. </div>
  344. </div>--}}
  345. <section>
  346. <div class=hbox>
  347. <h4>{{$patientName}}</h4>
  348. <i class=chart>[#{{$patient->chart_number}}]</i>
  349. </div>
  350. <div class=separators>
  351. <div>{{friendly_date_time($patient->dob, false,null, true)}}({{$patient->age_in_years}}
  352. y.o {{$patient->sex}})
  353. </div>
  354. <div>
  355. <?php
  356. $coverageStatus = $patient->getPrimaryCoverageStatus();
  357. $coverage = $patient->getPrimaryCoverage();
  358. ?>
  359. @if($coverageStatus === 'YES')
  360. Covered <i class="fa fa-check-circle text-success"></i>
  361. @elseif($coverageStatus === 'NO')
  362. Not Covered <i class="fa fa-times text-danger"></i>
  363. @else
  364. Unknown <i
  365. class="fa fa-exclamation-triangle text-warning-mellow"></i>
  366. @endif
  367. @if($coverage)
  368. &nbsp;
  369. {{$coverage->toString()}}
  370. @endif
  371. @if($pro->pro_type === 'ADMIN')
  372. &nbsp;
  373. <a href="{{route('patients.view.client-primary-coverages', ['patient' => $patient])}}">View</a>
  374. @endif
  375. </div>
  376. </div>
  377. <div class="screen-only">
  378. <div class=separators>
  379. <div>Joined <?=$memberSince?></div>
  380. <div><label>MCP:</label> {{$mcpName}}
  381. @if($patient->has_mcp_done_onboarding_visit !== 'YES' && $pro->pro_type == 'ADMIN')
  382. <div moe class="ml-2 hide-inside-popup">
  383. <a start show><i class="fa fa-edit"></i></a>
  384. <form url="/api/client/putMcp" class="mcp-theme-1">
  385. <input type="hidden" name="uid" value="{{$patient->uid}}">
  386. <div class="mb-2">
  387. <label class="text-secondary text-sm">MCP Pro</label>
  388. <select name="mcpProUid" provider-search data-pro-uid="{{ @$patient->mcp->uid }}"
  389. class="form-control form-control-sm">
  390. <option value=""> --select--</option>
  391. @foreach($pros as $iPro)
  392. <option
  393. value="{{$iPro->uid}}" {{ $patient->mcp && $iPro->uid === $patient->mcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  394. @endforeach
  395. </select>
  396. </div>
  397. <div>
  398. <button submit class="btn btn-sm btn-primary mr-1">
  399. Submit
  400. </button>
  401. <button cancel class="btn btn-sm btn-default border">
  402. Cancel
  403. </button>
  404. </div>
  405. </form>
  406. </div>
  407. @if($patient->mcp)
  408. <div moe class="ml-2 hide-inside-popup">
  409. <a start show><i class="fa fa-times"></i></a>
  410. <form url="/api/client/removeMcp" class="mcp-theme-1">
  411. <input type="hidden" name="uid" value="{{$patient->uid}}">
  412. <div class="mb-2">
  413. <label class="text-secondary text-sm">Remove MCP Pro</label>
  414. </div>
  415. <div>
  416. <button submit class="btn btn-sm btn-primary mr-1">Submit
  417. </button>
  418. <button cancel class="btn btn-sm btn-default border">
  419. Cancel
  420. </button>
  421. </div>
  422. </form>
  423. </div>
  424. @endif
  425. @endif
  426. </div>
  427. </div>
  428. <div>
  429. @if($patient->has_mcp_done_onboarding_visit !== 'YES')
  430. <span class="text-dark d-inline-flex align-items-center">
  431. <span class="mr-2">
  432. <i class="fa fa-exclamation-triangle"></i>
  433. MCP Onboarding Visit Pending
  434. </span>
  435. </span>
  436. <span moe class="hide-inside-popup">
  437. <a start show><i class="fa fa-edit"></i></a>
  438. <form url="/api/client/updateMcpOnboardingVisitInfo" class="mcp-theme-1">
  439. <input type="hidden" name="uid" value="{{$patient->uid}}">
  440. <div class="mb-2">
  441. <select name="hasMcpDoneOnboardingVisit"
  442. class="form-control form-control-sm"
  443. onchange="toggleDisabledAsNeeded(this, 'YES', 'if-visit-done')">
  444. <option value="">-- Select Status --</option>
  445. <option value="YES" {{ $patient->has_mcp_done_onboarding_visit === 'YES' ? 'selected' : '' }}>YES</option>
  446. <option value="NO" {{ $patient->has_mcp_done_onboarding_visit === 'NO' ? 'selected' : '' }}>NO</option>
  447. <option value="UNKNOWN" {{ $patient->has_mcp_done_onboarding_visit === 'UNKNOWN' ? 'selected' : '' }}>UNKNOWN</option>
  448. </select>
  449. </div>
  450. <div class="mb-2">
  451. <input type="date"
  452. class="if-visit-done form-control form-control-sm" disabled
  453. name="mcpOnboardingVisitDate" value="{{ date('Y-m-d') }}"
  454. max="{{ date('Y-m-d') }}">
  455. </div>
  456. <div class="mb-2">
  457. <select name="mcpOnboardingVisitNoteUid" disabled
  458. class="form-control form-control-sm if-visit-done"
  459. onchange="if(this.value === '-- create --') createNewNote('{{$patient->uid}}', '{{$pro->uid}}', '{{date('Y-m-d')}}');">
  460. <option value="">-- Visit Note --</option>
  461. <?php $notes = \App\Models\Note::where('client_id', $patient->id)->get() ?>
  462. @foreach ($notes as $note)
  463. @if(!empty($note->title) && $note->client_id === $patient->id && !$note->is_cancelled)
  464. <option
  465. {{ $patient->mcp_onboarding_visit_note_id === $note->id ? 'selected' : '' }}
  466. value="{{$note->uid}}">{{$note->title}} ({{friendly_date_time($note->effective_dateest, false)}})</option>
  467. @endif
  468. @endforeach
  469. {{--<option value="-- create --">-- Create Note --</option>--}}
  470. </select>
  471. </div>
  472. <div class="mb-2 if-note-outside-system">
  473. <textarea class="form-control form-control-sm"
  474. name="reasonOnboardingVisitNoteOutsideSystem"
  475. placeholder="Visit note outside the system reason"
  476. spellcheck="false" data-gramm="false"></textarea>
  477. </div>
  478. <div>
  479. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  480. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  481. </div>
  482. </form>
  483. </span>
  484. @else
  485. <span class="text-dark d-inline-flex align-items-center">
  486. <span class="mr-2 text-secondary">
  487. <i class="fa fa-check text-sm"></i>
  488. MCP Onboarding Visit Completed
  489. </span>
  490. </span>
  491. @endif
  492. </div>
  493. <div>
  494. <label>Physician:</label> {{$patient->pcp ? $patient->pcp->displayName() : '-' }}
  495. @if($pro->pro_type == 'ADMIN')
  496. <div moe class="ml-2 hide-inside-popup">
  497. <a start show><i class="fa fa-edit"></i></a>
  498. <form url="/api/client/putPhysicianPro" class="mcp-theme-1">
  499. <input type="hidden" name="uid" value="{{$patient->uid}}">
  500. <div class="mb-2">
  501. <label class="text-secondary text-sm">Physician Pro</label>
  502. <select provider-search data-pro-uid="{{ @$patient->pcp->uid }}"
  503. name="physicianProUid"
  504. class="form-control form-control-sm">
  505. <option value=""> --select--</option>
  506. @foreach($pros as $iPro)
  507. <option
  508. value="{{$iPro->uid}}" {{ $patient->pcp && $iPro->uid === $patient->pcp->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  509. @endforeach
  510. </select>
  511. </div>
  512. <div>
  513. <button submit class="btn btn-sm btn-primary mr-1">Submit
  514. </button>
  515. <button cancel class="btn btn-sm btn-default border">
  516. Cancel
  517. </button>
  518. </div>
  519. </form>
  520. </div>
  521. @if($patient->pcp)
  522. <div moe class="ml-2 hide-inside-popup">
  523. <a start show><i class="fa fa-times"></i></a>
  524. <form url="/api/client/removePhysicianPro" class="mcp-theme-1">
  525. <input type="hidden" name="uid" value="{{$patient->uid}}">
  526. <div class="mb-2">
  527. <label class="text-secondary text-sm">Remove Physician Pro</label>
  528. </div>
  529. <div>
  530. <button submit class="btn btn-sm btn-primary mr-1">Submit
  531. </button>
  532. <button cancel class="btn btn-sm btn-default border">
  533. Cancel
  534. </button>
  535. </div>
  536. </form>
  537. </div>
  538. @endif
  539. @endif
  540. </div>
  541. <div>
  542. <label>Nurse:</label> {{$patient->defaultNaPro ? $patient->defaultNaPro->displayName() : '-' }}
  543. @if($pro->pro_type == 'ADMIN')
  544. <div moe class="ml-2 hide-inside-popup">
  545. <a start show><i class="fa fa-edit"></i></a>
  546. <form url="/api/client/putDefaultNaPro" class="mcp-theme-1">
  547. <input type="hidden" name="uid" value="{{$patient->uid}}">
  548. <div class="mb-2">
  549. <label class="text-secondary text-sm">Nurse Pro</label>
  550. <select provider-search data-pro-uid="{{ @$patient->defaultNaPro->uid }}"
  551. name="defaultNaProUid"
  552. class="form-control form-control-sm">
  553. <option value=""> --select--</option>
  554. @foreach($pros as $iPro) <?php continue; ?>
  555. <option
  556. value="{{$iPro->uid}}" {{ $patient->defaultNaPro && $iPro->uid === $patient->defaultNaPro->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  557. @endforeach
  558. </select>
  559. </div>
  560. <div>
  561. <button submit class="btn btn-sm btn-primary mr-1">Submit
  562. </button>
  563. <button cancel class="btn btn-sm btn-default border">
  564. Cancel
  565. </button>
  566. </div>
  567. </form>
  568. </div>
  569. @if($patient->defaultNaPro)
  570. <div moe class="ml-2 hide-inside-popup">
  571. <a start show><i class="fa fa-times"></i></a>
  572. <form url="/api/client/removeDefaultNaPro" class="mcp-theme-1">
  573. <input type="hidden" name="uid" value="{{$patient->uid}}">
  574. <div class="mb-2">
  575. <label class="text-secondary text-sm">Remove Nurse Pro</label>
  576. </div>
  577. <div>
  578. <button submit class="btn btn-sm btn-primary mr-1">Submit
  579. </button>
  580. <button cancel class="btn btn-sm btn-default border">
  581. Cancel
  582. </button>
  583. </div>
  584. </form>
  585. </div>
  586. @endif
  587. @endif
  588. </div>
  589. </div>
  590. </section>
  591. {{--<section>
  592. <div>
  593. <label>Next Appt:</label>
  594. <?php
  595. $nextAppointment = $patient->nextMcpAppointment();
  596. $startTime = false;
  597. $endTime = false;
  598. if($nextAppointment) {
  599. $startTime = date('H:i', strtotime($nextAppointment->start_time));
  600. $endTime = date('H:i', strtotime($nextAppointment->end_time));
  601. $nextAppointment = date('Y-m-d', strtotime($nextAppointment->start_time));
  602. }
  603. ?>
  604. {{$nextAppointment ? friendly_date_time($nextAppointment . ($startTime ? ' ' . $startTime : ''), true, '') : '-'}}
  605. <span moe relative class="ml-1">
  606. <a start show><i class="fa fa-edit"></i></a>
  607. <form url="/api/appointment/create" class="mcp-theme-1" right>
  608. <input type="hidden" name="clientUid" value="{{$patient->uid}}">
  609. <input type="hidden" name="title" value="MCP Appointment">
  610. <div class="mb-2">
  611. <label class="text-secondary text-sm">Pro</label>
  612. <select name="proUid" class="form-control form-control-sm">
  613. <option value=""> --select-- </option>
  614. @foreach($pros as $iPro)
  615. <option value="{{$iPro->uid}}" {{ $iPro->uid === $pro->uid ? 'selected' : '' }}>{{$iPro->displayName()}}</option>
  616. @endforeach
  617. </select>
  618. </div>
  619. <div class="mb-2">
  620. <label class="text-secondary text-sm">Date</label>
  621. <input type="date" name="date" min="{{ date('Y-m-d') }}"
  622. value="{{ $nextAppointment ? $nextAppointment : date('Y-m-d') }}"
  623. class="form-control form-control-sm">
  624. </div>
  625. <div class="mb-2">
  626. <label class="text-secondary text-sm">Start Time</label>
  627. <input type="time" name="startTime" class="form-control form-control-sm"
  628. value="{{ $startTime ? $startTime : '' }}">
  629. </div>
  630. <div class="mb-2">
  631. <label class="text-secondary text-sm">End Time</label>
  632. <input type="time" name="endTime" class="form-control form-control-sm"
  633. value="{{ $endTime ? $endTime : '' }}">
  634. </div>
  635. <div>
  636. <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
  637. <button cancel class="btn btn-sm btn-default border">Cancel</button>
  638. </div>
  639. </form>
  640. </span>
  641. </div>
  642. <div>
  643. <label>CM:</label> {{ $patient->is_enrolled_in_cm === 'YES' ? 'Yes' : 'No' }}
  644. <label class="ml-2">RM:</label> {{ $patient->is_enrolled_in_rm === 'YES' ? 'Yes' : 'No' }}
  645. </div>
  646. </section>--}}
  647. <section class="hide-inside-popup screen-only vbox mt-2 align-self-start ml-4">
  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(0 && $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 p-3">
  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