feat(claims): enhance claims filtering with insurance, date range, and patient search
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user