feat(claims): enrich claims with insurance details and item specifics

This commit is contained in:
hamed
2026-06-24 04:48:11 +03:30
parent 27840da78d
commit c189daa860
8 changed files with 188 additions and 11 deletions
@@ -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;
}
}