EHR integration guide
Send device data to Epic, Oracle Health and other EHRs over FHIR R4 or HL7, through your device cloud. This guide covers the architecture, authentication, the FHIR resources involved, the errors teams hit most often, and what actually sets the timeline.
Short answer
Do not connect the device to the EHR directly. Route the data through your device cloud. The cloud matches the patient, maps each measurement to a FHIR resource, authenticates server to server and records every exchange. The integration build can be short. Hospital security review and EHR-side activation usually set the timeline.
Data stored once in the device cloud then serves the EHR, your clinician and patient portals, and your analytics.
On BioT, the EHR connection runs as a managed EHR integration module next to your tenant. Each health system is configured as its own endpoint, with its own base URL, authentication type, token URL, client ID and environment. One deployment can serve several health systems at once.
| Capability | Direction | FHIR R4 resources |
|---|---|---|
| Send vital signs | Device cloud to EHR | Observation |
| Upload clinical documents: device reports, session summaries, ECG strips | Device cloud to EHR | DocumentReference |
| Get patient information: demographics, conditions, medications, allergies, lab results | EHR to device cloud | Patient, Condition, MedicationRequest, AllergyIntolerance, DiagnosticReport |
Each read command can request any subset of those resources. Two initiation patterns are common. In the event-driven pattern, a measurement arrives and a rule pushes it to the chart. In the on-demand pattern, a clinician or an external system asks for the exchange, either through your application or through the BioT REST API.
The FHIR R4 vital signs profile requires a status, the category vital-signs, a LOINC code, a patient reference, a time and a numeric value with a UCUM unit, or a reason the value is absent. These are the default mappings:
| Measurement | LOINC | UCUM unit |
|---|---|---|
| Heart rate | 8867-4 | /min |
| Respiratory rate | 9279-1 | /min |
| Oxygen saturation (SpO2) | 2708-6 | % |
| Body temperature | 8310-5 | Cel or [degF] |
| Blood pressure panel | 85354-9, with components systolic 8480-6 and diastolic 8462-4 | mm[Hg] on each component |
The blood pressure panel carries no top-level value. The systolic and diastolic components carry the values. The measurement timestamp maps to effectiveDateTime. Additional measurements and codes are added in configuration.
Agree the mapping with each site early. Many Epic sites file incoming Observations to flowsheet rows. The site's EHR analyst decides which codes land where, so the clinical mapping is a joint decision between your team and the hospital.
EHRs authenticate backend integrations with OAuth 2.0 client credentials. The common standard is SMART Backend Services: you register a backend app with the EHR vendor and register a public key, and the integration signs a short-lived JWT assertion each time it requests an access token. No user logs in, and no password is stored on a device.
Your application generates the report, uploads it through the BioT file API and starts an upload command. The EHR integration module builds a DocumentReference, sends it and returns the EHR's document ID.
Document requirements vary by EHR and by site. Confirm these with each health system before go-live:
With Epic, enable both of Epic's DocumentReference APIs, Clinical Notes and Document Information, for your app.
| Symptom | Usual cause | Fix |
|---|---|---|
| 403 insufficient_scope | Scopes requested in the wrong format, or an API the operation needs is not enabled for the app | Request scopes in the format the EHR expects and enable every API the operation uses |
| 400 Valid encounter required | The patient has no active encounter | File against an encounter. For remote monitoring, confirm the site's workflow, which may use a monitoring order or episode instead. |
| invalid_client or invalid_grant at the token endpoint | The JWT audience does not match the token URL, clock skew, or a key mismatch | Set the audience to the exact token URL, keep server clocks in sync and check the registered public key |
| unauthorized_client in production | The health system has not activated the app or approved its scopes | Complete activation with the site's EHR team |
| 422 on a document | A field the site requires is missing, such as author, status or period, or the content type is not accepted | Add the required fields and send a content type the site accepts |
| 401 at the FHIR server after a token was issued | The token was issued for a different tenant or environment than the FHIR base URL | Discover both from the site's SMART configuration document |
| Risk of filing to the wrong patient | A weak identifier match, a mistyped record number, merged or moved records | Store the EHR patient ID at enrollment, verify identity, and define a process for merges, transfers and withdrawn consent |
Because every command stores the request, the response and the status, most of these are diagnosed from the command record without reproducing the call.
There are two clocks. The first is the build: configuring the endpoint, the templates and the code mapping, then testing against the EHR vendor's test environment. On BioT this is configuration of an existing module, and it is usually the short part.
The second clock is the health system. Expect these steps at each site:
IT security, privacy, clinical informatics, the EHR team and a clinical champion are usually involved. A practical sequence is a proof in the vendor's test environment first, then one pilot site, then each new site added as a new endpoint in configuration.
EHR interface: standards-based, FHIR R4, HL7 or open APIs. Epic and Oracle Health are documented named integrations. BioT customers have integrated with Athena Health and PointClickCare, among others. Other EHRs that support FHIR R4 or HL7 are added during onboarding.
You need someone who owns the clinical mapping decisions with each hospital. The integration module, the templates and the setup come from BioT.
Yes. Each health system is a separate endpoint with its own URLs, credentials and environment, and they can run on different EHRs.
No. Epic does not require a marketplace listing for a health system to connect your product. Each health system activates your app and client ID in its own environment. A listing can still support your commercial strategy.
Store the EHR patient ID on the patient record at enrollment, verify identity during enrollment, and define what happens when records merge, a patient moves to another health system or consent is withdrawn.
Yes. Each command keeps the request, the EHR response and the status, and PHI is kept out of the logs.
On AWS in the US, EU or Asia, either in your own AWS account or in a BioT-managed environment dedicated to your production, with a BAA and a DPA in both models.
Related: FDA cybersecurity for a medical device cloud, remote patient monitoring infrastructure, compliance and certifications, and the EHR integration module documentation.