EHR Integration for Dietitian Software: Why MealCircle Chose FHIR Over Direct EHR Sync
How I designed MealCircle's EHR integration strategy — why FHIR R4 over direct EHR connectors, how NutritionOrder resources map to dietitian workflows, and the middleware decision.
The EHR Integration Question for Nutrition SaaS
When I built MealCircle, I had to decide how deeply to integrate with EHR systems. Dietitians work within clinical workflows that are often anchored to Epic, Athenahealth, or a practice's PM system. Nutrition data — meal plans, weight trends, lab values — ideally flows between MealCircle and whatever EHR the practice uses.
The naive approach: build direct connectors for Epic, Athenahealth, Cerner. The realistic approach: build against FHIR R4 and let an EHR middleware layer handle vendor-specific details.
Why FHIR Over Direct EHR Connectors
Building a direct Epic connector means going through Epic App Orchard approval — a 3–9 month process before a single production hospital can use it. Building a direct Athenahealth connector means learning Athenahealth's proprietary API alongside the AthenaOne REST model. Building a direct Cerner connector means learning Cerner's FHIR profile differences from Epic's.
Each connector is a separate project. Each requires ongoing maintenance as vendors update their APIs. For a solo-built SaaS, three parallel EHR integrations is not a viable scope.
The FHIR approach: MealCircle exposes and consumes standard FHIR R4 resources. Practices that need deep EHR integration deploy a middleware layer (either their EHR vendor's existing integration or a custom middleware) that speaks FHIR to MealCircle and whatever protocol the EHR requires on the other side.
Relevant FHIR Resources for Dietitian Workflows
Patient — demographics, contact, insurance coverage
NutritionOrder — prescribed diet type, supplement orders, caloric targets
Observation — weight, BMI, lab values (HbA1c, lipid panel)
Goal — patient-stated goals (weight target, dietary compliance goal)
CarePlan — the care coordination framework connecting all of the above
MealCircle populates Observation resources from patient-logged meal data (caloric intake, macronutrient breakdown) and exposes them via FHIR for EHR sync. Weight measurements logged by patients are emitted as FHIR Observations with LOINC code 29463-7.
The Integration Architecture in Practice
[MealCircle FHIR API]
↕ FHIR R4 REST
[EHR Middleware / Integration Engine]
↕ HL7 v2 or vendor FHIR
[Hospital EHR (Epic / Athenahealth / Cerner)]
MealCircle is vendor-agnostic at the FHIR layer. The middleware handles the EHR-specific translation. This means adding a new EHR connector doesn't require touching MealCircle's codebase — just the middleware configuration.
The HIPAA Implications of EHR Integration
Any data flowing between MealCircle and an EHR crosses a PHI pipeline. That pipeline must be encrypted end-to-end, all intermediate services must have signed BAAs, and the middleware must not persist PHI beyond what's needed for the translation operation.
See MealCircle's how it works page for the clinical context, or the for clinics page for how practices use MealCircle within their existing clinical stack.
The EHR / EMR Middleware service handles the vendor-specific EHR integration layer — connecting FHIR-compatible SaaS products to Epic, Cerner, and Athenahealth environments.
Related Service
EHR / EMR Middleware
Deep-dive into our engineering approach, capabilities, and technical specifications.
Written by Sheharyar Amin
Founder & Lead Engineer, Opexia