Replace Maternity with Women's Health (OB/GYN) and configurable service lines.
Deploy Ladill Care / deploy (push) Successful in 26s

Keeps Fertility as a separate specialty, adds OB/GYN and fertility staff roles, and migrates live org settings from maternity → womens_health.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-20 09:48:19 +00:00
co-authored by Cursor
parent 938f351ede
commit 56a663a777
33 changed files with 708 additions and 189 deletions
+1 -1
View File
@@ -156,7 +156,7 @@
@if (empty($canUseSpecialtyModules))
<span class="ml-2 rounded-full bg-amber-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-amber-700">Pro</span>
@endif
<span class="mt-0.5 block text-xs text-slate-500">Dentistry, eye care, physiotherapy, maternity, radiology activate &amp; set prices</span>
<span class="mt-0.5 block text-xs text-slate-500">Dentistry, eye care, physiotherapy, women's health, radiology activate &amp; set prices</span>
</span>
<span class="text-slate-400">&rarr;</span>
</a>
@@ -28,6 +28,37 @@
</div>
</x-settings.card>
@if (! empty($serviceLines) && $canUseSpecialtyModules)
<x-settings.card title="Service lines" description="Enable only the clinics and services this facility offers under {{ $definition['label'] ?? $moduleKey }}.">
<form method="POST" action="{{ route('care.settings.modules.service-lines.update', $moduleKey) }}" class="space-y-4">
@csrf
@method('PUT')
<div class="grid gap-2 sm:grid-cols-2">
@foreach ($serviceLines as $lineKey => $line)
<label class="flex items-start gap-2 rounded-lg border border-slate-200 px-3 py-2 text-sm text-slate-800">
<input
type="checkbox"
name="lines[{{ $lineKey }}]"
value="1"
class="mt-0.5 rounded border-slate-300 text-indigo-600"
@checked(old('lines.'.$lineKey, $enabledServiceLines[$lineKey] ?? ($line['default_on'] ?? true)))
@disabled(! $canManage)
>
<span>
<span class="font-medium">{{ $line['label'] }}</span>
</span>
</label>
@endforeach
</div>
@if ($canManage)
<div class="flex justify-end">
<button type="submit" class="btn-primary">Save service lines</button>
</div>
@endif
</form>
</x-settings.card>
@endif
@if (! $canUseSpecialtyModules)
<x-settings.card title="Pro feature" description="Specialty module pricing requires Care Pro or Enterprise.">
<a href="{{ route('care.pro.index') }}" class="btn-primary mt-2 inline-flex text-sm">View plans</a>
@@ -46,7 +46,7 @@
'dentistry' => 'chair',
'ophthalmology' => 'check_in',
'physiotherapy' => 'check_in',
'maternity' => 'check_in',
'womens_health' => 'check_in',
'radiology' => 'check_in',
'cardiology' => 'check_in',
'psychiatry' => 'check_in',
@@ -66,7 +66,7 @@
'dentistry' => 'Seat at chair',
'ophthalmology' => 'Start check-in',
'physiotherapy' => 'Start check-in',
'maternity' => 'Start check-in',
'womens_health' => 'Start check-in',
'radiology' => 'Start check-in',
'cardiology' => 'Start check-in',
'psychiatry' => 'Start check-in',
@@ -65,8 +65,8 @@
@include('care.specialty.ophthalmology.workspace-'.$activeTab)
@elseif ($moduleKey === 'physiotherapy' && in_array($activeTab, ['overview', 'session'], true))
@include('care.specialty.physiotherapy.workspace-'.$activeTab)
@elseif ($moduleKey === 'maternity' && in_array($activeTab, ['overview', 'postnatal'], true))
@include('care.specialty.maternity.workspace-'.$activeTab)
@elseif ($moduleKey === 'womens_health' && in_array($activeTab, ['overview', 'postnatal'], true))
@include('care.specialty.womens_health.workspace-'.$activeTab)
@elseif ($moduleKey === 'radiology' && in_array($activeTab, ['overview', 'verification'], true))
@include('care.specialty.radiology.workspace-'.$activeTab)
@elseif ($moduleKey === 'cardiology' && in_array($activeTab, ['overview', 'procedures'], true))
@@ -40,8 +40,8 @@
@if ($moduleKey === 'physiotherapy')
<a href="{{ route('care.specialty.physiotherapy.reports') }}" class="text-slate-600 hover:text-slate-900">Reports</a>
@endif
@if ($moduleKey === 'maternity')
<a href="{{ route('care.specialty.maternity.reports') }}" class="text-slate-600 hover:text-slate-900">Reports</a>
@if ($moduleKey === 'womens_health')
<a href="{{ route('care.specialty.womens_health.reports') }}" class="text-slate-600 hover:text-slate-900">Reports</a>
@endif
@if ($moduleKey === 'radiology')
<a href="{{ route('care.specialty.radiology.reports') }}" class="text-slate-600 hover:text-slate-900">Reports</a>
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Maternity summary · {{ $patient->fullName() }}</title>
<title>Women's Health summary · {{ $patient->fullName() }}</title>
<style>
body { font-family: system-ui, sans-serif; color: #0f172a; margin: 2rem; }
h1 { font-size: 1.25rem; margin: 0 0 .25rem; }
@@ -15,7 +15,7 @@
</style>
</head>
<body>
<p class="no-print"><a href="{{ route('care.specialty.workspace', ['module' => 'maternity', 'visit' => $visit]) }}">Back</a></p>
<p class="no-print"><a href="{{ route('care.specialty.workspace', ['module' => 'womens_health', 'visit' => $visit]) }}">Back</a></p>
<h1>{{ $patient->fullName() }}</h1>
<p class="meta">
@@ -1,11 +1,11 @@
<x-app-layout title="Maternity reports">
<x-app-layout title="Women's Health reports">
<div class="space-y-6">
<div class="flex flex-wrap items-center justify-between gap-3">
<div>
<h1 class="text-xl font-semibold text-slate-900">Maternity reports</h1>
<p class="mt-1 text-sm text-slate-500">Arrivals, high-risk ANC, risk categories, postnatal outcomes, length of stay, and maternity service revenue.</p>
<h1 class="text-xl font-semibold text-slate-900">Women's Health reports</h1>
<p class="mt-1 text-sm text-slate-500">Arrivals, high-risk ANC, risk categories, postnatal outcomes, length of stay, and Women's Health service revenue.</p>
</div>
<a href="{{ route('care.specialty.show', 'maternity') }}" class="text-sm font-medium text-indigo-600"> Specialty home</a>
<a href="{{ route('care.specialty.show', 'womens_health') }}" class="text-sm font-medium text-indigo-600"> Specialty home</a>
</div>
<form method="GET" class="flex flex-wrap items-end gap-3 rounded-2xl border border-slate-200 bg-white p-4">
@@ -72,7 +72,7 @@
</div>
<section class="rounded-2xl border border-slate-200 bg-white p-5">
<h2 class="text-sm font-semibold text-slate-900">Maternity service revenue</h2>
<h2 class="text-sm font-semibold text-slate-900">Women's Health service revenue</h2>
<ul class="mt-3 space-y-2 text-sm">
@forelse ($report['revenue_by_service'] as $row)
<li class="flex justify-between gap-3">
@@ -80,7 +80,7 @@
<span class="tabular-nums">{{ $currency }} {{ number_format($row->amount_minor / 100, 2) }}</span>
</li>
@empty
<li class="text-slate-500">No billed maternity services in range.</li>
<li class="text-slate-500">No billed Women's Health services in range.</li>
@endforelse
</ul>
</section>
@@ -8,12 +8,12 @@
<section class="rounded-2xl border border-slate-200 bg-white p-5">
<div class="flex flex-wrap items-start justify-between gap-3">
<div>
<h3 class="text-sm font-semibold text-slate-900">Maternity overview</h3>
<h3 class="text-sm font-semibold text-slate-900">Women's Health overview</h3>
<p class="mt-0.5 text-xs text-slate-500">ANC history, exam, fetal notes, and care plan for this episode.</p>
</div>
<div class="flex flex-wrap gap-3 text-sm">
<a href="{{ route('care.specialty.maternity.print', $workspaceVisit) }}" target="_blank" class="font-medium text-indigo-600">Print summary</a>
<a href="{{ route('care.specialty.maternity.reports') }}" class="font-medium text-indigo-600">Maternity reports</a>
<a href="{{ route('care.specialty.womens_health.print', $workspaceVisit) }}" target="_blank" class="font-medium text-indigo-600">Print summary</a>
<a href="{{ route('care.specialty.womens_health.reports') }}" class="font-medium text-indigo-600">Women's Health reports</a>
</div>
</div>
@@ -10,11 +10,11 @@
<h3 class="text-sm font-semibold text-slate-900">Delivery / postnatal</h3>
<p class="mt-0.5 text-xs text-slate-500">Clinic delivery notes and postnatal review. Discharge outcomes can close the visit.</p>
</div>
<a href="{{ route('care.specialty.maternity.print', $workspaceVisit) }}" target="_blank" class="text-sm font-medium text-indigo-600">Print summary</a>
<a href="{{ route('care.specialty.womens_health.print', $workspaceVisit) }}" target="_blank" class="text-sm font-medium text-indigo-600">Print summary</a>
</div>
@if ($canManage)
<form method="POST" action="{{ route('care.specialty.maternity.postnatal', $workspaceVisit) }}" class="mt-4 space-y-4">
<form method="POST" action="{{ route('care.specialty.womens_health.postnatal', $workspaceVisit) }}" class="mt-4 space-y-4">
@csrf
<input type="hidden" name="tab" value="postnatal">
<div class="grid gap-3 sm:grid-cols-2">