PatientController.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  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 settings(Request $request, Client $patient )
  280. {
  281. return view('app.patient.settings', compact('patient'));
  282. }
  283. public function smsReminders(Request $request, Client $patient )
  284. {
  285. return view('app.patient.sms-reminders', compact('patient'));
  286. }
  287. public function measurementConfirmationNumbers(Request $request, Client $patient )
  288. {
  289. return view('app.patient.measurement-confirmation-numbers', compact('patient'));
  290. }
  291. public function pros(Request $request, Client $patient )
  292. {
  293. return view('app.patient.pros', compact('patient'));
  294. }
  295. public function account(Request $request, Client $patient )
  296. {
  297. return view('app.patient.account', compact('patient'));
  298. }
  299. public function careChecklist(Request $request, Client $patient )
  300. {
  301. return view('app.patient.care-checklist', compact('patient'));
  302. }
  303. public function documents(Request $request, Client $patient )
  304. {
  305. return view('app.patient.documents', compact('patient'));
  306. }
  307. public function incomingReports(Request $request, Client $patient, IncomingReport $currentReport = null)
  308. {
  309. return view('app.patient.incoming-reports', compact('patient', 'currentReport'));
  310. }
  311. public function education(Request $request, Client $patient )
  312. {
  313. return view('app.patient.education', compact('patient'));
  314. }
  315. public function messaging(Request $request, Client $patient )
  316. {
  317. return view('app.patient.messaging', compact('patient'));
  318. }
  319. public function duplicate(Request $request, Client $patient )
  320. {
  321. return view('app.patient.duplicate', compact('patient'));
  322. }
  323. public function careMonths(Request $request, Client $patient )
  324. {
  325. $careMonths = CareMonth::where('client_id', $patient->id)->orderBy('start_date', 'desc')->get();
  326. $notes = Note::where('is_cancelled', false)->get();
  327. return view('app.patient.care-months', compact('patient', 'careMonths', 'notes'));
  328. }
  329. public function presence(Request $request, Client $patient )
  330. {
  331. return json_encode([
  332. "online" => $patient->is_online
  333. ]);
  334. }
  335. public function embedSection(Request $request, Client $patient, $section, $selectable) {
  336. return view('app.patient.partials.' . $section, compact('patient', 'selectable'));
  337. }
  338. public function calendar(Request $request, Client $patient, Appointment $currentAppointment) {
  339. $pros = [];
  340. if($this->pro && $this->pro->pro_type != 'ADMIN') {
  341. $accessiblePros = ProProAccess::where('owner_pro_id', $this->pro->id)->get();
  342. $accessibleProIds = [];
  343. foreach($accessiblePros as $accessiblePro){
  344. $accessibleProIds[] = $accessiblePro->accessible_pro_id;
  345. }
  346. $accessibleProIds[] = $this->pro->id;
  347. // for dna, add pros accessible via pro teams
  348. if($this->performer->pro->isDefaultNA()) {
  349. $teams = $this->performer->pro->teamsWhereAssistant;
  350. foreach ($teams as $team) {
  351. if(!in_array($team->mcp_pro_id, $accessibleProIds)) {
  352. $accessibleProIds[] = $team->mcp_pro_id;
  353. }
  354. }
  355. }
  356. $pros = Pro::whereIn('id', $accessibleProIds)->get();
  357. }
  358. return view('app.patient.appointment-calendar', compact('pros', 'patient', 'currentAppointment'));
  359. }
  360. public function programs(Request $request, Client $patient, $filter = '') {
  361. $pros = $this->pros;
  362. return view('app.patient.programs', compact('patient', 'pros', 'filter'));
  363. }
  364. public function flowsheets(Request $request, Client $patient, $filter = '') {
  365. $pros = $this->pros;
  366. return view('app.patient.flowsheets', compact('patient', 'pros', 'filter'));
  367. }
  368. public function vitalsSettings(Request $request, Client $patient) {
  369. return view('app.patient.vitals-settings', compact('patient'));
  370. }
  371. public function vitalsGraph(Request $request, Client $patient, $filter = '') {
  372. $pros = $this->pros;
  373. return view('app.patient.vitals-graph', compact('patient', 'pros', 'filter'));
  374. }
  375. public function tickets(Request $request, Client $patient, $type = '', String $currentTicket = '') {
  376. $pros = $this->pros;
  377. $allPros = Pro::all();
  378. $qlTicket = $currentTicket;
  379. if(!!$currentTicket) {
  380. $qlTicket = Ticket::where('uid', $currentTicket)->first();
  381. if($qlTicket) {
  382. $currentTicket = $qlTicket;
  383. }
  384. }
  385. return view('app.patient.tickets', compact('patient', 'pros', 'allPros', 'type', 'currentTicket'));
  386. }
  387. public function prescriptions(Request $request, Client $patient, String $type = '', String $currentErx = '') {
  388. if(!!$currentErx) {
  389. $currentErx = Erx::where('uid', $currentErx)->first();
  390. }
  391. $note = $patient->coreNote;
  392. return view('app.patient.prescriptions.index', compact('patient', 'type', 'currentErx', 'note'));
  393. }
  394. public function prescriptionsPopup(Request $request, Client $patient, String $type = '', String $currentErx = '') {
  395. if(!!$currentErx) {
  396. $currentErx = Erx::where('uid', $currentErx)->first();
  397. }
  398. $note = null;
  399. if($request->input('noteUid')) {
  400. $note = Note::where('uid', $request->input('noteUid'))->first();
  401. }
  402. return view('app.patient.prescriptions-popup.list-popup', compact('patient', 'type', 'currentErx', 'note'));
  403. }
  404. public function prescriptionsList(Request $request, Client $patient, String $type = '', String $currentErx = '') {
  405. if(!!$currentErx) {
  406. $currentErx = Erx::where('uid', $currentErx)->first();
  407. }
  408. $note = null;
  409. if($request->input('noteUid')) {
  410. $note = Note::where('uid', $request->input('noteUid'))->first();
  411. }
  412. return view('app.patient.prescriptions.list', compact('patient', 'type', 'currentErx', 'note'));
  413. }
  414. public function downloadPrescriptionAsPdf(Request $request, Erx $prescription){
  415. if($request->input('html')) {
  416. return view('app.patient.prescriptions.pdf.pdf-preview', compact('prescription'));
  417. }
  418. else {
  419. $pdf = PDF::loadView('app.patient.prescriptions.pdf.pdf-preview', compact('prescription'));
  420. return $pdf->download($prescription->created_at .'_' . 'erx.pdf');
  421. }
  422. }
  423. public function transmitPrescription(Request $request, Erx $prescription){
  424. // re-generate pdf with cover sheet as first page and save it to FS
  425. $filePath = config('app.temp_dir') . "/{$prescription->uid}.pdf";
  426. $pdf = PDF::loadView('app.patient.prescriptions.pdf.pdf-preview-with-cover-sheet', compact('prescription'));
  427. $pdf->save($filePath);
  428. // send it along with the rest of the params to /api/erx/transmit [multi-part POST]
  429. $url = config('stag.backendUrl') . '/erx/transmit';
  430. $params = [
  431. "uid" => $request->input('uid'),
  432. "toWho" => $request->input('toWho'),
  433. "toEmail" => $request->input('toEmail'),
  434. "toFaxNumber" => $request->input('toFaxNumber'),
  435. "toFaxNumberAttentionLine" => $request->input('toFaxNumberAttentionLine'),
  436. "toFaxNumberCoverSheetMemo" => $request->input('toFaxNumberCoverSheetMemo'),
  437. ];
  438. if($request->input('copyToPatient')) {
  439. $params["copyToPatientFaxNumber"] = $request->input('copyToPatientFaxNumber');
  440. $params["copyToPatientEmail"] = $request->input('copyToPatientEmail');
  441. }
  442. $pdf = fopen($filePath, 'r');
  443. $response = Http
  444. ::attach('pdfSystemFile', $filePath, "{$prescription->uid}.pdf")
  445. ->withHeaders(['sessionKey' => $request->cookie('sessionKey')])
  446. ->post($url, $params)
  447. ->json();
  448. return $response;
  449. }
  450. public function supplyOrders(Request $request, Client $patient, SupplyOrder $supplyOrder = null)
  451. {
  452. $products = Product::where('is_active', true)->orderBy('created_at', 'desc')->get();
  453. return view('app.patient.supply-orders', compact('patient', 'supplyOrder', 'products'));
  454. }
  455. public function shipments(Request $request, Client $patient, Shipment $shipment = null)
  456. {
  457. return view('app.patient.shipments', compact('patient', 'shipment'));
  458. }
  459. public function appointments(Request $request, Client $patient, $forPro = 'all', $status = 'all') {
  460. $pros = $this->pros;
  461. $appointments = $patient->appointmentsForProByStatus($forPro, strtoupper($status));
  462. $appointmentProIDs = $appointments->map(function($_item) {
  463. return $_item->pro_id;
  464. });
  465. $appointmentPros = Pro::whereIn('id', $appointmentProIDs)->get();
  466. return view('app.patient.appointments',
  467. compact('patient', 'pros', 'appointments', 'appointmentPros', 'forPro', 'status'));
  468. }
  469. public function mcpRequests(Request $request, Client $patient) {
  470. return view('app.patient.mcp-requests', compact('patient'));
  471. }
  472. public function eligibleRefreshes(Request $request, Client $patient) {
  473. return view('app.patient.eligible-refreshes', compact('patient'));
  474. }
  475. public function insuranceCoverage(Request $request, Client $patient) {
  476. $mbPayers = MBPayer::all();
  477. return view('app.patient.insurance-coverage', compact('patient', 'mbPayers'));
  478. }
  479. public function clientPrimaryCoverages(Request $request, Client $patient) {
  480. $mbPayers = MBPayer::all();
  481. return view('app.patient.client-primary-coverages', compact('patient', 'mbPayers'));
  482. }
  483. public function primaryCoverage(Request $request, Client $patient) {
  484. $mbPayers = MBPayer::all();
  485. return view('app.patient.primary-coverage', compact('patient', 'mbPayers'));
  486. }
  487. public function primaryCoverageForm(Request $request, Client $patient) {
  488. $mbPayers = MBPayer::all();
  489. return view('app.patient.primary-coverage-form', compact('patient', 'mbPayers'));
  490. }
  491. public function primaryCoverageManualDeterminationModal(Request $request, Client $patient) {
  492. if($patient->latestClientPrimaryCoverage->plan_type === 'MEDICARE'){
  493. return view('app.patient.primary-coverage-manual-determination-medicare-modal', compact('patient'));
  494. }
  495. if($patient->latestClientPrimaryCoverage->plan_type === 'MEDICAID'){
  496. return view('app.patient.primary-coverage-manual-determination-medicaid-modal', compact('patient'));
  497. }
  498. if($patient->latestClientPrimaryCoverage->plan_type === 'COMMERCIAL'){
  499. return view('app.patient.primary-coverage-manual-determination-commercial-modal', compact('patient'));
  500. }
  501. return "Plan Type is missing!";
  502. }
  503. public function mbClaim(Request $request, MBClaim $mbClaim) {
  504. return view('app.patient.mb-claim-single', compact('mbClaim'));
  505. }
  506. public function accounts(Request $request, Client $patient) {
  507. return view('app.patient.accounts', compact('patient'));
  508. }
  509. public function careMonthMatrix(Request $request, CareMonth $careMonth) {
  510. return view('app.patient.care-month.matrix', [
  511. 'patient' => $careMonth->patient,
  512. 'careMonth' => $careMonth,
  513. ]);
  514. }
  515. }