|
@@ -1376,7 +1376,7 @@ FROM claim
|
|
left join app_session on claim.status_updated_by_session_id = app_session.id
|
|
left join app_session on claim.status_updated_by_session_id = app_session.id
|
|
left join pro sp on app_session.pro_id = sp.id
|
|
left join pro sp on app_session.pro_id = sp.id
|
|
--WHERE claim.status IS NULL OR claim.status = 'NEW'
|
|
--WHERE claim.status IS NULL OR claim.status = 'NEW'
|
|
-WHERE (claim.status is NULL OR claim.status NOT IN ('CANCELLED', 'ABANDONED'))
|
|
|
|
|
|
+WHERE (claim.status is NULL OR claim.status NOT IN ('CANCELLED', 'ABANDONED'" . ($request->input('show-submitted') ? "" : ", 'SUBMITTED'") . "))
|
|
-- AND claim.current_version_id IS NOT NULL
|
|
-- AND claim.current_version_id IS NOT NULL
|
|
AND (client.name_first ILIKE :q OR
|
|
AND (client.name_first ILIKE :q OR
|
|
client.name_last ILIKE :q OR
|
|
client.name_last ILIKE :q OR
|
|
@@ -1385,7 +1385,7 @@ AND (client.name_first ILIKE :q OR
|
|
AND (claim.created_at >= :from AND claim.created_at <= :to)
|
|
AND (claim.created_at >= :from AND claim.created_at <= :to)
|
|
" . ($hcpPro ? "AND claim.pro_id = :hcp" : '') . "
|
|
" . ($hcpPro ? "AND claim.pro_id = :hcp" : '') . "
|
|
AND claim.id IN (SELECT mb_claim.claim_id FROM mb_claim)
|
|
AND claim.id IN (SELECT mb_claim.claim_id FROM mb_claim)
|
|
-ORDER BY claim.created_at ASC
|
|
|
|
|
|
+ORDER BY claim.created_at DESC
|
|
--OFFSET 0 LIMIT 15
|
|
--OFFSET 0 LIMIT 15
|
|
"), $params);
|
|
"), $params);
|
|
|
|
|