<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;

class clients_SINGLE_Controller extends Controller
{
    public $selfName = 'clients_SINGLE_Controller';
    public $dashboardName = 'detail';

	// GET /clients/view/{uid}/ACTION_sendCellNumberConfirmationMessage
	public function ACTION_sendCellNumberConfirmationMessage(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_sendCellNumberConfirmationMessage');
		}
		return response()->view('pro/clients_SINGLE/ACTION_sendCellNumberConfirmationMessage', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_confirmCellNumberWithConfirmationToken
	public function ACTION_confirmCellNumberWithConfirmationToken(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_confirmCellNumberWithConfirmationToken');
		}
		return response()->view('pro/clients_SINGLE/ACTION_confirmCellNumberWithConfirmationToken', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putNewCellNumber
	public function ACTION_putNewCellNumber(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putNewCellNumber');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putNewCellNumber', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putNewEmailAddress
	public function ACTION_putNewEmailAddress(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putNewEmailAddress');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putNewEmailAddress', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_sendEmailAddressConfirmationMessage
	public function ACTION_sendEmailAddressConfirmationMessage(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_sendEmailAddressConfirmationMessage');
		}
		return response()->view('pro/clients_SINGLE/ACTION_sendEmailAddressConfirmationMessage', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_confirmEmailAddressWithConfirmationToken
	public function ACTION_confirmEmailAddressWithConfirmationToken(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_confirmEmailAddressWithConfirmationToken');
		}
		return response()->view('pro/clients_SINGLE/ACTION_confirmEmailAddressWithConfirmationToken', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_deactivate
	public function ACTION_deactivate(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_deactivate');
		}
		return response()->view('pro/clients_SINGLE/ACTION_deactivate', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateDeactivationMemo
	public function ACTION_updateDeactivationMemo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateDeactivationMemo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateDeactivationMemo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_reactivate
	public function ACTION_reactivate(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_reactivate');
		}
		return response()->view('pro/clients_SINGLE/ACTION_reactivate', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateReactivationMemo
	public function ACTION_updateReactivationMemo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateReactivationMemo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateReactivationMemo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editSource
	public function ACTION_editSource(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editSource');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editSource', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_setIsDuplicateToTrue
	public function ACTION_setIsDuplicateToTrue(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_setIsDuplicateToTrue');
		}
		return response()->view('pro/clients_SINGLE/ACTION_setIsDuplicateToTrue', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_setIsDuplicateToFalse
	public function ACTION_setIsDuplicateToFalse(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_setIsDuplicateToFalse');
		}
		return response()->view('pro/clients_SINGLE/ACTION_setIsDuplicateToFalse', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editName
	public function ACTION_editName(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editName');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editName', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editDob
	public function ACTION_editDob(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editDob');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editDob', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editDemographics
	public function ACTION_editDemographics(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editDemographics');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editDemographics', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editSpouse
	public function ACTION_editSpouse(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editSpouse');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editSpouse', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editIntakeDetails
	public function ACTION_editIntakeDetails(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editIntakeDetails');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editIntakeDetails', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editResponsibleParty
	public function ACTION_editResponsibleParty(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editResponsibleParty');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editResponsibleParty', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editEmergencyRelationship
	public function ACTION_editEmergencyRelationship(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editEmergencyRelationship');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editEmergencyRelationship', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editFamilyInfo
	public function ACTION_editFamilyInfo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editFamilyInfo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editFamilyInfo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editContactDetails
	public function ACTION_editContactDetails(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editContactDetails');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editContactDetails', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editAddress
	public function ACTION_editAddress(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editAddress');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editAddress', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editMiscDemographics
	public function ACTION_editMiscDemographics(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editMiscDemographics');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editMiscDemographics', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_setIsDeceasedToTrue
	public function ACTION_setIsDeceasedToTrue(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_setIsDeceasedToTrue');
		}
		return response()->view('pro/clients_SINGLE/ACTION_setIsDeceasedToTrue', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_setIsDeceasedToFalse
	public function ACTION_setIsDeceasedToFalse(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_setIsDeceasedToFalse');
		}
		return response()->view('pro/clients_SINGLE/ACTION_setIsDeceasedToFalse', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editPharmacy
	public function ACTION_editPharmacy(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editPharmacy');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editPharmacy', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_editSsn
	public function ACTION_editSsn(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_editSsn');
		}
		return response()->view('pro/clients_SINGLE/ACTION_editSsn', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putMedicareInfo
	public function ACTION_putMedicareInfo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putMedicareInfo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putMedicareInfo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_removeMcn
	public function ACTION_removeMcn(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_removeMcn');
		}
		return response()->view('pro/clients_SINGLE/ACTION_removeMcn', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateWebcamInfo
	public function ACTION_updateWebcamInfo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateWebcamInfo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateWebcamInfo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putMcp
	public function ACTION_putMcp(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putMcp');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putMcp', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_removeMcp
	public function ACTION_removeMcp(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_removeMcp');
		}
		return response()->view('pro/clients_SINGLE/ACTION_removeMcp', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateMcpOnboardingVisitInfo
	public function ACTION_updateMcpOnboardingVisitInfo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateMcpOnboardingVisitInfo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateMcpOnboardingVisitInfo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateMcpOnboardingActiveInfo
	public function ACTION_updateMcpOnboardingActiveInfo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateMcpOnboardingActiveInfo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateMcpOnboardingActiveInfo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putMcpOnboardingPro
	public function ACTION_putMcpOnboardingPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putMcpOnboardingPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putMcpOnboardingPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_removeMcpOnboardingPro
	public function ACTION_removeMcpOnboardingPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_removeMcpOnboardingPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_removeMcpOnboardingPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_acceptAssignmentAsMcpOnboardingPro
	public function ACTION_acceptAssignmentAsMcpOnboardingPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_acceptAssignmentAsMcpOnboardingPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_acceptAssignmentAsMcpOnboardingPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_rejectAssignmentAsMcpOnboardingPro
	public function ACTION_rejectAssignmentAsMcpOnboardingPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_rejectAssignmentAsMcpOnboardingPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_rejectAssignmentAsMcpOnboardingPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateMcpOnboardingProDecisionMemo
	public function ACTION_updateMcpOnboardingProDecisionMemo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateMcpOnboardingProDecisionMemo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateMcpOnboardingProDecisionMemo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateMcpOnboardingStrategy
	public function ACTION_updateMcpOnboardingStrategy(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateMcpOnboardingStrategy');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateMcpOnboardingStrategy', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateNextMcpOnboardingAttempt
	public function ACTION_updateNextMcpOnboardingAttempt(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateNextMcpOnboardingAttempt');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateNextMcpOnboardingAttempt', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putCmPro
	public function ACTION_putCmPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putCmPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putCmPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_removeCmPro
	public function ACTION_removeCmPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_removeCmPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_removeCmPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putRmePro
	public function ACTION_putRmePro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putRmePro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putRmePro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_removeRmePro
	public function ACTION_removeRmePro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_removeRmePro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_removeRmePro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putRmmPro
	public function ACTION_putRmmPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putRmmPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putRmmPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_removeRmmPro
	public function ACTION_removeRmmPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_removeRmmPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_removeRmmPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_putRdPro
	public function ACTION_putRdPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_putRdPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_putRdPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_removeRdPro
	public function ACTION_removeRdPro(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_removeRdPro');
		}
		return response()->view('pro/clients_SINGLE/ACTION_removeRdPro', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateMntEligibility
	public function ACTION_updateMntEligibility(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateMntEligibility');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateMntEligibility', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateCmEligibility
	public function ACTION_updateCmEligibility(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateCmEligibility');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateCmEligibility', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_setIsEnrolledInCmToFalse
	public function ACTION_setIsEnrolledInCmToFalse(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_setIsEnrolledInCmToFalse');
		}
		return response()->view('pro/clients_SINGLE/ACTION_setIsEnrolledInCmToFalse', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_setIsEnrolledInCmToTrue
	public function ACTION_setIsEnrolledInCmToTrue(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_setIsEnrolledInCmToTrue');
		}
		return response()->view('pro/clients_SINGLE/ACTION_setIsEnrolledInCmToTrue', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateCmReasons
	public function ACTION_updateCmReasons(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateCmReasons');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateCmReasons', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateRmReasons
	public function ACTION_updateRmReasons(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateRmReasons');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateRmReasons', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateCmEnrollmentConsentInfo
	public function ACTION_updateCmEnrollmentConsentInfo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateCmEnrollmentConsentInfo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateCmEnrollmentConsentInfo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateWhyNotEnrolledInCm
	public function ACTION_updateWhyNotEnrolledInCm(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateWhyNotEnrolledInCm');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateWhyNotEnrolledInCm', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateRmEligibility
	public function ACTION_updateRmEligibility(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateRmEligibility');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateRmEligibility', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_setIsEnrolledInRmToFalse
	public function ACTION_setIsEnrolledInRmToFalse(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_setIsEnrolledInRmToFalse');
		}
		return response()->view('pro/clients_SINGLE/ACTION_setIsEnrolledInRmToFalse', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_setIsEnrolledInRmToTrue
	public function ACTION_setIsEnrolledInRmToTrue(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_setIsEnrolledInRmToTrue');
		}
		return response()->view('pro/clients_SINGLE/ACTION_setIsEnrolledInRmToTrue', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateWhyNotEnrolledInRm
	public function ACTION_updateWhyNotEnrolledInRm(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateWhyNotEnrolledInRm');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateWhyNotEnrolledInRm', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_updateEquipmentInfo
	public function ACTION_updateEquipmentInfo(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_updateEquipmentInfo');
		}
		return response()->view('pro/clients_SINGLE/ACTION_updateEquipmentInfo', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_dashboard
	public function SUB_dashboard(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_dashboard');
		}
		return response()->view('pro/clients_SINGLE/SUB_dashboard', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_detail
	public function SUB_detail(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_detail');
		}
		$result_clients = DB::select("select id, concat(name_first, ' ', name_last) as name_display from client");
		$result_pros = DB::select("select id, name_display from pro");
		$result_facilities = DB::select("select id, name from facility");
		$result_relationships = DB::select("select id, concat(name_first, ' - ', relationship_to_client) as name_display from relationship");
		return response()->view('pro/clients_SINGLE/SUB_detail', compact('record', 'result_clients', 'result_pros', 'result_facilities', 'result_relationships'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_measurements
	public function SUB_measurements(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_measurements');
		}
		$subRecords = DB::table('measurement')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_measurements', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_med_profile
	public function SUB_med_profile(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_med_profile');
		}
		$subRecords = DB::table('client_info_line')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_med_profile', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_med_profile_log
	public function SUB_med_profile_log(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_med_profile_log');
		}
		$subRecords = DB::table('client_info_line_update')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_med_profile_log', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_pro_access
	public function SUB_pro_access(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_pro_access');
		}
		$subRecords = DB::table('client_pro_access')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_pro_access', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_notes
	public function SUB_notes(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_notes');
		}
		$subRecords = DB::table('note')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_notes', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_relationships
	public function SUB_relationships(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_relationships');
		}
		$subRecords = DB::table('relationship')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_relationships', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_care_months
	public function SUB_care_months(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_care_months');
		}
		$subRecords = DB::table('care_month')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_care_months', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_care_month_entries
	public function SUB_care_month_entries(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_care_month_entries');
		}
		$subRecords = DB::table('care_month_entry')->where('client_id', $record->id)->get();
		$result_pros = DB::select("SELECT id, name_display FROM pro");
		return response()->view('pro/clients_SINGLE/SUB_care_month_entries', compact('record', 'subRecords', 'result_pros'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_bills
	public function SUB_bills(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_bills');
		}
		$subRecords = DB::table('bill')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_bills', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_related_transactions
	public function SUB_related_transactions(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_related_transactions');
		}
		$subRecords = DB::table('pro_transaction')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_related_transactions', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_action_items
	public function SUB_action_items(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_action_items');
		}
		$subRecords = DB::table('action_item')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_action_items', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_erx
	public function SUB_erx(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_erx');
		}
		$subRecords = DB::table('action_item')->where('client_id', $record->id)->where('action_item_category', 'RX')->get();
		return response()->view('pro/clients_SINGLE/SUB_erx', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_mcp_updates
	public function SUB_mcp_updates(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_mcp_updates');
		}
		$subRecords = DB::table('client_mcp_update')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_mcp_updates', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_client_sms
	public function SUB_client_sms(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_client_sms');
		}
		$subRecords = DB::table('client_sms')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_client_sms', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_client_sms_numbers
	public function SUB_client_sms_numbers(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_client_sms_numbers');
		}
		$subRecords = DB::table('client_sms_number')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_client_sms_numbers', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_client_documents
	public function SUB_client_documents(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_client_documents');
		}
		$subRecords = DB::table('client_document')->where('client_id', $record->id)->get();
		return response()->view('pro/clients_SINGLE/SUB_client_documents', compact('record', 'subRecords'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/SUB_audit_log
	public function SUB_audit_log(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/SUB_audit_log');
		}
		return response()->view('pro/clients_SINGLE/SUB_audit_log', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_measurement
	public function ACTION_add_new_measurement(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_measurement');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_measurement', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_client_info_line
	public function ACTION_add_new_client_info_line(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_client_info_line');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_client_info_line', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_client_pro_access
	public function ACTION_add_new_client_pro_access(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_client_pro_access');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_client_pro_access', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_note
	public function ACTION_add_new_note(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_note');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_note', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_relationship
	public function ACTION_add_new_relationship(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_relationship');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_relationship', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_care_month
	public function ACTION_add_new_care_month(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_care_month');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_care_month', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_action_item
	public function ACTION_add_new_action_item(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_action_item');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_action_item', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_erx_action_item
	public function ACTION_add_new_erx_action_item(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_erx_action_item');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_erx_action_item', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}

	// GET /clients/view/{uid}/ACTION_add_new_client_document
	public function ACTION_add_new_client_document(Request $request, $uid) {
		$record = DB::table('client')->where('uid', $uid)->first();
		if(!$record) {
			$record = DB::table('client')->where('id', $uid)->first();
			if($record) return redirect('/clients/view/' . $record->uid . '/ACTION_add_new_client_document');
		}
		return response()->view('pro/clients_SINGLE/ACTION_add_new_client_document', compact('record'), session('message') ? 500 : 200)->header('Content-Type', 'text/html');
	}
}
