瀏覽代碼

Merge branch 'dev' into dev-vj

Vijayakrishnan 3 年之前
父節點
當前提交
cafafab9e7
共有 46 個文件被更改,包括 835 次插入266 次删除
  1. 1 0
      app/Http/Controllers/HomeController.php
  2. 33 0
      app/Http/Controllers/PatientController.php
  3. 15 17
      app/Http/Controllers/PracticeManagementController.php
  4. 6 0
      app/Models/CareMonth.php
  5. 2 16
      app/Models/Client.php
  6. 9 0
      app/Models/ClientPrimaryCoverage.php
  7. 1 0
      app/Models/Pro.php
  8. 3 2
      public/css/z.css
  9. 1 1
      resources/views/app/dashboard-admin.blade.php
  10. 1 1
      resources/views/app/dashboard-dna.blade.php
  11. 2 2
      resources/views/app/dashboard-mcp.blade.php
  12. 4 4
      resources/views/app/dna/patients-table.blade.php
  13. 2 2
      resources/views/app/generic-bills/inline.blade.php
  14. 2 2
      resources/views/app/mcp/appointments.blade.php
  15. 9 15
      resources/views/app/mcp/appointments_filters.blade.php
  16. 9 15
      resources/views/app/mcp/bills_filters.blade.php
  17. 1 1
      resources/views/app/mcp/cancelled_supply_orders_pending_review.blade.php
  18. 9 15
      resources/views/app/mcp/client_messages_filters.blade.php
  19. 20 0
      resources/views/app/mcp/dashboard/messages.blade.php
  20. 9 15
      resources/views/app/mcp/erx_and_orders_filters.blade.php
  21. 1 1
      resources/views/app/mcp/new_patients_awaiting_visit.blade.php
  22. 8 14
      resources/views/app/mcp/notes_filters.blade.php
  23. 4 4
      resources/views/app/mcp/patients-table.blade.php
  24. 35 38
      resources/views/app/mcp/patients_filters.blade.php
  25. 9 15
      resources/views/app/mcp/reports_filters.blade.php
  26. 8 15
      resources/views/app/mcp/supply_orders_filters.blade.php
  27. 3 3
      resources/views/app/new-patient.blade.php
  28. 3 2
      resources/views/app/patient/accounts.blade.php
  29. 421 0
      resources/views/app/patient/canvas-migrate.blade.php
  30. 11 0
      resources/views/app/patient/canvas_dump.blade.php
  31. 2 2
      resources/views/app/patient/care-month/dashboard.blade.php
  32. 16 16
      resources/views/app/patient/measurements.blade.php
  33. 2 2
      resources/views/app/patient/note/dashboard-univ.blade.php
  34. 7 4
      resources/views/app/patient/note/dashboard.blade.php
  35. 3 1
      resources/views/app/patient/partials/appointment-confirmation.blade.php
  36. 1 1
      resources/views/app/patient/sms.blade.php
  37. 1 1
      resources/views/app/patient/supply-orders.blade.php
  38. 3 1
      resources/views/app/patient/vitals-settings/bmi-management-summary.blade.php
  39. 1 1
      resources/views/app/patients.blade.php
  40. 2 2
      resources/views/app/practice-management/bill-matrix.blade.php
  41. 1 1
      resources/views/app/practice-management/cellular-device-manager.blade.php
  42. 1 1
      resources/views/app/practice-management/patient-claim-summary.blade.php
  43. 118 12
      resources/views/app/practice-management/remote-monitoring-report.blade.php
  44. 2 8
      resources/views/app/practice-management/remote-monitoring.blade.php
  45. 29 11
      resources/views/layouts/patient.blade.php
  46. 4 2
      routes/web.php

+ 1 - 0
app/Http/Controllers/HomeController.php

@@ -537,6 +537,7 @@ WHERE cl.shadow_pro_id IS NULL
             SELECT cs.* ,c.uid as client_uid, c.name_first as client_name_first, c.name_last as client_name_last FROM client_sms cs LEFT JOIN client c ON c.id = cs.client_id
             WHERE cs.is_reply_needed = 'YES' AND c.mcp_pro_id = :mcp_pro_id AND incoming_or_outgoing = 'INCOMING'
             AND (cs.created_at > c.last_sms_sent_to_client_at OR c.last_sms_sent_to_client_at IS NULL)
+            ORDER BY created_at DESC
         ", ['mcp_pro_id' => $performer->pro->id]);
 
         return view('app/dashboard-mcp', compact('keyNumbers', 'reimbursement', 'milliseconds',

+ 33 - 0
app/Http/Controllers/PatientController.php

@@ -79,6 +79,39 @@ class PatientController extends Controller
             compact('patient', 'facilities', 'devices', 'dxInfoLines'));
     }
 
+    public function canvasMigrate(Request $request, Client $patient )
+    {
+        $mcpPros = Pro::where('is_enrolled_as_mcp', true)->get();
+        $facilities = []; // Facility::where('is_active', true)->get();
+
+        // get assigned devices
+        $assignedDeviceIDs = DB::select(DB::raw("SELECT device_id from client_bdt_device where is_active = true"));
+        $assignedDeviceIDs = array_map(function($_x) {
+            return $_x->device_id;
+        }, $assignedDeviceIDs);
+
+        // get all except assigned ones
+        $devices = BDTDevice::where('is_active', true)
+            ->whereNotIn('id', $assignedDeviceIDs)
+            ->orderBy('imei', 'asc')
+            ->get();
+
+        $assignedDeviceIDs = null;
+        unset($assignedDeviceIDs);
+
+        $dxInfoLines = ClientInfoLine::where('client_id', $patient->id)
+            ->where('category', 'dx')
+            ->where('is_removed', false)
+            ->orderBy('content_text', 'asc')
+            ->get();
+        return view('app.patient.canvas-migrate',
+            compact('patient', 'facilities', 'devices', 'dxInfoLines'));
+    }
+
+    public function canvas(Request $request, Client $patient){
+        return view('app.patient.canvas_dump', compact('patient'));
+    }
+
     public function actionItems(Request $request, Client $patient )
     {
         $facilities = []; // Facility::where('is_active', true)->get();

+ 15 - 17
app/Http/Controllers/PracticeManagementController.php

@@ -54,8 +54,11 @@ class PracticeManagementController extends Controller
 		$rows = null;
 		$proID = $this->performer()->pro->id;
 		$isAdmin = $this->performer()->pro->pro_type == 'ADMIN';
-		$rows = $isAdmin ? ClientMeasurementDaysPerMonth::all() : ClientMeasurementDaysPerMonth::where('mcp_pro_id', $proID)->orderBy('year_month', 'asc')->orderBy('num_of_days_with_measurement', 'asc')->get();
-		return view ('app.practice-management.remote-monitoring-report', compact('rows'));
+		//$rows = $isAdmin ? ClientMeasurementDaysPerMonth::all() : ClientMeasurementDaysPerMonth::where('mcp_pro_id', $proID)->orderBy('year_month', 'asc')->orderBy('num_of_days_with_measurement', 'asc')->get();
+        $rows = CareMonth::whereNotNull('mcp_pro_id')
+            ->where('number_of_days_with_remote_measurements', '>=', 16)
+            ->orderByRaw(DB::raw('start_date DESC'))->paginate(50) ;
+        return view ('app.practice-management.remote-monitoring-report', compact('rows'));
 	}
 
     public function billingReport(Request $request)
@@ -202,10 +205,10 @@ class PracticeManagementController extends Controller
             ->where('is_cancelled', FALSE)
             ->whereRaw("
             (
-                SELECT count(bill.id) 
-                FROM bill WHERE 
-                      bill.is_cancelled = FALSE AND 
-                      bill.generic_pro_id = {$this->performer()->pro->id} AND 
+                SELECT count(bill.id)
+                FROM bill WHERE
+                      bill.is_cancelled = FALSE AND
+                      bill.generic_pro_id = {$this->performer()->pro->id} AND
                       bill.note_id = note.id
             ) = 0
             ");
@@ -909,13 +912,8 @@ SELECT client.name_first, client.name_last, client.uid as client_uid,
        client.rme_pro_id,
        client.cell_number
 FROM care_month join client on care_month.client_id = client.id
-WHERE (
-          (client.mcp_pro_id = {$performer->pro->id})
-          OR (client.rmm_pro_id = {$performer->pro->id})
-          OR (client.rme_pro_id = {$performer->pro->id})
-          OR (client.default_na_pro_id = {$performer->pro->id})
-      )
-  AND EXTRACT(MONTH from care_month.start_date) = " . ($request->input('m') ?: 'EXTRACT(MONTH from now())') . "
+WHERE
+      EXTRACT(MONTH from care_month.start_date) = " . ($request->input('m') ?: 'EXTRACT(MONTH from now())') . "
   AND EXTRACT(YEAR from care_month.start_date) = " . ($request->input('y') ?: 'EXTRACT(YEAR from now())') . "
   {$filters}
 ORDER BY care_month.number_of_days_with_remote_measurements DESC NULLS LAST, client.name_first ASC, client.name_last ASC
@@ -955,7 +953,7 @@ SELECT measurement.label,
 FROM measurement RIGHT JOIN client on measurement.client_id = client.id
 WHERE
     client.id = {$careMonth->client_id}
-    AND measurement.label IS NOT NULL  
+    AND measurement.label IS NOT NULL
     AND measurement.label NOT IN ('SBP', 'DBP')
     AND (measurement.is_cellular_zero = FALSE or measurement.is_cellular_zero IS NULL)
     AND measurement.is_removed IS FALSE
@@ -1537,7 +1535,7 @@ ORDER BY claim.created_at DESC
 
         $mode = $request->input('mode') ? $request->input('mode') : '1';
         if(($mode < 1 || $mode > 5) && $mode != 8) $mode = 1;
-	
+
 	DB::enableQueryLog(); // Enable query log
 
 	$test = Note::where('is_cancelled', false)
@@ -1614,7 +1612,7 @@ ORDER BY claim.created_at DESC
                 // ->whereRaw("(((detail_json)::json->>'isGood')::text <> 'true')")
                 ->where('is_claim_closed', true)
                 ->whereRaw("((SELECT count(id) FROM claim WHERE note_id = note.id AND is_cancelled IS FALSE AND status != 'CANCELLED' AND status != 'SUBMITTED') > 0)")
-                
+
 		->count(),
  // has unsubmitted claims MARKED GOOD!
             "mode-8" => Note::where('is_cancelled', false)
@@ -1738,7 +1736,7 @@ ORDER BY claim.created_at DESC
                 break;
             case 4: // claiming not closed
 		DB::enableQueryLog(); // Enable query log
-                
+
 		$note = Note::where('is_cancelled', false)
                     ->where('is_signed_by_hcp', true)
                     ->whereRaw("((detail_json)::json->>'isBad' is null OR ((detail_json)::json->>'isBad')::text != 'true')")

+ 6 - 0
app/Models/CareMonth.php

@@ -103,4 +103,10 @@ class CareMonth extends Model
         return $this->hasOne(Claim::class, 'id', 'rm_setup_claim_id')
             ->where('status', '<>', 'CANCELLED');
     }
+
+    public function mostRecentMcpNote()
+    {
+        return $this->hasOne(Note::class, 'id', 'most_recent_mcp_note_id');
+    }
+
 }

+ 2 - 16
app/Models/Client.php

@@ -299,26 +299,12 @@ class Client extends Model
 
     public function nextMcpAppointment()
     {
-        if ($this->mcp) {
-            return Appointment::where('client_id', $this->id)
-                ->where('pro_id', $this->mcp->id)
-                ->where('start_time', '>=', date('Y-m-d'))
-                ->orderBy('start_time', 'asc')
-                ->first();
-        }
-        return false;
+        return $this->hasOne(Appointment::class, 'id', 'next_mcp_appointment_id');
     }
 
     public function lastMcpAppointment()
     {
-        if ($this->mcp) {
-            return Appointment::where('client_id', $this->id)
-                ->where('pro_id', $this->mcp->id)
-                ->where('start_time', '<', date('Y-m-d'))
-                ->orderBy('start_time', 'asc')
-                ->first();
-        }
-        return false;
+        return $this->hasOne(Appointment::class, 'id', 'previous_mcp_appointment_id');
     }
 
     public function lastMeasurementOfType($_type) {

+ 9 - 0
app/Models/ClientPrimaryCoverage.php

@@ -40,6 +40,15 @@ class ClientPrimaryCoverage extends Model
         return $status;
     }
 
+    public function insuranceDisplayName(){
+        $coverageName = $this->toString();
+        if(stripos($coverageName, 'medicare') !== false) return 'Medicare';
+        if(stripos($coverageName, 'medicaid') !== false) return 'Medicaid';
+        if(stripos($coverageName, 'commercial') !== false) return 'Commercial';
+        return null;
+
+    }
+
     public function toString() {
         $parts = [];
         $parts[] = $this->plan_type;

+ 1 - 0
app/Models/Pro.php

@@ -413,6 +413,7 @@ WHERE mcp_pro_id = :pro_id
 
     function get_patients_without_appointment_query() {
         return Client::where('mcp_pro_id', $this->id)
+                    ->whereNull('today_mcp_appointment_date')
                     ->where(function($q){
                         $q->whereNull('next_mcp_appointment_id')
                         ->orWhere('next_mcp_appointment_date', '<=', DB::raw('NOW()::DATE'));

+ 3 - 2
public/css/z.css

@@ -52,7 +52,7 @@
 .z .header {}
 .z .thumbnail {
     --shadow-color: #aaa;
-    --size: 40px;
+    --size: 25px;
     align-items: center;
     background: #ccc;
     box-shadow: 0 0 20px var(--shadow-color);
@@ -60,7 +60,8 @@
     display: flex;
     flex-shrink: 0;
     justify-content: center;
-    font-size: 18px;
+    font-size: 12px;
+    padding: 15px;
     height: var(--size);
     width: var(--size);
 } .z .thumbnail.online {

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

@@ -63,7 +63,7 @@
                                 </tr>
                                 <tr>
                                     <th class="px-2 text-center">{{$pro->get_cancelled_supply_orders_awaiting_review_count_as_mcp()}}</th>
-                                    <th class="pl-2">Cancelled Supply Orders Pending Review</th>
+                                    <th class="pl-2">Cancelled Supply Orders</th>
                                 </tr>
 
                                 <tr>

+ 1 - 1
resources/views/app/dashboard-dna.blade.php

@@ -63,7 +63,7 @@
                                 </tr>
                                 <tr>
                                     <th class="px-2 text-center">{{$pro->get_cancelled_supply_orders_awaiting_review_count_as_mcp()}}</th>
-                                    <th class="pl-2">Cancelled Supply Orders Pending Review</th>
+                                    <th class="pl-2">Cancelled Supply Orders</th>
                                 </tr>
 
                                 <tr>

+ 2 - 2
resources/views/app/dashboard-mcp.blade.php

@@ -143,8 +143,8 @@
                                            native target="_blank"
                                            open-in-stag-popup
                                            popup-style="tall"
-                                           title="Cancelled Supply Orders Pending Review">
-                                            Cancelled Supply Orders Pending Review
+                                           title="Cancelled Supply Orders">
+                                            Cancelled Supply Orders
                                         </a>
                                     </th>
                                 </tr>

+ 4 - 4
resources/views/app/dna/patients-table.blade.php

@@ -43,12 +43,12 @@
 				@endif
 				<?php $coverage = $patient->getPrimaryCoverage(); ?>
 				@if($coverage)
-				{{$coverage->toString()}}
+				{{$coverage->insuranceDisplayName()}}
 				@endif
 			</td>
-			<td>{{$patient->lastMcpAppointment() ? $patient->lastMcpAppointment()->start_date : '-'}}</td>
-			<td>{{$patient->nextMcpAppointment() ? $patient->nextMcpAppointment()->start_date : '-'}}</td>
-			<td>{{$patient->nextMcpAppointment() ? $patient->nextMcpAppointment()->status : '-'}}</td>
+			<td>{{$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>
 			<td>{{$patient->is_enrolled_in_cm ? 'Yes' : 'No'}}</td>
 			<td>{{$patient->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>
 			<td>

+ 2 - 2
resources/views/app/generic-bills/inline.blade.php

@@ -171,7 +171,7 @@ $genericBills = genericBills($pro, @$patient, @$entityType, @$entityUid);
                             @if($bill->is_cancelled && !$bill->is_cancellation_acknowledged)
                                 <div class="mt-2 text-secondary">
                                     <i class="fa fa-exclamation-triangle"></i>
-                                    Not Acknowledged
+                                    Not Ack.
                                 </div>
                                 <div class="d-block mt-1" moe>
                                     <a class="" href="" show start>Ack. Cancellation</a>
@@ -190,7 +190,7 @@ $genericBills = genericBills($pro, @$patient, @$entityType, @$entityUid);
                             @if($bill->is_cancellation_acknowledged)
                                 <div class="mt-2 text-secondary">
                                     <i class="fa fa-check"></i>
-                                    Acknowledged
+                                    Ack.
                                 </div>
                                 <div class="d-block mt-1" moe>
                                     <a class="" href="" show start>Undo Cancellation Ack.</a>

+ 2 - 2
resources/views/app/mcp/appointments.blade.php

@@ -30,7 +30,7 @@
                     @foreach($appointments as $appointment)
                     <tr>
                         <td class="px-2">
-                            <a href="/patients/view/{{$appointment->client->uid}}/calendar/{{$appointment->uid}}" class="font-weight-bold">
+                            <a href="/patients/view/{{$appointment->client->uid}}/calendar/{{$appointment->uid}}" class="font-weight-bold text-nowrap">
                                 {{friendlier_date_time($appointment->raw_date . ' ' . $appointment->raw_start_time)}}
                             </a>
                         </td>
@@ -65,4 +65,4 @@
         </div>
     </div>
 </div>
-@endsection
+@endsection

+ 9 - 15
resources/views/app/mcp/appointments_filters.blade.php

@@ -6,22 +6,16 @@
 	#mcp-appointments-filters .mw-100px {
 		min-width: 100px;
 	}
-	.filter-container, .filter-child-container {
+	.filter-container{
 		display: flex;
 		align-items: flex-start;
 		flex-wrap: wrap;
 	}
 	.filter-container >div {
-		width: 180px;
+		width: 165px;
 	}
 	.filter-container >div:not(:last-child) {
-		margin-right: 20px;
-	}
-	.filter-child-container >div {
-		width: 85px;
-	}
-	.filter-child-container >div:not(:last-child) {
-		margin-right: 10px;
+		margin-right: 15px;
 	}
 </style>
 <form id="mcp-appointments-filters" method="GET" action="{{ route('mcp.appointments') }}" class="filter-container" v-cloak>
@@ -37,12 +31,12 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.date_category" class="filter-child-container mt-2">
+			<div v-show="filters.date_category" class="mt-2">
 				<div>
-					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm" :placeholder="(filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN') ? 'From' : 'Date'" />
+					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm"/>
 				</div>
-				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'">
-					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm" placeholder="To" />
+				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'" class="mt-2">
+					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm"/>
 				</div>
 			</div>
 		</div>
@@ -65,8 +59,8 @@
 		<div class="form-group">
 			<label>&nbsp;</label>
 			<div class="d-flex">
-				<button type="submit" v-on:click.prevent="doSubmit()" class="w-50 btn btn-primary btn-sm mr-2">Apply</button>
-				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.appointments')}}')" class="w-50 btn btn-danger btn-sm text-white">Clear</a>
+				<button type="submit" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
+				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.appointments')}}')" class="btn btn-link btn-sm text-danger">Clear Filters</a>
 			</div>
 		</div>
 	</div>

+ 9 - 15
resources/views/app/mcp/bills_filters.blade.php

@@ -6,22 +6,16 @@
 	#mcp-bills-filters .mw-100px {
 		min-width: 100px;
 	}
-	.filter-container, .filter-child-container {
+	.filter-container {
 		display: flex;
 		align-items: flex-start;
 		flex-wrap: wrap;
 	}
 	.filter-container >div {
-		width: 180px;
+		width: 165px;
 	}
 	.filter-container >div:not(:last-child) {
-		margin-right: 20px;
-	}
-	.filter-child-container >div {
-		width: 85px;
-	}
-	.filter-child-container >div:not(:last-child) {
-		margin-right: 10px;
+		margin-right: 15px;
 	}
 </style>
 <form id="mcp-bills-filters" method="GET" action="{{ route('mcp.bills') }}" class="filter-container" v-cloak>
@@ -37,12 +31,12 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.date_category" class="filter-child-container mt-2">
+			<div v-show="filters.date_category" class="mt-2">
 				<div>
-					<input name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm" :placeholder="(filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN') ? 'From' : 'Date'" />
+					<input name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm"/>
 				</div>
-				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'">
-					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm" placeholder="To" />
+				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'" class="mt-2">
+					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm"/>
 				</div>
 			</div>
 		</div>
@@ -63,8 +57,8 @@
 		<div class="form-group">
 			<label>&nbsp;</label>
 			<div class="d-flex">
-				<button type="submit" v-on:click.prevent="doSubmit()" class="w-50 btn btn-primary btn-sm mr-2">Apply</button>
-				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.bills')}}')" class="w-50 btn btn-danger btn-sm text-white">Clear</a>
+				<button type="submit" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
+				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.bills')}}')" class="btn btn-link btn-sm text-danger">Clear Filters</a>
 			</div>
 		</div>
 	</div>

+ 1 - 1
resources/views/app/mcp/cancelled_supply_orders_pending_review.blade.php

@@ -4,7 +4,7 @@
         <div class="card-header px-3 py-2 hide-inside-popup border-bottom-0">
             <strong class="mr-4">
                 <i class="fas fa-box"></i>
-                Cancelled Supply Orders Pending Review
+                Cancelled Supply Orders
             </strong>
         </div>
 

+ 9 - 15
resources/views/app/mcp/client_messages_filters.blade.php

@@ -6,22 +6,16 @@
 	#mcp-client-messages-filters .mw-100px {
 		min-width: 100px;
 	}
-	.filter-container, .filter-child-container {
+	.filter-container {
 		display: flex;
 		align-items: flex-start;
 		flex-wrap: wrap;
 	}
 	.filter-container >div {
-		width: 180px;
+		width: 165px;
 	}
 	.filter-container >div:not(:last-child) {
-		margin-right: 20px;
-	}
-	.filter-child-container >div {
-		width: 85px;
-	}
-	.filter-child-container >div:not(:last-child) {
-		margin-right: 10px;
+		margin-right: 15px;
 	}
 </style>
 <form id="mcp-client-messages-filters" method="GET" action="{{ route('mcp.client_messages') }}" class="filter-container" v-cloak>
@@ -37,12 +31,12 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.date_category" class="filter-child-container mt-2">
+			<div v-show="filters.date_category" class="mt-2">
 				<div>
-					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm" :placeholder="(filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN') ? 'From' : 'Date'" />
+					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm"/>
 				</div>
-				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'">
-					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm" placeholder="To" />
+				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'" class="mt-2">
+					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm"/>
 				</div>
 			</div>
 		</div>
@@ -73,8 +67,8 @@
 		<div class="form-group">
 			<label>&nbsp;</label>
 			<div class="d-flex">
-				<button type="submit" v-on:click.prevent="doSubmit()" class="w-50 btn btn-primary btn-sm mr-2">Apply</button>
-				<a v-on:click.prevent="fastLoad('{{route('mcp.client_messages')}}')" href="#" class="w-50 btn btn-danger btn-sm text-white">Clear</a>
+				<button type="submit" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
+				<a v-on:click.prevent="fastLoad('{{route('mcp.client_messages')}}')" href="#" class="btn btn-link btn-sm text-danger">Clear Filters</a>
 			</div>
 		</div>
 	</div>

+ 20 - 0
resources/views/app/mcp/dashboard/messages.blade.php

@@ -16,6 +16,26 @@
                 <td class="px-1">
                     {{$msg->body}}
                 </td>
+                <td>
+                    @if($msg->is_reply_needed == 'YES')
+                        <div moe relative>
+                            <a start show class="">clear</a>
+                            <form url="/api/clientSms/updateIsReplyNeeded" class="mcp-theme-1" right>
+                                <input type="hidden" name="uid" value="{{ $msg->uid }}">
+                                <input type="hidden" name="isReplyNeeded" value="NO">
+                                <div class="mb-2">
+                                    <label for="" class="text-sm text-secondary mb-1">Are you sure?</label>
+
+                                </div>
+
+                                <div class="d-flex align-items-center">
+                                    <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
+                                    <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                </div>
+                            </form>
+                        </div>
+                    @endif
+                </td>
             </tr>
         @endforeach
         </tbody>

+ 9 - 15
resources/views/app/mcp/erx_and_orders_filters.blade.php

@@ -6,22 +6,16 @@
 	#mcp-erx-and-orders-filters .mw-100px {
 		min-width: 100px;
 	}
-	.filter-container, .filter-child-container {
+	.filter-container {
 		display: flex;
 		align-items: flex-start;
 		flex-wrap: wrap;
 	}
 	.filter-container >div {
-		width: 180px;
+		width: 165px;
 	}
 	.filter-container >div:not(:last-child) {
-		margin-right: 20px;
-	}
-	.filter-child-container >div {
-		width: 85px;
-	}
-	.filter-child-container >div:not(:last-child) {
-		margin-right: 10px;
+		margin-right: 15px;
 	}
 </style>
 <form id="mcp-erx-and-orders-filters" method="GET" action="{{ route('mcp.notes') }}" class="filter-container" v-cloak>
@@ -37,12 +31,12 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.date_category" class="filter-child-container mt-2">
+			<div v-show="filters.date_category" class="mt-2">
 				<div>
-					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm" :placeholder="(filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN') ? 'From' : 'Date'" />
+					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm"/>
 				</div>
-				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'">
-					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm" placeholder="To" />
+				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'" class="mt-2">
+					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm"/>
 				</div>
 			</div>
 		</div>
@@ -66,8 +60,8 @@
 		<div class="form-group">
 			<label>&nbsp;</label>
 			<div class="d-flex">
-				<button type="submit" v-on:click.prevent="doSubmit()" class="w-50 btn btn-primary btn-sm mr-2">Apply</button>
-				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.erx_and_orders')}}')" class="w-50 btn btn-danger btn-sm text-white">Clear</a>
+				<button type="submit" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
+				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.erx_and_orders')}}')" class="btn btn-link btn-sm text-danger">Clear Filters</a>
 			</div>
 		</div>
 	</div>

+ 1 - 1
resources/views/app/mcp/new_patients_awaiting_visit.blade.php

@@ -55,7 +55,7 @@
                                 @endif
                                 <?php $coverage = $row->getPrimaryCoverage(); ?>
                                 @if($coverage)
-                                    {{ucwords(strtolower($coverage->toString()))}}
+                                    {{$coverage->insuranceDisplayName()}}
                                 @endif
                               </div>
                             </td>

+ 8 - 14
resources/views/app/mcp/notes_filters.blade.php

@@ -6,22 +6,16 @@
 	#mcp-notes-filters .mw-100px {
 		min-width: 100px;
 	}
-	.filter-container, .filter-child-container {
+	.filter-container{
 		display: flex;
 		align-items: flex-start;
 		flex-wrap: wrap;
 	}
 	.filter-container >div {
-		width: 180px;
+		width: 165px;
 	}
 	.filter-container >div:not(:last-child) {
-		margin-right: 20px;
-	}
-	.filter-child-container >div {
-		width: 85px;
-	}
-	.filter-child-container >div:not(:last-child) {
-		margin-right: 10px;
+		margin-right: 15px;
 	}
 </style>
 <form id="mcp-notes-filters" method="GET" action="{{ route('mcp.notes') }}" class="filter-container" v-cloak>
@@ -39,10 +33,10 @@
 			</select>
 			<div v-show="filters.date_category" class="filter-child-container mt-2">
 				<div>
-					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm" :placeholder="(filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN') ? 'From' : 'Date'" />
+					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm"/>
 				</div>
-				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'">
-					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm" placeholder="To" />
+				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'" class="mt-2">
+					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm"/>
 				</div>
 			</div>
 		</div>
@@ -63,8 +57,8 @@
 		<div class="form-group">
 			<label>&nbsp;</label>
 			<div class="d-flex">
-				<button type="submit"  v-on:click.prevent="doSubmit()" class="w-50 btn btn-primary btn-sm mr-2">Apply</button>
-				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.notes')}}')" class="w-50 btn btn-danger btn-sm text-white">Clear</a>
+				<button type="submit"  v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
+				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.notes')}}')" class="btn btn-link btn-sm text-danger">Clear Filters</a>
 			</div>
 		</div>
 	</div>

+ 4 - 4
resources/views/app/mcp/patients-table.blade.php

@@ -43,13 +43,13 @@
 					@endif
 					<?php $coverage = $patient->getPrimaryCoverage(); ?>
 					@if($coverage)
-					{{ucwords(strtolower($coverage->toString()))}}
+					{{$coverage->insuranceDisplayName()}}
 					@endif
 				</div>
 			</td>
-			<td>{{$patient->lastMcpAppointment() ? $patient->lastMcpAppointment()->start_date : '-'}}</td>
-			<td>{{$patient->nextMcpAppointment() ? $patient->nextMcpAppointment()->start_date : '-'}}</td>
-			<td>{{$patient->nextMcpAppointment() ? $patient->nextMcpAppointment()->status : '-'}}</td>
+			<td>{{$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>
 			<td>{{$patient->is_enrolled_in_cm ? 'Yes' : 'No'}}</td>
 			<td>{{$patient->is_enrolled_in_rm ? 'Yes' : 'No'}}</td>
 			<td class="d-none">

+ 35 - 38
resources/views/app/mcp/patients_filters.blade.php

@@ -6,33 +6,30 @@
 	#mcp-patients-filters .mw-100px {
 		min-width: 100px;
 	}
-	.filter-container, .filter-child-container {
+	.filter-container{
 		display: flex;
 		align-items: flex-start;
 		flex-wrap: wrap;
 	}
 	.filter-container >div {
-		width: 180px;
+		width: 165px;
 	}
 	.filter-container >div:not(:last-child) {
-		margin-right: 20px;
+		margin-right: 15px;
 	}
-	.filter-child-container >div {
-		width: 85px;
-	}
-	.filter-child-container >div:not(:last-child) {
-		margin-right: 10px;
+	.sm-section {
+		width: 125px !important;
 	}
 </style>
 <form id="mcp-patients-filters" method="GET" action="{{ route('mcp.patients') }}" class="filter-container" v-cloak>
-	<div>
+	<div class="sm-section">
 		<div class="form-group">
 			<label>Name:</label>
 			<input name="name" class="form-control input-sm" v-model="filters.name">
 		</div>
 	</div>
 	<!-- AGE	 -->
-	<div>
+	<div class="sm-section">
 		<div class="form-group">
 			<label>Age:</label>
 			<select name="age_category" class="form-control input-sm" v-model="filters.age_category">
@@ -43,18 +40,18 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.age_category" class="filter-child-container mt-2">
+			<div v-show="filters.age_category" class="mt-2">
 				<div>
 					<input  name="age_value_1" v-model="filters.age_value_1" type="number" class="form-control input-sm" :placeholder="(filters.age_category === 'BETWEEN' || filters.age_category === 'NOT_BETWEEN') ? 'From' : 'Age'" />
 				</div>
-				<div v-show="filters.age_category === 'BETWEEN' || filters.age_category === 'NOT_BETWEEN'">
+				<div v-show="filters.age_category === 'BETWEEN' || filters.age_category === 'NOT_BETWEEN'" class="mt-2">
 					<input name="age_value_2" v-model="filters.age_value_2" type="number" class="form-control input-sm" placeholder="To" />
 				</div>
 			</div>
 		</div>
 	</div>
 	<!-- SEX -->
-	<div>
+	<div class="sm-section">
 		<div class="form-group">
 			<label>Sex:</label>
 			<select name="sex" class="form-control input-sm" v-model="filters.sex">
@@ -65,7 +62,7 @@
 		</div>
 	</div>
 	<!-- BMI -->
-	<div>
+	<div class="sm-section">
 		<div class="form-group">
 			<label>BMI:</label>
 			<select name="bmi_category" class="form-control input-sm" v-model="filters.bmi_category">
@@ -76,11 +73,11 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.bmi_category" class="filter-child-container mt-2">
+			<div v-show="filters.bmi_category" class="mt-2">
 				<div>
 					<input  name="bmi_value_1" v-model="filters.bmi_value_1" type="number" class="form-control input-sm" :placeholder="(filters.bmi_category === 'BETWEEN' || filters.bmi_category === 'NOT_BETWEEN') ? 'From' : 'BMI'" />
 				</div>
-				<div v-show="filters.bmi_category === 'BETWEEN' || filters.bmi_category === 'NOT_BETWEEN'">
+				<div v-show="filters.bmi_category === 'BETWEEN' || filters.bmi_category === 'NOT_BETWEEN'" class="mt-2">
 					<input name="bmi_value_2" v-model="filters.bmi_value_2" type="number" class="form-control input-sm" placeholder="To" />
 				</div>
 			</div>
@@ -88,9 +85,9 @@
 	</div>
 
 	<!-- LAST VISIT -->
-	<div>
+	<div class="sm-section">
 		<div class="form-group">
-			<label>Last Visit **:</label>
+			<label>Last Visit:</label>
 			<select name="last_visit_category" class="form-control input-sm" v-model="filters.last_visit_category">
 				<option value="">All</option>
 				<option value="EXACTLY">Exactly</option>
@@ -99,11 +96,11 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.last_visit_category" class="filter-child-container mt-2">
+			<div v-show="filters.last_visit_category" class="mt-2">
 				<div>
-					<input  name="last_visit_value_1" v-model="filters.last_visit_value_1" type="number" class="form-control input-sm" :placeholder="(filters.last_visit_category === 'BETWEEN' || filters.last_visit_category === 'NOT_BETWEEN') ? 'From' : 'BMI'" />
+					<input  name="last_visit_value_1" v-model="filters.last_visit_value_1" type="number" class="form-control input-sm" :placeholder="(filters.last_visit_category === 'BETWEEN' || filters.last_visit_category === 'NOT_BETWEEN') ? 'From' : 'Last Visit'" />
 				</div>
-				<div v-show="filters.last_visit_category === 'BETWEEN' || filters.last_visit_category === 'NOT_BETWEEN'">
+				<div v-show="filters.last_visit_category === 'BETWEEN' || filters.last_visit_category === 'NOT_BETWEEN'" class="mt-2">
 					<input name="last_visit_value_2" v-model="filters.last_visit_value_2" type="number" class="form-control input-sm" placeholder="To" />
 				</div>
 			</div>
@@ -113,7 +110,7 @@
 	<!-- NEXT APPOINTMENT -->
 	<div>
 		<div class="form-group">
-			<label>Next Appointment **:</label>
+			<label>Next Appointment:</label>
 			<select name="next_appointment_category" class="form-control input-sm" v-model="filters.next_appointment_category">
 				<option value="">All</option>
 				<option value="EXACTLY">Exactly</option>
@@ -122,11 +119,11 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.next_appointment_category" class="filter-child-container mt-2">
+			<div v-show="filters.next_appointment_category" class="mt-2">
 				<div>
-					<input  name="next_appointment_value_1" v-model="filters.next_appointment_value_1" type="number" class="form-control input-sm" :placeholder="(filters.next_appointment_category === 'BETWEEN' || filters.next_appointment_category === 'NOT_BETWEEN') ? 'From' : 'BMI'" />
+					<input  name="next_appointment_value_1" v-model="filters.next_appointment_value_1" type="number" class="form-control input-sm" :placeholder="(filters.next_appointment_category === 'BETWEEN' || filters.next_appointment_category === 'NOT_BETWEEN') ? 'From' : 'Next Appt.'" />
 				</div>
-				<div v-show="filters.next_appointment_category === 'BETWEEN' || filters.next_appointment_category === 'NOT_BETWEEN'">
+				<div v-show="filters.next_appointment_category === 'BETWEEN' || filters.next_appointment_category === 'NOT_BETWEEN'" class="mt-2">
 					<input name="next_appointment_value_2" v-model="filters.next_appointment_value_2" type="number" class="form-control input-sm" placeholder="To" />
 				</div>
 			</div>
@@ -134,7 +131,7 @@
 	</div>
 
 	<!-- STATUS -->
-	<div>
+	<div class="sm-section">
 		<div class="form-group">
 			<label>Status:</label>
 			<select name="status" class="form-control input-sm" v-model="filters.status">
@@ -147,7 +144,7 @@
 	</div>
 
 	<!-- LAST WEIGHED-IN -->
-	<div class="col-md-2 d-none">
+	<!-- <div class="col-md-2 d-none">
 		<div class="form-group">
 			<label>Last Weighed-In:</label>
 			<select name="last_weighed_in_category" class="form-control input-sm" v-model="filters.last_weighed_in_category">
@@ -158,19 +155,19 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.last_weighed_in_category" class="filter-child-container mt-2">
+			<div v-show="filters.last_weighed_in_category" class="mt-2">
 				<div>
-					<input  name="last_weighed_in_value_1" v-model="filters.last_weighed_in_value_1" type="number" class="form-control input-sm" :placeholder="(filters.last_weighed_in_category === 'BETWEEN' || filters.last_weighed_in_category === 'NOT_BETWEEN') ? 'From' : 'BMI'" />
+					<input  name="last_weighed_in_value_1" v-model="filters.last_weighed_in_value_1" type="number" class="form-control input-sm" :placeholder="(filters.last_weighed_in_category === 'BETWEEN' || filters.last_weighed_in_category === 'NOT_BETWEEN') ? 'From' : 'Last Weighed'" />
 				</div>
-				<div v-show="filters.last_weighed_in_category === 'BETWEEN' || filters.last_weighed_in_category === 'NOT_BETWEEN'">
+				<div v-show="filters.last_weighed_in_category === 'BETWEEN' || filters.last_weighed_in_category === 'NOT_BETWEEN'" class="mt-2">
 					<input name="last_weighed_in_value_2" v-model="filters.last_weighed_in_value_2" type="number" class="form-control input-sm" placeholder="To" />
 				</div>
 			</div>
 		</div>
-	</div>
+	</div> -->
 
 	<!-- LAST BP -->
-	<div class="col-md-2 d-none">
+	<!-- <div class="col-md-2 d-none">
 		<div class="form-group">
 			<label>Last BP:</label>
 			<select name="last_bp_category" class="form-control input-sm" v-model="filters.last_bp_category">
@@ -181,23 +178,23 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.last_bp_category" class="filter-child-container mt-2">
+			<div v-show="filters.last_bp_category" class="mt-2">
 				<div>
-					<input  name="last_bp_value_1" v-model="filters.last_bp_value_1" type="number" class="form-control input-sm" :placeholder="(filters.last_bp_category === 'BETWEEN' || filters.last_bp_category === 'NOT_BETWEEN') ? 'From' : 'BMI'" />
+					<input  name="last_bp_value_1" v-model="filters.last_bp_value_1" type="number" class="form-control input-sm" :placeholder="(filters.last_bp_category === 'BETWEEN' || filters.last_bp_category === 'NOT_BETWEEN') ? 'From' : 'Last BP'" />
 				</div>
-				<div v-show="filters.last_bp_category === 'BETWEEN' || filters.last_bp_category === 'NOT_BETWEEN'">
+				<div v-show="filters.last_bp_category === 'BETWEEN' || filters.last_bp_category === 'NOT_BETWEEN'" class="mt-2">
 					<input name="last_bp_value_2" v-model="filters.last_bp_value_2" type="number" class="form-control input-sm" placeholder="To" />
 				</div>
 			</div>
 		</div>
-	</div>
+	</div> -->
 
 	<div>
 		<div class="form-group">
 			<label>&nbsp;</label>
 			<div class=" d-flex">
-				<button type="button" v-on:click.prevent="doSubmit()" class="w-50 btn btn-primary btn-sm mr-2">Apply</button>
-				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.patients')}}')" class="w-50 btn btn-danger btn-sm text-white">Clear</a>
+				<button type="button" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
+				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.patients')}}')" class="btn btn-link btn-sm text-danger">Clear Filters</a>
 			</div>
 		</div>
 	</div>

+ 9 - 15
resources/views/app/mcp/reports_filters.blade.php

@@ -6,22 +6,16 @@
 	#mcp-reports-filters .mw-100px {
 		min-width: 100px;
 	}
-	.filter-container, .filter-child-container {
+	.filter-container{
 		display: flex;
 		align-items: flex-start;
 		flex-wrap: wrap;
 	}
 	.filter-container >div {
-		width: 180px;
+		width: 165px;
 	}
 	.filter-container >div:not(:last-child) {
-		margin-right: 20px;
-	}
-	.filter-child-container >div {
-		width: 85px;
-	}
-	.filter-child-container >div:not(:last-child) {
-		margin-right: 10px;
+		margin-right: 15px;
 	}
 </style>
 <form id="mcp-reports-filters" method="GET" action="{{ route('mcp.reports') }}" class="filter-container" v-cloak>
@@ -37,12 +31,12 @@
 				<option value="BETWEEN">Between</option>
 				<option value="NOT_BETWEEN">Not Between</option>
 			</select>
-			<div v-show="filters.date_category" class="filter-child-container mt-2">
+			<div v-show="filters.date_category" class="mt-2">
 				<div>
-					<input name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm" :placeholder="(filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN') ? 'From' : 'Date'" />
+					<input name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm"/>
 				</div>
-				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'">
-					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm" placeholder="To" />
+				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'" class="mt-2">
+					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm"/>
 				</div>
 			</div>
 		</div>
@@ -63,8 +57,8 @@
 		<div class="form-group">
 			<label>&nbsp;</label>
 			<div class="d-flex">
-				<button type="submit" v-on:click.prevent="doSubmit()" class="w-50 btn btn-primary btn-sm mr-2">Apply</button>
-				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.reports')}}')" class="w-50 btn btn-danger btn-sm text-white">Clear</a>
+				<button type="submit" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
+				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.reports')}}')" class="btn btn-link btn-sm text-danger">Clear Filters</a>
 			</div>
 		</div>
 	</div>

+ 8 - 15
resources/views/app/mcp/supply_orders_filters.blade.php

@@ -6,22 +6,15 @@
 	#mcp-supply-orders-filters .mw-100px {
 		min-width: 100px;
 	}
-	.filter-container, .filter-child-container {
+	.filter-container {
 		display: flex;
 		align-items: flex-start;
-		flex-wrap: wrap;
 	}
 	.filter-container >div {
-		width: 180px;
+		width: 165px;
 	}
 	.filter-container >div:not(:last-child) {
-		margin-right: 20px;
-	}
-	.filter-child-container >div {
-		width: 85px;
-	}
-	.filter-child-container >div:not(:last-child) {
-		margin-right: 10px;
+		margin-right: 15px;
 	}
 </style>
 <form id="mcp-supply-orders-filters" method="GET" action="{{ route('mcp.supply_orders') }}" class="filter-container" v-cloak>
@@ -39,10 +32,10 @@
 			</select>
 			<div v-show="filters.date_category" class="filter-child-container mt-2">
 				<div>
-					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm" :placeholder="(filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN') ? 'From' : 'Date'" />
+					<input  name="date_value_1" v-model="filters.date_value_1" type="date" class="form-control input-sm"/>
 				</div>
-				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'">
-					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm" placeholder="To" />
+				<div v-show="filters.date_category === 'BETWEEN' || filters.date_category === 'NOT_BETWEEN'" class="mt-2">
+					<input name="date_value_2" v-model="filters.date_value_2" type="date" class="form-control input-sm"/>
 				</div>
 			</div>
 		</div>
@@ -76,8 +69,8 @@
 		<div class="form-group">
 			<label>&nbsp;</label>
 			<div class="d-flex">
-				<button type="submit" v-on:click.prevent="doSubmit()" class="w-50 btn btn-primary btn-sm mr-2">Apply</button>
-				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.supply_orders')}}')" class="w-50 btn btn-danger btn-sm text-white">Clear</a>
+				<button type="submit" v-on:click.prevent="doSubmit()" class="btn btn-primary btn-sm mr-2"><i class="fas fa-filter"></i> Filter</button>
+				<a href="#" v-on:click.prevent="fastLoad('{{route('mcp.supply_orders')}}')" class="btn btn-link btn-sm text-danger">Clear Filters</a>
 			</div>
 		</div>
 	</div>

+ 3 - 3
resources/views/app/new-patient.blade.php

@@ -217,9 +217,9 @@
                 					</div>
                 				</div>
                         <div class="mb-1" v-if="planType == 'COMMERCIAL'">
-                					<p>Does the patient also have either a Medicare or Medicaid #? (optional)</p>
+                					<h6 class="font-weight-bold">Does the patient also have either a Medicare or Medicaid #? (optional)</h6>
                 				</div>
-                        <div class="row" v-if="planType == 'MEDICAID' || planType == 'COMMERCIAL'">
+                        <div class="row" v-if="planType == 'MEDICAID' || planType == 'COMMERCIAL'" :class="planType == 'COMMERCIAL' ? 'mx-0' : ''">
                 					<div class="col-md-12 bg-light p-3 mb-2">
                 						<h5 class="m-0 font-weight-bold">Medicaid Information:</h5>
                 					</div>
@@ -293,7 +293,7 @@
                 					</div>
                 				</div>
 
-                				<div class="row" v-if="planType == 'MEDICARE' || planType == 'COMMERCIAL'">
+                				<div class="row" v-if="planType == 'MEDICARE' || planType == 'COMMERCIAL'" :class="planType == 'COMMERCIAL' ? 'mx-0' : ''">
                 					<div class="col-md-12 bg-light p-3 mb-2">
                 						<h5 class="m-0 font-weight-bold">Medicare Information:</h5>
                 					</div>

+ 3 - 2
resources/views/app/patient/accounts.blade.php

@@ -161,7 +161,7 @@
                         </td>
                         <td class="px-2">
                             <div class="d-flex">
-                                @if($accountInvite->status !== 'CANCELLED')
+                                @if($accountInvite->status !== 'PENDING')
                                     <span moe class="ml-1" relative>
                                         <a class="" href="" show start>Cancel</a>
                                         <form url="/api/accountInvite/markAsCancelled" right>
@@ -173,7 +173,8 @@
                                             </div>
                                         </form>
                                     </span>
-                                @else
+                                @endif
+                                @if($accountInvite->status == 'CANCELLED')
                                     <span moe class="ml-1" relative>
                                         <a class="" href="" show start>Undo Cancel</a>
                                         <form url="/api/accountInvite/undoMarkAsCancelled" right>

+ 421 - 0
resources/views/app/patient/canvas-migrate.blade.php

@@ -0,0 +1,421 @@
+@extends ('layouts.patient')
+
+@section('inner-content')
+    <?php
+    $shortCutsObject = [];
+    foreach ($pro->allShortcuts() as $shortcut) {
+
+        // %replaceables%
+        $shortcut->text = str_replace("%AGE%", $patient->age_in_years, $shortcut->text);
+        $shortcut->text = str_replace("%GENDER%", $patient->sex, $shortcut->text);
+        $shortcut->text = str_replace("%NAME%", $patient->displayName(), $shortcut->text);
+
+        $shortCutsObject[] = [
+            "name" => $shortcut->shortcut,
+            "value" => $shortcut->text
+        ];
+    }
+    ?>
+    <script>window.userShortcuts = <?= json_encode($shortCutsObject); ?>;</script>
+    <link href="/select2/select2.min.css" rel="stylesheet" />
+    <script src="/select2/select2.min.js"></script>
+    <div>
+
+        {{-- CARE PLAN START --}}
+        <?php $infoLines = json_decode($patient->info_lines);?>
+        <?php $infoLines = !$infoLines ? [] : $infoLines; ?>
+        <?php $vitalLabels = ['Ht. (in.)','Wt. (lbs.)','Temp. (F)','Pulse','Resp.','Pulse Ox.','SBP','DBP','Smoking Status', 'BMI']; ?>
+        <?php $isOldClient = (date_diff(date_create(config('app.point_impl_date')), date_create($patient->created_at))->invert === 1); ?>
+
+	    <div class="row client-single-dashboard">
+            <div class="col-6">
+
+                {{-- canvas based allergies --}}
+                @if($isOldClient)
+                <div class="pt-2 mt-2 border-top">
+                    <div class="d-flex align-items-center pb-2">
+                        <h6 class="my-0 font-weight-bold text-secondary">Allergies</h6>
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                    </div>
+                    <div class="bg-light border p-2 mb-3">
+                        @include('app.patient.canvas-sections.allergies.summary')
+                    </div>
+                </div>
+                @endif
+
+                {{-- canvas based dx --}}
+                @if($isOldClient)
+                    <div class="pt-2 mt-2 border-top">
+                        <div class="d-flex align-items-center pb-2">
+                            <h6 class="my-0 font-weight-bold text-secondary">Current Problems / Focus Areas</h6>
+                            <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                        </div>
+                        <div class="bg-light border p-2 mb-3">
+                            @include('app.patient.canvas-sections.dx.summary')
+                        </div>
+                    </div>
+                @endif
+
+
+
+                {{-- canvas based rx --}}
+                @if($isOldClient)
+                <div class="pt-2 mt-2 border-top">
+                    <div class="d-flex align-items-center pb-2">
+                        <h6 class="my-0 font-weight-bold text-secondary">Current Medications</h6>
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                    </div>
+                    <div class="bg-light border p-2 mb-3">
+                        @include('app.patient.canvas-sections.rx.summary')
+                    </div>
+                </div>
+                @endif
+
+                {{-- canvas based careteam --}}
+                @if($isOldClient)
+                    <div class="pt-2 mt-2 border-top">
+                        <div class="d-flex align-items-center pb-2">
+                            <h6 class="my-0 font-weight-bold text-secondary">Care Team</h6>
+                            <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                        </div>
+                        <div class="bg-light border p-2 mb-3">
+                            @include('app.patient.canvas-sections.care-team.summary')
+                        </div>
+                    </div>
+                @endif
+
+                {{-- history_medical --}}
+                @if($isOldClient)
+                    <div class="pt-2 mt-2 border-top">
+                        <div class="d-flex align-items-center pb-2">
+                            <h6 class="my-0 font-weight-bold text-secondary">Medical History</h6>
+                            <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                        </div>
+                        <div class="bg-light border p-2 mb-3">
+                            @include('app.patient.canvas-sections.pmhx.summary')
+                        </div>
+                    </div>
+                @endif
+
+                {{-- history_surgical --}}
+                @if($isOldClient)
+                    <div class="mt-2 border-top pt-2">
+                        <div class="d-flex align-items-center pb-2">
+                            <h6 class="my-0 font-weight-bold text-secondary">Surgical History</h6>
+                            <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                        </div>
+                        <div class="bg-light border p-2 mb-3">
+                            @include('app.patient.canvas-sections.pshx.summary')
+                        </div>
+                    </div>
+                @endif
+
+                {{-- history_family --}}
+                @if($isOldClient)
+                    <div class="mt-2 border-top pt-2">
+                        <div class="d-flex align-items-center pb-2">
+                            <h6 class="my-0 font-weight-bold text-secondary">Family History</h6>
+                            <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                        </div>
+                        <div class="bg-light border p-2 mb-3">
+                            @include('app.patient.canvas-sections.fhx.summary')
+                        </div>
+                    </div>
+                @endif
+
+                {{-- history_social --}}
+                @if($isOldClient)
+                    <div class="mt-2 border-top pt-2">
+                        <div class="d-flex align-items-center pb-2">
+                            <h6 class="my-0 font-weight-bold text-secondary">Social History</h6>
+                            <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                        </div>
+                        <div class="bg-light border p-2 mb-3">
+                            @include('app.patient.canvas-sections.sochx.summary')
+                        </div>
+                    </div>
+                @endif
+
+
+                {{-- vitals --}}
+                {{--@include('app/patient/partials/vitals')--}}
+
+                {{-- canvas based vitals --}}
+                @if($isOldClient)
+                <div class="pt-2 border-top">
+                    <div class="d-flex align-items-center pb-2">
+                        <h6 class="my-0 font-weight-bold text-secondary">Vitals</h6>
+                        <div class="px-2 font-weight-bold alert alert-warning text-sm my-0 ml-2 py-1">Deprecated</div>
+                    </div>
+                    <div class="bg-light border p-2 mb-3">
+                        @include('app.patient.canvas-sections.vitals.summary')
+                    </div>
+                </div>
+                @endif
+
+            </div>
+            <div class="col-6">
+
+                <!-- allergies - point -->
+                @include('app.patient.point-based-partials.allergies')
+
+
+                <!-- probs - point -->
+                @include('app.patient.point-based-partials.dx')
+
+                <!-- meds - point -->
+                @include('app.patient.point-based-partials.rx')
+
+
+                <!-- careteam - point -->
+                @include('app.patient.point-based-partials.care-team')
+
+
+                <!-- pmhx - point -->
+                @include('app.patient.point-based-partials.pmhx')
+
+                <!-- pshx - point -->
+                @include('app.patient.point-based-partials.shx')
+
+                <!-- fhx - point -->
+                @include('app.patient.point-based-partials.fhx')
+
+
+                <!-- sochx - point -->
+                @include('app.patient.point-based-partials.sochx')
+
+                <!-- vitals - point -->
+                <?php $latestVitals = \App\Models\Point::where('client_id', $patient->id)->where('category', 'VITALS')->orderBy('id', 'DESC')->first(); ?>
+                <div class="pt-2 mt-2">
+                    <div class="d-flex align-items-center pb-2">
+                        <h6 class="my-0 font-weight-bold text-secondary">Vitals
+                            @if(!!$latestVitals && $latestVitals->note && $latestVitals->note->effective_dateest)
+                                <span class="text-secondary font-weight-normal pl-1">(as on
+                                    <a href="{{route('patients.view.notes.view.dashboard', ['patient' => $patient, 'note' => $latestVitals->note])}}">{{friendlier_date($latestVitals->note->effective_dateest)}}</a>)
+                                </span>
+                            @endif
+                        </h6>
+                        @if($isOldClient)
+                            <div class="px-2 font-weight-bold alert alert-info text-sm my-0 ml-2 py-1">New</div>
+                        @endif
+                    </div>
+                    <div class="bg-light border p-2 mb-3">
+                        @if(!!$latestVitals)
+                            @include('app.patient.partials.latest-vitals', ['patient' => $patient, 'point' => $latestVitals])
+                        @else
+                            <div class="text-secondary">Nothing here yet</div>
+                        @endif
+                    </div>
+                </div>
+
+
+            </div>
+        </div>
+        <?php /* <div class="row my-3">
+            <div class="col-12">
+                {{-- erx --}}
+                <div  class="mb-2 pt-3 pb-2 border-top">
+                    <style>
+                        td.fit {
+                            width:1%;
+                            white-space:nowrap;
+                        }
+                    </style>
+                    <div class="d-flex align-items-center pb-2">
+                        <h6 class="my-0 font-weight-bold text-secondary">ERx</h6>
+                        <span class="mx-2 text-secondary">|</span>
+                        <div moe>
+                            <a start show class="py-0 font-weight-normal">Add</a>
+                            <form url="/api/actionItem/create" wide>
+                                <input type="hidden" name="clientUid" value="{{ $patient->uid }}">
+                                <input type="hidden" name="prescriberProUid" value="{{ $pro->uid }}">
+                                <input type="hidden" name="category" value="DRUG">
+                                <div class="mb-2">
+                                    <label for="" class="control-label text-sm text-secondary mb-1">Pharmacy</label>
+                                    <select name="toFacilityUid"
+                                            class="form-control form-control-sm">
+                                        <option value="">-- Pharmacy --</option>
+                                        @foreach ($facilities as $facility)
+                                            <option value="{{$facility->uid}}">{{$facility->name}}</option>
+                                        @endforeach
+                                    </select>
+                                </div>
+                                <div class="mb-2">
+                                    <input type="text" class="form-control form-control-sm" name="contentText" value="" placeholder="Title *" required>
+                                </div>
+                                <div class="mb-2">
+                                    <input type="text" class="form-control form-control-sm" name="contentDetail" value="" placeholder="Directions">
+                                </div>
+                                <div class="d-flex align-items-center">
+                                    <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
+                                    <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                </div>
+                            </form>
+                        </div>
+                    </div>
+                    <table class="table table-sm table-bordered mb-0" style="table-layout: fixed">
+                        <thead>
+                        <tr>
+                            <th class="px-2 text-secondary border-bottom-0 w-25">Prescription</th>
+                            <th class="px-2 text-secondary border-bottom-0 fit">Created</th>
+                            <th class="px-2 text-secondary border-bottom-0 fit">Status</th>
+                            <th class="px-2 text-secondary border-bottom-0 fit">Pharmacy</th>
+                            <th class="px-2 text-secondary border-bottom-0">&nbsp;</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <?php $prevItemType = false; ?>
+                        @foreach($patient->actionItems as $item)
+                            @if($item->action_item_category === 'DRUG')
+                                <tr>
+                                    <td class="px-2">
+                                        {{$item->content_text}}
+                                        <span moe>
+                                        <a start show class="on-hover-opaque"><i class="fa fa-edit"></i></a>
+                                        <form url="/api/actionItem/updateContent" wide>
+                                            <input type="hidden" name="uid" value="{{ $item->uid }}">
+                                            <div class="mb-2">
+                                                <input type="text" class="form-control form-control-sm" name="contentText" value="{{ $item->content_text }}" placeholder="Title *" required>
+                                            </div>
+                                            <div class="mb-2">
+                                                <input type="text" class="form-control form-control-sm" name="contentDetail" value="{{ $item->content_detail }}" placeholder="Details">
+                                            </div>
+                                            <div class="d-flex align-items-center">
+                                                <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
+                                                <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                            </div>
+                                        </form>
+                                    </span>
+                                        <div class="text-sm text-secondary">{{$item->content_detail}}</div>
+                                    </td>
+                                    <td class="px-2">{{friendly_date_time($item->created_at, false)}}</td>
+                                    <td class="px-2">
+                                        {{ucwords($item->status_category)}}
+                                        <span moe>
+                                        <a start show class="on-hover-opaque"><i class="fa fa-edit"></i></a>
+                                        <form url="/api/actionItem/updateStatus">
+                                            <input type="hidden" name="uid" value="{{ $item->uid }}">
+                                            <div class="mb-2">
+                                                <label for="" class="control-label text-sm text-secondary mb-1">Status *</label>
+                                                <select name="statusCategory" class="form-control form-control-sm" required>
+                                                    <option {{ $item->status_category === 'OPEN' ? 'selected' : '' }} value="OPEN">Open</option>
+                                                    <option {{ $item->status_category === 'CLOSED' ? 'selected' : '' }} value="CLOSED">Closed</option>
+                                                </select>
+                                            </div>
+                                            <div class="mb-2">
+                                                <input type="text" class="form-control form-control-sm" name="statusMemo" value="" placeholder="Memo">
+                                            </div>
+                                            <div class="d-flex align-items-center">
+                                                <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
+                                                <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                            </div>
+                                        </form>
+                                    </span>
+                                    </td>
+                                    <td class="px-2">
+                                        {{$item->facility ? $item->facility->name : ''}}
+                                        <span moe>
+                                        <a start show class="on-hover-opaque"><i class="fa fa-edit"></i></a>
+                                        <form url="/api/actionItem/updateToFacility">
+                                            <input type="hidden" name="uid" value="{{ $item->uid }}">
+                                            <div class="mb-2">
+                                                <label for="" class="control-label text-sm text-secondary mb-1">Pharmacy *</label>
+                                                <select name="toFacilityUid" class="form-control form-control-sm" required>
+                                                    <option value="">-- Pharmacy --</option>
+                                                    @foreach ($facilities as $facility)
+                                                        <option {{ $item->to_facility_id === $facility->id ? 'selected' : '' }} value="{{$facility->uid}}">{{$facility->name}}</option>
+                                                    @endforeach
+                                                </select>
+                                            </div>
+                                            <div class="d-flex align-items-center">
+                                                <button class="btn btn-sm btn-primary mr-2" submit>Save</button>
+                                                <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                            </div>
+                                        </form>
+                                    </span>
+                                    </td>
+                                    <td class="px-2 text-center">
+                                        <div class="d-flex align-items-center justify-content-start">
+                                            @if($item->is_signed_by_prescriber)
+                                                <span class="text-secondary">
+                                            <i class="fa fa-check"></i>
+                                            Signed
+                                        </span>
+                                                <span class="mx-2 text-secondary">|</span>
+                                            @else
+                                                @if($pro->id === $item->prescriber_pro_id)
+                                                    <span moe relative>
+                                                <a start show>Sign</a>
+                                                <form url="/api/actionItem/signAsPrescriber" right>
+                                                    <input type="hidden" name="uid" value="{{ $item->uid }}">
+                                                    <p class="small min-width-200px text-left">Sign this action items as the prescriber?</p>
+                                                    <div class="d-flex align-items-center">
+                                                        <button class="btn btn-sm btn-success mr-2" submit>Yes</button>
+                                                        <button class="btn btn-sm btn-default mr-2 border" cancel>No</button>
+                                                    </div>
+                                                </form>
+                                            </span>
+                                                    <span class="mx-2 text-secondary">|</span>
+                                                @endif
+                                            @endif
+                                            <span moe relative>
+                                        <a start show>eFax</a>
+                                        <form url="/api/actionItem/efax" right>
+                                            <input type="hidden" name="uid" value="{{ $item->uid }}">
+                                            <div class="mb-2">
+                                                <input type="text" class="form-control form-control-sm" name="toFaxNumber" value="" placeholder="To Number *" required>
+                                            </div>
+                                            <div class="d-flex align-items-center">
+                                                <button class="btn btn-sm btn-primary mr-2" submit>Send</button>
+                                                <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
+                                            </div>
+                                        </form>
+                                    </span>
+                                        </div>
+                                    </td>
+                                </tr>
+                            @endif
+                        @endforeach
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div> */ ?>
+
+    </div>
+    <script>
+        (function() {
+            function init() {
+                $('select[name="deviceUid"]').select2({
+                    width: '100%'
+                });
+
+                // refresh once ticket popup is closed
+                $('body').off('stag-popup-closed')
+                /*$('body').on('stag-popup-closed', function() {
+                    if($('#client-rx-container').length) {
+                        fastReload();
+                    }
+                });*/
+                // ticket-popup
+                $(document)
+                    .off('click', '.ticket-popup-trigger')
+                    .on('click', '.ticket-popup-trigger', function() {
+                        showMask();
+                        window.noMc = true;
+                        $.get(this.href, (_data) => {
+                            $('.ticket-popup').html(_data);
+                            showStagPopup('ticket-popup', true);
+                            // $('.ticket-popup .stag-popup.stag-slide').attr('close-all-with-self', 1);
+                            runMCInitializer('patient-tickets'); // run specific mc initer
+                            hideMask();
+                        });
+                        return false;
+                    });
+
+            }
+            addMCInitializer('patient-dashboard-devices', init, '#patient-dashboard-devices');
+
+        }).call(window);
+    </script>
+@endsection

+ 11 - 0
resources/views/app/patient/canvas_dump.blade.php

@@ -0,0 +1,11 @@
+@extends ('layouts.patient')
+@section('inner-content')
+<div>
+    @php
+        $canvasDataJson = $patient->canvas_data ?? '[]';
+        $canvasData = json_decode($canvasDataJson);
+        dump($canvasData);
+    @endphp
+    {{$patient->canvas_data}}
+</div>
+@endsection

+ 2 - 2
resources/views/app/patient/care-month/dashboard.blade.php

@@ -1657,7 +1657,7 @@
                                             @if($bill->is_cancelled && !$bill->is_cancellation_acknowledged)
                                                 <div class="mt-2 text-secondary">
                                                     <i class="fa fa-exclamation-triangle"></i>
-                                                    Not Acknowledged
+                                                    Not Ack.
                                                 </div>
                                                 <div class="d-block mt-1" moe>
                                                     <a class="" href="" show start>Ack. Cancellation</a>
@@ -1676,7 +1676,7 @@
                                             @if($bill->is_cancellation_acknowledged && !$careMonth->is_billing_marked_done)
                                                 <div class="mt-2 text-secondary">
                                                     <i class="fa fa-check"></i>
-                                                    Acknowledged
+                                                    Ack.
                                                 </div>
                                                 <div class="d-block mt-1" moe>
                                                     <a class="" href="" show start>Undo Cancellation Ack.</a>

+ 16 - 16
resources/views/app/patient/measurements.blade.php

@@ -47,23 +47,23 @@
                         </div>
                     </form>
                 </div>
-                @if($performer->pro->pro_type == 'ADMIN')
-                <span class="mx-2 text-secondary">|</span>
-                <div moe>
-                    <a start show class="py-0 font-weight-normal">Process Client BDT Measurements Report</a>
-                    <form url="/api/clientBdtReport/processClientBdtReport">
-                        <input type="hidden" name="uid" value="{{ $patient->uid }}">
-                        <div class="mb-2">
-                            <label for="" class="control-label">Process client bd measurements report?</label>
-                        </div>
+{{--                @if($performer->pro->pro_type == 'ADMIN')--}}
+{{--                <span class="mx-2 text-secondary">|</span>--}}
+{{--                <div moe>--}}
+{{--                    <a start show class="py-0 font-weight-normal">Process Client BDT Measurements Report</a>--}}
+{{--                    <form url="/api/clientBdtReport/processClientBdtReport">--}}
+{{--                        <input type="hidden" name="uid" value="{{ $patient->uid }}">--}}
+{{--                        <div class="mb-2">--}}
+{{--                            <label for="" class="control-label">Process client bd measurements report?</label>--}}
+{{--                        </div>--}}
 
-                        <div class="d-flex align-items-center">
-                            <button class="btn btn-sm btn-primary mr-2" submit>Yes</button>
-                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>
-                        </div>
-                    </form>
-                </div>
-                @endif
+{{--                        <div class="d-flex align-items-center">--}}
+{{--                            <button class="btn btn-sm btn-primary mr-2" submit>Yes</button>--}}
+{{--                            <button class="btn btn-sm btn-default mr-2 border" cancel>Cancel</button>--}}
+{{--                        </div>--}}
+{{--                    </form>--}}
+{{--                </div>--}}
+{{--                @endif--}}
             </div>
             <table class="table table-striped table-sm table-bordered mt-2 mb-0">
                 <thead>

+ 2 - 2
resources/views/app/patient/note/dashboard-univ.blade.php

@@ -1359,7 +1359,7 @@
                                                         @if($bill->is_cancelled && !$bill->is_cancellation_acknowledged)
                                                             <div class="mt-2 text-secondary">
                                                                 <i class="fa fa-exclamation-triangle"></i>
-                                                                Not Acknowledged
+                                                                Not Ack.
                                                             </div>
                                                             <div class="d-block mt-1" moe>
                                                                 <a class="" href="" show start>Ack. Cancellation</a>
@@ -1378,7 +1378,7 @@
                                                         @if($bill->is_cancellation_acknowledged && !$note->is_billing_marked_done)
                                                             <div class="mt-2 text-secondary">
                                                                 <i class="fa fa-check"></i>
-                                                                Acknowledged
+                                                                Ack.
                                                             </div>
                                                             <div class="d-block mt-1" moe>
                                                                 <a class="" href="" show start>Undo Cancellation Ack.</a>

+ 7 - 4
resources/views/app/patient/note/dashboard.blade.php

@@ -28,6 +28,9 @@
 
     $visitLayoutPath = '';
     $doesVisitTemplateLayoutExist = false;
+    $visitLayoutPath = $note->visitTemplate? "app.patient.note.visit-template-ui-layouts.{$note->visitTemplate->internal_name}" : null;
+
+    $doesVisitTemplateLayoutExist = $isVisitTemplateBased && \Illuminate\Support\Facades\View::exists($visitLayoutPath);
 
     if($isVisitTemplateBased) {
         $visitLayoutPath = "app.patient.note.visit-template-ui-layouts.{$note->visitTemplate->internal_name}";
@@ -1474,7 +1477,7 @@
                                     @if($bill->is_cancelled && !$bill->is_cancellation_acknowledged)
                                         <div class="mt-2 text-secondary">
                                             <i class="fa fa-exclamation-triangle"></i>
-                                            Not Acknowledged
+                                            Not Ack.
                                         </div>
                                         <div class="d-block mt-1" moe>
                                             <a class="" href="" show start>Ack. Cancellation</a>
@@ -1494,7 +1497,7 @@
                                     @if($bill->is_cancellation_acknowledged && !$note->is_billing_marked_done)
                                         <div class="mt-2 text-secondary">
                                             <i class="fa fa-check"></i>
-                                            Acknowledged
+                                            Ack.
                                         </div>
                                         <div class="d-block mt-1" moe>
                                             <a class="" href="" show start>Undo Cancellation Ack.</a>
@@ -1765,7 +1768,7 @@
                                             @if($bill->is_cancelled && !$bill->is_cancellation_acknowledged)
                                                 <div class="ml-2 text-secondary">
                                                     <i class="fa fa-exclamation-triangle"></i>
-                                                    Not Acknowledged
+                                                    Not Ack.
                                                 </div>
                                                 <div class="d-block ml-2" moe>
                                                     <a class="" href="" show start>Ack. Cancellation</a>
@@ -1785,7 +1788,7 @@
                                             @if($bill->is_cancellation_acknowledged && !$note->is_billing_marked_done)
                                                 <div class="ml-2 text-secondary">
                                                     <i class="fa fa-check"></i>
-                                                    Acknowledged
+                                                    Ack.
                                                 </div>
                                                 <div class="d-block ml-2" moe>
                                                     <a class="" href="" show start>Undo</a>

+ 3 - 1
resources/views/app/patient/partials/appointment-confirmation.blade.php

@@ -46,9 +46,11 @@
                     Request Pending
                 </div>
             @endif
+            @if($appointment->status !== 'COMPLETED' && $appointment->status !== 'CONFIRMED' && $appointment->status !== 'CANCELLED')
             <div>
-                @include('app.patient.partials.appointment-request-confirmation', ['label' => 'Re-request Confirmation'])
+              @include('app.patient.partials.appointment-request-confirmation', ['label' => 'Re-request Confirmation'])
             </div>
+            @endif
         @endif
     </div>
     @if($appointment->latest_confirmation_request_at || $appointment->latest_confirmation_decision_at)

+ 1 - 1
resources/views/app/patient/sms.blade.php

@@ -46,7 +46,7 @@
                     <td class="px-2">{{ $sms->to_number }}</td>
                     <td class="px-2">{{ $sms->body }}</td>
                     <td class="px-2">
-                        @if($sms->is_reply_needed)
+                        @if($sms->is_reply_needed == 'YES')
                             <div moe relative>
                                 <a start show class="">clear</a>
                                 <form url="/api/clientSms/updateIsReplyNeeded" class="mcp-theme-1" right>

+ 1 - 1
resources/views/app/patient/supply-orders.blade.php

@@ -481,7 +481,7 @@
                         @else
                             <div class="text-secondary font-weight-bold mt-1">
                                 <i class="fa fa-check"></i>
-                                Cancellation Acknowledged
+                                Cancellation Ack.
                             </div>
                             @if($supplyOrder->cancellation_acknowledgement_memo)
                                 <div class="text-sm text-secondary font-italic mt-1">{{$supplyOrder->cancellation_acknowledgement_memo}}</div>

+ 3 - 1
resources/views/app/patient/vitals-settings/bmi-management-summary.blade.php

@@ -21,7 +21,6 @@
 <div class="mb-1">
     <span class="text-secondary">Weight (ideal):</span>
     <b><?= vsValue('ideal_weight_in_pounds', $patient) ?></b>
-    <span class="text-secondary">(range <?= vsValue('ideal_weight_in_pounds_min', $patient) ?> to <?= vsValue('ideal_weight_in_pounds_max', $patient) ?>)</span>
 </div>
 
 <div class="mb-3 ml-3">
@@ -38,6 +37,9 @@
     <span class="text-secondary">Remarks:</span>
     <span>___</span>
 </div>-->
+{{--usual_bmi_min_category;--}}
+{{--usual_bmi_max_category;--}}
+{{--ideal_bmi_category;--}}
 
 <div class="mb-3">
     <span class="text-secondary">CHF?:</span>

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

@@ -179,7 +179,7 @@
                             @endif
                             <?php $coverage = $patient->getPrimaryCoverage(); ?>
                             @if($coverage)
-                                {{$coverage->toString()}}
+                                {{$coverage->insuranceDisplayName()}}
                             @endif
                             @include('app.patient.coverage-status')
                         </td>

+ 2 - 2
resources/views/app/practice-management/bill-matrix.blade.php

@@ -311,7 +311,7 @@
                             @if($bill->is_cancelled && !$bill->is_cancellation_acknowledged)
                                 <div class="mt-2 text-secondary">
                                     <i class="fa fa-exclamation-triangle"></i>
-                                    Not Acknowledged
+                                    Not Ack.
                                 </div>
                                 <div class="d-block mt-1" moe>
                                     <a class="" href="" show start>Ack. Cancellation</a>
@@ -330,7 +330,7 @@
                             @if($bill->is_cancellation_acknowledged)
                                 <div class="mt-2 text-secondary">
                                     <i class="fa fa-check"></i>
-                                    Acknowledged
+                                    Ack.
                                 </div>
                                 <div class="d-block mt-1" moe>
                                     <a class="" href="" show start>Undo Cancellation Ack.</a>

+ 1 - 1
resources/views/app/practice-management/cellular-device-manager.blade.php

@@ -74,7 +74,7 @@
                                 @endif
                                 <?php $coverage = $client->getPrimaryCoverage(); ?>
                                 @if($coverage)
-                                    {{$coverage->toString()}}
+                                    {{$coverage->insuranceDisplayName()}}
                                 @endif
                             </td>
 

+ 1 - 1
resources/views/app/practice-management/patient-claim-summary.blade.php

@@ -170,7 +170,7 @@
                                 @endif
                                 <?php $coverage = $patient->getPrimaryCoverage(); ?>
                                 @if($coverage)
-                                    {{$coverage->toString()}}
+                                    {{$coverage->insuranceDisplayName()}}
                                 @endif
                             </td>
                             <td>{{$patient->notes_without_billing_closed}}</td>

+ 118 - 12
resources/views/app/practice-management/remote-monitoring-report.blade.php

@@ -5,41 +5,147 @@
         <div class="card">
             <div class="card-header p-3 d-flex align-items-center">
                 <strong class="mr-4">
-                    <i class="fas fa-user"></i>
+                    <i class="fas fa-chart-bar"></i>
                     Remote Monitoring Report
                 </strong>
             </div>
+
             <div class="card-body p-0">
+                <div class="d-flex flex-row">
+                    <div class="ml-2 mt-2">
+                        <div>Patient</div>
+                        <input type="text"  class="form-control input-sm" name="patient">
+                    </div>
+                    <div class="ml-2 mt-2">
+                        <div>HCP</div>
+                        <input type="text"  class="form-control input-sm" name="hcp">
+                    </div>
+                    <div class="ml-2 mt-2">
+                        <div>Care Month Start Date</div>
+                        <select name="" id="" class="form-control input-sm mb-2">
+                            <option>all</option>
+                            <option>on</option>
+                            <option>on-or-before</option>
+                            <option>on-or-after</option>
+                            <option>between</option>
+                            <option>not-on</option>
+                            <option>not-in-between</option>
+                        </select>
+                        <input type="date1" class="form-control input-sm mb-2">
+                        <input type="date1" class="form-control input-sm mb-2">
+                    </div>
+                    <div class="ml-2 mt-2">
+                        <div>Number Of Days With Measurements</div>
+                        <select name="" id="" class="form-control input-sm mb-2">
+                            <option>all</option>
+                            <option>less-than</option>
+                            <option>greater-than</option>
+                            <option>equal-to</option>
+                            <option>between</option>
+                            <option>not-equal-to</option>
+                            <option>not-in-between</option>
+                        </select>
+                        <input type="date1" class="form-control form-control input-sm mb-2">
+                        <input type="date1" class="form-control form-control input-sm mb-2">
+                    </div>
+                    <div class="ml-2 mt-2">
+                        <div>Most Recent Mcp Note Date</div>
+                        <select name="" id="" class="form-control  form-control input-sm mb-2">
+                            <option>all</option>
+                            <option>on</option>
+                            <option>on-or-before</option>
+                            <option>on-or-after</option>
+                            <option>between</option>
+                            <option>not-on</option>
+                            <option>not-in-between</option>
+                        </select>
+                        <input type="date1" class="form-control input-sm mb-2">
+                        <input type="date1" class="form-control input-sm mb-2">
+                    </div>
+                    <div class="ml-2 mt-2">
+                        <div>Days Between Most Recent Mcp Note Date And End Of Care Month</div>
+                        <select name="" id="" class="form-control input-sm mb-2">
+                            <option>all</option>
+                            <option>less-than</option>
+                            <option>greater-than</option>
+                            <option>equal-to</option>
+                            <option>between</option>
+                            <option>not-equal-to</option>
+                            <option>not-in-between</option>
+                        </select>
+                        <input type="date1" class="form-control  input-sm mb-2">
+                        <input type="date1" class="form-control  input-sm mb-2">
+                    </div>
+                    <div class="ml-2 mt-2">
+                        <button class="btn btn-primary"><i class="fa fa-filter"></i> Filter</button>
+                    </div>
+                </div>
                 <table class="table table-sm table-condensed p-0 m-0" style="table-layout: fixed">
                     <thead class="bg-light">
                         <tr>
-                            <th class="px-3 border-0">Patient</th>
+                            <th class="border-0">MCP</th>
+                            <th class="border-0">Patient</th>
                             <th class="border-0">Month/Year</th>
-                            <th class="border-0"># Days with Measurements</th>
-                            <th class="border-0">HCP</th>
+                            <th class="border-0"># Days w/ Meas.</th>
+                            <th class="border-0">Most Recent MCP Note</th>
+                            <th class="border-0">Days Between Note and EOM</th>
+                            <th class="border-0">RM Bill</th>
+                            <th class="border-0">Is Bill Closed</th>
+                            <th class="border-0">Bill Closed At</th>
+                            <th class="border-0">Is Claim Closed</th>
                         </tr>
                     </thead>
+
                     <tbody>
                         @foreach($rows as $row)
                             <tr>
                                 <td>
-                                    <a href="/patients/view/{{ $row->uid }}">
-                                        <b>{{ implode(", ", [$row->name_last, $row->name_first]) }}</b>
+                                    @if($row->mcp)
+                                        <b>{{ implode(", ", [$row->mcp->name_display]) }}</b>
+                                    @else
+                                        --
+                                    @endif
+                                </td>
+                                <td>
+                                    <a href="/patients/view/{{ $row->patient->uid }}">
+                                        <b>{{ implode(", ", [$row->patient->name_last,$row->patient->name_first]) }}</b>
                                     </a>
                                 </td>
                                 <td>
-                                        {{ $row->year_month }}
+                                    <a href="{{route('patients.view.care-months.view.dashboard', ['patient'=>$row->patient, 'careMonth'=>$row])}}">
+                                        {{ friendly_date_month_year($row->start_date) }}
+                                    </a>
                                 </td>
                                 <td>
-                                	{{ $row->num_of_days_with_measurement }}
-				</td>
-				<td>
-                                        <b>{{ implode(", ", [$row->mcp_pro_lname, $row->mcp_pro_fname]) }}</b>
-				</td>
+                                	{{ $row->number_of_days_with_remote_measurements }}
+				                </td>
+                                <td>
+                                    @if($row->mostRecentMcpNote)
+                                        <a href="{{route('patients.view.notes.view.dashboard',['patient'=>$row->patient, 'note'=>$row->mostRecentMcpNote])}}">
+                                            {{friendly_date($row->most_recent_mcp_note_date)}}
+                                        </a>
+                                    @else
+                                        --
+                                    @endif
+                                </td>
+                                <td>{{$row->days_between_most_recent_mcp_note_date_and_end_of_care_month}}</td>
+                                <td>
+                                    @if($row->rmBill)
+                                        <a href="{{route('patients.view.care-months.view.dashboard', ['patient'=>$row->patient, 'careMonth'=>$row])}}">{{ $row->rmBill->code  }}</a>
+                                    @else
+                                        --
+                                    @endif
+                                </td>
+                                <td>{{$row->is_bill_closed? 'Yes':'No'}}</td>
+                                <td>{{friendly_date_time($row->bill_closed_at)}}</td>
+                                <td>{{$row->is_claim_closed? 'Yes':'No'}}</td>
                             </tr>
                         @endforeach
                     </tbody>
                 </table>
+                <div>
+                    {{$rows->links()}}
+                </div>
             </div>
         </div>
     </div>

+ 2 - 8
resources/views/app/practice-management/remote-monitoring.blade.php

@@ -39,9 +39,7 @@
                         <th class="border-0">Relation</th>
                         <th class="border-0">Measurement Days</th>
                         <th class="border-0">Unstamped Measurements</th>
-                        @if(!$pro->is_hcp)
-                            <th class="border-0">Communicated With Patient</th>
-                        @endif
+                        
                         <th class="border-0">Phone</th>
                     </tr>
                     </thead>
@@ -99,11 +97,7 @@
                                        href="/remote-monitoring-measurements/{{$iPatient->care_month_uid}}">View</a>
                                 @endif
                             </td>
-                            @if(!$pro->is_hcp)
-                                <td class="">
-                                    {{$iPatient->has_non_hcp_communicated_to_patient_about_rm ? 'Yes' : 'No'}}
-                                </td>
-                            @endif
+
                             <td class="">
                                 {{$iPatient->cell_number}}
                             </td>

+ 29 - 11
resources/views/layouts/patient.blade.php

@@ -22,6 +22,16 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
 							<a class="nav-link {{ strpos($routeName, 'patients.view.dashboard') === 0 ? 'active' : '' }}"
 							   href="{{ route('patients.view.dashboard', ['patient' => $patient]) }}">Dashboard</a>
 						</li>
+                        @if($performer->pro->pro_type == 'ADMIN')
+                            <li class="nav-item">
+                                <a class="nav-link {{ strpos($routeName, 'patients.view.migrate-canvas') === 0 ? 'active' : '' }}"
+                                   href="{{ route('patients.view.migrate-canvas', ['patient' => $patient]) }}">Canvas Migrate</a>
+                            </li>
+                            <li class="nav-item">
+                                <a class="nav-link {{ strpos($routeName, 'patients.view.canvas') === 0 ? 'active' : '' }}"
+                                   href="{{ route('patients.view.canvas', ['patient' => $patient]) }}">Canvas</a>
+                            </li>
+                        @endif
 						<li class="nav-item">
 							<a class="nav-link {{ strpos($routeName, 'patients.view.calendar') === 0 ? 'active' : '' }}"
 							   href="{{ route('patients.view.calendar', ['patient' => $patient]) }}">Calendar</a>
@@ -308,7 +318,7 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
 					</div>
 				@endif
 				<div class="card {{$isVisitNote ? 'card m-0 border-0 rounded-0' : 'my-3'}}" id="patient-header">
-					<div class="card-header py-1 hide-inside-ticket-popup">
+					<div class="card-header @if($patient->client_engagement_status_category == 'DUMMY') alert-warning @endif py-1 hide-inside-ticket-popup">
 						<?php
 						$thumbnail = $patient->profile_picture_base64;
 						$initials = !$thumbnail ? substr($patient->name_first, 0, 1) . substr($patient->name_last, 0, 1) : '';
@@ -364,7 +374,12 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
 											<div>{{friendly_date_time($patient->dob, false,null, true)}}({{$patient->age_in_years}}
 												y.o {{$patient->sex}})
 											</div>
-
+											@if($patient->getPrimaryCoverage() &&  $patient->getPrimaryCoverageStatus() === 'YES')
+												<div class="text-nowrap">
+													<i class="fa fa-check-circle text-success" data-toggle="tooltip" data-placement="bottom" title="Covered"></i>
+													{{$patient->getPrimaryCoverage()->insuranceDisplayName()}}
+												</div>
+											@endif
 										</div>
 										<div class="screen-only">
 										<div class=separators>
@@ -534,7 +549,7 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
                       </div>
 											<div>
 												<label>Engagement Status:</label>
-												<b>{{$patient->client_engagement_status_category ? ucwords(strtolower(str_replace('_', ' ', $patient->client_engagement_status_category))) : '-'}}</b>
+												<b>{{$patient->client_engagement_status_category ? ucwords(strtolower(str_replace('_', ' ', $patient->client_engagement_status_category == 'DUMMY' ? 'Test Chart' : $patient->client_engagement_status_category))) : '-'}}</b>
 												<div moe class="ml-2 hide-inside-popup">
 													<a start show><i class="fa fa-edit"></i></a>
 													<form url="/api/client/updateClientEngagementAssessmentStatus" class="mcp-theme-1">
@@ -546,7 +561,7 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
 																<option {{ $patient->client_engagement_status_category === 'ACTIVE' ? 'selected' : '' }} value="ACTIVE">Active</option>
 																<option {{ $patient->client_engagement_status_category === 'INACTIVE' ? 'selected' : '' }} value="INACTIVE">Inactive</option>
 																<option {{ $patient->client_engagement_status_category === 'ENTRY_ERROR' ? 'selected' : '' }} value="ENTRY_ERROR">Entry Error</option>
-																<option {{ $patient->client_engagement_status_category === 'DUMMY' ? 'selected' : '' }} value="DUMMY">Dummy</option>
+																<option {{ $patient->client_engagement_status_category === 'DUMMY' ? 'selected' : '' }} value="DUMMY">Test Chart</option>
 																<option {{ $patient->client_engagement_status_category === 'DECEASED' ? 'selected' : '' }} value="DECEASED">Deceased</option>
 																<option {{ $patient->client_engagement_status_category === 'DUPLICATE' ? 'selected' : '' }} value="DUPLICATE">Duplicate</option>
 																<option {{ $patient->client_engagement_status_category === 'NO_LONGER_INTERESTED' ? 'selected' : '' }} value="NO_LONGER_INTERESTED">No Longer Interested</option>
@@ -703,8 +718,8 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
                                         </div>
                                         <div>
                                         <span moe relative class="">
-                                            <button class="col-2-button" start show title="SMS check-in link to the patient">Send&nbsp;<i
-                                                    class="on-hover-opaque fa fa-paper-plane text-secondary"></i></button>
+                                            <button class="col-2-button" start show title="SMS check-in link to the patient"><i
+                                                    class="on-hover-opaque fa fa-paper-plane text-secondary"></i>&nbsp;Send</button>
                                             <form url="/api/client/sendCheckInTokenViaSmsOrEmail" right
                                                   class="mcp-theme-1">
                                                 <input type="hidden" name="uid" value="{{ $patient->uid }}">
@@ -731,18 +746,21 @@ $isVisitNote = ($routeName === 'patients.view.notes.view.dashboard' && @$note &&
                                         </div>
 																				@if($performer->pro->pro_type == 'ADMIN')
 																				<div>
-																					<button class="col-2-button" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')">Check Video</button>
+																					<button class="col-2-button" onclick="return openInRHS('/pro/check-video/{{ $patient->uid }}')"><i
+																									class="on-hover-opaque fa fa-video text-secondary"></i>&nbsp;Check</button>
 																				</div>
 																				@endif
 																				<div>
-																					<button class="col-2-button" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')">Join Video</button>
+																					<button class="col-2-button" onclick="return openInRHS('/pro/meet/{{ $patient->uid }}')"><i
+																									class="on-hover-opaque fa fa-video text-secondary"></i>&nbsp;Join</button>
 																				</div>
                                     </section>
-
+									
+									@if(!$patient->getPrimaryCoverage() || $patient->getPrimaryCoverageStatus() !== 'YES')
 									<section class="hide-inside-popup screen-only vbox align-self-start mt-2 mx-2">
-										@include('app.patient.coverage-status')
+											@include('app.patient.coverage-status')										
 									</section>
-
+									@endif
 									<ul class="vbox mt-2 align-self-start patient-header-address">
 										<li class="d-flex align-items-start">
 											<span class="aligned-icon">

+ 4 - 2
routes/web.php

@@ -20,7 +20,6 @@ use Illuminate\Support\Facades\Route;
  * -> they are authenticated in... see the home dashboard... logout button to -> /login
  */
 
-
 Route::get('login', 'LoginController@showLoginForm')->name('login');
 Route::post('login', 'LoginController@login');
 Route::get('logout', 'LoginController@logout');
@@ -288,8 +287,11 @@ Route::middleware('pro.auth')->group(function () {
 
         Route::middleware('pro.auth.can-access-patient')->group(function () {
 
-            Route::get('intake', 'PatientController@intake')->name('intake');
             Route::get('', 'PatientController@dashboard')->name('dashboard');
+            Route::get('canvas-migrate', 'PatientController@canvasMigrate')->name('migrate-canvas');
+            Route::get('intake', 'PatientController@intake')->name('intake');
+            Route::get('canvas', 'PatientController@canvas')->name('canvas');
+            Route::get('intake', 'PatientController@intake')->name('intake');
             Route::get('care-plan', 'PatientController@carePlan')->name('care-plan');
             Route::get('medications', 'PatientController@medications')->name('medications');
             Route::get('dx-and-focus-areas', 'PatientController@dxAndFocusAreas')->name('dx-and-focus-areas');