-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
178 changed files
with
3,760 additions
and
2,426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Reports\Queries\Child; | ||
|
||
use App\Filament\Resources\BeneficiaryResource; | ||
use App\Models\Beneficiary; | ||
use App\Reports\Queries\ReportQuery; | ||
use Illuminate\Database\Eloquent\Builder; | ||
|
||
class C01 extends ReportQuery | ||
{ | ||
/** | ||
* Sum beneficiari with Nou-născut (0-27 de zile) (VCV_00). | ||
*/ | ||
public static function query(): Builder | ||
{ | ||
return Beneficiary::query() | ||
->whereHasVulnerabilities(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VCV_00'); | ||
}); | ||
} | ||
|
||
public static function dateColumn(): string | ||
{ | ||
return 'activity_log.created_at'; | ||
} | ||
|
||
public static function columns(): array | ||
{ | ||
return [ | ||
'id' => __('field.id'), | ||
'first_name' => __('field.first_name'), | ||
'last_name' => __('field.last_name'), | ||
'cnp' => __('field.cnp'), | ||
'gender' => __('field.gender'), | ||
'date_of_birth' => __('field.age'), | ||
'county' => __('field.county'), | ||
'city' => __('field.city'), | ||
'status' => __('field.status'), | ||
]; | ||
} | ||
|
||
public static function getRecordActions(array $params = []): array | ||
{ | ||
return [ | ||
BeneficiaryResource::getUrl('view', $params, isAbsolute: false) => __('beneficiary.action.view_details'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Reports\Queries\Child; | ||
|
||
use App\Filament\Resources\BeneficiaryResource; | ||
use App\Models\Beneficiary; | ||
use App\Reports\Queries\ReportQuery; | ||
use Illuminate\Database\Eloquent\Builder; | ||
|
||
class C02 extends ReportQuery | ||
{ | ||
/** | ||
* Sum beneficiari with Copil născut prematur (VSC_10). | ||
*/ | ||
public static function query(): Builder | ||
{ | ||
return Beneficiary::query() | ||
->whereHasVulnerabilities(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VSC_10'); | ||
}); | ||
} | ||
|
||
public static function dateColumn(): string | ||
{ | ||
return 'activity_log.created_at'; | ||
} | ||
|
||
public static function columns(): array | ||
{ | ||
return [ | ||
'id' => __('field.id'), | ||
'first_name' => __('field.first_name'), | ||
'last_name' => __('field.last_name'), | ||
'cnp' => __('field.cnp'), | ||
'gender' => __('field.gender'), | ||
'date_of_birth' => __('field.age'), | ||
'county' => __('field.county'), | ||
'city' => __('field.city'), | ||
'status' => __('field.status'), | ||
]; | ||
} | ||
|
||
public static function getRecordActions(array $params = []): array | ||
{ | ||
return [ | ||
BeneficiaryResource::getUrl('view', $params, isAbsolute: false) => __('beneficiary.action.view_details'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Reports\Queries\Child; | ||
|
||
use App\Models\Beneficiary; | ||
use App\Reports\Queries\ReportQuery; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use App\Filament\Resources\BeneficiaryResource; | ||
|
||
class C04 extends ReportQuery | ||
{ | ||
/** | ||
* Sum beneficiari with Boală infecţioasă (VSG_BI); Copil 0-1 ani (VCV_01) OR Copil 1-5 ani (VCV_02) OR Copil 5-14 ani (VCV_03). | ||
*/ | ||
public static function query(): Builder | ||
{ | ||
return Beneficiary::query() | ||
->whereHasVulnerabilities(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VSG_BI') | ||
->where(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VCV_01') | ||
->orWhereJsonContains('properties', 'VCV_02') | ||
->orWhereJsonContains('properties', 'VCV_03'); | ||
}); | ||
}); | ||
} | ||
|
||
public static function dateColumn(): string | ||
{ | ||
return 'activity_log.created_at'; | ||
} | ||
|
||
public static function columns(): array | ||
{ | ||
return [ | ||
'id' => __('field.id'), | ||
'first_name' => __('field.first_name'), | ||
'last_name' => __('field.last_name'), | ||
'cnp' => __('field.cnp'), | ||
'gender' => __('field.gender'), | ||
'date_of_birth' => __('field.age'), | ||
'county' => __('field.county'), | ||
'city' => __('field.city'), | ||
'status' => __('field.status'), | ||
]; | ||
} | ||
|
||
public static function getRecordActions(array $params = []): array | ||
{ | ||
return [ | ||
BeneficiaryResource::getUrl('view', $params, isAbsolute: false) => __('beneficiary.action.view_details'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Reports\Queries\Child; | ||
|
||
use App\Models\Beneficiary; | ||
use App\Reports\Queries\ReportQuery; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use App\Filament\Resources\BeneficiaryResource; | ||
|
||
class C05 extends ReportQuery | ||
{ | ||
/** | ||
* Sum beneficiari with Boală cronică (VSG_01); Copil 0-1 ani (VCV_01) OR Copil 1-5 ani (VCV_02) OR Copil 5-14 ani (VCV_03). | ||
*/ | ||
public static function query(): Builder | ||
{ | ||
return Beneficiary::query() | ||
->whereHasVulnerabilities(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VSG_01') | ||
->where(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VCV_01') | ||
->orWhereJsonContains('properties', 'VCV_02') | ||
->orWhereJsonContains('properties', 'VCV_03'); | ||
}); | ||
}); | ||
} | ||
|
||
public static function dateColumn(): string | ||
{ | ||
return 'activity_log.created_at'; | ||
} | ||
|
||
public static function columns(): array | ||
{ | ||
return [ | ||
'id' => __('field.id'), | ||
'first_name' => __('field.first_name'), | ||
'last_name' => __('field.last_name'), | ||
'cnp' => __('field.cnp'), | ||
'gender' => __('field.gender'), | ||
'date_of_birth' => __('field.age'), | ||
'county' => __('field.county'), | ||
'city' => __('field.city'), | ||
'status' => __('field.status'), | ||
]; | ||
} | ||
|
||
public static function getRecordActions(array $params = []): array | ||
{ | ||
return [ | ||
BeneficiaryResource::getUrl('view', $params, isAbsolute: false) => __('beneficiary.action.view_details'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Reports\Queries\Child; | ||
|
||
use App\Models\Beneficiary; | ||
use App\Reports\Queries\ReportQuery; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use App\Filament\Resources\BeneficiaryResource; | ||
|
||
class C06 extends ReportQuery | ||
{ | ||
/** | ||
* Sum beneficiari with Copil care nu primește vitamina D și Fier (VCS_03); Copil 0-1 ani (VCV_01) OR Copil 1-5 ani (VCV_02) OR Copil 5-14 ani (VCV_03). | ||
*/ | ||
public static function query(): Builder | ||
{ | ||
return Beneficiary::query() | ||
->whereHasVulnerabilities(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VCS_03') | ||
->where(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VCV_01') | ||
->orWhereJsonContains('properties', 'VCV_02') | ||
->orWhereJsonContains('properties', 'VCV_03'); | ||
}); | ||
}); | ||
} | ||
|
||
public static function dateColumn(): string | ||
{ | ||
return 'activity_log.created_at'; | ||
} | ||
|
||
public static function columns(): array | ||
{ | ||
return [ | ||
'id' => __('field.id'), | ||
'first_name' => __('field.first_name'), | ||
'last_name' => __('field.last_name'), | ||
'cnp' => __('field.cnp'), | ||
'gender' => __('field.gender'), | ||
'date_of_birth' => __('field.age'), | ||
'county' => __('field.county'), | ||
'city' => __('field.city'), | ||
'status' => __('field.status'), | ||
]; | ||
} | ||
|
||
public static function getRecordActions(array $params = []): array | ||
{ | ||
return [ | ||
BeneficiaryResource::getUrl('view', $params, isAbsolute: false) => __('beneficiary.action.view_details'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Reports\Queries\Child; | ||
|
||
use App\Filament\Resources\BeneficiaryResource; | ||
use App\Models\Beneficiary; | ||
use App\Reports\Queries\ReportQuery; | ||
use Illuminate\Database\Eloquent\Builder; | ||
|
||
class C07 extends ReportQuery | ||
{ | ||
/** | ||
* Sum beneficiari with Copil nevaccinat conform calendarului național (VSC_01); Copil 0-1 ani (VCV_01) OR Copil 1-5 ani (VCV_02) OR Copil 5-14 ani (VCV_03). | ||
*/ | ||
public static function query(): Builder | ||
{ | ||
return Beneficiary::query() | ||
->whereHasVulnerabilities(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VSC_01') | ||
->where(function (Builder $query) { | ||
$query->whereJsonContains('properties', 'VCV_01') | ||
->orWhereJsonContains('properties', 'VCV_02') | ||
->orWhereJsonContains('properties', 'VCV_03'); | ||
}); | ||
}); | ||
} | ||
|
||
public static function dateColumn(): string | ||
{ | ||
return 'activity_log.created_at'; | ||
} | ||
|
||
public static function columns(): array | ||
{ | ||
return [ | ||
'id' => __('field.id'), | ||
'first_name' => __('field.first_name'), | ||
'last_name' => __('field.last_name'), | ||
'cnp' => __('field.cnp'), | ||
'gender' => __('field.gender'), | ||
'date_of_birth' => __('field.age'), | ||
'county' => __('field.county'), | ||
'city' => __('field.city'), | ||
'status' => __('field.status'), | ||
]; | ||
} | ||
|
||
public static function getRecordActions(array $params = []): array | ||
{ | ||
return [ | ||
BeneficiaryResource::getUrl('view', $params, isAbsolute: false) => __('beneficiary.action.view_details'), | ||
]; | ||
} | ||
} |
Oops, something went wrong.