Skip to main content

Provider Directory Service — Migration Plan

Status: populated Owner: TBD Last updated: 2026-04-17

1. Context

Legacy sources: a single module provider-directory (version 1.0). Migration moves code and data into the unified provider-directory-service.

2. Tracks

TrackDescriptionPhase
T1Code move into services/provider-directory-service; hexagonal refactorM0
T2Schema ETL into provider_directory.*; preserve IDsM0
T3Event renaming: legacy provider.* → canonical provider_directory.* with 30d dual-publishM0 → M1
T4Credential lifecycle introduction (new scanner + events)M1
T5Search index build (OpenSearch) + cut-over from DB-only searchM1
T6FHIR R4 full projection rolloutM2

3. Data mapping

Legacy entityNew tableNotes
provider_profilepractitionersJSON names + identifiers expanded
provider_rolepractitioner_rolesSplit privileges into JSON array
service_endpointendpointsauth_method introduced with default none
(new) credentialscredentialsPopulate from provider_profile.credentials[]

4. Event rename

LegacyNew
provider.createdprovider_directory.practitioner.created.v1
provider.updatedprovider_directory.practitioner.updated.v1
provider.credential.expiringprovider_directory.credential.expiring.v1
endpoint.updatedprovider_directory.endpoint.updated.v1

Dual-publish for 30 days; consumers cut over; legacy retired.

5. Procedure (per tenant)

  1. Freeze provider writes 15 min.
  2. Snapshot legacy DB.
  3. ETL to new schema; build OpenSearch index.
  4. Smoke tests.
  5. Unfreeze; dual-publish enabled.
  6. 30d consumer cut-over.
  7. Retire legacy subjects.

6. Rollback

Legacy DB read-only for 90 days. Feature flag toggles routing back to legacy service if incident.

7. Consumer impact

ConsumerImpactMitigation
scheduling-serviceEvent renameDual-subscribe during window
orders/medication/lab/radPrivilege check endpoint movesBoth endpoints live 30d
interop-serviceFHIR path unchangedNone
facility-serviceNew subscription to practitioner.createdRelease-train coordinated