Engagement · Healthcare
Integrating patient scheduling across a hospital group through standards-based interfaces
Booking staff and patients at a hospital group get one view of appointments across sites, built on HL7 and FHIR interfaces with privacy controls included.
The situation
A hospital group has grown through mergers into several hospitals and a set of outpatient clinics. Two of the hospitals share an electronic health record that includes a scheduling module, a third runs a different record system, radiology books appointments in its own information system, and some specialty clinics use a standalone practice management product. Because each system has its own patient identifiers, appointment types and definition of a clinic location, scheduling was never connected, even though an integration engine already carries admissions and results messages between some of them.
Patients notice the gap. When someone is referred from one site to another, staff book the appointment by phone, reading from one screen and typing into another, and the contact center has no view of imaging appointments at all. Reminders are sent from three systems and sometimes contradict each other. The group wants a single view of appointments and the ability to book across sites, while keeping every existing scheduling system and without giving any role more access to patient information than it needs.
What was going wrong
No shared view of a patient's appointments
A contact center agent can see bookings in the main record system and in no other system. If the patient has a scan at another hospital on the same morning, the agent has no way of knowing and may book a clinic visit that clashes with it.
The same patient under several identifiers
Each hospital issues its own medical record number, names are spelled in different ways and addresses are often out of date. Unless patients can be matched reliably, appointments from two systems cannot safely be presented as belonging to the same person.
Each site uses HL7 differently
All the systems can send HL7 version 2 scheduling messages, but each one uses local appointment type codes, fills optional segments in its own way and follows its own rules for reschedules. Where one system sends a cancellation followed by a new booking, another sends a single update.
Double booking and stale slots
Cross-site referrals are booked by phone against a slot that someone read out a few minutes earlier, and by the time the booking is typed in the slot may already be taken. When a site cancels an appointment, the freed capacity stays invisible to other sites that could have used it.
Our approach
In orderRecord real messages first
We would capture scheduling messages from every source system over several weeks, including new bookings, reschedules, cancellations, no-shows and the unusual cases. Designing the interfaces from what the systems actually send exposes the places where they depart from the specification, and the same recordings later serve as a replay test suite.
Agree a shared vocabulary
Working with service managers from each site, we map local appointment types, locations and statuses to a single group-wide set, and the department that owns each clinic approves its mapping. The mapping is kept in a maintained table, which means adding a new clinic is a configuration change.
Settle patient matching rules
Matching uses the group's master patient index if one exists, or sets one up for this purpose if it does not. Exact matches on agreed identifiers are linked automatically and probable matches are sent to the health records team for confirmation, while uncertain matches are left unmerged by the system in every case.
Read first, write second
The first release is a consolidated read-only view for the contact center, fed by events from each system. Cross-site booking writes into another site's scheduling system, so it comes later, once the view has been running without problems and the clinical safety review of the booking flow has been completed.
Review privacy and safety before each release
Together with the group's privacy officer and clinical safety lead, we record who sees which fields and for what reason, along with the hazards that a wrong or missing appointment could create. The mitigations are built and tested, and the review is signed off before go-live.
The design
The parts and what each one doesIntegration engine routes
Each scheduling system sends HL7 version 2 SIU messages to the existing integration engine, which validates them, keeps them in order for each patient, rejects duplicates and translates local codes through the mapping table.
Canonical appointment store
Appointments from all sources are held in a single model aligned with the FHIR Appointment, Schedule and Slot resources, with each record keyed to the source system's identifier and to the matched patient.
Patient identity service
This service sits over the master patient index and resolves each source identifier to a group-wide identity. It exposes the confidence of each match and places uncertain cases in a queue for the health records team.
FHIR API for consumers
The contact center application and the patient portal are served through a FHIR API secured with OAuth 2.0 scopes, and each consumer receives only the resources and fields that its role has been granted.
Booking adapters
For cross-site booking, each scheduling system has an adapter that checks the slot and writes the appointment through that system's supported interface, using an idempotency key so that a retry cannot create a second booking.
Monitoring and reconciliation
Alerts are raised when a route's queue stops moving or its volume falls unexpectedly, and a nightly job compares the canonical store with each source system's appointment list and reports any differences.
Safeguards
What keeps a bad day smallMinimum necessary access
Contact center staff see the time, location, service and status of an appointment. Sensitive clinic types such as mental health or sexual health appear as a generic appointment unless the user's role allows more detail, and every view of a patient's appointments is logged.
Source systems stay authoritative
Each scheduling system remains the system of record for its own appointments. The shared store is a copy that can be rebuilt by replaying messages, and any discrepancy is resolved in favor of the source system.
No uncertain merges
Two records are displayed as one patient only after a confirmed match. Where identity is uncertain the appointments are kept separate, since missing a link is safer than showing one patient's visits to someone else.
Test environments use no patient data
Development and test environments work with synthetic or de-identified messages. The recorded production messages used for replay tests are kept in a controlled environment and handled under the group's privacy rules.
Timeline
Weeks 1 to 3
We capture messages from every source, run vocabulary mapping workshops with service managers, agree matching rules with health records, and scope the privacy and clinical safety work.
Weeks 4 to 7
We build the integration engine routes, the canonical store and the identity service, run the replay suite on recorded messages and begin reconciling against the source systems.
Weeks 8 to 10
The FHIR API and the contact center view are built with access scopes and audit logging, the privacy and safety reviews are signed, and one contact center team starts a pilot.
Weeks 11 to 12
The read-only view goes live across the group, runbooks and on-call procedures pass to the integration team, and the design for cross-site booking is reviewed.
Following phase
Booking adapters are built for one scheduling system at a time, each with its own safety review, beginning with the two sites that exchange the most referrals.
What it changes
What the build is designed to changeWhen a contact center agent answers a call, they can see every appointment the patient holds anywhere in the group, within the limits of their role, which lets them avoid clashes or combine visits at the same site. Once cross-site booking follows, a referral is booked against a live slot in the receiving system where it would previously have been arranged over the phone, and a cancellation at one site shows up as available capacity for another.
Behind that view, the group gains a scheduling vocabulary that its departments have agreed, a tested method for identifying a patient across sites, and interfaces that are monitored and can be replayed. Its privacy officer has a written account of who can see what, supported by an access log, and the measures below are how the group would establish whether the design is doing what it was built to do.
How success is measured
- Differences between the shared store and the source systems found at nightly reconciliation
- Delay between a booking change in a source system and its appearance in the view
- Patient matches waiting for manual confirmation, and how long they have waited
- Conflicting or duplicate appointments found for each patient across sites
- Access log reviews completed and the exceptions they found, broken down by role
What generalizes
Recorded messages show how sites apply standards
HL7 version 2 and FHIR define a structure, but each site fills that structure in its own way. Designing from captured messages reveals those local habits early, and replaying the recordings before each change stops a fix made for one hospital from breaking the interface at another.
Patient identity needs explicit ownership
Moving appointment messages between systems is routine engineering work. Deciding that two records belong to the same person is a clinical and privacy decision with consequences either way, so it needs explicit rules, a queue for human review and an owner in health records.
Bookings are written after the view proves stable
A consolidated view is useful on its own, and it brings mapping and matching faults to light while an error costs no more than a wrong display. Writing bookings into another system raises the stakes, so it should wait until the read side has been reconciled for several weeks.
Related
If you have a similar problem, a two-week review is the usual place to start.
Tell us what you are trying to do and where it is stuck. A principal reads every message and replies within one working day.
