feat(claims): enrich claims with insurance details and item specifics
This commit is contained in:
@@ -64,4 +64,29 @@ class PatientSessionRepository extends ServiceEntityRepository
|
||||
$this->getEntityManager()->persist($session);
|
||||
$this->getEntityManager()->flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* تاریخ ثبت چند مراجعه — کلیددار بر اساس id جلسه.
|
||||
* @param int[] $ids
|
||||
* @return array<int, int> sessionId => createdAt
|
||||
*/
|
||||
public function datesForIds(array $ids): array
|
||||
{
|
||||
if ($ids === []) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$rows = $this->createQueryBuilder('s')
|
||||
->select('s.id AS id', 's.createdAt AS created_at')
|
||||
->where('s.id IN (:ids)')
|
||||
->setParameter('ids', $ids)
|
||||
->getQuery()
|
||||
->getArrayResult();
|
||||
|
||||
$out = [];
|
||||
foreach ($rows as $r) {
|
||||
$out[(int) $r['id']] = (int) $r['created_at'];
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user