Conversation
## Walkthrough
The changes introduce a new FHIR API base URL configuration across multiple environment files, including local, CI, test, and production settings. New constants for the FHIR API base URL are added or updated, and two new API endpoint URLs—`getAllRegistrationData` and `getBenIdForhealthID`—are included in the relevant environment exports. The CI prebuild script is updated to include the `FHIR_API_BASE` environment variable. Some URL constructions are modified to use path segments instead of port numbers. No existing logic or control flow is altered.
## Changes
| File(s) | Change Summary |
|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| scripts/ci-prebuild.js | Added `FHIR_API_BASE` key with default value to `defaultEnvValues`; added missing trailing comma. |
| src/environments/environment.ci.ts.template | Introduced `FHIR_API` constant; added `getAllRegistrationData` and `getBenIdForhealthID` endpoints to environment export. |
| src/environments/environment.local.ts | Added local constants `fhirIP` and `FHIR_API` for FHIR API base URL; no changes to exports. |
| src/environments/environment.prod.ts | Added `fhirIP` and `FHIR_API` constants; added two new endpoints to environment export; reordered one constant. |
| src/environments/environment.test.ts | Changed `FHIR_API` construction from port-based to path-based URL. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant App
participant EnvironmentConfig
participant FHIR_API
participant COMMON_API
App->>EnvironmentConfig: Load environment (local/CI/prod/test)
EnvironmentConfig->>FHIR_API: Set FHIR_API base URL
EnvironmentConfig->>COMMON_API: Set COMMON_API base URL
App->>EnvironmentConfig: Get getAllRegistrationData endpoint
App->>EnvironmentConfig: Get getBenIdForhealthID endpoint
App->>FHIR_API: Call healthID/getBenIdForhealthID
App->>COMMON_API: Call customization/fetchAllDataPoem
|
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
scripts/ci-prebuild.js(1 hunks)src/environments/environment.ci.ts.template(2 hunks)src/environments/environment.local.ts(1 hunks)src/environments/environment.prod.ts(2 hunks)src/environments/environment.test.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Build
🔇 Additional comments (6)
scripts/ci-prebuild.js (1)
44-45: Added missing FHIR API environment variableThe addition of
FHIR_API_BASEto the defaultEnvValues object properly enables FHIR API configuration in the CI environment, addressing the missing environment customization property that was causing build failures.src/environments/environment.test.ts (1)
35-35: Updated FHIR endpoint structure from port-based to path-basedThe FHIR API URL has been correctly modified to use the path segment
fhirapi-v1.0/instead of a port suffix, which aligns with the approach used in the production environment.src/environments/environment.ci.ts.template (2)
28-28: Added FHIR API base URL from environment variableThe FHIR_API constant is correctly initialized with the placeholder
<%= FHIR_API_BASE %>, which will be replaced with the actual value during build.
215-218: Added customization API endpointsThe two new endpoints for customization APIs are consistently added with proper spacing and formatting. The endpoints reference the FHIR_API constant for the health ID lookup, which correctly completes the configuration.
src/environments/environment.prod.ts (2)
31-31: FHIR API constant added correctlyThe FHIR API base URL is correctly constructed using the fhirIP constant.
222-224: API endpoints added correctly for customization and health ID servicesThe new endpoints have been properly added to the environment configuration, which resolves the missing environment customization properties mentioned in the PR objectives.
| const fhirIP = 'http://localhost'; | ||
| const FHIR_API = `${fhirIP}:8085/`; |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
FHIR API configuration for local environment
The addition of FHIR API constants for the local environment is consistent with the changes in other environment files, providing proper separation between environments.
However, I noticed that while you've defined these constants, they're not yet being used in the exported environment object like they are in the test and CI environments. You may need to add the customization API endpoints to maintain consistency.
🏁 Script executed:
#!/bin/bash
# Search for any potential usage of FHIR_API in other files that might expect these endpoints
rg -A 2 -B 2 "getAllRegistrationData|getBenIdForhealthID" --type tsLength of output: 870
Add missing customization endpoints in environment.local.ts
The FHIR_API constant is defined but not yet used in the exported environment object. To match environment.test.ts and environment.prod.ts, add the two customization API endpoints:
• File to update: src/environments/environment.local.ts
• Around the exported object, insert:
export const environment = {
production: false,
fhirIP,
FHIR_API,
+ // Customization APIs
+ getAllRegistrationData: `${COMMON_API}customization/fetchAllData`,
+ getBenIdForhealthID: `${FHIR_API}healthID/getBenIdForhealthID`,
// …other endpoints
};This ensures consistent API availability across all environments.
Committable suggestion skipped: line range outside the PR's diff.
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
srinuatpiramal
left a comment
There was a problem hiding this comment.
Changed const fhirIP value
|



📋 Description: Due to missing customization properties, CI/CD build is failing. Added required properties.
JIRA ID: AMM-1093
Please provide a summary of the change and the motivation behind it. Include relevant context and details.
✅ Type of Change
ℹ️ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Summary by CodeRabbit
New Features
Chores