Skip to main content

Provider Directory Service — Service Overview

Status: populated Owner: TBD Last updated: 2026-04-17 Companion: Service Template · 03 platform-services · 02 DDD

1. Purpose

The provider-directory-service is the authoritative registry of clinicians and care-delivery service endpoints within the Ghasi-eHealth platform. It owns Practitioner identities, their roles and privileges, licenses-to-practice, credential lifecycle, specialties, and service/endpoint discovery. It exposes this data to scheduling, orders, clinical notes, billing, and interoperability partners.

2. Bounded Context

Provider Directory — classified as Supporting. It sits between Identity (who is the user) and clinical services (what can they do). It complements facility-service by linking providers to nodes, but it owns the clinical-professional view (license, specialty, credentials) that facility-service does not.

3. Responsibilities

AreaWhat provider-directory Owns
Practitioner identityPractitioner aggregate: name variants, telecoms, specialties, employment status
Practitioner rolesPractitionerRole with scope (department/location) + privileges
Credentials / licensesCredential entity — issuing authority, expiry, status; notification on expiry
Service endpointsServiceEndpoint — FHIR / HL7 URLs per organisation/location
Healthcare servicesHealthcareService — service offerings bound to location + specialty
Specialty taxonomyDeployment-configurable taxonomy references (SNOMED, local)
National IDsMedical-council registration numbers, tazkira-linked identifiers (AFG), DHA/DoH numbers (UAE)
Multi-script namesLocal script + Latin transliteration; display-order rules
Search & listingsFull-text + filter search; deterministic ordering
FHIR projectionPractitioner, PractitionerRole, HealthcareService, Endpoint
Credential expiry eventsLifecycle events for privilege gating upstream

4. Non-Responsibilities

AreaOwnerWhy Not provider-directory
Login / credentials / MFAidentity-serviceIdentity authenticates users; provider-directory describes their clinical profile
Node assignments (provider ↔ location)facility-service (ProviderNodeMembership)Facility owns the graph membership edge; provider-directory stores primary profile and reacts to membership events
Scheduling availabilityscheduling-serviceScheduling consumes provider + working hours from facility
Privilege evaluation at runtimeaccess-policyProvider-directory publishes privileges; access-policy decides
Billing NPI equivalentsbilling-serviceBilling consumes; does not own

5. Dependencies

5.1 Upstream

DependencyPatternPurpose
identity-serviceCFJWT validation; sub claim links to Practitioner.userId
tenant-serviceShared kernelTenant isolation
facility-serviceEvent + RPCNode memberships, locations
terminology-serviceRPCSpecialty taxonomy lookup
access-policyRPCWrite authorization
Licensing (platform-admin)RPCModule entitlement ehr.provider-directory

5.2 Downstream Consumers

ConsumerPatternWhat they consume
scheduling-serviceEvent + RPCPractitioner profile, role, working hours
orders/medication/laboratory/radiologyEvent + RPCPrivilege gating (can-order, can-prescribe)
patient-chart-serviceRPCAttribution on clinical notes
billing-serviceEventProvider identifiers for claims
interop-serviceEventFHIR Practitioner / Endpoint
facility-serviceEventCreates ProviderNodeMembership when practitioner.created arrives
population-health-serviceEventWorkforce analytics

5.3 Events Consumed

EventProducerPurpose
identity.user.registered.v1identity-serviceOptional JIT shadow Practitioner for clinician users
tenant.tenant.created.v1tenant-serviceInitialize specialty taxonomy defaults
facility.provider_membership.assigned.v1facility-serviceUpdate cached node context for provider
gdpr.subject_request.received.v1platformParticipate in erasure flow

6. Slice Involvement

SliceScopeMilestone
S0 — FoundationPractitioner CRUD, role assignment, specialty catalog, search, FHIR PractitionerM0
S1 — CredentialsLicense + credential lifecycle, expiry notifications, privilege gating, endpoint registryM1
S2 — InteropFull FHIR R4 (PractitionerRole, HealthcareService, Endpoint), HL7 v2 PV1/ORC alignmentM2
S4 — EnterpriseNational registry bridges (AFG medical council, UAE DHA), multi-script UX polishM3

7. Architectural Freeze Points

FreezeWhatBy
F03PractitionerId, PractitionerRoleId, CredentialId, EndpointId, HealthcareServiceId branded typesEnd of M0
F01EventEnvelope on provider_directory.* eventsEnd of M0

8. Readiness Levels

LevelTargetCapabilities
L2M0CRUD + search operational; manual monitoring
L3M1Credential lifecycle, privilege gating, contract tests, SLOs
L4M3National registry integration, chaos-tested, multi-region

9. Architecture Diagram

10. Key Design Decisions

  1. Practitioner is separate from User. Identity owns login; provider-directory owns the clinical-professional view. Link via userId (optional — not every practitioner has a system login).
  2. Credentials gate privileges. A provider without an active license cannot be granted ordering/prescribing privileges (BR-PROV-001).
  3. Specialty taxonomy is configurable. Deployments may use SNOMED CT, local codes, or both; provider-directory stores the code + system; terminology-service resolves.
  4. Search is ElasticSearch / OpenSearch-backed for fuzzy name matches across scripts.
  5. Node membership lives in facility-service. provider-directory emits practitioner.created and consumes facility.provider_membership.* for cache.
  6. FHIR is a projection. Practitioner, PractitionerRole, HealthcareService, Endpoint are generated from internal domain.