Skip to content

Commit

Permalink
fix: wrong query for "Copil cu tulburări mintale și de comportament"
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Oct 14, 2024
1 parent c4ae3f5 commit 38f978b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Reports/Queries/Child/C25.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
namespace App\Reports\Queries\Child;

use App\Models\Beneficiary;
use App\Models\Disease;
use App\Reports\Queries\ReportQuery;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Query\Builder as QueryBuilder;

class C25 extends ReportQuery
{
Expand All @@ -17,8 +19,10 @@ public static function query(): Builder
{
return Beneficiary::query()
->whereHasVulnerabilities(function (Builder $query) {
$query->whereJsonContains('properties', 'VSG_TMC')
->whereJsonOverlaps('properties', ['VCV_01', 'VCV_02', 'VCV_03']);
$query->whereJsonOverlaps('properties', ['VCV_01', 'VCV_02', 'VCV_03']);
})
->whereHasCatagraphyRelation(Disease::class, function (QueryBuilder $query) {
$query->where('properties->attributes->category', 'VSG_TMC');
});
}
}

0 comments on commit 38f978b

Please sign in to comment.