PatientController.php 23 KB

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