|
@@ -444,8 +444,8 @@ WHERE
|
|
SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
|
|
SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
|
|
WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$performer->pro->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}))
|
|
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())') . "
|
|
|
|
- AND EXTRACT(YEAR from care_month.start_date) = " . ($request->input('y') ?: 'EXTRACT(YEAR from now())') . "
|
|
|
|
|
|
+ AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
|
|
|
|
+ AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
|
|
AND (care_month.number_of_days_with_remote_measurements < 16 OR care_month.number_of_days_with_remote_measurements IS NULL)
|
|
AND (care_month.number_of_days_with_remote_measurements < 16 OR care_month.number_of_days_with_remote_measurements IS NULL)
|
|
"
|
|
"
|
|
)
|
|
)
|
|
@@ -458,8 +458,8 @@ WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$per
|
|
SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
|
|
SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
|
|
WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$performer->pro->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}))
|
|
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())') . "
|
|
|
|
- AND EXTRACT(YEAR from care_month.start_date) = " . ($request->input('y') ?: 'EXTRACT(YEAR from now())') . "
|
|
|
|
|
|
+ AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
|
|
|
|
+ AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
|
|
AND (care_month.number_of_days_with_remote_measurements >= 16 AND care_month.number_of_days_with_remote_measurements IS NOT NULL)
|
|
AND (care_month.number_of_days_with_remote_measurements >= 16 AND care_month.number_of_days_with_remote_measurements IS NOT NULL)
|
|
"
|
|
"
|
|
)
|
|
)
|
|
@@ -472,9 +472,9 @@ WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$per
|
|
SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
|
|
SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
|
|
WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$performer->pro->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}))
|
|
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())') . "
|
|
|
|
- AND EXTRACT(YEAR from care_month.start_date) = " . ($request->input('y') ?: 'EXTRACT(YEAR from now())') . "
|
|
|
|
- AND care_month.has_non_hcp_communicated_to_patient_about_rm = TRUE
|
|
|
|
|
|
+ AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
|
|
|
|
+ AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
|
|
|
|
+ AND (care_month.has_non_hcp_communicated_to_patient_about_rm = TRUE AND care_month.has_non_hcp_communicated_to_patient_about_rm IS NOT NULL)
|
|
"
|
|
"
|
|
)
|
|
)
|
|
);
|
|
);
|
|
@@ -486,9 +486,9 @@ WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$per
|
|
SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
|
|
SELECT count(client.id) as cnt FROM client join care_month on care_month.client_id = client.id
|
|
WHERE ((client.mcp_pro_id = {$performer->pro->id}) OR (client.rmm_pro_id = {$performer->pro->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}))
|
|
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())') . "
|
|
|
|
- AND EXTRACT(YEAR from care_month.start_date) = " . ($request->input('y') ?: 'EXTRACT(YEAR from now())') . "
|
|
|
|
- AND care_month.has_non_hcp_communicated_to_patient_about_rm = FALSE
|
|
|
|
|
|
+ AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
|
|
|
|
+ AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
|
|
|
|
+ AND (care_month.has_non_hcp_communicated_to_patient_about_rm = FALSE OR care_month.has_non_hcp_communicated_to_patient_about_rm IS NULL)
|
|
"
|
|
"
|
|
)
|
|
)
|
|
);
|
|
);
|