WEARABLES & IOT CONNECTORS
Best Practices / APIs & SDK / Next Steps
7 of 7Everything developers need to integrate wearable and IoT devices with Mediloop from architecture and implementation through testing, monitoring and production readiness.
Implementation ChecklistAPIs & SDKWebhooks & EventsTesting & CertificationMonitoring & OperationsProduction Readiness
End-to-End Integration Flow
1
Device
Wearable / IoT source collects measurements
2
Connectivity
BLE, platform API, provider cloud or gateway
3
Mediloop Connector
Authentication, validation, ingestion and deduplication
4
MSIS
Semantic normalization, units, quality and provenance
5
FHIR & Time-Series
Standardized longitudinal data
6
Patient Record
Dashboards, trends and clinical workflows
7
Monitoring & Alerts
Thresholds, care-team notifications and operations
Implementation Best Practices
Start from the clinical/product use case, then select devices and providers.
Choose the correct integration path: BLE, platform framework, cloud API, gateway or local network.
Request minimum permissions and separate provider authorization from Mediloop authorization.
Normalize data through MSIS while preserving original values, units and codes.
Handle device clocks, time zones, missing data, duplicates and provider delays explicitly.
Preserve device/provider provenance and data-quality indicators.
Implement robust retry, idempotency and reconciliation behavior.
Monitor device/provider connectivity and ingestion health separately from clinical-data quality.
Plan for high-volume time-series retention and query patterns.
Developer Integration Surface
How to use these integration surfaces
This is the quick decision table developers should use before writing code.
| Surface | Operation / resource | Use | Status |
|---|---|---|---|
| Direct device | BLE / GATT / IEEE 11073 where applicable | Mobile/local connection to a supported device | Protocol surface |
| Mobile platform | HealthKit / Health Connect | Use data already mediated by iOS/Android health frameworks | External platform API |
| Provider cloud | Provider OAuth + REST/webhooks | Cloud-connected wearables and medical-device providers | External provider API |
| Gateway / IoT | MQTT / HTTPS / local agent | Home/enterprise IoT and buffered local devices | Protocol surface |
| FHIR | Device / DeviceMetric / Observation / Provenance | Interoperable clinical representation and exchange | FHIR surface |
| Mediloop APIs / SDK | Device registry, ingestion, observation query, events | Simplified app and connector development | Planned/evolving contracts |
APIs & SDK
FHIR search — standards surface
httpCopy
GET /fhir/Observation?patient=pat_123&code=http://loinc.org|8867-4&date=ge2026-08-01
Authorization: Bearer <token>
# Query normalized heart-rate observations.Illustrative TypeScript SDK
typescriptCopy
import { MediloopClient } from '@mediloop/sdk';
const client = new MediloopClient({
apiKey: process.env.MEDILOOP_API_KEY!,
});
const observations = await client.observations.list({
patientId: 'pat_123',
code: '8867-4',
limit: 100,
});
// SDK naming/contract remains illustrative until production SDK freeze.Webhooks & Events
device.connected / device.disconnected
device.status.changed
observation.created
provider.connection.revoked
data.gap.detected
threshold.triggered / alert.created
jsonCopy
{
"event": "observation.created",
"patientId": "pat_123",
"deviceId": "dev_456",
"occurredAt": "2026-08-31T10:15:30Z",
"data": {
"code": "8867-4",
"value": 72,
"unit": "/min"
}
}Event names and payloads are illustrative until the Mediloop event contract is implemented and versioned. Production webhooks must use signature verification, idempotency and replay protection.
Testing & Certification
Test sandbox/simulated payloads before real devices.
Use representative device/provider versions and real-world sampling behavior.
Validate mappings, units, time zones, gaps and duplicate handling.
Test provider token revocation, permission changes and offline recovery.
Validate clinical-vs-wellness classification and regulatory assumptions.
Perform security, penetration and tenant-isolation testing appropriate to deployment.
Regression-test after provider API, mobile OS, firmware or mapping changes.
Monitoring & Operations
| Signal | What to monitor | Why |
|---|---|---|
| Connector health | Provider auth, gateway/device connectivity, last successful sync | Detect broken connections early |
| Ingestion | Rates, latency, queue depth, retries and failures | Operational reliability |
| Data quality | Gaps, duplicates, outliers, mapping failures, unit errors | Clinical/product trust |
| Provider dependencies | API errors, quota pressure, version/deprecation notices | External dependency risk |
| Security | Auth failures, revocations, unusual exports/access | Security and governance |
| Time series | Storage growth, query latency, retention/downsampling | Scalability and cost |
Production Readiness
Security and privacy review completed.
Provider/device agreements, programs and permissions verified.
Data mapping and normalization versioned and tested.
Error handling, retries, idempotency and reconciliation implemented.
Monitoring, alerting and support ownership configured.
Retention, time-series scaling and disaster recovery reviewed.
Clinical/regulatory intended-use boundaries documented.
Developer integration surfaces classified as FHIR/protocol/external/real/planned.
Example Use Cases
Remote Patient Monitoring
Longitudinal vitals and alerts for chronic-condition programs.
Diabetes Management
CGM data with trends, gaps, patient context and care-team workflows.
Cardiac Rehabilitation
Activity, heart rate and recovery with progress monitoring.
Preventive Care & Wellness
Steps, sleep, activity and lifestyle data with clear wellness context.
Research & Real-World Evidence
Governed, consented/pseudonymized datasets with provenance.
Next Steps
1
Choose use case
Define data, device and intended-use requirements
2
Choose integration path
BLE, platform, cloud, gateway or local
3
Implement
Standards, adapters, APIs or SDK as appropriate
4
Validate
Real/simulated data, quality, security and edge cases
5
Deploy
Production onboarding, monitoring and support
6
Iterate
Track provider/platform changes and mapping versions