Mediloop
HEALTHCARE SYSTEMS CONNECTORS

Best Practices / APIs & SDK / Next Steps

9 of 9

Practical guidance, API and SDK examples, and recommended steps to implement, modernize and operate HIS/EHR integrations with Mediloop from sandbox to production.

Implementation GuideAPI ExamplesTypeScript SDKTesting & CertificationMonitoringProduction ReadinessSupport
End-to-End Integration Reference Architecture
1
HIS / EHR Source
ADT, scheduling, orders/results, documents, meds/allergies/dx
2
Mediloop Connector
Receive, validate, transform, route, retry
3
MSIS – Semantic Layer
Normalize, terminology mapping, identity reconciliation
4
Mediloop Platform
Patient record, workflows, CareFlow and services
5
External / National Systems
DSP, DMP, other providers and future cross-border
Implementation Checklist
1. Discover

Inventory source systems, interfaces, messages, identifiers and owners.

2. Map

Define canonical/FHIR mappings, terminology and source-of-truth rules.

3. Secure

Set authentication, scopes, tenant context, consent/legal basis and certificates.

4. Build

Use standards, connector SDK and adapters appropriate to each integration surface.

5. Test

Validate happy paths, errors, retries, duplicates, ordering and reconciliation.

6. Go live

Stage rollout, monitoring, rollback and production support.

Developer Integration Surface
SurfaceExamplesUse whenStatus classification
FHIRPatient, Encounter, Appointment, ServiceRequest, Observation, DiagnosticReport, DocumentReference, MedicationRequest, CarePlan, TaskYou want modern standards-based clinical data accessFHIR endpoint / resource surface
HL7 v2ADT, SIU, ORM/OML, ORU, ACKYou must integrate established hospital/interface-engine workflowsProtocol operation
CDA / C-CDA / IHEClinical documents, MHD/XDS exchangeYou need document-centric enterprise/national exchangeDocument/profile operation
Events / WebhooksLifecycle/status/change notificationsYou need event-driven synchronizationPlanned until backend contract verified
Connector SDKBuild adapters, parsing/mapping and operational handlersYou are developing reusable/custom connectorsSDK surface
Mediloop REST façadeSimplified domain APIs above standards where usefulYou are building a new app or modernizing legacy modulesPlanned until route verified
API & SDK Examples
FHIR — create an order
httpCopy
POST /fhir/ServiceRequest
Content-Type: application/fhir+json
Authorization: Bearer <token>

{
  "resourceType": "ServiceRequest",
  "status": "active",
  "intent": "order",
  "subject": { "reference": "Patient/pat_123" },
  "encounter": { "reference": "Encounter/enc_456" }
}
Connector SDK — handle an ADT event
typescriptCopy
connector.on('hl7.adt', async ({ message, context }) => {
  const parsed = await connector.hl7.parse(message);
  const result = await connector.map.toFhir(parsed, {
    resources: ['Patient', 'Encounter'],
    tenantId: context.tenantId,
  });

  await connector.fhir.upsert(result);
  return connector.hl7.ack('AA');
});
Error Handling & Reconciliation
ProblemRecommended behavior
Schema / message validation failureReject with actionable error; do not partially persist unknown state
Temporary downstream outageRetry with exponential backoff and idempotency
Duplicate message/resourceDetect via source identifiers and safely acknowledge duplicate
Identity ambiguityRoute to controlled identity-reconciliation workflow
Terminology mapping uncertaintyPreserve source code and flag unresolved mapping
Out-of-order eventsUse event/version timestamps and reconciliation rules
Permanent failureMove to DLQ / exception queue with support visibility
Testing & Certification
Test using representative HL7/FHIR/CDA payloads from real source systems
Include negative, duplicate, retry, ordering and cancellation scenarios
Validate identity matching and terminology mapping separately
Use sandbox/staging before production
Record country/vendor-specific certification or onboarding evidence
Regression-test after source-system, firmware, interface-engine or standards changes
Monitoring & Operations
Connector healthUp/down, last successful exchange, certificate/trust state
ThroughputMessages/resources per minute and queue depth
LatencySource-to-Mediloop and Mediloop-to-target delay
QualityValidation errors, unmapped codes, duplicate/unmatched rates
ReliabilityRetries, DLQ volume, acknowledgement failures
ReconciliationOutstanding mismatches and stale synchronization
AuditActor/source/tenant/purpose/correlation coverage
Production Readiness
Document authoritative systems and conflict rules
Pin supported protocol/profile/SDK versions
Provision secrets/certificates with rotation plan
Establish SLOs, alerting and support ownership
Test rollback, replay and disaster-recovery procedures
Use phased deployment and reconciliation before full cutover
Classify every documented API as real, planned, FHIR, protocol or external adapter
Modernize a Legacy Healthcare Application
1
Inventory legacy capabilities
Auth, patient, scheduling, orders, documents, meds
2
Wrap with connectors
Keep legacy system operational while adding Mediloop
3
Introduce canonical/FHIR layer
Normalize data and identifiers
4
Replace modules progressively
Move selected capabilities to APIs/SDKs
5
Synchronize side-by-side
Measure parity and reconcile differences
6
Retire safely
Decommission only after verified cutover
The goal is not to force a big-bang rewrite. Mediloop should let software vendors modernize capability by capability while stable, versioned contracts absorb much of the standards and infrastructure evolution underneath.
Next Steps
API & SDK Capability Map

Choose the right surface for each capability.

Connector SDK

Build reusable adapters and protocol handlers.

Production Onboarding

Complete security, testing and operational readiness.

Support & Integration Review

Validate mappings, standards and rollout plan with Mediloop.