Skip to main content

Patient Portal Service — Service Overview

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

Purpose

The patient-portal-service is the Backend-for-Frontend (BFF) for all patient-facing digital channels. It surfaces a controlled, policy-filtered view of the patient's longitudinal health record and enables self-service actions — appointment requests, demographic updates, secure messaging entry, and results viewing. It serves both the responsive web portal and the React Native mobile app from a single API contract.

It is an optional licensed add-on (ehr.portal). Unlicensed tenants receive 403 MODULE_NOT_LICENSED.

Bounded Context Responsibilities

In scopeOut of scope
Patient authentication session management (OIDC/OAuth2 + MFA)Clinical data storage (owned by source-of-record services)
Policy-filtered FHIR read projections (Patient, AllergyIntolerance, MedicationRequest, Observation, Immunization, Appointment, DiagnosticReport, DocumentReference)Claims adjudication and billing workflow (claims-service)
Appointment request submission to scheduling-serviceSecure messaging storage (messaging-service)
Demographic update request workflowPCI-scoped payment processing
Proxy / caregiver delegation managementVirtual visit session management (virtual-care-service)
Patient portal access audit logPopulation health analytics
Patient-initiated FHIR Bundle export
EOB / coverage read projections from claims-service
AI-assisted navigation (non-diagnostic, Tier A only, via ai-gateway-service)
Push notification dispatch (mobile)
Account deletion / closure request routing

Upstream Dependencies

ServiceWhy
identity-serviceJWT issuance, OIDC/OAuth2, MFA, patient realm
registration-servicePatient demographic data (Patient FHIR resource)
scheduling-serviceAppointment reads and booking request intake
orders-service / ehr-serviceMedicationRequest, medication summaries
laboratory-serviceObservation results (policy-released only)
radiology-serviceDiagnosticReport results (policy-released only)
claims-serviceExplanationOfBenefit, Coverage read projections
immunization-serviceImmunization records
messaging-serviceSecure message thread access (if licensed)
ai-gateway-servicePatient-facing AI (Tier A only, non-diagnostic)
audit-servicePortal access event pipeline

Downstream Dependents

ServiceDependency
(None)patient-portal-service is a leaf BFF; no services depend on it

Key Architectural Decisions

  1. BFF pattern. The portal service acts as a dedicated backend-for-frontend aggregating data from multiple upstream services. No raw inter-service calls are made from the browser or mobile app.
  2. FHIR R4 constrained read surface. Patient-facing data is expressed as FHIR R4 resources. Policy filters and result-release rules are applied server-side; the client never receives unreleased or restricted data.
  3. SMART on FHIR authorization model. Patient OAuth2 scopes are mapped to FHIR resource types (patient/Patient.read, patient/Observation.read, etc.). Scope-to-resource enforcement is at the BFF layer.
  4. Shared API contract for web and mobile. Both channels consume the same /v1/portal/* REST surface and the same FHIR endpoints. Client-specific behavior is presentation-only.
  5. No PHI in push notification payloads. Mobile push payloads contain only a notification type and deep link; the app fetches actual content after authentication.
  6. Proxy/caregiver delegation. ProxyDelegation records are scoped, audited, and enforced at the BFF boundary. A proxy cannot exceed the granted scope.

Architecture Diagram

Slice Involvement

SliceRole
S4 — Patient engagementCore responsibility
S1 — Clinical workflowPortal surfaces clinical read projections
S2 — Revenue cycleEOB and coverage view from claims-service

Source Reconciliation

Source: _sources/patient-portal/ (PAT-PORTAL v1.1). This is a new service; no legacy module merge required. FRs FR-PORT-001..013 map directly to FR-PORTAL-001..013. AI guidance requirements from FR-AI-007 apply to patient-facing AI Tier A access.