Seed investigation types early (before clinical data), expand the default catalog, scope Lab → Catalog by organization, and harden practitioner-branch sync so a mid-reseed failure cannot wipe the catalog. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -79,12 +79,20 @@ class DemoSeedCommandTest extends TestCase
|
||||
$this->assertSame(3, Branch::query()->where('owner_ref', $user->public_id)->count());
|
||||
$this->assertTrue(app(PlanService::class)->canUseProModules($org));
|
||||
|
||||
$this->assertGreaterThan(0, InvestigationType::query()->where('owner_ref', $user->public_id)->count());
|
||||
$this->assertGreaterThanOrEqual(12, InvestigationType::query()->where('organization_id', $org->id)->count());
|
||||
$this->assertGreaterThan(0, InvestigationRequest::query()->where('owner_ref', $user->public_id)->count());
|
||||
$this->assertGreaterThan(0, Drug::query()->where('owner_ref', $user->public_id)->count());
|
||||
$this->assertGreaterThan(0, Prescription::query()->where('owner_ref', $user->public_id)->count());
|
||||
$this->assertGreaterThan(0, Bill::query()->where('owner_ref', $user->public_id)->count());
|
||||
|
||||
$this->actingAs($user)
|
||||
->withoutMiddleware(\App\Http\Middleware\EnsurePlatformSession::class)
|
||||
->get(route('care.lab.catalog.index'))
|
||||
->assertOk()
|
||||
->assertSee('Full Blood Count')
|
||||
->assertSee('Chest X-Ray')
|
||||
->assertDontSee('No tests in catalog.');
|
||||
|
||||
$catalog = array_keys(config('care.specialty_modules', []));
|
||||
$this->assertNotEmpty($catalog);
|
||||
foreach ($catalog as $key) {
|
||||
|
||||
Reference in New Issue
Block a user