diff --git a/src/Bundle/ChillActivityBundle/Export/Export/CountActivityLinkedToACP.php b/src/Bundle/ChillActivityBundle/Export/Export/CountActivityLinkedToACP.php index c182145a8..f17ced0fd 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/CountActivityLinkedToACP.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/CountActivityLinkedToACP.php @@ -17,7 +17,7 @@ use Chill\ActivityBundle\Security\Authorization\ActivityStatsVoter; use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; use Chill\MainBundle\Export\GroupedExportInterface; -use Chill\PersonBundle\Export\Declarations as ExportDeclarations; +use Chill\PersonBundle\Export\Declarations as PersonDeclarations; use Doctrine\ORM\Query; use LogicException; use Symfony\Component\Form\FormBuilderInterface; @@ -100,9 +100,9 @@ class CountActivityLinkedToACP implements ExportInterface, GroupedExportInterfac public function supportsModifiers() { return [ - ExportDeclarations::PERSON_TYPE, Declarations::ACTIVITY, - ExportDeclarations::ACP_SHARED + PersonDeclarations::PERSON_TYPE, + //PersonDeclarations::ACP_TYPE, ]; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php index f02368fde..3f98c7003 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php @@ -78,10 +78,10 @@ final class EvaluationAggregator implements AggregatorInterface */ public function alterQuery(QueryBuilder $qb, $data) { - $qb - ->join('acp.works', 'acpw') - ->join('acpw.accompanyingPeriodWorkEvaluations', 'we') - ; + if (!in_array('acpw', $qb->getAllAliases())) { + $qb->join('acp.works', 'acpw'); + } + $qb->join('acpw.accompanyingPeriodWorkEvaluations', 'we'); $qb->addSelect('IDENTITY(we.evaluation) AS evaluation_aggregator'); diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php similarity index 72% rename from src/Bundle/ChillPersonBundle/Export/Aggregator/JobAggregator.php rename to src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php index 9793dd875..31b3fca66 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php @@ -1,6 +1,6 @@ getBaseEntityAppliedOn($qb)) { + $qb->join('acp.job', 'j'); - case 'acp': - $qb->join('acp.job', 'j'); - $qb->addSelect('IDENTITY(acp.job) AS job_aggregator'); - break; - - case 'acpw': - $qb->join('acpw.referrers', 'r'); - $qb->addSelect('IDENTITY(r.userJob) as job_aggregator'); - break; - - default: - throw new \Exception("Does not apply on that base entity"); - } + $qb->addSelect('IDENTITY(acp.job) AS job_aggregator'); $groupBy = $qb->getDQLPart('groupBy'); @@ -110,14 +98,6 @@ final class JobAggregator implements AggregatorInterface */ public function applyOn(): string { - return Declarations::ACP_SHARED; - } - - private function getBaseEntityAppliedOn(QueryBuilder $qb): string - { - /** @var From $from */ - $from = $qb->getDQLPart('from'); - - return $from[0]->getAlias(); + return Declarations::ACP_TYPE; } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php similarity index 71% rename from src/Bundle/ChillPersonBundle/Export/Aggregator/ReferrerAggregator.php rename to src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php index 3f9344212..56522f2ed 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php @@ -9,7 +9,7 @@ declare(strict_types=1); -namespace Chill\PersonBundle\Export\Aggregator; +namespace Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators; use Chill\MainBundle\Export\AggregatorInterface; use Chill\MainBundle\Repository\UserRepository; @@ -40,21 +40,9 @@ final class ReferrerAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - switch ($this->getBaseEntityAppliedOn($qb)) { + $qb->join('acp.user', 'u'); - case 'acp': - $qb->join('acp.user', 'u'); - $qb->addSelect('u.id AS referrer_aggregator'); - break; - - case 'acpw': - $qb->join('acpw.referrers', 'r'); - $qb->addSelect('r.id AS referrer_aggregator'); - break; - - default: - throw new \Exception("Does not apply on that base entity"); - } + $qb->addSelect('u.id AS referrer_aggregator'); $groupBy = $qb->getDQLPart('groupBy'); @@ -68,7 +56,7 @@ final class ReferrerAggregator implements AggregatorInterface public function applyOn(): string { - return Declarations::ACP_SHARED; + return Declarations::ACP_TYPE; } public function buildForm(FormBuilderInterface $builder) @@ -98,12 +86,4 @@ final class ReferrerAggregator implements AggregatorInterface { return 'Group by referrers'; } - - private function getBaseEntityAppliedOn(QueryBuilder $qb): string - { - /** @var From $from */ - $from = $qb->getDQLPart('from'); - - return $from[0]->getAlias(); - } } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php similarity index 72% rename from src/Bundle/ChillPersonBundle/Export/Aggregator/ScopeAggregator.php rename to src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php index d6d6d5a58..5bddac42b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php @@ -1,6 +1,6 @@ getBaseEntityAppliedOn($qb)) { + $qb->join('acp.scopes', 's'); - case 'acp': - $qb->join('acp.scopes', 's'); - $qb->addSelect('s.id as scope_aggregator'); - break; - - case 'acpw': - $qb->join('acpw.referrers', 'r'); - $qb->addSelect('IDENTITY(r.mainScope) as scope_aggregator'); - break; - - default: - throw new \Exception("Does not apply on that base entity"); - } + $qb->addSelect('s.id as scope_aggregator'); $groupBy = $qb->getDQLPart('groupBy'); @@ -110,14 +98,6 @@ final class ScopeAggregator implements AggregatorInterface */ public function applyOn(): string { - return Declarations::ACP_SHARED; - } - - private function getBaseEntityAppliedOn(QueryBuilder $qb): string - { - /** @var From $from */ - $from = $qb->getDQLPart('from'); - - return $from[0]->getAlias(); + return Declarations::ACP_TYPE; } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php index 4be8c027d..a9257bd8e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php @@ -76,7 +76,9 @@ final class SocialActionAggregator implements AggregatorInterface */ public function alterQuery(QueryBuilder $qb, $data) { - $qb->join('acp.works', 'acpw'); + if (!in_array('acpw', $qb->getAllAliases())) { + $qb->join('acp.works', 'acpw'); + } $qb->addSelect('IDENTITY(acpw.socialAction) AS socialaction_aggregator'); // DISTINCT ?? diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php index d52c410e5..e94290925 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php @@ -76,8 +76,7 @@ class EvaluationTypeAggregator implements AggregatorInterface */ public function alterQuery(QueryBuilder $qb, $data) { - $qb->join('eval.evaluation', 'ev'); - $qb->addSelect('ev.id AS evaluationtype_aggregator'); + $qb->addSelect('IDENTITY(eval.evaluation) AS evaluationtype_aggregator'); $groupBy = $qb->getDQLPart('groupBy'); diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php index c629fe0bf..df50b76f0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php @@ -76,6 +76,10 @@ class ChildrenNumberAggregator implements AggregatorInterface */ public function alterQuery(QueryBuilder $qb, $data) { + if (!in_array('composition', $qb->getAllAliases())) { + $qb->join('household.compositions', 'composition'); + } + $qb->addSelect('composition.numberOfChildren AS childrennumber_aggregator'); $groupBy = $qb->getDQLPart('groupBy'); diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php index 3e292ceec..2c6ab174f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php @@ -83,6 +83,10 @@ class CompositionAggregator implements AggregatorInterface */ public function alterQuery(QueryBuilder $qb, $data) { + if (!in_array('composition', $qb->getAllAliases())) { + $qb->join('household.compositions', 'composition'); + } + $qb->addSelect('IDENTITY(composition.householdCompositionType) AS composition_aggregator'); $groupBy = $qb->getDQLPart('groupBy'); diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php new file mode 100644 index 000000000..ddab1f7cd --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php @@ -0,0 +1,103 @@ +jobRepository = $jobRepository; + $this->translatableStringHelper = $translatableStringHelper; + } + + /** + * @inheritDoc + */ + public function getLabels($key, array $values, $data) + { + return function($value): string { + if ($value === '_header') { + return 'Job'; + } + + $j = $this->jobRepository->find($value); + + return $this->translatableStringHelper->localize( + $j->getLabel() + ); + }; + } + + /** + * @inheritDoc + */ + public function getQueryKeys($data): array + { + return ['job_aggregator']; + } + + /** + * @inheritDoc + */ + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + /** + * @inheritDoc + */ + public function getTitle(): string + { + return 'Group by treating agent job'; + } + + /** + * @inheritDoc + */ + public function addRole() + { + return null; + } + + /** + * @inheritDoc + */ + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('acpw.referrers', 'u'); + + $qb->addSelect('IDENTITY(u.userJob) as job_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('job_aggregator'); + } else { + $qb->groupBy('job_aggregator'); + } + } + + /** + * @inheritDoc + */ + public function applyOn(): string + { + return Declarations::SOCIAL_WORK_ACTION_TYPE; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php new file mode 100644 index 000000000..1815ecc19 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php @@ -0,0 +1,89 @@ +userRepository = $userRepository; + $this->userRender = $userRender; + } + + public function addRole() + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('acpw.referrers', 'u'); + + $qb->addSelect('u.id AS referrer_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('referrer_aggregator'); + } else { + $qb->groupBy('referrer_aggregator'); + } + + } + + public function applyOn(): string + { + return Declarations::SOCIAL_WORK_ACTION_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ('_header' === $value) { + return 'Referrer'; + } + + $r = $this->userRepository->find($value); + + return $this->userRender->renderString($r, []); + }; + } + + public function getQueryKeys($data): array + { + return ['referrer_aggregator']; + } + + public function getTitle(): string + { + return 'Group by treating agent'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php new file mode 100644 index 000000000..74a73537c --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php @@ -0,0 +1,103 @@ +scopeRepository = $scopeRepository; + $this->translatableStringHelper = $translatableStringHelper; + } + + /** + * @inheritDoc + */ + public function getLabels($key, array $values, $data) + { + return function ($value): string { + if ($value === '_header') { + return 'Scope'; + } + + $s = $this->scopeRepository->find($value); + + return $this->translatableStringHelper->localize( + $s->getName() + ); + }; + } + + /** + * @inheritDoc + */ + public function getQueryKeys($data): array + { + return ['scope_aggregator']; + } + + /** + * @inheritDoc + */ + public function buildForm(FormBuilderInterface $builder) + { + // no form + } + + /** + * @inheritDoc + */ + public function getTitle(): string + { + return 'Group by treating agent scope'; + } + + /** + * @inheritDoc + */ + public function addRole() + { + return null; + } + + /** + * @inheritDoc + */ + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('acpw.referrers', 'u'); + + $qb->addSelect('IDENTITY(u.mainScope) as scope_aggregator'); + + $groupBy = $qb->getDQLPart('groupBy'); + + if (!empty($groupBy)) { + $qb->addGroupBy('scope_aggregator'); + } else { + $qb->groupBy('scope_aggregator'); + } + } + + /** + * @inheritDoc + */ + public function applyOn(): string + { + return Declarations::SOCIAL_WORK_ACTION_TYPE; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Declarations.php b/src/Bundle/ChillPersonBundle/Export/Declarations.php index b8e2cd69c..f6c870e4d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Declarations.php +++ b/src/Bundle/ChillPersonBundle/Export/Declarations.php @@ -22,8 +22,6 @@ abstract class Declarations public const ACP_TYPE = 'accompanying_period'; - public const ACP_SHARED = 'accompanying_period_shared'; - public const SOCIAL_WORK_ACTION_TYPE = 'social_actions'; public const EVAL_TYPE = 'evaluation'; diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php index 6d2c0c6f6..a842284f5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php @@ -18,6 +18,7 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Export\Declarations; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; @@ -26,15 +27,12 @@ use LogicException; class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface { - /** - * @var EntityManagerInterface - */ - protected $entityManager; + protected EntityRepository $repository; public function __construct( EntityManagerInterface $em ) { - $this->entityManager = $em; + $this->repository = $em->getRepository(AccompanyingPeriod::class); } public function buildForm(FormBuilderInterface $builder): void @@ -88,12 +86,9 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder { - $qb = $this->entityManager->createQueryBuilder(); - $expr = $qb->expr(); + $qb = $this->repository->createQueryBuilder('acp'); - $qb->select('COUNT(acp.id) AS export_result') - ->from('ChillPersonBundle:AccompanyingPeriod', 'acp') - ; + $qb->select('COUNT(acp.id) AS export_result'); return $qb; } @@ -105,7 +100,9 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface public function supportsModifiers(): array { - return [Declarations::ACP_TYPE, Declarations::ACP_SHARED]; + return [ + Declarations::ACP_TYPE, + ]; } public function getGroup(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php index 22bd07b0c..3c7a0e319 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php @@ -5,7 +5,7 @@ namespace Chill\PersonBundle\Export\Export; use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; use Chill\MainBundle\Export\GroupedExportInterface; -use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Export\Declarations; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; use Doctrine\ORM\EntityManagerInterface; @@ -17,12 +17,12 @@ use Symfony\Component\Security\Core\Role\Role; class CountEvaluation implements ExportInterface, GroupedExportInterface { - private EntityRepository $evaluationRepository; + private EntityRepository $repository; public function __construct( EntityManagerInterface $em ) { - $this->evaluationRepository = $em->getRepository(AccompanyingPeriodWorkEvaluation::class); + $this->repository = $em->getRepository(AccompanyingPeriod::class); } /** @@ -103,7 +103,10 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { - $qb = $this->evaluationRepository->createQueryBuilder('eval'); + $qb = $this->repository->createQueryBuilder('acp') + ->join('acp.works', 'acpw') + ->join('acpw.accompanyingPeriodWorkEvaluations', 'eval') + ; $qb->select('COUNT(eval.id) AS export_result'); diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php b/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php index c9b2b541a..9767c17ed 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php @@ -16,12 +16,12 @@ use Symfony\Component\Security\Core\Role\Role; class CountHousehold implements ExportInterface, GroupedExportInterface { - private EntityRepository $acpRepository; + private EntityRepository $repository; public function __construct( EntityManagerInterface $em ) { - $this->acpRepository = $em->getRepository(AccompanyingPeriod::class); + $this->repository = $em->getRepository(AccompanyingPeriod::class); } /** @@ -102,12 +102,11 @@ class CountHousehold implements ExportInterface, GroupedExportInterface */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { - $qb = $this->acpRepository->createQueryBuilder('acp') + $qb = $this->repository->createQueryBuilder('acp') ->join('acp.participations', 'acppart') ->join('acppart.person', 'person') ->join('person.householdParticipations', 'householdmember') ->join('householdmember.household', 'household') - ->join('household.compositions', 'composition') ; $qb->select('COUNT(DISTINCT householdmember.household) AS export_result'); diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php index a2f3842e7..3ef74a69e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php @@ -114,7 +114,7 @@ class CountPerson implements ExportInterface, GroupedExportInterface return [ Declarations::PERSON_TYPE, Declarations::PERSON_IMPLIED_IN, - Declarations::ACP_SHARED + //Declarations::ACP_TYPE ]; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php index 7cba36904..cfea1f0c1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php @@ -14,9 +14,11 @@ namespace Chill\PersonBundle\Export\Export; use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; use Chill\MainBundle\Export\GroupedExportInterface; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Export\Declarations; -use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkRepository; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; @@ -25,11 +27,12 @@ use Symfony\Component\Security\Core\Role\Role; class CountSocialWorkActions implements ExportInterface, GroupedExportInterface { - protected AccompanyingPeriodWorkRepository $socialActionRepository; + protected EntityRepository $repository; - public function __construct(AccompanyingPeriodWorkRepository $socialActionRepository) - { - $this->socialActionRepository = $socialActionRepository; + public function __construct( + EntityManagerInterface $em + ) { + $this->repository = $em->getRepository(AccompanyingPeriod::class); } public function buildForm(FormBuilderInterface $builder): void @@ -54,7 +57,7 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface public function getLabels($key, array $values, $data) { - if ('export_count_social_work_actions' !== $key) { + if ('export_result' !== $key) { throw new LogicException("the key {$key} is not used by this export"); } @@ -68,7 +71,7 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface public function getQueryKeys($data): array { - return ['export_count_social_work_actions']; + return ['export_result']; } public function getResult($qb, $data) @@ -83,10 +86,11 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder { - $qb = $this - ->socialActionRepository - ->createQueryBuilder('acpw') - ->select('COUNT(acpw.id) as export_count_social_work_actions'); + $qb = $this->repository->createQueryBuilder('acp') + ->join('acp.works', 'acpw') + ; + + $qb->select('COUNT(acpw.id) as export_result'); return $qb; } @@ -99,7 +103,9 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface public function supportsModifiers(): array { - return [Declarations::SOCIAL_WORK_ACTION_TYPE, Declarations::ACP_SHARED]; + return [ + Declarations::SOCIAL_WORK_ACTION_TYPE, + ]; } public function getGroup(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php index 8747c288a..417411f98 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php @@ -15,9 +15,11 @@ use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\FormatterInterface; use Chill\MainBundle\Export\GroupedExportInterface; use Chill\MainBundle\Form\Type\ChillDateType; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Export\Declarations; -use Chill\PersonBundle\Repository\AccompanyingPeriodRepository; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; +use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; @@ -26,15 +28,12 @@ use Symfony\Component\Security\Core\Role\Role; class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportInterface { - private AccompanyingPeriodRepository $periodRepository; + private EntityRepository $repository; - /** - * @param AccompanyingPeriodRepository $periodRepository - */ public function __construct( - AccompanyingPeriodRepository $periodRepository + EntityManagerInterface $em ) { - $this->periodRepository = $periodRepository; + $this->repository = $em->getRepository(AccompanyingPeriod::class); } /** @@ -118,10 +117,7 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder { - $qb = $this->periodRepository->createQueryBuilder('acp'); - $expr = $qb->expr(); - - $force_closingdate = $data['closingdate']; // parameter from buildForm + $qb = $this->repository->createQueryBuilder('acp'); $qb ->select('AVG( @@ -131,7 +127,7 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn ELSE :force_closingDate END ) - acp.openingDate ) AS export_result') - ->setParameter('force_closingDate', $force_closingdate) + ->setParameter('force_closingDate', $data['closingdate']) ; return $qb; @@ -150,7 +146,9 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn */ public function supportsModifiers(): array { - return [Declarations::ACP_TYPE]; + return [ + Declarations::ACP_TYPE + ]; } public function getGroup(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php index fff38318c..933350134 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php @@ -31,7 +31,7 @@ class ActiveOnDateFilter implements FilterInterface */ public function getTitle(): string { - return 'Filtered by active on date'; + return 'Filter by active on date'; } /** diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php index 91732e83d..2f83667c9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php @@ -34,7 +34,7 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface */ public function getTitle(): string { - return 'Filtered by active at least one day between dates'; + return 'Filter by active at least one day between dates'; } /** diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php index 20e020784..400ab7a14 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php @@ -34,7 +34,7 @@ class OpenBetweenDatesFilter implements FilterInterface */ public function getTitle(): string { - return 'Filtered by opened between dates'; + return 'Filter by opened between dates'; } /** diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php similarity index 70% rename from src/Bundle/ChillPersonBundle/Export/Filter/ReferrerFilter.php rename to src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php index 5aac709c4..89b306678 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php @@ -1,6 +1,6 @@ getDQLPart('where'); - - // Use querybuilder from alias to find which export context (indicator) - switch ($this->getBaseEntityAppliedOn($qb)) { - case 'acp': - $clause = $qb->expr()->in('acp.user', ':referrers'); - break; - - case 'acpw': - $qb->join('acpw.referrers', 'r'); - $clause = $qb->expr()->in('r', ':referrers'); - break; - - default: - throw new \Exception("Does not apply on that base entity"); - } + $clause = $qb->expr()->in('acp.user', ':referrers'); if ($where instanceof Andx) { $where->add($clause); @@ -103,19 +88,11 @@ class ReferrerFilter implements FilterInterface $qb->setParameter('referrers', $data['accepted_referrers']); } - private function getBaseEntityAppliedOn(QueryBuilder $qb): string - { - /** @var From $from */ - $from = $qb->getDQLPart('from'); - - return $from[0]->getAlias(); - } - /** * @inheritDoc */ public function applyOn(): string { - return Declarations::ACP_SHARED; + return Declarations::ACP_TYPE; } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php index 3f61b017f..d96d0ca44 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php @@ -69,9 +69,10 @@ class SocialActionFilter implements FilterInterface public function alterQuery(QueryBuilder $qb, $data) { - $qb->join('acp.works', 'acpw') - ->join('acpw.socialAction', 'sa') - ; + if (!in_array('acpw', $qb->getAllAliases())) { + $qb->join('acp.works', 'acpw'); + } + $qb->join('acpw.socialAction', 'sa'); $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('sa.id', ':socialactions'); diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php index de84d5877..c69e15d9e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php @@ -12,7 +12,6 @@ use Symfony\Contracts\Translation\TranslatorInterface; class MaxDateFilter implements FilterInterface { - private const MAXDATE_CHOICES = [ 'is specified' => true, 'is not specified' => false, @@ -89,8 +88,6 @@ class MaxDateFilter implements FilterInterface } $qb->add('where', $where); - - dump($data['maxdate']); } /** diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php index f8a36e4b9..78aba8bf7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php @@ -85,6 +85,10 @@ class CompositionFilter implements FilterInterface */ public function alterQuery(QueryBuilder $qb, $data) { + if (!in_array('composition', $qb->getAllAliases())) { + $qb->join('household.compositions', 'composition'); + } + $where = $qb->getDQLPart('where'); $clause = $qb->expr()->andX( diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php index 7eb7d6142..80efd03e3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php @@ -39,7 +39,7 @@ class JobFilter implements FilterInterface public function buildForm(FormBuilderInterface $builder) { - $builder->add('userjob', EntityType::class, [ + $builder->add('job', EntityType::class, [ 'class' => UserJob::class, 'choice_label' => function (UserJob $j) { return $this->translatableStringHelper->localize( @@ -55,13 +55,13 @@ class JobFilter implements FilterInterface { $userjobs = []; - foreach ($data['userjob'] as $j) { + foreach ($data['job'] as $j) { $userjobs[] = $this->translatableStringHelper->localize( $j->getLabel()); } - return ['Filtered by the following jobs: only %userjobs%', [ - '%userjobs%' => implode(', ou ', $userjobs) + return ['Filtered by treating agent job: only %jobs%', [ + '%jobs%' => implode(', ou ', $userjobs) ]]; } @@ -72,10 +72,10 @@ class JobFilter implements FilterInterface public function alterQuery(QueryBuilder $qb, $data) { - $qb->join('acpw.referrers', 'r'); + $qb->join('acpw.referrers', 'u'); $where = $qb->getDQLPart('where'); - $clause = $qb->expr()->in('r.userJob', ':userjob'); + $clause = $qb->expr()->in('u.userJob', ':job'); if ($where instanceof Andx) { $where->add($clause); @@ -84,7 +84,7 @@ class JobFilter implements FilterInterface } $qb->add('where', $where); - $qb->setParameter('userjob', $data['userjob']); + $qb->setParameter('job', $data['job']); } public function applyOn() @@ -93,8 +93,8 @@ class JobFilter implements FilterInterface } - public function getTitle() + public function getTitle(): string { - return 'Filter by user job'; + return 'Filter by treating agent job'; } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php new file mode 100644 index 000000000..1ca1d39d2 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php @@ -0,0 +1,100 @@ +userRender = $userRender; + } + + /** + * @inheritDoc + */ + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('accepted_agents', EntityType::class, [ + 'class' => User::class, + 'choice_label' => function (User $u) { + return $this->userRender->renderString($u, []); + }, + 'multiple' => true, + 'expanded' => true + ]); + + } + + /** + * @inheritDoc + */ + public function getTitle(): string + { + return 'Filter by treating agent'; + } + + /** + * @inheritDoc + */ + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_agents'] as $r) { + $users[] = $r; + } + + return [ + 'Filtered by treating agent: only %agents%', [ + '%agents' => implode(", ou ", $users) + ]]; + } + + /** + * @inheritDoc + */ + public function addRole() + { + return null; + } + + /** + * @inheritDoc + */ + public function alterQuery(QueryBuilder $qb, $data) + { + $qb->join('acpw.referrers', 'u'); + + $where = $qb->getDQLPart('where'); + $clause = $qb->expr()->in('u', ':agents'); + + if ($where instanceof Andx) { + $where->add($clause); + } else { + $where = $qb->expr()->andX($clause); + } + + $qb->add('where', $where); + $qb->setParameter('agents', $data['accepted_agents']); + } + + /** + * @inheritDoc + */ + public function applyOn(): string + { + return Declarations::SOCIAL_WORK_ACTION_TYPE; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php index a91344645..6588efc18 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php @@ -59,8 +59,8 @@ class ScopeFilter implements FilterInterface $s->getName()); } - return ['Filtered by the following scopes: only %scope%', [ - '%scope%' => implode(', ou ', $scopes) + return ['Filtered by treating agent scope: only %scopes%', [ + '%scopes%' => implode(', ou ', $scopes) ]]; } @@ -71,10 +71,10 @@ class ScopeFilter implements FilterInterface public function alterQuery(QueryBuilder $qb, $data) { - $qb->join('acpw.referrers', 'r'); + $qb->join('acpw.referrers', 'u'); $where = $qb->getDQLPart('where'); - $clause = $qb->expr()->in('r.mainScope', ':scope'); + $clause = $qb->expr()->in('u.mainScope', ':scope'); if ($where instanceof Andx) { $where->add($clause); @@ -94,6 +94,6 @@ class ScopeFilter implements FilterInterface public function getTitle() { - return 'Filter by scope'; + return 'Filter by treating agent scope'; } } \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml index 592df7573..155ad11df 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml @@ -136,7 +136,7 @@ services: - { name: chill.export_filter, alias: accompanyingcourse_activeonedaybetweendates_filter } chill.person.export.filter_referrer: - class: Chill\PersonBundle\Export\Filter\ReferrerFilter + class: Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ReferrerFilter autowire: true autoconfigure: true tags: @@ -150,19 +150,19 @@ services: - { name: chill.export_filter, alias: accompanyingcourse_openbetweendates_filter } ## Aggregators - chill.person.export.aggregator_scope: - class: Chill\PersonBundle\Export\Aggregator\ScopeAggregator + chill.person.export.aggregator_referrer_scope: + class: Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ScopeAggregator autowire: true autoconfigure: true tags: - - { name: chill.export_aggregator, alias: accompanyingcourse_scope_aggregator } + - { name: chill.export_aggregator, alias: accompanyingcourse_referrer_scope_aggregator } - chill.person.export.aggregator_job: - class: Chill\PersonBundle\Export\Aggregator\JobAggregator + chill.person.export.aggregator_referrer_job: + class: Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\JobAggregator autowire: true autoconfigure: true tags: - - { name: chill.export_aggregator, alias: accompanyingcourse_job_aggregator } + - { name: chill.export_aggregator, alias: accompanyingcourse_referrer_job_aggregator } chill.person.export.aggregator_socialissue: class: Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\SocialIssueAggregator @@ -235,7 +235,7 @@ services: - { name: chill.export_aggregator, alias: accompanyingcourse_intensity_aggregator } chill.person.export.aggregator_referrer: - class: Chill\PersonBundle\Export\Aggregator\ReferrerAggregator + class: Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ReferrerAggregator autowire: true autoconfigure: true tags: diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_social_actions.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_social_actions.yaml index 266b8db75..ef86732ff 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports_social_actions.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports_social_actions.yaml @@ -29,6 +29,13 @@ services: autoconfigure: true tags: - { name: chill.export_filter, alias: social_work_actions_job_filter } + + chill.person.export.filter_treatingagent: + class: Chill\PersonBundle\Export\Filter\SocialWorkFilters\ReferrerFilter + autowire: true + autoconfigure: true + tags: + - { name: chill.export_filter, alias: social_work_actions_treatingagent_filter } ## AGGREGATORS chill.person.export.aggregator_action_type: @@ -37,6 +44,27 @@ services: autoconfigure: true tags: - { name: chill.export_aggregator, alias: social_work_actions_action_type_aggregator } + + chill.person.export.aggregator_treatingagent_scope: + class: Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ScopeAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: social_work_actions_treatingagent_scope_aggregator } + + chill.person.export.aggregator_treatingagent_job: + class: Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\JobAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: social_work_actions_treatingagent_job_aggregator } + + chill.person.export.aggregator_treatingagent: + class: Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\ReferrerAggregator + autowire: true + autoconfigure: true + tags: + - { name: chill.export_aggregator, alias: social_work_actions_treatingagent_aggregator } chill.person.export.aggregator_goal: class: Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\GoalAggregator diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index da499c725..d7455f070 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -511,23 +511,41 @@ is regular: le parcours est régulier Intensity: Intensité Group by intensity: Grouper par intensité -Filtered by active on date: Filtrer les parcours actifs à une date +Filter by active on date: Filtrer les parcours actifs à une date On date: Actifs à cette date "Filtered by actives courses: active on %ondate%": "Filtrer les parcours actifs: actifs le %ondate%" -Filtered by active at least one day between dates: Filtrer les parcours actifs au moins un jour dans la période +Filter by active at least one day between dates: Filtrer les parcours actifs au moins un jour dans la période "Filtered by actives courses: at least one day between %datefrom% and %dateto%": "Filtrer les parcours actifs: au moins un jour entre le %datefrom% et le %dateto%" -Filtered by referrers: Filtrer par référent +Filter by referrers: Filtrer par référent Accepted referrers: Référents "Filtered by referrer: only %referrers%": "Filtré par référent: uniquement %referrers%" Group by referrers: Grouper par référent -Filtered by opened between dates: Filtrer les parcours ouverts entre deux dates +Filter by opened between dates: Filtrer les parcours ouverts entre deux dates Date from: Date de début Date to: Date de fin "Filtered by opening dates: between %datefrom% and %dateto%": "Filtrer les parcours ouverts entre deux dates: entre le %datefrom% et le %dateto%" +Group social work actions by action type: Grouper les actions par type d'action + +Filter by treating agent scope: Filtrer les actions par service de l'agent traitant +"Filtered by treating agent scope: only %scopes%": "Filtré par service de l'agent traitant: uniquement %scopes%" +Group by treating agent scope: Grouper les actions par service de l'agent traitant + +Filter by treating agent job: Filtrer les actions par métier de l'agent traitant +"Filtered by treating agent job: only %jobs%": "Filtré par métier de l'agent traitant: uniquement %jobs%" +Group by treating agent job: Grouper les actions par métier de l'agent traitant + +Filter by treating agent: Filtrer les actions par agent traitant +Accepted agents: Agent traitant +"Filtered by treating agent: only %agents%": "Filtré par agent traitant: uniquement %agents%" +Group by treating agent: Grouper les actions par agent traitant + +Group social work actions by goal: Grouper les actions par objectif +Group social work actions by result: Grouper les actions par résultat + Filter by evaluation type: Filtrer par type d'évaluation Accepted evaluationtype: Évaluations "Filtered by evaluation type: only %evals%": "Filtré par type d'évaluation: uniquement %evals%"