Ship commercial Dentistry suite with odontogram and treatment plans.
Deploy Ladill Care / deploy (push) Failing after 36s
Deploy Ladill Care / deploy (push) Failing after 36s
Replace placeholder clinical forms with patient-level FDI charting, multi-visit plans, procedure-to-bill linking, imaging, reports, and demo seed data. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -72,12 +72,20 @@ class SpecialtyShellService
|
||||
*/
|
||||
public function provisionedServices(Organization $organization, string $moduleKey): array
|
||||
{
|
||||
$catalog = collect($this->catalogServices($moduleKey))->keyBy(fn ($s) => (string) ($s['code'] ?? ''));
|
||||
$stored = data_get($organization->settings, "specialty_module_provisioning.{$moduleKey}.services");
|
||||
if (is_array($stored) && $stored !== []) {
|
||||
return array_values($stored);
|
||||
if (is_array($stored)) {
|
||||
foreach ($stored as $service) {
|
||||
$code = (string) ($service['code'] ?? '');
|
||||
if ($code === '') {
|
||||
continue;
|
||||
}
|
||||
$prior = $catalog->get($code, []);
|
||||
$catalog->put($code, array_merge(is_array($prior) ? $prior : [], $service));
|
||||
}
|
||||
}
|
||||
|
||||
return $this->catalogServices($moduleKey);
|
||||
return $catalog->filter(fn ($s, $code) => $code !== '')->values()->all();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -271,7 +279,20 @@ class SpecialtyShellService
|
||||
$clinicalOpen = match ($moduleKey) {
|
||||
'emergency' => $clinical->countOpenByType($organization, 'emergency', 'triage', $branchScope),
|
||||
'blood_bank' => $clinical->countOpenByType($organization, 'blood_bank', 'blood_request', $branchScope),
|
||||
'dentistry' => $clinical->countOpenByType($organization, 'dentistry', 'odontogram', $branchScope),
|
||||
'dentistry' => \App\Models\DentalPlanItem::query()
|
||||
->whereHas('plan', function ($q) use ($organization, $ownerRef) {
|
||||
$q->owned($ownerRef)
|
||||
->where('organization_id', $organization->id)
|
||||
->whereIn('status', [
|
||||
\App\Models\DentalTreatmentPlan::STATUS_ACCEPTED,
|
||||
\App\Models\DentalTreatmentPlan::STATUS_IN_PROGRESS,
|
||||
]);
|
||||
})
|
||||
->whereIn('status', [
|
||||
\App\Models\DentalPlanItem::STATUS_ACCEPTED,
|
||||
\App\Models\DentalPlanItem::STATUS_PROPOSED,
|
||||
])
|
||||
->count(),
|
||||
default => 0,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user