|
@@ -380,13 +380,6 @@ class Pro extends Model
|
|
->count();
|
|
->count();
|
|
}
|
|
}
|
|
|
|
|
|
- function get_notes_pending_billing_count_as_dna() {
|
|
|
|
- return Note::where('ally_pro_id', $this->id)
|
|
|
|
- ->where('is_cancelled', '<>', true)
|
|
|
|
- ->where('is_signed_by_hcp', true)
|
|
|
|
- ->where('is_billing_marked_done', '<>', true)
|
|
|
|
- ->count();
|
|
|
|
- }
|
|
|
|
|
|
|
|
function get_measurements_awaiting_review_count_as_mcp() {
|
|
function get_measurements_awaiting_review_count_as_mcp() {
|
|
$result = DB::select(DB::raw("
|
|
$result = DB::select(DB::raw("
|
|
@@ -498,10 +491,11 @@ WHERE mcp_pro_id = :pro_id
|
|
->count();
|
|
->count();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //TODO: Generic bills that are cancelled where performer is the pro and not acknowledged
|
|
function get_cancelled_bills_awaiting_review_count_as_dna() {
|
|
function get_cancelled_bills_awaiting_review_count_as_dna() {
|
|
- // SELECT * FROM bill WHERE bill_service_type = 'NOTE' AND is_cancelled IS TRUE AND isCancellationAcknowledged IS FALSE;
|
|
|
|
- return Bill::where('na_pro_id', $this->id)
|
|
|
|
- ->where('bill_service_type', 'NOTE')
|
|
|
|
|
|
+ // SELECT * FROM bill WHERE bill_service_type = 'GENERIC' AND is_cancelled IS TRUE AND isCancellationAcknowledged IS FALSE;
|
|
|
|
+ return Bill::where('generic_pro_id', $this->id)
|
|
|
|
+ ->where('bill_service_type', 'GENERIC')
|
|
->where('is_cancelled', true)
|
|
->where('is_cancelled', true)
|
|
->where('is_cancellation_acknowledged', '<>', true)
|
|
->where('is_cancellation_acknowledged', '<>', true)
|
|
->count();
|
|
->count();
|