Use a specialty dropdown when adding practitioners.
Deploy Ladill Care / deploy (push) Successful in 26s

Replace free-text specialty on practitioner and team-invite forms with a shared selectable list so clinicians pick a known specialty.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-18 17:39:29 +00:00
co-authored by Cursor
parent 2ac84faf73
commit 18c24077e3
8 changed files with 127 additions and 8 deletions
+19
View File
@@ -64,6 +64,25 @@ class Practitioner extends Model
return $this->hasMany(Appointment::class, 'practitioner_id');
}
/**
* Specialty dropdown options. Preserves a legacy/custom value when editing.
*
* @return list<string>
*/
public static function specialtyOptions(?string $current = null): array
{
$options = array_values(array_filter(
config('care.practitioner_specialties', []),
fn ($label) => is_string($label) && $label !== '',
));
if ($current !== null && $current !== '' && ! in_array($current, $options, true)) {
$options[] = $current;
}
return $options;
}
/**
* Select option label includes branch context when available.
*/