|
@@ -438,6 +438,34 @@ class McpController extends Controller
|
|
];
|
|
];
|
|
return view('app.mcp.unsigned_incoming_reports', $data);
|
|
return view('app.mcp.unsigned_incoming_reports', $data);
|
|
}
|
|
}
|
|
|
|
+ public function patients_awaiting_rpm_interaction(Request $request) {
|
|
|
|
+ $cmStartDate = date('Y-m-01');
|
|
|
|
+ $query = "
|
|
|
|
+SELECT
|
|
|
|
+ client.uid as client_uid,
|
|
|
|
+ care_month.uid as care_month_uid,
|
|
|
|
+ (client.name_first || ' ' || client.name_last) as client_name,
|
|
|
|
+ client.age_in_years,
|
|
|
|
+ client.sex,
|
|
|
|
+ care_month.start_date,
|
|
|
|
+ care_month.number_of_days_with_remote_measurements
|
|
|
|
+FROM
|
|
|
|
+ client join care_month on client.id = care_month.client_id
|
|
|
|
+WHERE
|
|
|
|
+ care_month.start_date = '{$cmStartDate}'
|
|
|
|
+ AND client.is_enrolled_in_rm = 'YES'
|
|
|
|
+ AND care_month.has_mcp_interacted_with_client_about_rm IS NOT TRUE
|
|
|
|
+ AND care_month.mcp_pro_id = {$this->performer->pro->id}
|
|
|
|
+ AND (client.client_engagement_status_category IS NULL OR client.client_engagement_status_category != 'DUMMY')
|
|
|
|
+ AND client.name_first NOT ILIKE '%test%'
|
|
|
|
+ AND client.name_last NOT ILIKE '%test%'
|
|
|
|
+ORDER BY care_month.number_of_days_with_remote_measurements DESC NULLS LAST
|
|
|
|
+ ";
|
|
|
|
+ $data = [
|
|
|
|
+ 'records' => DB::select($query)
|
|
|
|
+ ];
|
|
|
|
+ return view('app.mcp.patients_awaiting_rpm_interaction', $data);
|
|
|
|
+ }
|
|
public function measurements_pending_stamping(Request $request){
|
|
public function measurements_pending_stamping(Request $request){
|
|
$data = [
|
|
$data = [
|
|
'records' => CareMonth::where('mcp_pro_id', $this->performer->pro->id)
|
|
'records' => CareMonth::where('mcp_pro_id', $this->performer->pro->id)
|