feat(appointment): update patient identification to use national code from profile and enhance appointment creation logic
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Tests\Appointment;
|
||||
|
||||
use App\Auth\Entity\User;
|
||||
use App\Tests\ApiTestCase;
|
||||
use App\UserProfile\Entity\UserProfile;
|
||||
|
||||
/**
|
||||
* GET /api/v1/my/appointment/patient-lookup — mobile-first patient search used
|
||||
@@ -32,7 +33,9 @@ class PatientLookupTest extends ApiTestCase
|
||||
$nc = $this->nationalCode();
|
||||
$patient = $this->createUser(['ROLE_USER'], $mobile);
|
||||
$patient->setRealName('علی محمدی');
|
||||
$patient->setNationalCode($nc);
|
||||
$profile = new UserProfile($patient);
|
||||
$profile->setNationalCode($nc);
|
||||
$this->em->persist($profile);
|
||||
$this->em->flush();
|
||||
|
||||
$res = $this->authJson('GET', '/api/v1/my/appointment/patient-lookup?mobile=' . $mobile, $this->booker());
|
||||
|
||||
Reference in New Issue
Block a user