HomeCase studiesMulti-Campus Clinician Scheduling and Urgent Paging System

Case study · Brisbane, Australia

Multi-Campus Clinician Scheduling and Urgent Paging System

Healthcare — clinical workforce and care-team coordination

Coordinating rotating rosters, last-minute shift vacancies, and acute escalation alerts across multi-site medical facilities breaks down when schedules live in static portals and urgent calls depend on manual phone trees. We built a cross-device clinician coordination platform uniting a Laravel web operations engine with native Java Android and Objective-C iOS apps backed by local SQLite caches. Redis atomic locks prevent double-claimed shifts, while high-priority Firebase messaging drives real-time urgent response workflows across care teams.

Industry
Healthcare — clinical workforce and care-team coordination
Solution
A multi-campus clinical workforce scheduling, shift-coverage matching, and urgent alert system comprising native Android and iOS apps alongside a Laravel web console and API.
Platforms
Android · iOS · Web & API
Stack
Laravel · PHP · MySQL · SQLite · Redis · Java
Location
Brisbane, Australia · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Brisbane, Australia. Names withheld by agreement.

Project Overview

When a clinician calls in sick hours before an overnight ward rotation or an acute care unit needs rapid backup across a multi-campus hospital network in Brisbane, static monthly PDFs and manual call-around sheets collapse under pressure. Coordinators spend hours calling practitioners one by one, clinicians cannot verify their upcoming shifts while moving between dead-zone hospital corridors, and urgent response alerts lack proof of who acknowledged the call. We engineered a unified clinician scheduling, shift-matching, and urgent paging system spanning a Laravel backend, a web roster console, and native Java Android and Objective-C iOS applications equipped with local SQLite persistence.

Business Bottleneck

Care-team operations suffered from two tightly coupled failures: scheduling friction and alert ambiguity. On the scheduling side, broadcasting an uncovered shift via group emails or SMS triggered chaotic reply-all races where coordinators accidentally double-booked staff or assigned clinicians lacking campus-specific credentials or mandatory rest intervals. On the response side, urgent paging lacked closed-loop confirmation—dispatchers could not tell whether a clinician's handset was offline in a radiology bunker, silenced, or actively responding. Mobile tools also failed when staff walked underground corridors where live web views timed out.

Architectural Strategy

We decoupled authoritative roster state from real-time notification delivery and offline mobile read paths. MySQL holds the source of truth for campuses, credential matrices, fatigue rules, and shift assignments, while Redis enforces single-winner concurrency on shift claims and powers wave-based alert escalations. Both the Java Android and Objective-C iOS clients treat local SQLite as their primary UI data store, hydrating screens instantaneously offline and reconciling deltas whenever Firebase signals a state change or connectivity resumes.

Core Capabilities

  • Rule-Gated Shift Marketplace: Unfilled shifts route only to clinicians holding matching specialty credentials, site inductions, and compliant rest gaps between adjacent rotations.
  • One-Tap Swap & Coverage Requests: Clinicians initiate partial or full shift handoffs from mobile, subject to automated eligibility checks and coordinator approval workflows.
  • Wave-Based Urgent Paging: High-priority alerts target designated campus responders first and automatically cascade to standby tiers if unacknowledged within strict SLA windows.
  • Offline Roster & Directory Access: SQLite stores upcoming shifts, site protocols, and colleague call trees locally so staff never hit blank loading spinners inside shielded clinical zones.
  • Multi-Campus Operations Console: Web dashboard for coordinators to visualize coverage gaps, override emergency assignments, and audit alert response timelines.

Technical Architecture

Flow: Android (Java) / iOS (Objective-C) with Local SQLite <-> Laravel PHP API -> MySQL (Schedules/Rules) + Redis (Locks/Waves) -> Firebase Cloud Messaging

Each mobile device registers an authenticated push token paired with its platform capabilities and OS notification permissions. When a coordinator publishes a gap or triggers an urgent response alert, Laravel evaluates target recipients in MySQL, pushes serialized jobs into Redis queues, and dispatches high-priority Firebase Cloud Messaging payloads. Upon receiving a high-priority data message, the Android Java service or iOS handler wakes local alert UI, persists the payload to SQLite, and posts an immediate delivery receipt back to Laravel.

Claiming a shift executes an optimistic client action backed by a strict Redis distributed lock (SET NX PX) in PHP. Once the winning clinician passes fatigue and overlap checks inside a MySQL transaction, Laravel clears the lock, writes the assignment, and fires silent Firebase invalidation messages so every other device removes the open vacancy from its local SQLite cache.

Technology Stack

Category Technology detail
Backend API & admin Laravel (PHP) REST API and multi-campus roster management console
Central database MySQL storing facilities, credentials, shift templates, and alert logs
Distributed coordination Redis for atomic shift-claim locks, rate limiting, and alert queues
Android client Native Java application with background wake-lock alert handling
iOS client Native Objective-C application tailored for rapid shift and page response
On-device persistence SQLite local stores on Android and iOS for offline roster and protocol access
Real-time delivery Firebase Cloud Messaging (FCM) with high-priority data payloads
Conflict rules engine Server-side credential, fatigue-window, and overlap validation in PHP
Background processing Laravel Horizon-style worker queues for broadcast waves and digest sync
Monitoring & diagnostics Delivery receipt telemetry tracking FCM handoff to mobile acknowledgment

Engineering Trade-offs & Solutions

Architectural Dilemma Chosen Solution & Rationale
Native Java/Objective-C vs. cross-platform wrapper Reliable background wakeups, custom notification channels, and strict battery-exemption handling for urgent clinical pages behave differently on Android and iOS. Native Java and Objective-C implementations gave direct access to OS power-management and SQLite lifecycle hooks without bridge latency.
Server-side locking vs. database unique constraints alone Relying solely on SQL unique errors forces noisy exception handling and partial rule checks under broadcast spikes. Combining Redis short-lived mutex locks with MySQL row transactions kept conflict resolution deterministic and clean.
Full schedule sync vs. incremental SQLite deltas Multi-campus rosters span thousands of shifts across weeks. Syncing by updated_at high-water marks and clinician-scoped subscriptions keeps mobile SQLite writes fast and minimizes cellular bandwidth.
Notification payload richness vs. data minimization High-priority FCM envelopes transmit concise operational metadata and alert severity rather than sensitive patient identifiers, fetching extended response notes only over authenticated TLS endpoints once the app opens.

Security & Reliability

Authentication binds bearer credentials to verified staff profiles, enforcing role-scoped authorization across campus boundaries so a roster coordinator in one facility cannot alter schedules in another without explicit multi-site permissions. All API traffic runs over TLS, while local SQLite databases store only operational shift metadata and encrypted session references—never raw patient records.

To prevent silent notification failures, the mobile clients periodically report push-token health and OS notification permission status to Laravel during delta syncs. Coordinators see an immediate visual warning on the web console if a scheduled on-call clinician has disabled critical alert permissions or holds a stale push registration.

Performance & Scale

Burst traffic concentrates around shift-release windows and urgent campus broadcasts when hundreds of clinicians open the app simultaneously. By reading schedule feeds against indexed MySQL views warmed via Redis cache keys and serving mobile UI views straight from local SQLite, API read pressure stays low even during shift-change peaks. Queued Firebase fan-out jobs batch recipient tokens cleanly and throttle retries with exponential backoff so transient network blips never block urgent escalation timers.

Operational Outcomes

Roster coordinators moved away from manual phone chains to deterministic, rule-verified shift matching across campuses, eliminating accidental double-bookings and credential mismatches. Clinicians gained reliable offline access to their schedules inside hospital dead zones and clear, closed-loop urgent paging that confirms when a colleague has actively accepted responsibility for an incident.

01 — Questions

asked about this kind of project

How do you prevent two clinicians from claiming the same open shift simultaneously?

Shift claims pass through an atomic Redis lock keyed by the shift identifier before touching MySQL. Inside the lock, Laravel validates credential eligibility, fatigue-break rules, and overlapping commitments, marks the shift filled inside a database transaction, and broadcasts an instant cancellation payload via Firebase so competing clients clear the vacancy immediately.

Why embed SQLite on both Android and iOS instead of relying purely on API responses?

Hospital basements, imaging suites, and ambulance bays routinely drop cellular and Wi-Fi signals. Caching each clinician's upcoming roster, campus contacts, and active incident protocols in a local SQLite database guarantees zero-latency access offline, while outbound shift requests and alert acknowledgements queue safely until connectivity returns.

How do Firebase high-priority alerts behave reliably when Android or iOS devices are asleep?

Urgent pages dispatch as high-priority FCM data messages rather than display-only notifications, waking the native Java broadcast receiver on Android and triggering critical-path notification logic on iOS. Devices immediately post a delivery beacon back to Laravel so coordinators see whether a page reached the handset or requires escalation to an alternate responder.

How does the scheduling engine enforce clinical credentialing and fatigue rules?

Every open shift carries required specialty tags, facility clearances, and minimum rest intervals. Rather than filtering only in the mobile UI, the Laravel API evaluates eligibility rules at both feed-generation time and claim-execution time, rejecting any swap or overtime claim that violates mandatory rest windows or expired certifications.

What happens when an urgent alert receives no response from the primary team?

Urgent alerts run on stepped escalation waves managed by Laravel queued jobs. Wave one targets on-shift leads at the affected campus; if no clinician taps Accept within the configured window, wave two expands to adjacent departments or standby rosters while logging every notification attempt for clinical governance review.

How are roster updates synchronized to mobile SQLite stores without draining device batteries?

Instead of polling full monthly schedules, mobile clients perform watermark-based delta syncs triggered either by silent Firebase invalidation hints or foreground app opens. Only modified shift blocks and contact entries are downloaded and upserted into SQLite.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.