Commit Graph
211 Commits
Author SHA1 Message Date
isaaccladandCursor e94708d46c Issue Queue tickets for every waiting appointment when integration is on.
Deploy Ladill Care / deploy (push) Successful in 51s
Patient queue syncs consultation and specialty waiters; specialty contexts now provision desks so check-in/onboarding no longer leaves half the list on local positions only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 06:12:32 +00:00
isaaccladandCursor 4e910a1db7 Fix patient queue showing position 1 for every waiter.
Deploy Ladill Care / deploy (push) Successful in 1m44s
Specialty demo seed reused slot+1 per module; repair duplicates on queue load and renumber after demo seed so waiting lists show 1..n.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 05:54:47 +00:00
isaaccladandCursor 6cfecc1763 Persist admin branch filter across Patient, Pharmacy, Lab, and Bills queues.
Deploy Ladill Care / deploy (push) Successful in 57s
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>
2026-07-18 05:49:24 +00:00
isaaccladandCursor 88f84a4f96 Assign every demo waiter to a doctor and sync Queue tickets.
Deploy Ladill Care / deploy (push) Successful in 1m54s
Link DemoWorld doctor staff to practitioners, clear unresolved routing, distribute staff across branches, and restore scoped consultation/pharmacy ticket sync so demos are not left Unassigned.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 05:34:45 +00:00
isaaccladandCursor 86d79b5099 Restore Care queue FIFO after demo skip left tickets Unassigned.
Deploy Ladill Care / deploy (push) Successful in 1m2s
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>
2026-07-17 23:05:42 +00:00
isaaccladandCursor 640b62010a Fix Care settings 500s and slow saves under Queue/demo load.
Deploy Ladill Care / deploy (push) Successful in 52s
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>
2026-07-17 22:57:25 +00:00
isaaccladandCursor 88b5a4e3ab Skip Queue HTTP entirely during Care demo seed.
Deploy Ladill Care / deploy (push) Successful in 1m33s
Enterprise reseeds were blocked for minutes on queue.ladill.com calls; local specialty data still seeds, and Queue tickets can backfill on first visit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 22:50:26 +00:00
isaaccladandCursor fd2c854c57 Keep demo specialty seeding off the Queue API hot path.
Deploy Ladill Care / deploy (push) Successful in 1m52s
Enterprise reseeds were hanging on per-module Queue HTTP; activate specialties locally first, then provision once, and limit ticket sync to core contexts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 22:36:57 +00:00
isaaccladandCursor db6d0617e9 Enable all specialty modules with demo traffic for Pro/Enterprise demos.
Deploy Ladill Care / deploy (push) Successful in 1m9s
Free and real onboarding stay opt-in; Pro/Enterprise demos activate every catalog specialty and seed waiting appointments so module pages are populated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 21:55:30 +00:00
isaaccladandCursor c461430441 Recover empty Care demo tenants after onboarding races.
Deploy Ladill Care / deploy (push) Successful in 54s
Demo Pro was left as an empty workflow shell after lock-timeout races; clear leftover rollout flags on seed, sync-reseed empty tenants on login, and repair missing facility workflow indexes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 21:38:21 +00:00
isaaccladandCursor e172d3c5d1 Make workflow migrations idempotent for partial deploys.
Deploy Ladill Care / deploy (push) Successful in 2m41s
Production already had care_facility_workflows from a prior attempt, so recreate checks let migrate finish and record the batch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 21:19:59 +00:00
isaaccladandCursor 3ee59a0956 Activate Care workflows across check-in and financial clearance.
Deploy Ladill Care / deploy (push) Failing after 1m9s
Enforce service-queue gates, cashier settlements, and clinical stage progression so patient journeys cannot bypass configured payment or authorization rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 21:13:06 +00:00
isaaccladandCursor 86bfce1e17 Add workflow-centric patient journey with financial gates.
Deploy Ladill Care / deploy (push) Failing after 45s
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>
2026-07-17 20:47:33 +00:00
isaaccladandCursor c319692b33 Create demo org shell before login redirect.
Deploy Ladill Care / deploy (push) Successful in 42s
Async reseed alone still left the first Care request without an onboarded org; ensure the shell synchronously, then refresh demo data afterResponse().

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 19:33:04 +00:00
isaaccladandCursor 2c2cc1e938 Keep Care org onboarded during demo login reseed.
Deploy Ladill Care / deploy (push) Successful in 1m19s
Avoid the onboarding flash when reset-on-login deletes the tenant before the afterResponse() reseed finishes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 19:29:09 +00:00
isaaccladandCursor a3521247e0 Route pharmacy, lab, and billing tickets through a shared FIFO pool.
Deploy Ladill Care / deploy (push) Successful in 57s
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>
2026-07-17 19:06:36 +00:00
isaaccladandCursor 5e8c082e02 Return doctors to the patient queue after completing a consultation.
Deploy Ladill Care / deploy (push) Successful in 1m6s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 18:57:45 +00:00
isaaccladandCursor 986ec0155c Document that Care owns healthcare stage provisioning under Queue v2.
Deploy Ladill Care / deploy (push) Successful in 1m24s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 18:00:42 +00:00
isaaccladandCursor 94e53d05bf Keep consultation context on nested clinical pages and add Call again on patient queue cards.
Deploy Ladill Care / deploy (push) Successful in 1m7s
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>
2026-07-17 17:48:34 +00:00
isaaccladandCursor e73b39b678 Route Care tickets to per-staff service points instead of shared branch queues.
Deploy Ladill Care / deploy (push) Successful in 1m40s
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>
2026-07-17 17:22:14 +00:00
isaaccladandCursor c5151ad476 Fix Call next when Care waiters lack Queue tickets.
Deploy Ladill Care / deploy (push) Successful in 1m35s
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>
2026-07-17 16:53:52 +00:00
isaaccladandCursor 015a4cc7fe Wire Care lists into Ladill Queue workflows instead of reception panels.
Deploy Ladill Care / deploy (push) Successful in 1m45s
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>
2026-07-17 16:27:48 +00:00
isaaccladandCursor 15638d1672 Fall back to sole Queue branch when Care branch names differ.
Deploy Ladill Care / deploy (push) Successful in 1m31s
Free single-location Queue orgs often use a default name like
Main Branch while Care stubs send Main; reuse the only branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 16:09:31 +00:00
isaaccladandCursor cd020512c3 Create real Queue counters when specialty modules activate.
Deploy Ladill Care / deploy (push) Successful in 1m39s
Wire module activation to the Queue create/upsert APIs, persist
queue and counter UUIDs on Care stubs, and soft-deactivate on
module off so embedded service counters work without manual setup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 16:03:16 +00:00
isaaccladandCursor dec282d25d Embed Ladill Queue on role pages and add specialty modules under Settings.
Deploy Ladill Care / deploy (push) Successful in 53s
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>
2026-07-17 15:55:47 +00:00
isaaccladandCursor e0a7a64d38 Add clinical device registry, browser wedge scan, and local agent API.
Deploy Ladill Care / deploy (push) Successful in 1m39s
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>
2026-07-17 14:28:46 +00:00
isaaccladandCursor 1da90203e8 Remove Faker from DemoTenantSeeder for --no-dev prod seeds.
Deploy Ladill Care / deploy (push) Successful in 1m51s
DemoWorld seeding already used deterministic catalogs; the last randomElement calls blocked production demo:seed without fakerphp/faker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 14:11:51 +00:00
isaaccladandCursor dd4efec135 Seed Care demos from shared DemoWorld with staff roles.
Deploy Ladill Care / deploy (push) Successful in 1m0s
Patients, branches, and org identity now match suite continuity keys; staff Members are created for training SSO without login reseed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 13:27:07 +00:00
isaacclad 2d548e2bbc Fix deploy tmp paths: drop unset gitea.run_attempt.
Deploy Ladill Care / deploy (push) Successful in 1m43s
act_runner v0.2.x does not expose gitea.run_attempt, so release archive and
workspace paths rendered with a trailing dash. Use gitea.run_id only, matching
the Meet/CRM deploy workflows.
2026-07-17 12:57:28 +00:00
isaaccladandCursor 679577a7b3 Reseed Care demo tenants after each SSO login.
Deploy Ladill Care / deploy (push) Successful in 2m38s
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>
2026-07-17 11:17:16 +00:00
isaaccladandCursor 62d42d9157 Show Care Enterprise upgrade banner to Pro users.
Deploy Ladill Care / deploy (push) Successful in 1m2s
Pro dashboards now pitch Enterprise instead of the Free unlock copy, and plan context is shared with the banner so Pro tenants no longer see Free messaging.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 11:08:13 +00:00
isaaccladandCursor b12dbc79dd Add plan-aware Care demo:seed command.
Deploy Ladill Care / deploy (push) Successful in 1m54s
Seed clinic tenants with Free, Pro, and Enterprise volumes plus FK-safe reset for sales demos.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-17 10:02:52 +00:00
isaacclad 8706be3c95 fix(ui): lead diagnosis form with free-text, optional code
Deploy Ladill Care / deploy (push) Successful in 1m58s
Reorder consultation diagnoses so clinicians enter the diagnosis
first; retitle the ICD field as an optional code with a skip-friendly hint.
2026-07-17 06:47:31 +00:00
isaacclad 6c9051d2c6 fix(ui): use clinician-friendly assessment copy
Deploy Ladill Care / deploy (push) Successful in 1m22s
Replace internal design jargon (Layer 1, narrative source of truth,
pathway instruments) with plain clinical language on consultations,
patient charts, settings, and nav.
2026-07-16 23:17:08 +00:00
isaacclad f6780b9958 fix(assessments): enable engine by default and wire into live UI
Deploy Ladill Care / deploy (push) Successful in 54s
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.
2026-07-16 23:05:48 +00:00
isaacclad 2ce4bc8993 feat(assessments): layered clinical assessment engine end-to-end
Deploy Ladill Care / deploy (push) Successful in 1m26s
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.
2026-07-16 22:58:09 +00:00
isaacclad 8896088425 chore(pricing): raise Care Pro to GHS 2490 per branch/mo
Deploy Ladill Care / deploy (push) Successful in 54s
Increase Care Pro monthly branch price by GHS 500 (1990 → 2490).
2026-07-16 12:10:19 +00:00
isaacclad f7baa6ebf0 fix(care): use clinic name as email From display, not Ladill Care
Deploy Ladill Care / deploy (push) Successful in 28s
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.
2026-07-16 11:58:24 +00:00
isaacclad 2a00d4321b fix(care): point Messaging settings at suite defaults, not API keys
Deploy Ladill Care / deploy (push) Successful in 35s
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.
2026-07-16 11:31:34 +00:00
isaacclad c9f5df6ed7 feat(messaging): suite-channel patient email/SMS and entitlement sync
Deploy Ladill Care / deploy (push) Successful in 40s
Prefer platform suite messaging for patient email/SMS, fall back to product
keys; write suite entitlements on Pro wallet, prepaid, and renewal.
2026-07-16 11:24:21 +00:00
isaacclad 7a0a7fcb88 Add Paystack, Flutterwave, and Hubtel for encounter billing.
Deploy Ladill Care / deploy (push) Successful in 1m0s
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.
2026-07-16 10:24:28 +00:00
isaacclad 068c5aa63f Drop setup fee from Enterprise onboarding copy.
Deploy Ladill Care / deploy (push) Successful in 43s
Dedicated onboarding remains; setup fees apply only to VPS and dedicated servers.
2026-07-16 10:06:14 +00:00
isaacclad 85eb04d2a3 Gate Care branch management behind Pro like Frontdesk.
Deploy Ladill Care / deploy (push) Successful in 1m25s
Free plans keep a single setup branch but get an upgrade screen for Branches; Pro/Enterprise unlock multi-branch management via plan features.
2026-07-16 09:14:58 +00:00
isaacclad 0181c958f5 Nest Care branches under settings with Frontdesk-style UI.
Deploy Ladill Care / deploy (push) Successful in 1m25s
Move branch routes to /settings/branches, restyle list/create/edit with settings layout and breadcrumbs, and keep legacy /branches redirects.
2026-07-16 09:10:06 +00:00
isaacclad b092f9a934 Nest Care team under settings with Frontdesk-style UI.
Deploy Ladill Care / deploy (push) Successful in 46s
Move team routes to /settings/team, restyle list and invite pages with settings layout and breadcrumbs, and keep legacy /members redirects.
2026-07-16 09:08:24 +00:00
isaacclad 59ddf92642 Place Branches & team after Organization on settings.
Deploy Ladill Care / deploy (push) Successful in 1m10s
Keep facility details first so access links follow org settings instead of leading the page.
2026-07-16 09:03:00 +00:00
isaacclad eaf482b5a2 Move Branches and Team into settings; drop wallet from plan CTAs.
Deploy Ladill Care / deploy (push) Successful in 1m24s
Match Frontdesk by linking branches and team from settings instead of the admin sidebar, and simplify Care plan upgrade button copy.
2026-07-16 08:58:07 +00:00
isaacclad c6fd2547ef Add branch seat selector on Care plan checkout.
Deploy Ladill Care / deploy (push) Successful in 40s
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.
2026-07-15 14:21:30 +00:00
isaacclad f9aa4a679f Tighten Care free tier and bill Pro/Enterprise per branch.
Deploy Ladill Care / deploy (push) Successful in 29s
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).
2026-07-15 14:14:35 +00:00
isaacclad 78be5c803d Raise suite Pro and Business/Enterprise prices tenfold.
Deploy Ladill Care / deploy (push) Successful in 1m3s
Free tiers stay free. Paid defaults and marketing copy use the new GHS amounts (e.g. Pro 79→790, Business 249→2490).
2026-07-15 13:53:18 +00:00