Challenge:
APrime engaged with an early-stage Behavioral Health Tech startup (who has since raised their Series C) to scale critical pieces of their technical architecture and to hire and mentor much of their in-house engineering team. One of our most transformational projects was helping migrate from an EHR integration the client had initially built out as a monolithic backend – with several fragile, bespoke integrations tied to specific scheduling tools and a single EHR – to a more modern, scalable solution. Our challenge was to architect and build an abstracted and performant solution that was EHR-agnostic and extensible to support various integrations, allowing the client flexibility in vendor options and seamless onboarding for additional providers.
At the project’s outset, the client’s backend was a single Python application running a series of ETL jobs that routinely polled their vendor scheduling tool for appointments and provider timeslots. These responses were stored in the monolithic database and could be joined with internal business objects. Key challenges we needed to address in architecting a new solution included:
- Timeliness and scalability. The scheduling vendor’s APIs were slow and inflexible, with ETL jobs for a 3 month period taking over four hours–an unsustainable load as more providers came on board.
- Data pollution. The vendor’s data was stored within the client’s main database and linked to internal business objects, creating data management issues.
- Lack of flexibility. Vendor-specific fields were hardcoded in the database, preventing support for additional scheduling providers.
Solution:
We created a robust framework that isolated external provider data from internal business objects and created a dedicated service to manage interaction with scheduling providers. This approach allowed us to decouple the ETL jobs from the monolithic application and migrate them into the new scheduling service.
Platform architecture and vendor integration before (left) and after (right) our implementation
Implementation Highlights:
✅ Timeliness and Scalability. The scheduling vendor’s APIs didn’t provide change notifications, so we essentially configured webhooks to simulate event-driven updates, enabling the system to detect availability and appointment changes and notify the core application asynchronously. To mitigate slow processing times, we introduced parallelization to streamline ETL jobs.
✅ Eliminate data pollution. The new scheduling service stores responses in its own private database, exposing a normalized client representation for appointments and time slots to ensure data integrity across systems.
✅ Enhanced flexibility. We removed all vendor-specific references from the main database and abstracted all related vendor data and logic into the the new scheduling service
Transformation:
The new architecture was a success on all fronts.
Parallelizing the ETL jobs accelerated the polling of availability slots sixteenfold, reducing runtime from over 4 hours to under 15 minutes. Refactoring the monolithic application to respond to appointment change events also streamlined the codebase (detangling the scheduling vendor’s API polling from acting on appointment changes) and reduced related maintenance tremendously. All vendor-specific mentions were successfully abstracted out of the monolith database.
The impact? When our client onboarded a new EHR, it was a seamless integration with the scheduling service, requiring no adjustments to the contract between the monolith and the scheduling service.
Our client was so satisfied with the abstraction layer that they adopted our service architecture as a model for scaling other critical areas of their system.
A year post-engagement, our client continues to grow rapidly, leveraging and extending the system we built to scale their provider network and smoothly integrate additional EHRs.
Testimonial:
“We relied heavily on APrime’s engineers for my entire tenure… They were excellent to work with and provided a tremendous amount of value to our team. I cannot recommend them enough and hope to continue to work with them.”
– Jeff, CTO
“I regularly share that my experience with APrime is the best contracting/consulting experience I’ve had in my career. Not only did the team do incredible implementation work, they also acted as mentors and leaders within the engineering team; helping with every detail of a project from planning through to completion.”
– Emilie, Director of Engineering
Let Aprime help you overcome your challenges
and build your core technology
Are you ready to accelerate?