Ver código fonte

cleaned up patients table

= 3 anos atrás
pai
commit
c91d1a8487

+ 29 - 0
app/Helpers/helpers.php

@@ -14,6 +14,35 @@ use App\Models\Bill;
 use Illuminate\Support\Facades\Http;
 use Soundasleep\Html2Text as Html2Text;
 
+function isJSON($string){
+    return is_string($string) && is_array(json_decode($string, true)) && (json_last_error() == JSON_ERROR_NONE) ? true : false;
+}
+
+if(!function_exists('prop')) {
+    function prop($node, $keys) {
+	if($node === '') return null;
+        if(is_string($node)) {
+            if(isJSON($node)) {
+                $node = json_decode($node, true);
+            }
+        }
+	if(is_array($node) && empty($node)) return null;
+        if(empty($keys)){
+            return $node;
+        }
+        if(is_array($keys)){
+            $key = array_shift($keys);
+            $val = isset($node[$key]) ? $node[$key] : null;
+            return prop($val, $keys);
+        }
+        if(is_array($node) && is_string($keys)){
+            return isset($node[$keys]) && $node[$keys] ? $node[$keys] : null;
+        }
+	if(is_array($node) && empty($node)) return null;
+        return $node;
+    }
+}
+
 if(!function_exists('toFeetAndInches')) {
     function toFeetAndInches($value, $ftLabel = ' ft.', $inLabel = ' in.') {
         if(!$value) return '-';

+ 2 - 25
app/Http/Controllers/AdminController.php

@@ -38,31 +38,8 @@ class AdminController extends Controller
     public function patients(Request $request)
     {
         $filters = $request->all();
-        $patients = Client::whereNull('shadow_pro_id');
-
-        // filters
-        /*
-        array:18 [▼
-          "age_category" => "LESS_THAN"
-          "age_value_1" => "34"
-          "age_value_2" => null
-          "sex" => "M"
-          "bmi_category" => "BETWEEN"
-          "bmi_value_1" => "20"
-          "bmi_value_2" => "25"
-          "last_visit_category" => "LESS_THAN"
-          "last_visit_value_1" => "2021-10-14"
-          "last_visit_value_2" => null
-          "next_appointment_category" => "LESS_THAN"
-          "next_appointment_value_1" => "2021-10-15"
-          "status" => "ACTIVE"
-          "last_weighed_in_category" => "EXACTLY"
-          "last_weighed_in_value_1" => "2021-10-07"
-          "last_bp_category" => "BETWEEN"
-          "last_bp_value_1" => "2021-10-01"
-          "last_bp_value_2" => "2021-10-31"
-        ]
-        */
+        $patients = Client::whereNotNull('shadow_pro_id');
+
 
         if ($request->input('name')) {
             $name = trim($request->input('name'));

+ 1 - 3
app/Http/Kernel.php

@@ -66,9 +66,7 @@ class Kernel extends HttpKernel
         'pro.auth' => \App\Http\Middleware\ProAuthenticated::class,
         'pro.auth.redirect' => \App\Http\Middleware\RedirectAuthenticatedPro::class,
         'pro.auth.admin' => \App\Http\Middleware\EnsureAdminPro::class,
-        'pro.auth.na' => \App\Http\Middleware\EnsureNaPro::class,
-        'pro.auth.mcp' => \App\Http\Middleware\EnsureMcpPro::class,
         'pro.auth.can-access-patient' => \App\Http\Middleware\EnsureProCanAccessPatient::class,
-        'client.not-shadow-of-pro' => \App\Http\Middleware\EnsureClientIsNotShadowOfPro::class,
+        'client.not-shadow-of-pro' => \App\Http\Middleware\EnsureClientIsShadowOfPro::class,
     ];
 }

+ 2 - 2
app/Http/Middleware/EnsureClientIsNotShadowOfPro.php → app/Http/Middleware/EnsureClientIsShadowOfPro.php

@@ -5,7 +5,7 @@ namespace App\Http\Middleware;
 use App\Models\AppSession;
 use Closure;
 
-class EnsureClientIsNotShadowOfPro
+class EnsureClientIsShadowOfPro
 {
     /**
      * Handle an incoming request.
@@ -18,7 +18,7 @@ class EnsureClientIsNotShadowOfPro
     {
         $patient = \request()->route('patient');
         if(!!$patient) {
-            if(!!$patient->shadow_pro_id) {
+            if(!$patient->shadow_pro_id) {
                 abort(403);
             }
         }

+ 0 - 29
app/Http/Middleware/EnsureMcpPro.php

@@ -1,29 +0,0 @@
-<?php
-
-namespace App\Http\Middleware;
-
-use App\Models\AppSession;
-use Closure;
-
-class EnsureMcpPro
-{
-    /**
-     * Handle an incoming request.
-     *
-     * @param  \Illuminate\Http\Request  $request
-     * @param  \Closure  $next
-     * @return mixed
-     */
-    public function handle($request, Closure $next)
-    {
-        $sessionKey = $request->cookie('sessionKey');
-        $appSession = AppSession::where('session_key', $sessionKey)->where('is_active', true)->first();
-        $authenticated = $sessionKey && $appSession && $appSession->pro && $appSession->pro->is_enrolled_as_mcp;
-
-        if (!$authenticated) {
-            return abort(403);
-        }
-
-        return $next($request);
-    }
-}

+ 0 - 29
app/Http/Middleware/EnsureNaPro.php

@@ -1,29 +0,0 @@
-<?php
-
-namespace App\Http\Middleware;
-
-use App\Models\AppSession;
-use Closure;
-
-class EnsureNaPro
-{
-    /**
-     * Handle an incoming request.
-     *
-     * @param  \Illuminate\Http\Request  $request
-     * @param  \Closure  $next
-     * @return mixed
-     */
-    public function handle($request, Closure $next)
-    {
-        $sessionKey = $request->cookie('sessionKey');
-        $appSession = AppSession::where('session_key', $sessionKey)->where('is_active', true)->first();
-        $authenticated = $sessionKey && $appSession && $appSession->pro && $appSession->pro->is_considered_for_dna;
-
-        if (!$authenticated) {
-            return abort(403);
-        }
-
-        return $next($request);
-    }
-}

+ 110 - 186
resources/views/app/admin/patients-table.blade.php

@@ -1,211 +1,135 @@
 <div class="table-responsive">
-	<table class="table p-0 m-0 table-sm border-top border-bottom text-nowrap">
+	<table class="table table-sm table-hover table-striped mb-0" id="pros-table">
 		<thead class="bg-light">
 			<tr>
-				<th class="border-0 width-90px">#</th>
-				<th class="border-0">Name</th>
-				<th class="border-0">DOB</th>
-				<th class="border-0">Age</th>
-				<th class="border-0">Sex</th>
-				<th class="border-0">BMI</th>
-				<th class="border-0">Insurance</th>
-				<th class="border-0">Last Visit</th>
-				<th class="border-0">Next Appt.</th>
-				<th class="border-0">Status</th>
-
-				<th class="border-0">BP</th>
-				<th class="border-0"> <i class="fa fa-heartbeat"></i> </th>
-				<th class="border-0">Pulse</th>
-				<th class="border-0">BP/Pulse Timestamp</th>
-				<th class="border-0">Weight</th>
-				<th class="border-0">Weight Timestamp</th>
-
-				{{-- <th>Scale <i class="fa fa-battery"></i></th>--}}
-				{{-- <th class="border-0">RPM</th>--}}
-				{{-- <th class="border-0">CCM</th>--}}
-				{{-- <th class="border-0 d-none">Last Weight-In</th>--}}
-				{{-- <th class="border-0 d-none">Last BP</th>--}}
-				<th class="border-0">Assigned On</th>
-
-				@if($pro->pro_type == 'ADMIN')
-				<th class="border-0">MCP</th>
-				<th class="border-0">Initiative</th>
-				@endif
+				<th class="border-0 text-nowrap">ID</th>
+				<th class="border-0 text-nowrap">Created</th>
+				<th class="border-0 text-nowrap">HR Stage</th>
+				<th class="border-0 text-nowrap">HR Stage Perf.</th>
+				<th class="border-0 text-nowrap">Manager</th>
+				<th class="border-0 text-nowrap">Name</th>
+				<th class="border-0 text-nowrap">Credential</th>
+				<th class="border-0 text-nowrap">HCP?</th>
+				<th class="border-0 text-nowrap">Profession</th>
+				<th class="border-0 text-nowrap">NPI</th>
+				<th class="border-0 text-nowrap">Zip</th>
+				<th class="border-0 text-nowrap">State</th>
+				<th class="border-0 text-nowrap">Grade</th>
+				<th class="border-0 text-nowrap">FT?</th>
 			</tr>
 		</thead>
 		<tbody>
 			@foreach($patients as $patient)
-			<tr>
-				<td>
-					<a native target="_blank" href="{{route('patients.view.dashboard', $patient)}}">
-						{{$patient->chart_number}}
-					</a>
-					<span class="on-hover-show left d-inline-block on-hover-opaque">
-						<i class="fa fa-info-circle ml-1"></i>
-						<div class="on-hover-content py-2 pl-3">
-							Created: <b class="m-0">{{friendly_date_time($patient->created_at)}}</b>
-						</div>
-					</span>
-				</td>
-				<td>
-					<div class="d-flex align-items-center flex-nowrap">
-						<span>{{$patient->displayName()}}</span>
-						@if(count($patient->activeNotes))
-							<a href="#" class="btn-toggle-notes-row ml-3 on-hover-opaque text-sm" onclick="$(this).closest('tr').next('.notes-row').toggleClass('d-none'); return false">
-								<i class="fa fa-file-alt"></i> <i class="fa fa-sort"></i>
-								{{count($patient->activeNotes)}}
-							</a>
-						@endif
-					</div>
-				</td>
-				<td>{{ friendly_date_time($patient->dob, false) }}</td>
-				<td>{{ $patient->age_in_years ?  $patient->age_in_years : '-' }}</td>
-				<td>{{ $patient->sex }}</td>
-				<td>
-					<div class="d-none d-dflex flex-column">
-						@if($patient->usual_bmi_min && $patient->usual_bmi_max)
-						<small class="text-muted">BMI (Usual): <b>{{ $patient->usual_bmi_min }}</b> {{ $patient->usual_bmi_min_category }} to <b>{{ $patient->usual_bmi_max }}</b> {{ $patient->usual_bmi_max_category }}</small>
-						@endif
-						@if($patient->ideal_bmi)
-						<small class="text-muted">BMI (Ideal) <b>{{ $patient->ideal_bmi }}</b> {{ $patient->ideal_bmi_category }}</small>
-						@endif
-					</div>
-				</td>
-				<td>
-					@include('app.patient.coverage_column_renderer', ['patient'=>$patient])
-				</td>
-				<td>
-					{{ friendly_date($patient->most_recent_completed_mcp_note_date) }}
-					{{-- {{$patient->lastMcpAppointment ? friendly_date_time($patient->lastMcpAppointment->raw_date.' '.$patient->lastMcpAppointment->raw_start_time) : '-'}}--}}
-				</td>
-				<td>{{$patient->nextMcpAppointment ? friendly_date_time($patient->nextMcpAppointment->raw_date.' '.$patient->nextMcpAppointment->raw_start_time) : '-'}}</td>
-				<td>{{$patient->nextMcpAppointment ? $patient->nextMcpAppointment->status : '-'}}</td>
+			<?php
 
-				<td>
-					@if($patient->most_recent_cellular_bp_measurement_at)
-					{{ $patient->most_recent_cellular_bp_sbp_mm_hg }} / {{ $patient->most_recent_cellular_bp_dbp_mm_hg }}
-					@endif
-				</td>
+				//use App\Models\SystemFile;
 
-				<td><?= $patient->most_recent_cellular_bp_value_irregular ? '<i class="fa fa-heartbeat"></i>' : '' ?></td>
+				$pro = $patient->shadowOfPro;
 
-				<td>{{ $patient->most_recent_cellular_bp_value_pulse }}</td>
+				$hrSectionMap = json_decode($pro->hr_section_map, true);
+				$sectionObject = $hrSectionMap && isset($hrSectionMap['profession']) ? $hrSectionMap['profession'] : null;
+				$params = json_decode($sectionObject['proposedData'] ?? '{}');
+				$hrSectionMap = json_decode($pro->hr_section_map, true);
+				$professionSectionObject = $hrSectionMap['profession'] ?? null;
+				$professionData = json_decode($professionSectionObject['proposedData'] ?? '{}');
 
-				<td>{{ friendlier_date_time($patient->most_recent_cellular_bp_measurement_at, false) }}</td>
 
-				<td>{{ $patient->most_recent_cellular_weight_value ? round($patient->most_recent_cellular_weight_value, 2) : '--' }}</td>
+				$section = $hrSectionMap && isset($hrSectionMap['webcam']) ? $hrSectionMap['webcam'] : null;
+				$proposedData = json_decode($section['proposedData'] ?? null);
 
-				<td>{{ friendlier_date_time($patient->most_recent_cellular_weight_measurement_at, false) }}</td>
+				$current_professional_video_file_name = null;
+				$current_professional_video_uid = null;
 
-				{{-- <td>{{$patient->is_enrolled_in_cm ? 'Yes' : 'No'}}</td>--}}
-				{{-- <td>{{$patient->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>--}}
-				<td class="d-none text-nowrap">
-					<?php $m = $patient->lastMeasurementOfType('Wt. (lbs.)'); ?>
-					{{$m && $m->value ? round($m->value, 2) : '-'}}
+			?>
+			<tr class="{{$pro->is_all ? '' : 'text-muted'}}">
+				<td class="text-nowrap">{{ $patient->chart_number }}</td>
+				<td class="text-nowrap">{{ friendly_date_time($pro->created_at) }}</td>
+				<td>{{$pro->new_hr_stage}}</td>
+				<td>
+					<?= $pro->newHrStageByPro && $pro->newHrStageByPro->pro_type == 'ADMIN' ? '<i class="fa fa-lock"></i>' : '' ?>
+					{{$pro->newHrStageByPro->name_display ?? '-'}}
 				</td>
-				<td class="d-none text-nowrap">
-					<?php $m = $patient->lastMeasurementOfType('BP'); ?>
-					{{$m && $m->value ? $m->value : '-'}}
+				<td class="text-nowrap">
+					{{ $pro->hrRep ? $pro->hrRep->name_display : '' }}
 				</td>
-				<td>{{$patient->getMcpAssignedOn()}}</td>
-				@if($pro->pro_type == 'ADMIN')
-				<td>{{@$patient->mcp ? $patient->mcp->displayName() : '--'}}</td>
-				<td>{{$patient->initiative}}</td>
-				@endif
-			</tr>
-				@if(count($patient->activeNotes))
-					<tr class="notes-row bg-light">
-						<td></td>
-						<td colspan="20">
-							<div class="my-2">
-								@if(count($patient->activeNotes))
-									Notes for <b>{{$patient->displayName()}}</b>
-									<table class="table table-sm table-striped table-bordered mb-0 mt-2">
-										<thead class="bg-light">
-										<tr>
-											<th class="border-0 text-secondary">Effective Date</th>
-											<th class="border-0 text-secondary">New / Follow-up</th>
-											<th class="border-0 text-secondary">Method</th>
-											<th class="border-0 text-secondary">HCP</th>
-											<th class="border-0 text-secondary">NA</th>
-											<th class="border-0 text-secondary">HCP Signed</th>
-											<th class="border-0 text-secondary">ICDs</th>
-											<th class="border-0 text-secondary">Bills</th>
-										</tr>
-										</thead>
-										<tbody>
-										@foreach ($patient->activeNotes as $note)
-											<tr class="{{ $note->is_cancelled ? 'cancelled-item always-clickable' : '' }}">
-												<td>
-													<a native target="_blank" href="/patients/view/{{ $patient->uid }}/notes/view/{{ $note->uid }}">
-														{{ friendly_date_time($note->effective_dateest, false) }}
-													</a>
-													@if(!!$note->visitTemplate)
-														<span class="text-info font-weight-bold">*</span>
-													@endif
-													<span class="ml-1">{{ $note->is_cancelled ? '[cancelled]' : '' }}</span>
-												</td>
-												<td>
-													{{ $note->new_or_fu_or_na === 'NEW' ? 'New' : 'Follow-up' }}
-												</td>
-												@if($pro->pro_type == 'ADMIN')
-													<td>
-														{{ noteMethodDisplay($note->method) }}
-													</td>
-												@endif
-												<td>
-													{{$note->hcpPro ? $note->hcpPro->name_display: '-'}}
-												</td>
-												@if($pro->pro_type == 'ADMIN')
-													<td>
-														{{$note->allyPro ? $note->allyPro->name_display: '-'}}
-													</td>
-												@endif
-												<td>
-													{!! $note->hcpPro && $note->is_signed_by_hcp ? '<b class="text-success">Yes</b>' : 'No' !!}
-												</td>
-												<td class="max-width-200px">
-													@if(count($note->reasons))
-														@foreach ($note->reasons as $reason)
-															<div class="mb-1">
-																<span>{{ $reason->code }}</span>
-																<span class="text-secondary text-sm">{{ $reason->description}}</span>
-															</div>
-														@endforeach
-													@else
-														-
-													@endif
-												</td>
-												<td>
-													@if(!count($note->bills))
-														<div class="alert alert-warning">No bills.</div>	
-													@endif
-													@foreach($note->bills as $bill)
-													<div>{{ $bill->code}} | {{ $bill->number_of_units }} | {{ $bill->hcp_expected_payment_amount }}</div>
-													@endforeach
-												</td>
-											</tr>
-										@endforeach
-										</tbody>
-									</table>
-								@else
-									<span class="text-secondary">No active notes for <b>{{$patient->displayName()}}</b></span>
-								@endif
+				<td class="text-nowrap">
+					@if($pro->shadowClient)
+						<a href="{{route('patients.view.dashboard', $pro->shadowClient)}}">
+							{{ $pro->name_last }}@if($pro->name_first), {{ $pro->name_first }}@endif
+						</a>
+						<div>
+							@foreach($pro->shadowClient->clientTags as $ct)
+								<span class="inline-block badge badge-info">{{$ct->tag}}</span>
+							@endforeach
+						</div>
+					@endif
+
+					@php
+					$detailJson = json_decode($pro->detail_json, true);
+					@endphp
+
+					<div moe relative class="d-none">
+						<a start show href="#" class="btn btn-pry">
+							<i class="fas fa-envelope"></i>
+							Send IV1
+							@if(isset($detailJson['IV1']))
+							<i class="fa fa-check"></i>
+							@endif
+						</a>
+						<form url="/api/hrm/sendIV1IfNotExistsAndNotificationText" class="mt-2" right>
+							<input type="hidden" name="shadowClientUid" value="{{ $pro->shadowClient->uid }}">
+							<div class="mb-2">
+								<label for="board">Cell Number</label>
+								<input type="text" class="form-control min-width-300px" name="cellNumber" value="{{$pro->cell_number}}" />
+							</div>
+							<div class="mb-2">
+								<label for="board">To Name For SMS</label>
+								<input type="text" class="form-control" name="toNameForSms" value="{{$pro->name_display}}" />
 							</div>
-						</td>
-					</tr>
-				@endif
-			@endforeach
 
-			@if(count($patients) === 0)
-			<tr>
-				<td colspan="24">No records found!</td>
+							<div class="mt-3">
+								<button submit class="btn btn-sm btn-primary px-3 mr-2">Create</button>
+								<button cancel class="btn btn-default border px-3">Cancel</button>
+							</div>
+						</form>
+					</div>
+
+				</td>
+				<td class="hrm4-slim">
+					{{ $pro->hrp_name_credentials }}
+				</td>
+				<td class="text-nowrap">
+					@if($pro->hrp_are_you_hcp)
+					<span><i class="fa fa-user-md"></i></span>
+					@endif
+				</td>
+				<td class="hrm4-slim">
+					{{ $pro->hrp_specialty_free_text }}
+				</td>
+				<td class="hrm4-slim">
+					{{ $pro->hcp_npi }}
+				</td>
+				
+				<td class="text-nowrap">
+					@if($pro->hrp_residential_zip)
+					<span><?= $pro->hrp_residential_zip; ?> <i class="fas fa-info-circle text-info" data-zip="{{ $pro->hrp_residential_zip }}" decode-zip></i></span>
+					@endif
+				</td>
+				<td class="text-nowrap">
+					<?php $state = prop($hrSectionMap, ['basic-information', 'proposedData', 'state']) ?>
+					@if($state)
+					<span><?= $state; ?></span>
+					@endif
+				</td>
+				<td class="text-nowrap">{{ $pro->interview_grade }}</td>
+				<td class="text-nowrap">{{ $pro->should_fast_track }}</td>
+			
 			</tr>
-			@endif
+			@endforeach
 		</tbody>
 
 	</table>
 </div>
 <div class="p-3">
 	{{$patients->withQueryString()->links()}}
-</div>
+</div>

+ 1 - 1
resources/views/app/admin/patients.blade.php

@@ -13,7 +13,7 @@
                 <div class="p-3">
                     @include('app.admin.patients_filters')
                 </div>
-                @include('app.admin.patients-table-extended')
+                @include('app.admin.patients-table')
             </div>
         </div>
     </div>

+ 43 - 44
routes/web.php

@@ -72,7 +72,7 @@ Route::middleware('pro.auth')->group(function () {
 
     Route::get('/can-access-patient/{uid}', 'HomeController@canAccessPatient')->name('can-access-patient');
 
-    Route::name('mcp.')->prefix('m')->middleware('pro.auth.mcp')->group(function () {
+    Route::name('mcp.')->prefix('m')->group(function () {
 
         Route::get('dashboard', 'HomeController@dashboard_MCP')->name('dashboard');
 
@@ -145,51 +145,50 @@ Route::middleware('pro.auth')->group(function () {
 
     });
 
-    Route::middleware('pro.auth.na')->group(function(){
-        Route::name('dna.')->prefix('n')->group(function () {
-
-            Route::get('dashboard', 'HomeController@dashboard_DNA')->name('dashboard');
-
-            Route::get('patients', 'DnaController@patients')->name('patients');
-            Route::get('encounters', 'DnaController@encounters')->name('encounters');
-            Route::get('notes', 'DnaController@notes')->name('notes');
-            Route::get('appointments', 'DnaController@appointments')->name('appointments');
-            Route::get('care-months', 'DnaController@careMonths')->name('careMonths');
-            Route::get('financial-transactions', 'DnaController@financialTransactions')->name('financialTransactions');
-            Route::get('my-bills', 'DnaController@myBills')->name('myBills');
-            Route::get('my-clinical-teams', 'DnaController@myClinicalTeams')->name('myClinicalTeams');
-
-            Route::get('bills', 'DnaController@bills')->name('bills');
-            Route::get('erx-and-orders', 'DnaController@erx_and_orders')->name('erx_and_orders');
-            Route::get('reports', 'DnaController@reports')->name('reports');
-            Route::get('supply-orders', 'DnaController@supply_orders')->name('supply_orders');
-
-            Route::get('new_patients_awaiting_visit', 'DnaController@new_patients_awaiting_visit')->name('new_patients_awaiting_visit');
-            Route::get('notes_pending_signature', 'DnaController@notes_pending_signature')->name('notes_pending_signature');
-            Route::get('notes_pending_billing', 'DnaController@notes_pending_billing')->name('notes_pending_billing');
-            Route::get('reports_pending_signature', 'DnaController@reports_pending_signature')->name('reports_pending_signature');
-            Route::get('patients_without_appointments', 'DnaController@patients_without_appointments')->name('patients_without_appointments');
-            Route::get('patients_overdue_for_visit', 'DnaController@patients_overdue_for_visit')->name('patients_overdue_for_visit');
-            Route::get('cancelled_appointments_pending_review', 'DnaController@cancelled_appointments_pending_review')->name('cancelled_appointments_pending_review');
-            Route::get('cancelled_bills_pending_review', 'DnaController@cancelled_bills_pending_review')->name('cancelled_bills_pending_review');
-            Route::get('cancelled_supply_orders_pending_review', 'DnaController@cancelled_supply_orders_pending_review')->name('cancelled_supply_orders_pending_review');
-            Route::get('erx_and_orders_pending_signature', 'DnaController@erx_and_orders_pending_signature')->name('erx_and_orders_pending_signature');
-            Route::get('supply_orders_pending_signature', 'DnaController@supply_orders_pending_signature')->name('supply_orders_pending_signature');
-
-            //from the new spec
-            Route::get('my-patients', 'DnaController@myPatients')->name('my-patients');
-            Route::get('patients_awaiting_mcp_visit', 'DnaController@patientsAwaitingMcpVisit')->name('patients_awaiting_mcp_visit');
-            Route::get('patients_without_appointment', 'DnaController@patientsWithoutAppointment')->name('patients_without_appointment');
-            Route::get('encounters_pending_my_review', 'DnaController@encountersPendingMyReview')->name('encounters_pending_my_review');
-            Route::get('encounters_in_progress', 'DnaController@encountersInProgress')->name('encounters_in_progress');
-            Route::get('appointments_pending_confirmation', 'DnaController@appointmentsPendingConfirmation')->name('appointments_pending_confirmation');
-            Route::get('cancelled_appointments_pending_ack', 'DnaController@cancelledAppointmentsPendingAck')->name('cancelled_appointments_pending_ack');
-            Route::get('reports_pending_ack', 'DnaController@reportsPendingAck')->name('reports_pending_ack');
-            Route::get('supply_orders_pending_my_ack', 'DnaController@supplyOrdersPendingMyAck')->name('supply_orders_pending_my_ack');
-            Route::get('supply_orders_pending_hcp_approval', 'DnaController@supplyOrdersPendingHcpApproval')->name('supply_orders_pending_hcp_approval');
+    Route::name('dna.')->prefix('n')->group(function () {
+
+        Route::get('dashboard', 'HomeController@dashboard_DNA')->name('dashboard');
+
+        Route::get('patients', 'DnaController@patients')->name('patients');
+        Route::get('encounters', 'DnaController@encounters')->name('encounters');
+        Route::get('notes', 'DnaController@notes')->name('notes');
+        Route::get('appointments', 'DnaController@appointments')->name('appointments');
+        Route::get('care-months', 'DnaController@careMonths')->name('careMonths');
+        Route::get('financial-transactions', 'DnaController@financialTransactions')->name('financialTransactions');
+        Route::get('my-bills', 'DnaController@myBills')->name('myBills');
+        Route::get('my-clinical-teams', 'DnaController@myClinicalTeams')->name('myClinicalTeams');
+
+        Route::get('bills', 'DnaController@bills')->name('bills');
+        Route::get('erx-and-orders', 'DnaController@erx_and_orders')->name('erx_and_orders');
+        Route::get('reports', 'DnaController@reports')->name('reports');
+        Route::get('supply-orders', 'DnaController@supply_orders')->name('supply_orders');
+
+        Route::get('new_patients_awaiting_visit', 'DnaController@new_patients_awaiting_visit')->name('new_patients_awaiting_visit');
+        Route::get('notes_pending_signature', 'DnaController@notes_pending_signature')->name('notes_pending_signature');
+        Route::get('notes_pending_billing', 'DnaController@notes_pending_billing')->name('notes_pending_billing');
+        Route::get('reports_pending_signature', 'DnaController@reports_pending_signature')->name('reports_pending_signature');
+        Route::get('patients_without_appointments', 'DnaController@patients_without_appointments')->name('patients_without_appointments');
+        Route::get('patients_overdue_for_visit', 'DnaController@patients_overdue_for_visit')->name('patients_overdue_for_visit');
+        Route::get('cancelled_appointments_pending_review', 'DnaController@cancelled_appointments_pending_review')->name('cancelled_appointments_pending_review');
+        Route::get('cancelled_bills_pending_review', 'DnaController@cancelled_bills_pending_review')->name('cancelled_bills_pending_review');
+        Route::get('cancelled_supply_orders_pending_review', 'DnaController@cancelled_supply_orders_pending_review')->name('cancelled_supply_orders_pending_review');
+        Route::get('erx_and_orders_pending_signature', 'DnaController@erx_and_orders_pending_signature')->name('erx_and_orders_pending_signature');
+        Route::get('supply_orders_pending_signature', 'DnaController@supply_orders_pending_signature')->name('supply_orders_pending_signature');
+
+        //from the new spec
+        Route::get('my-patients', 'DnaController@myPatients')->name('my-patients');
+        Route::get('patients_awaiting_mcp_visit', 'DnaController@patientsAwaitingMcpVisit')->name('patients_awaiting_mcp_visit');
+        Route::get('patients_without_appointment', 'DnaController@patientsWithoutAppointment')->name('patients_without_appointment');
+        Route::get('encounters_pending_my_review', 'DnaController@encountersPendingMyReview')->name('encounters_pending_my_review');
+        Route::get('encounters_in_progress', 'DnaController@encountersInProgress')->name('encounters_in_progress');
+        Route::get('appointments_pending_confirmation', 'DnaController@appointmentsPendingConfirmation')->name('appointments_pending_confirmation');
+        Route::get('cancelled_appointments_pending_ack', 'DnaController@cancelledAppointmentsPendingAck')->name('cancelled_appointments_pending_ack');
+        Route::get('reports_pending_ack', 'DnaController@reportsPendingAck')->name('reports_pending_ack');
+        Route::get('supply_orders_pending_my_ack', 'DnaController@supplyOrdersPendingMyAck')->name('supply_orders_pending_my_ack');
+        Route::get('supply_orders_pending_hcp_approval', 'DnaController@supplyOrdersPendingHcpApproval')->name('supply_orders_pending_hcp_approval');
 
-        });
     });
+  
 
     Route::name('admin.')->prefix('a')->middleware('pro.auth.admin')->group(function () {
         // TODO