|
@@ -2294,6 +2294,7 @@ SELECT client.name_first, client.name_last,
|
|
|
nv.raw_date as next_visit_date,
|
|
|
DATE_PART('day', NOW() - client.most_recent_cellular_measurement_at) as dslm,
|
|
|
care_month.uid as care_month_uid,
|
|
|
+ care_month.mcp_rm_generic_bill_id as care_month_mcp_rm_generic_bill_id,
|
|
|
care_month.id as care_month_id,
|
|
|
care_month.is_claim_closed,
|
|
|
care_month.start_date,
|
|
@@ -2382,7 +2383,15 @@ WHERE
|
|
|
|
|
|
// counts
|
|
|
$stats = [];
|
|
|
- $stats['totalPatients'] = $paginator->total();
|
|
|
+ $stats['totalPatients'] = 0;
|
|
|
+ $stats['withMeasOn'] = 0;
|
|
|
+ $stats['noMeasOn'] = 0;
|
|
|
+ $stats['gt16MD'] = 0;
|
|
|
+ $stats['gt20M'] = 0;
|
|
|
+ $stats['gt40M'] = 0;
|
|
|
+
|
|
|
+
|
|
|
+ /*$stats['totalPatients'] = $paginator->total();
|
|
|
$commonStatSQL = "
|
|
|
SELECT COUNT(*)
|
|
|
FROM care_month join client on care_month.client_id = client.id
|
|
@@ -2432,7 +2441,7 @@ EXISTS (SELECT 1 FROM measurement mstat WHERE mstat.care_month_id = care_month.i
|
|
|
" . (count($conditions) > 0 ? implode(" AND ", $conditions) : '1') . "
|
|
|
";
|
|
|
$statResult = DB::select($statQuery);
|
|
|
- $stats['gt40M'] = $statResult[0]->count;
|
|
|
+ $stats['gt40M'] = $statResult[0]->count;*/
|
|
|
|
|
|
if($request->get('ql')) dd(DB::getQueryLog());
|
|
|
|