Admins pick a working branch once; session keeps Pharmacy Call Next and lists scoped to that site so ticket numbers no longer collide across branches.
Co-authored-by: Cursor <cursoragent@cursor.com>
Provision one branch/context at a time instead of the whole org, fall back to a desk when doctor counters are catching up, sync pharmacy tickets in Care list order on page load, and seed waiting_at/queue_position for demos.
Co-authored-by: Cursor <cursoragent@cursor.com>
Defer Queue provision and ticket backfill after the settings response, harden messaging credential creation against lock races, and stop wrapping demo seed in a long-held transaction.
Co-authored-by: Cursor <cursoragent@cursor.com>
Introduces a facility workflow engine as Care's primary configuration
object: onboarding now leads with a facility category (which modules to
enable) and a workflow template (how patients move + where money is
collected), including standard herbal hospital/clinic templates.
Templates materialize into care_facility_workflows/care_workflow_stages.
The engine tracks a visit's position via care_visit_stage_advances and,
with FinancialGateService, gates a stage's queue behind a cleared
FinancialObligation (paid/authorized/waived/deferred) for "before"
payment timing while leaving "after" (pay-at-exit) flows unblocked.
Gated behavior is opt-in behind the workflow_engine/financial_gates
rollout flags; legacy orgs keep current behavior.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop pre-assigning prescriptions to a default counter so Call next follows arrival order and each pharmacist only serves one active patient at a time.
Co-authored-by: Cursor <cursoragent@cursor.com>
Doctors can return to the active consultation from forms, lab, prescriptions, pathways, and bills; queue cards can re-announce called/serving tickets via the existing Queue recall bridge.
Co-authored-by: Cursor <cursoragent@cursor.com>
Provision one consultation point per doctor (room + identity) and role-based
points for pharmacy, lab, billing, and triage. Fixed-doctor appointments and
walk-ins issue only to the assigned point; Call next respects that assignment
and flags unresolved patients rather than random routing.
Co-authored-by: Cursor <cursoragent@cursor.com>
Demo/pre-integration waiting lists showed patients but Call next hit an empty Queue and flashed a red error. Backfill missing tickets on Call next and queue load, and treat empty Call next as info.
Co-authored-by: Cursor <cursoragent@cursor.com>
When Queue integration is on, role pages issue tickets into their own
department queues and drive Call next → Serve → Complete on the native
lists. Integration off leaves existing UI unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the standalone Service Queues nav so call-next/now-serving lives on clinical queue, appointments, pharmacy, lab, and specialty surfaces; Pro orgs can activate dentistry and related modules with branch departments and queue stubs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Branch-scoped Care devices with hashed agent tokens, patient barcode lookup/labels, and provenance-aware vitals from a minimal device agent (Pro for agent hardware; wedge free).
Co-authored-by: Cursor <cursoragent@cursor.com>
Demo Free/Pro/Enterprise accounts wipe and reload sample clinic data on
authorization-code SSO callbacks so every sales walkthrough starts clean.
Co-authored-by: Cursor <cursoragent@cursor.com>
The assessment engine was built but opt-in and hidden: flag defaulted
off, no sidebar entry, and no settings toggle. Default assessments_engine
on, auto-seed catalog when empty, add Settings toggle and Assessments
nav, and surface guidance from the patients list.
Add a template-driven assessment system with universal intake, clinical
pathways, disease instruments (stroke MVP + extended, diabetes, and ten
specialty packs), scoring, patient outcome trends, REST/API + FHIR
export, and Enterprise org-level assessment analytics. Seed packs and
design/licensing docs ship for deploy and pre-GA review.
Patient-facing suite (and Bird fallback) emails should appear from the
organization name. Stop defaulting from_name to CARE_SMTP_FROM_NAME.
Appointment notifications also prefer suite messaging with the same rule.
Care still linked to Integrations for Bird/SMS credentials after zero-config
suite messaging. Update copy and readiness checks so suite platform keys
count as ready; Account Messaging is primary, product keys are advanced.
Clinics on Pro/Enterprise can connect their own gateway in Integrations and collect card or MoMo on bills with 0% Ladill fee, while cash payments and balance totals stay correct for pending checkouts.
Let operators pick how many branches to bill next to the monthly/prepaid toggles so Pro and Enterprise totals and charges use branches × per-branch rate.
Free keeps core records, appointments, and basic workflows; Pro unlocks lab, pharmacy, billing, and Queue. Both paid tiers bill per branch with unlimited branches. Enterprise adds multi-dept workflows, analytics, AI-assisted healthcare integration, and priority support (not Afia).
Staff can hand off patients between queues with ticket number kept, clearer actions, and success feedback.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hospital admins can manage assignable doctors and invite team members
from Ladill mailboxes; invited staff only see Care tools they need.
Co-authored-by: Cursor <cursoragent@cursor.com>
Patients can be SMS/email notified on booking and video schedule when enabled in Settings. Bird validation now accepts only lsk_live_ keys, strips paste artifacts, and surfaces the platform error.
Co-authored-by: Cursor <cursoragent@cursor.com>
Patient SMS/email now use encrypted tenant keys via the platform relay instead of shared platform Care API keys.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire Care to Ladill SMS and Bird management APIs on the patient page, and surface Meet auth/config failures as friendly validation errors instead of a 502 page.
Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce shared x-care.page-hero with summary stats so key list views
match the Ladill app hero pattern used across Frontdesk and Link.
Co-authored-by: Cursor <cursoragent@cursor.com>
Provision alone left care_enabled false on Queue; settings re-save and
service queue pages now recover when integration is out of sync.
Co-authored-by: Cursor <cursoragent@cursor.com>
Schedule and start video visits via the Meet service API, persist join links on appointments, and propagate the shared copy-button component.
Co-authored-by: Cursor <cursoragent@cursor.com>
Honors the intended URL for signed-in users instead of calling post-auth-redirect, which returned /sso/connect again.
Co-authored-by: Cursor <cursoragent@cursor.com>
Server-side auth ping cannot reliably see auth.ladill.com cookies, so treat 401 as inconclusive and use client keepalive instead of signing users out.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace public ID member form with email invites, SSO provisioning, and
post-auth redirect for pending team access.
Co-authored-by: Cursor <cursoragent@cursor.com>
Organizations can subscribe from wallet, expire correctly on free tier, and renew nightly via care:pro-renew.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add Afia and notifications to the top bar, remove the duplicate desktop page
title, wire notification and AI routes, and fix mobile nav notification links.
Co-authored-by: Cursor <cursoragent@cursor.com>