Note for implementers: The design outlined here is a guideline, not a strict specification. Feel free to pivot from the suggested approach if you discover a better solution during implementation. Update the issue with your rationale when deviating significantly.
Summary
Replace the stub IntelligenceClient with production HTTP calls to the Intelligence service /analyze endpoint.
Context
The current implementation returns hardcoded mock data. Production implementation must:
- Serialize
ClinicalBundle to JSON - POST to
/analyze endpoint with timeout handling - Deserialize response to
PAFormData - Handle errors gracefully
Dependencies
| Issue | Relationship |
|---|
| #9 | Blocked by - data contracts must be stable |
Tasks
Core Implementation
Resilience (Polly)
Error Handling
Testing
Files
| File | Action |
|---|
apps/gateway/Gateway.API/Services/IntelligenceClient.cs | Modify |
apps/gateway/Gateway.API/Configuration/IntelligenceOptions.cs | Reference |
apps/gateway/Gateway.API.Tests/Services/IntelligenceClientTests.cs | Create |
Design References
Summary
Replace the stub
IntelligenceClientwith production HTTP calls to the Intelligence service/analyzeendpoint.Context
The current implementation returns hardcoded mock data. Production implementation must:
ClinicalBundleto JSON/analyzeendpoint with timeout handlingPAFormDataDependencies
Tasks
Core Implementation
HttpClientviaIHttpClientFactory{BaseUrl}/analyzePAFormDataResilience (Polly)
Error Handling
HttpRequestExceptionTesting
HttpMessageHandlerFiles
apps/gateway/Gateway.API/Services/IntelligenceClient.csapps/gateway/Gateway.API/Configuration/IntelligenceOptions.csapps/gateway/Gateway.API.Tests/Services/IntelligenceClientTests.csDesign References