feat(claims): enhance claims filtering with insurance, date range, and patient search

This commit is contained in:
hamed
2026-06-24 06:19:25 +03:30
parent 69beb7b944
commit 91fb55258a
5 changed files with 196 additions and 17 deletions
@@ -89,4 +89,31 @@ class PatientSessionRepository extends ServiceEntityRepository
}
return $out;
}
/**
* نام و موبایل بیمار هر مراجعه — کلیددار بر اساس id جلسه.
* @param int[] $ids
* @return array<int, array{name: ?string, mobile: ?string}>
*/
public function patientInfoForIds(array $ids): array
{
if ($ids === []) {
return [];
}
$rows = $this->createQueryBuilder('s')
->select('s.id AS id', 'u.realName AS name', 'u.mobileNumber AS mobile')
->join('s.record', 'r')
->join('r.user', 'u')
->where('s.id IN (:ids)')
->setParameter('ids', $ids)
->getQuery()
->getArrayResult();
$out = [];
foreach ($rows as $r) {
$out[(int) $r['id']] = ['name' => $r['name'], 'mobile' => $r['mobile']];
}
return $out;
}
}