diff --git a/src/Entity/NRPZS/HealthcareService.php b/src/Entity/NRPZS/HealthcareService.php index ad27009..f1c7fe7 100644 --- a/src/Entity/NRPZS/HealthcareService.php +++ b/src/Entity/NRPZS/HealthcareService.php @@ -139,6 +139,7 @@ public function setFacility(?HealthcareFacility $facility): HealthcareService public function serialize( ): array { return [ + 'id' => $this->id, 'careField' => $this->careField, 'careForm' => $this->careForm, 'careType' => $this->careType, diff --git a/src/Service/NRPZs/Syncers/HealthcareServiceSyncer.php b/src/Service/NRPZs/Syncers/HealthcareServiceSyncer.php index 6ae8663..6ab3d7b 100644 --- a/src/Service/NRPZs/Syncers/HealthcareServiceSyncer.php +++ b/src/Service/NRPZs/Syncers/HealthcareServiceSyncer.php @@ -22,7 +22,9 @@ protected function getRepository(): EntityRepository */ protected function handleRow(array $row, EntityRepository $repository): void { - $id = $row['ZdravotnickeZarizeniId']. '-' . md5($row['OborPece']); + + $id = hash('sha256',$row['ZdravotnickeZarizeniId'].$row['OborPece']); + $id = substr($id, 0, 16); $service = $repository->find($id); if ($service === null) {