Add Operating Mode Configuration tab to Settings page#506
Merged
aurelianware merged 2 commits intomainfrom Mar 17, 2026
Merged
Conversation
Adds a read-only Operating Mode tab that displays how each CHO engine
(Benefit Calculation, Rate Resolution, NCCI Edits, etc.) interacts with
the tenant's existing core admin system — either "Augment" (parallel/
comparison mode) or "Replace" (CHO authoritative).
- New IOperatingModeService + OperatingModeService fetching from
GET /api/v1/tenants/{tenantId}/operating-mode via tenant-service
- Graceful fallback to default config (all engines in Replace mode)
when the tenant-service is unreachable
- MudSimpleTable with color-coded MudChip status and per-engine
descriptions, plus info boxes explaining each mode
https://claude.ai/code/session_01KrMqcqhxYjv1q1kCXN1NGS
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new read-only “Operating Mode” tab to the Cloud Health Office portal Settings page, backed by a portal service that fetches per-tenant operating-mode configuration from tenant-service and displays per-engine “Augment” vs “Replace” status.
Changes:
- Introduces
IOperatingModeServiceandOperatingModeServiceto fetch operating-mode config from tenant-service. - Registers the new service in the portal DI container.
- Extends
Settings.razorwith an “Operating Mode” tab rendering a table of engines/modes plus explanatory copy.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/portal/CloudHealthOffice.Portal/Services/ServiceImplementations.cs | Adds OperatingModeService that calls tenant-service and falls back to defaults. |
| src/portal/CloudHealthOffice.Portal/Services/IServices.cs | Adds IOperatingModeService and a portal OperatingModeConfiguration DTO. |
| src/portal/CloudHealthOffice.Portal/Program.cs | Registers IOperatingModeService in DI. |
| src/portal/CloudHealthOffice.Portal/Pages/Settings.razor | Adds the new “Operating Mode” tab UI and loading logic. |
Comment on lines
+332
to
+345
| isUsingDefaults = true; | ||
| operatingModeConfig = new OperatingModeConfiguration | ||
| { | ||
| TenantId = "unknown", | ||
| Engines = new Dictionary<string, string> | ||
| { | ||
| { "benefitCalculation", "replace" }, | ||
| { "rateResolution", "replace" }, | ||
| { "ncciEdits", "replace" }, | ||
| { "eligibilityVerification", "replace" }, | ||
| { "claimsAdjudication", "replace" } | ||
| }, | ||
| UpdatedAt = DateTime.UtcNow | ||
| }; |
Comment on lines
+162
to
+177
| <MudText Typo="Typo.h5" GutterBottom="true">Operating Mode Configuration</MudText> | ||
| <MudText Typo="Typo.body2" Color="Color.Secondary" Class="mb-4"> | ||
| Controls how CHO engines interact with your existing core admin system | ||
| </MudText> | ||
|
|
||
| @if (isLoadingOperatingMode) | ||
| { | ||
| <MudProgressCircular Indeterminate="true" /> | ||
| } | ||
| else if (operatingModeConfig != null) | ||
| { | ||
| @if (isUsingDefaults) | ||
| { | ||
| <MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Class="mb-4" Icon="@Icons.Material.Filled.Info"> | ||
| Operating mode configuration loaded from defaults. Contact the Aurelianware team to customize engine modes for your tenant. | ||
| </MudAlert> |
Comment on lines
+691
to
+692
| public Dictionary<string, string> Engines { get; set; } = new(); | ||
| public DateTime UpdatedAt { get; set; } |
Comment on lines
+3147
to
+3150
| var result = await _httpClient.GetFromJsonAsync<OperatingModeConfiguration>( | ||
| $"{baseUrl}/v1/tenants/{tenantId}/operating-mode"); | ||
| return result ?? GetDefaultConfiguration(tenantId); | ||
| } |
Comment on lines
+351
to
+354
| // The service returns defaults on failure; detect this by checking if the | ||
| // returned tenantId matches what we sent (defaults always set it). | ||
| // Since the default config is fine, just flag it for the info banner. | ||
| isUsingDefaults = false; |
Comment on lines
+358
to
+359
| Console.WriteLine($"Failed to load operating mode: {ex.Message}"); | ||
| isUsingDefaults = true; |
- Centralize default engine list in OperatingModeConfiguration.DefaultEngines to eliminate duplication between Settings.razor and OperatingModeService - Make UpdatedAt nullable; use null as sentinel to detect default/fallback config so the "loaded from defaults" banner shows reliably - Use StringComparer.OrdinalIgnoreCase for Engines dictionary - Add NormalizeConfiguration() to merge API results onto defaults, filling missing engines with "replace" mode - Replace "CHO" with "Cloud Health Office" and "Aurelianware team" with "support or your account team" in all user-facing text https://claude.ai/code/session_01KrMqcqhxYjv1q1kCXN1NGS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a read-only Operating Mode tab that displays how each CHO engine
(Benefit Calculation, Rate Resolution, NCCI Edits, etc.) interacts with
the tenant's existing core admin system — either "Augment" (parallel/
comparison mode) or "Replace" (CHO authoritative).
GET /api/v1/tenants/{tenantId}/operating-mode via tenant-service
when the tenant-service is unreachable
descriptions, plus info boxes explaining each mode
https://claude.ai/code/session_01KrMqcqhxYjv1q1kCXN1NGS