Interop Service — Deployment Topology
Status: populated
Owner: TBD
Last updated: 2026-04-18
Companion: Service Template · 03 platform-services · 02 DDD
1. Runtime
| Attribute | Value |
|---|
| Runtime | Node 22 / NestJS 11 |
| Language | TypeScript 5.x |
| HTTP port | 3000 (REST + FHIR) |
| MLLP port | 2575 (HL7 v2 inbound, TLS) |
| Package name | @ghasi/interop-service |
2. Replicas and Scaling
| Environment | Min | Max | Scaling trigger |
|---|
| Production (hub) | 2 | 8 | FHIR request rate > 500/min or CPU > 70% |
| Production (facility node) | 1 | 2 | CPU > 80% |
| Staging | 1 | 2 | Manual |
| Development | 1 | 1 | N/A |
MLLP listener is stateful (TCP connection per connector); sticky sessions for MLLP pods.
3. Kong Routes
| Route | Upstream |
|---|
/fhir/R4/* | interop-service:3000 |
/v1/interop/* | interop-service:3000 |
MLLP 2575 | Direct TCP (bypasses Kong); firewall-controlled |
4. Dependencies
| Dependency | Type | Notes |
|---|
| PostgreSQL 16 | Hard | Message log, connector registry |
| NATS JetStream | Hard | Event publishing + outbound trigger consuming |
| All clinical services | Hard (routing) | FHIR request targets |
| terminology-service | Hard (terminology ops) | FHIR $lookup/$expand proxy |
| access-policy-service | Hard (ABAC) | Patient-linked FHIR read authorization |
| MinIO | Hard (bulk export) | NDJSON file storage |
| Redis 7 | Soft | CapabilityStatement cache (5 min TTL) |
| Keycloak | Hard | JWT validation |
| Kong | Hard | HTTPS routing |
5. Environment Variables
| Variable | Required | Description |
|---|
DATABASE_URL | Yes | PostgreSQL connection string |
NATS_URL | Yes | NATS JetStream URL |
KEYCLOAK_JWKS_URI | Yes | JWT validation |
ABAC_SERVICE_URL | Yes | access-policy-service |
MINIO_ENDPOINT | Yes | MinIO for bulk export |
MINIO_BUCKET_EXPORTS | Yes | Bucket name for export NDJSON |
REDIS_URL | No | CapabilityStatement cache |
MLLP_PORT | No | Default 2575 |
FHIR_PROFILE_VALIDATION_ENABLED | No | Default true |
TERMINOLOGY_SERVICE_URL | Yes | For FHIR terminology op proxy |
6. Service Routing Table (FHIR)
| Resource Type | Category | Owning Service |
|---|
Patient, Encounter | — | registration-service |
Observation | vital-signs | patient-chart-service (vitals) |
Observation | laboratory | laboratory-service |
DiagnosticReport | LAB | laboratory-service |
DiagnosticReport | RAD | radiology-service |
ImagingStudy | — | radiology-service |
Specimen | — | laboratory-service |
ServiceRequest | — | orders-service |
MedicationRequest | — | medication-service |
Immunization | — | immunizations-service |
Appointment, Schedule, Slot | — | scheduling-service |
CodeSystem, ValueSet | — | terminology-service |
Practitioner, Organization | — | provider-directory-service |