|
@@ -388,6 +388,17 @@ class Pro extends Model
|
|
|
->count();
|
|
|
}
|
|
|
|
|
|
+ function get_measurements_awaiting_review_count_as_mcp() {
|
|
|
+ $result = DB::select(DB::raw("
|
|
|
+SELECT SUM(rm_num_measurements_not_stamped_by_mcp) AS count
|
|
|
+FROM care_month
|
|
|
+WHERE mcp_pro_id = :pro_id
|
|
|
+ AND rm_num_measurements_not_stamped_by_mcp IS NOT NULL
|
|
|
+ AND rm_num_measurements_not_stamped_by_mcp > 0;
|
|
|
+ "), ["pro_id" => $this->id]);
|
|
|
+ if($result) return $result[0]->count;
|
|
|
+ }
|
|
|
+
|
|
|
function get_bills_pending_signature_count_as_mcp(){
|
|
|
return;
|
|
|
$pendingBillsToSign = Bill::where('bill_service_type', '<>', 'CARE_MONTH')->where(function ($query) use ($performerProID) {
|