PatientController.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Models\Appointment;
  4. use App\Models\BDTDevice;
  5. use App\Models\CareMonth;
  6. use App\Models\Client;
  7. use App\Models\ClientBDTDevice;
  8. use App\Models\ClientInfoLine;
  9. use App\Models\Erx;
  10. use App\Models\Facility;
  11. use App\Models\Handout;
  12. use App\Models\IncomingReport;
  13. use App\Models\MBClaim;
  14. use App\Models\MBPayer;
  15. use App\Models\Note;
  16. use App\Models\NoteTemplate;
  17. use App\Models\Pro;
  18. use App\Models\Product;
  19. use App\Models\ProProAccess;
  20. use App\Models\SectionTemplate;
  21. use App\Models\Shipment;
  22. use App\Models\SupplyOrder;
  23. use App\Models\Ticket;
  24. use Illuminate\Http\Request;
  25. use Illuminate\Support\Facades\DB;
  26. use Illuminate\Support\Facades\File;
  27. use Illuminate\Support\Facades\Http;
  28. use PDF;
  29. class PatientController extends Controller
  30. {
  31. public function claimsResolver(Request $request, Client $patient)
  32. {
  33. $notes = $patient->notesAscending;
  34. $hcpSignedNotesCount = 0;
  35. foreach($notes as $note){
  36. if($note->is_signed_by_hcp){
  37. $hcpSignedNotesCount += 1;
  38. }
  39. }
  40. $data = [
  41. 'dog' => 'bark',
  42. 'patient' => $patient,
  43. 'hcpSignedNotesCount' => $hcpSignedNotesCount
  44. ];
  45. return view('app.patient.claims-resolver', $data);
  46. }
  47. public function dashboard(Request $request, Client $patient )
  48. {
  49. $mcpPros = Pro::where('is_enrolled_as_mcp', true)->get();
  50. $facilities = []; // Facility::where('is_active', true)->get();
  51. // get assigned devices
  52. $assignedDeviceIDs = DB::select(DB::raw("SELECT device_id from client_bdt_device where is_active = true"));
  53. $assignedDeviceIDs = array_map(function($_x) {
  54. return $_x->device_id;
  55. }, $assignedDeviceIDs);
  56. // get all except assigned ones
  57. $devices = BDTDevice::where('is_active', true)
  58. ->whereNotIn('id', $assignedDeviceIDs)
  59. ->orderBy('imei', 'asc')
  60. ->get();
  61. $assignedDeviceIDs = null;
  62. unset($assignedDeviceIDs);
  63. $dxInfoLines = ClientInfoLine::where('client_id', $patient->id)
  64. ->where('category', 'dx')
  65. ->where('is_removed', false)
  66. ->orderBy('content_text', 'asc')
  67. ->get();
  68. return view('app.patient.dashboard',
  69. compact('patient', 'facilities', 'devices', 'dxInfoLines'));
  70. }
  71. public function canvasMigrate(Request $request, Client $patient )
  72. {
  73. $mcpPros = Pro::where('is_enrolled_as_mcp', true)->get();
  74. $facilities = []; // Facility::where('is_active', true)->get();
  75. // get assigned devices
  76. $assignedDeviceIDs = DB::select(DB::raw("SELECT device_id from client_bdt_device where is_active = true"));
  77. $assignedDeviceIDs = array_map(function($_x) {
  78. return $_x->device_id;
  79. }, $assignedDeviceIDs);
  80. // get all except assigned ones
  81. $devices = BDTDevice::where('is_active', true)
  82. ->whereNotIn('id', $assignedDeviceIDs)
  83. ->orderBy('imei', 'asc')
  84. ->get();
  85. $assignedDeviceIDs = null;
  86. unset($assignedDeviceIDs);
  87. $dxInfoLines = ClientInfoLine::where('client_id', $patient->id)
  88. ->where('category', 'dx')
  89. ->where('is_removed', false)
  90. ->orderBy('content_text', 'asc')
  91. ->get();
  92. return view('app.patient.canvas-migrate',
  93. compact('patient', 'facilities', 'devices', 'dxInfoLines'));
  94. }
  95. public function canvas(Request $request, Client $patient){
  96. return view('app.patient.canvas_dump', compact('patient'));
  97. }
  98. public function actionItems(Request $request, Client $patient )
  99. {
  100. $facilities = []; // Facility::where('is_active', true)->get();
  101. return view('app.patient.action-items', compact('patient', 'facilities'));
  102. }
  103. public function actionItemsErx(Request $request, Client $patient, $filter = 'open')
  104. {
  105. $allPros = Pro::all();
  106. $facilities = []; // Facility::where('is_active', true)->get();
  107. return view('app.patient.action-items-erx', compact('patient', 'facilities', 'filter', 'allPros'));
  108. }
  109. public function actionItemsLab(Request $request, Client $patient, $filter = 'open')
  110. {
  111. $allPros = Pro::all();
  112. $facilities = []; // Facility::where('is_active', true)->get();
  113. return view('app.patient.action-items-lab', compact('patient', 'facilities', 'filter', 'allPros'));
  114. }
  115. public function actionItemsImaging(Request $request, Client $patient, $filter = 'open')
  116. {
  117. $allPros = Pro::all();
  118. $facilities = []; // Facility::where('is_active', true)->get();
  119. return view('app.patient.action-items-imaging', compact('patient', 'facilities', 'filter', 'allPros'));
  120. }
  121. public function actionItemsEquipment(Request $request, Client $patient, $filter = 'open')
  122. {
  123. $allPros = Pro::all();
  124. $facilities = []; // Facility::where('is_active', true)->get();
  125. return view('app.patient.action-items-equipment', compact('patient', 'facilities', 'filter', 'allPros'));
  126. }
  127. public function actionItemsOther(Request $request, Client $patient, $filter = 'open')
  128. {
  129. $allPros = Pro::all();
  130. $facilities = []; // Facility::where('is_active', true)->get();
  131. return view('app.patient.action-items-other', compact('patient', 'facilities', 'filter', 'allPros'));
  132. }
  133. public function actionItemsErxSingle(Request $request, Client $patient, Ticket $ticket) {
  134. $allPros = Pro::all();
  135. $facilities = []; // Facility::where('is_active', true)->get();
  136. return view('app.patient.action-items-erx-single', compact('patient', 'facilities', 'allPros', 'ticket'));
  137. }
  138. public function actionItemsLabSingle(Request $request, Client $patient, Ticket $ticket) {
  139. $allPros = Pro::all();
  140. $facilities = []; // Facility::where('is_active', true)->get();
  141. return view('app.patient.action-items-lab-single', compact('patient', 'facilities', 'allPros', 'ticket'));
  142. }
  143. public function actionItemsImagingSingle(Request $request, Client $patient, Ticket $ticket) {
  144. $allPros = Pro::all();
  145. $facilities = []; // Facility::where('is_active', true)->get();
  146. return view('app.patient.action-items-imaging-single', compact('patient', 'facilities', 'allPros', 'ticket'));
  147. }
  148. public function actionItemsEquipmentSingle(Request $request, Client $patient, Ticket $ticket) {
  149. $allPros = Pro::all();
  150. $facilities = []; // Facility::where('is_active', true)->get();
  151. return view('app.patient.action-items-equipment-single', compact('patient', 'facilities', 'allPros', 'ticket'));
  152. }
  153. public function actionItemsOtherSingle(Request $request, Client $patient, Ticket $ticket) {
  154. $allPros = Pro::all();
  155. $facilities = []; // Facility::where('is_active', true)->get();
  156. return view('app.patient.action-items-other-single', compact('patient', 'facilities', 'allPros', 'ticket'));
  157. }
  158. public function intake(Request $request, Client $patient )
  159. {
  160. $files = File::allFiles(resource_path('views/app/intake-templates'));
  161. $templates = [];
  162. foreach ($files as $file) {
  163. $templates[] = str_replace(".blade.php", "", $file->getFilename());
  164. }
  165. return view('app.patient.intake', compact('patient', 'templates'));
  166. }
  167. public function carePlan(Request $request, Client $patient )
  168. {
  169. return view('app.patient.care-plan', compact('patient'));
  170. }
  171. public function medications(Request $request, Client $patient )
  172. {
  173. $infoLines = ClientInfoLine::where('client_id', $patient->id)
  174. ->where('category', 'rx')
  175. ->where('is_removed', false)
  176. ->orderBy('content_text', 'asc')
  177. ->get();
  178. return view('app.patient.medications', compact('patient', 'infoLines'));
  179. }
  180. public function dxAndFocusAreas(Request $request, Client $patient )
  181. {
  182. $dxInfoLines = ClientInfoLine::where('client_id', $patient->id)
  183. ->where('category', 'dx')
  184. ->where('is_removed', false)
  185. ->orderBy('content_text', 'asc')
  186. ->get();
  187. return view('app.patient.dx-and-focus-areas', compact('patient', 'dxInfoLines'));
  188. }
  189. public function careTeam(Request $request, Client $patient )
  190. {
  191. $infoLines = ClientInfoLine::where('client_id', $patient->id)
  192. ->where('category', 'care_team')
  193. ->where('is_removed', false)
  194. ->get();
  195. return view('app.patient.care-team', compact('patient', 'infoLines'));
  196. }
  197. public function devices(Request $request, Client $patient )
  198. {
  199. // get assigned devices
  200. $assignedDeviceIDs = DB::select(DB::raw("SELECT device_id from client_bdt_device where is_active = true"));
  201. $assignedDeviceIDs = array_map(function($_x) {
  202. return $_x->device_id;
  203. }, $assignedDeviceIDs);
  204. // get all except assigned ones
  205. $devices = BDTDevice::where('is_active', true)
  206. ->whereNotIn('id', $assignedDeviceIDs)
  207. ->orderBy('imei', 'asc')
  208. ->get();
  209. $assignedDeviceIDs = null;
  210. unset($assignedDeviceIDs);
  211. return view('app.patient.devices', compact('patient', 'devices'));
  212. }
  213. public function measurements(Request $request, Client $patient )
  214. {
  215. return view('app.patient.measurements', compact('patient'));
  216. }
  217. public function labsAndStudies(Request $request, Client $patient )
  218. {
  219. return view('app.patient.labs-and-studies', compact('patient'));
  220. }
  221. public function history(Request $request, Client $patient )
  222. {
  223. $infoLines = ClientInfoLine::where('client_id', $patient->id)
  224. ->where('category', 'LIKE', 'history_%')
  225. ->where('is_removed', false)
  226. ->get();
  227. return view('app.patient.history', compact('patient', 'infoLines'));
  228. }
  229. public function memos(Request $request, Client $patient )
  230. {
  231. return view('app.patient.memos', compact('patient'));
  232. }
  233. public function memosThread(Request $request, Client $patient )
  234. {
  235. return view('app.patient.memos-thread', compact('patient'));
  236. }
  237. public function messagesThread(Request $request, Client $patient )
  238. {
  239. return view('app.patient.messages-thread', compact('patient'));
  240. }
  241. public function sms(Request $request, Client $patient )
  242. {
  243. return view('app.patient.sms', compact('patient'));
  244. }
  245. public function smsNumbers(Request $request, Client $patient )
  246. {
  247. return view('app.patient.sms-numbers', compact('patient'));
  248. }
  249. public function immunizations(Request $request, Client $patient )
  250. {
  251. return view('app.patient.immunizations', compact('patient'));
  252. }
  253. public function allergies(Request $request, Client $patient )
  254. {
  255. $infoLines = ClientInfoLine::where('client_id', $patient->id)
  256. ->where('category', 'allergy')
  257. ->where('is_removed', false)
  258. ->get();
  259. return view('app.patient.allergies', compact('patient', 'infoLines'));
  260. }
  261. public function notes(Request $request, Client $patient, $filter = 'active')
  262. {
  263. $pros = $this->pros;
  264. return view('app.patient.notes', compact('patient','pros', 'filter'));
  265. }
  266. public function genericBills(Request $request, Client $patient)
  267. {
  268. return view('app.patient.generic-bills', compact('patient'));
  269. }
  270. public function rmSetup(Request $request, Client $patient)
  271. {
  272. return view('app.patient.rm-setup', compact('patient'));
  273. }
  274. public function handouts(Request $request, Client $patient )
  275. {
  276. $handouts = Handout::where('is_active', true)->get();
  277. return view('app.patient.handouts', compact('patient', 'handouts'));
  278. }
  279. public function handoutsPopup(Request $request, Client $patient )
  280. {
  281. $handouts = Handout::where('is_active', true)->get();
  282. return view('app.patient.handouts-popup', compact('patient', 'handouts'));
  283. }
  284. public function settings(Request $request, Client $patient )
  285. {
  286. return view('app.patient.settings', compact('patient'));
  287. }
  288. public function smsReminders(Request $request, Client $patient )
  289. {
  290. return view('app.patient.sms-reminders', compact('patient'));
  291. }
  292. public function measurementConfirmationNumbers(Request $request, Client $patient )
  293. {
  294. return view('app.patient.measurement-confirmation-numbers', compact('patient'));
  295. }
  296. public function pros(Request $request, Client $patient )
  297. {
  298. return view('app.patient.pros', compact('patient'));
  299. }
  300. public function account(Request $request, Client $patient )
  301. {
  302. return view('app.patient.account', compact('patient'));
  303. }
  304. public function careChecklist(Request $request, Client $patient )
  305. {
  306. return view('app.patient.care-checklist', compact('patient'));
  307. }
  308. public function documents(Request $request, Client $patient )
  309. {
  310. return view('app.patient.documents', compact('patient'));
  311. }
  312. public function incomingReports(Request $request, Client $patient, IncomingReport $currentReport = null)
  313. {
  314. return view('app.patient.incoming-reports', compact('patient', 'currentReport'));
  315. }
  316. public function education(Request $request, Client $patient )
  317. {
  318. return view('app.patient.education', compact('patient'));
  319. }
  320. public function messaging(Request $request, Client $patient )
  321. {
  322. return view('app.patient.messaging', compact('patient'));
  323. }
  324. public function duplicate(Request $request, Client $patient )
  325. {
  326. return view('app.patient.duplicate', compact('patient'));
  327. }
  328. public function careMonths(Request $request, Client $patient )
  329. {
  330. $careMonths = CareMonth::where('client_id', $patient->id)->orderBy('start_date', 'desc')->get();
  331. $notes = Note::where('is_cancelled', false)->get();
  332. return view('app.patient.care-months', compact('patient', 'careMonths', 'notes'));
  333. }
  334. public function presence(Request $request, Client $patient )
  335. {
  336. return json_encode([
  337. "online" => $patient->is_online
  338. ]);
  339. }
  340. public function embedSection(Request $request, Client $patient, $section, $selectable) {
  341. return view('app.patient.partials.' . $section, compact('patient', 'selectable'));
  342. }
  343. public function calendar(Request $request, Client $patient, Appointment $currentAppointment) {
  344. $pros = [];
  345. if($this->pro && $this->pro->pro_type != 'ADMIN') {
  346. $accessiblePros = ProProAccess::where('owner_pro_id', $this->pro->id)->get();
  347. $accessibleProIds = [];
  348. foreach($accessiblePros as $accessiblePro){
  349. $accessibleProIds[] = $accessiblePro->accessible_pro_id;
  350. }
  351. $accessibleProIds[] = $this->pro->id;
  352. // for dna, add pros accessible via pro teams
  353. if($this->performer->pro->isDefaultNA()) {
  354. $teams = $this->performer->pro->teamsWhereAssistant;
  355. foreach ($teams as $team) {
  356. if(!in_array($team->mcp_pro_id, $accessibleProIds)) {
  357. $accessibleProIds[] = $team->mcp_pro_id;
  358. }
  359. }
  360. }
  361. $pros = Pro::whereIn('id', $accessibleProIds)->get();
  362. }
  363. return view('app.patient.appointment-calendar', compact('pros', 'patient', 'currentAppointment'));
  364. }
  365. public function programs(Request $request, Client $patient, $filter = '') {
  366. $pros = $this->pros;
  367. return view('app.patient.programs', compact('patient', 'pros', 'filter'));
  368. }
  369. public function flowsheets(Request $request, Client $patient, $filter = '') {
  370. $pros = $this->pros;
  371. return view('app.patient.flowsheets', compact('patient', 'pros', 'filter'));
  372. }
  373. public function vitalsSettings(Request $request, Client $patient) {
  374. return view('app.patient.vitals-settings', compact('patient'));
  375. }
  376. public function vitalsGraph(Request $request, Client $patient, $filter = '') {
  377. $pros = $this->pros;
  378. return view('app.patient.vitals-graph', compact('patient', 'pros', 'filter'));
  379. }
  380. public function tickets(Request $request, Client $patient, $type = '', String $currentTicket = '') {
  381. $pros = $this->pros;
  382. $allPros = Pro::all();
  383. $qlTicket = $currentTicket;
  384. if(!!$currentTicket) {
  385. $qlTicket = Ticket::where('uid', $currentTicket)->first();
  386. if($qlTicket) {
  387. $currentTicket = $qlTicket;
  388. }
  389. }
  390. return view('app.patient.tickets', compact('patient', 'pros', 'allPros', 'type', 'currentTicket'));
  391. }
  392. public function prescriptions(Request $request, Client $patient, String $type = '', String $currentErx = '') {
  393. if(!!$currentErx) {
  394. $currentErx = Erx::where('uid', $currentErx)->first();
  395. }
  396. $note = $patient->coreNote;
  397. return view('app.patient.prescriptions.index', compact('patient', 'type', 'currentErx', 'note'));
  398. }
  399. public function prescriptionsPopup(Request $request, Client $patient, String $type = '', String $currentErx = '') {
  400. if(!!$currentErx) {
  401. $currentErx = Erx::where('uid', $currentErx)->first();
  402. }
  403. $note = null;
  404. if($request->input('noteUid')) {
  405. $note = Note::where('uid', $request->input('noteUid'))->first();
  406. }
  407. return view('app.patient.prescriptions-popup.list-popup', compact('patient', 'type', 'currentErx', 'note'));
  408. }
  409. public function prescriptionsList(Request $request, Client $patient, String $type = '', String $currentErx = '') {
  410. if(!!$currentErx) {
  411. $currentErx = Erx::where('uid', $currentErx)->first();
  412. }
  413. $note = null;
  414. if($request->input('noteUid')) {
  415. $note = Note::where('uid', $request->input('noteUid'))->first();
  416. }
  417. return view('app.patient.prescriptions.list', compact('patient', 'type', 'currentErx', 'note'));
  418. }
  419. public function downloadPrescriptionAsPdf(Request $request, Erx $prescription){
  420. if($request->input('html')) {
  421. return view('app.patient.prescriptions.pdf.pdf-preview', compact('prescription'));
  422. }
  423. else {
  424. $pdf = PDF::loadView('app.patient.prescriptions.pdf.pdf-preview', compact('prescription'));
  425. return $pdf->download($prescription->created_at .'_' . 'erx.pdf');
  426. }
  427. }
  428. public function transmitPrescription(Request $request, Erx $prescription){
  429. // re-generate pdf with cover sheet as first page and save it to FS
  430. $filePath = config('app.temp_dir') . "/{$prescription->uid}.pdf";
  431. $pdf = PDF::loadView('app.patient.prescriptions.pdf.pdf-preview-with-cover-sheet', compact('prescription'));
  432. $pdf->save($filePath);
  433. // send it along with the rest of the params to /api/erx/transmit [multi-part POST]
  434. $url = config('stag.backendUrl') . '/erx/transmit';
  435. $params = [
  436. "uid" => $request->input('uid'),
  437. "toWho" => $request->input('toWho'),
  438. "toEmail" => $request->input('toEmail'),
  439. "toFaxNumber" => $request->input('toFaxNumber'),
  440. "toFaxNumberAttentionLine" => $request->input('toFaxNumberAttentionLine'),
  441. "toFaxNumberCoverSheetMemo" => $request->input('toFaxNumberCoverSheetMemo'),
  442. ];
  443. if($request->input('copyToPatient')) {
  444. $params["copyToPatientFaxNumber"] = $request->input('copyToPatientFaxNumber');
  445. $params["copyToPatientEmail"] = $request->input('copyToPatientEmail');
  446. }
  447. $pdf = fopen($filePath, 'r');
  448. $response = Http
  449. ::attach('pdfSystemFile', $filePath, "{$prescription->uid}.pdf")
  450. ->withHeaders(['sessionKey' => $request->cookie('sessionKey')])
  451. ->post($url, $params)
  452. ->json();
  453. return $response;
  454. }
  455. public function supplyOrders(Request $request, Client $patient, SupplyOrder $supplyOrder = null)
  456. {
  457. $products = Product::where('is_active', true)->orderBy('created_at', 'desc')->get();
  458. return view('app.patient.supply-orders', compact('patient', 'supplyOrder', 'products'));
  459. }
  460. public function shipments(Request $request, Client $patient, Shipment $shipment = null)
  461. {
  462. return view('app.patient.shipments', compact('patient', 'shipment'));
  463. }
  464. public function appointments(Request $request, Client $patient, $forPro = 'all', $status = 'all') {
  465. $pros = $this->pros;
  466. $appointments = $patient->appointmentsForProByStatus('all', 'ALL');
  467. $appointmentProIDs = $appointments->map(function($_item) {
  468. return $_item->pro_id;
  469. });
  470. $appointmentPros = Pro::whereIn('id', $appointmentProIDs)->get();
  471. $appointments = $patient->appointmentsForProByStatus($forPro, strtoupper($status));
  472. return view('app.patient.appointments',
  473. compact('patient', 'pros', 'appointments', 'appointmentPros', 'forPro', 'status'));
  474. }
  475. public function mcpRequests(Request $request, Client $patient) {
  476. return view('app.patient.mcp-requests', compact('patient'));
  477. }
  478. public function eligibleRefreshes(Request $request, Client $patient) {
  479. return view('app.patient.eligible-refreshes', compact('patient'));
  480. }
  481. public function insuranceCoverage(Request $request, Client $patient) {
  482. $mbPayers = MBPayer::all();
  483. return view('app.patient.insurance-coverage', compact('patient', 'mbPayers'));
  484. }
  485. public function clientPrimaryCoverages(Request $request, Client $patient) {
  486. $mbPayers = MBPayer::all();
  487. return view('app.patient.client-primary-coverages', compact('patient', 'mbPayers'));
  488. }
  489. public function primaryCoverage(Request $request, Client $patient) {
  490. $mbPayers = MBPayer::all();
  491. return view('app.patient.primary-coverage', compact('patient', 'mbPayers'));
  492. }
  493. public function primaryCoverageForm(Request $request, Client $patient) {
  494. $mbPayers = MBPayer::all();
  495. return view('app.patient.primary-coverage-form', compact('patient', 'mbPayers'));
  496. }
  497. public function primaryCoverageManualDeterminationModal(Request $request, Client $patient) {
  498. if($patient->latestClientPrimaryCoverage->plan_type === 'MEDICARE'){
  499. return view('app.patient.primary-coverage-manual-determination-medicare-modal', compact('patient'));
  500. }
  501. if($patient->latestClientPrimaryCoverage->plan_type === 'MEDICAID'){
  502. return view('app.patient.primary-coverage-manual-determination-medicaid-modal', compact('patient'));
  503. }
  504. if($patient->latestClientPrimaryCoverage->plan_type === 'COMMERCIAL'){
  505. return view('app.patient.primary-coverage-manual-determination-commercial-modal', compact('patient'));
  506. }
  507. return "Plan Type is missing!";
  508. }
  509. public function mbClaim(Request $request, MBClaim $mbClaim) {
  510. return view('app.patient.mb-claim-single', compact('mbClaim'));
  511. }
  512. public function accounts(Request $request, Client $patient) {
  513. return view('app.patient.accounts', compact('patient'));
  514. }
  515. public function careMonthMatrix(Request $request, CareMonth $careMonth) {
  516. return view('app.patient.care-month.matrix', [
  517. 'patient' => $careMonth->patient,
  518. 'careMonth' => $careMonth,
  519. ]);
  520. }
  521. }