Focusing Flows
Focusing Flows are the four defined methods for invoking the Focusing process in FOSPS, based on how ePI and IPS/PV data are provided.
The Four Flows
Flow 1: ePI ID + IPS ID
Request contains: Resource identifiers
{
"epiId": "bundle-epi-123",
"ipsId": "bundle-ips-456"
}
Process:
- Focusing Manager retrieves ePI from FHIR Server
- Retrieves IPS from FHIR Server
- Retrieves PV from FHIR Server (if available)
- Invokes Preprocessors for p(ePI)
- Calls LEE for f(ePI)
Use case: Both resources already cached in platform
Flow 2: ePI JSON + IPS JSON
Request contains: Full FHIR resources
{
"epi": { "resourceType": "Bundle", ... },
"ips": { "resourceType": "Bundle", ... },
"pv": { "resourceType": "Bundle", ... }
}
Process:
- Focusing Manager receives complete resources
- Invokes Preprocessors for p(ePI)
- Calls LEE for f(ePI)
Use case: Client-side focusing, external data sources, privacy-preserving workflows
Flow 3: ePI ID + IPS JSON
Request contains: Mixed identifiers and resources
{
"epiId": "bundle-epi-123",
"ips": { "resourceType": "Bundle", ... }
}
Process:
- Focusing Manager retrieves ePI from FHIR Server
- Uses provided IPS JSON
- Invokes Preprocessors for p(ePI)
- Calls LEE for f(ePI)
Use case: ePI cached, IPS from external system
Flow 4: ePI JSON + IPS ID
Request contains: Mixed resources and identifiers
{
"epi": { "resourceType": "Bundle", ... },
"ipsId": "bundle-ips-456"
}
Process:
- Focusing Manager uses provided ePI JSON
- Retrieves IPS from FHIR Server
- Invokes Preprocessors for p(ePI)
- Calls LEE for f(ePI)
Use case: ePI from external source, IPS cached in platform
Common Elements
All flows:
- Support optional Persona Vector input
- Return f(ePI) as output
- Execute via Focusing Manager API
- Follow same preprocessing and lens execution steps
API Design
Flows exposed via OpenAPI documented endpoints:
POST /focusing/flow1
POST /focusing/flow2
POST /focusing/flow3
POST /focusing/flow4
Or unified endpoint with request body discrimination:
POST /focusing
Selection Criteria
Choose flow based on:
- Data location: Cached vs. external
- Privacy requirements: Keep IPS client-side
- Performance: Avoid unnecessary transfers
- Integration: Match external system capabilities
Related Concepts
- Focusing - Overall process
- Focusing Manager - Orchestrator
- ePI - Product information
- IPS - Patient data
- Persona Vector - User context
- f(ePI) - Output
- FHIR Server - Resource storage