TPA Platform Blueprint Plan
How we will analyse, design and document the TPA product before any code is written: the decisions that shape it, the scope of each phase, and the order in which the 24-document blueprint package gets produced for management sign-off.
01Executive summary
We will build TPA, a separate product from OptimaX, for Third Party Administrators and for insurance companies that outsource medical administration in Saudi Arabia. The Saudi market currently has very few licensed medical TPAs. Our OptimaX team already runs pre-authorization and claims adjudication through NPHIES, plus provider and client portals, in production. That experience is the main head start. It is also the main risk, because an insurer's workflows assume the system owns the risk, the premium and the policy, and a TPA owns none of those.
Two requirements shape every layer and are not deferred: (1) one TPA serves 10–15+ insurance companies at the same time, with Insurance Company as a first-class key on every transaction, every rule, every report and every ledger; (2) claims volume grows from millions to potentially billions of records over the platform's life, so claims processing is asynchronous, queue-driven and partition-ready from day one.
Recommended approach
- Architecture: .NET modular monolith for the core business domains, with independently scalable background workers (adjudication, NPHIES gateway, batch intake, notifications, documents, SLA timers) connected through a message broker. Split into services only where load or release cadence justifies it. ARCHITECTURE DECISION REQUIRED
- Configuration over code: benefits, adjudication edits, authorization rules, tariffs, SLAs and fee models are versioned, effective-dated data scoped to Insurance Company, so onboarding IC number 12 is a configuration project, not a release.
- MVP: one pilot TPA, 1–3 insurance companies, full eligibility → pre-authorization → claim → adjudication → settlement-instruction loop through NPHIES and the provider portal, with client portal, core reports, roles and audit. Proposed elapsed time to first production go-live: 12–15 months with a team of about 28 (proposed estimate, depends on discovery answers).
- Working method: discovery questions first, then vision and scope, then architecture and BRD, then the gap analysis and a final consistency review. Development starts only after management approves the blueprint.
02Insurance company ERP vs TPA ERP
The single most important distinction in the blueprint. Every module will be checked against this table in the final review so that no insurer-only feature leaks into the TPA product.
| Dimension | Insurance company ERP (OptimaX) | TPA ERP | Design consequence |
|---|---|---|---|
| Risk ownership | Carries underwriting risk, reserves, solvency, reinsurance | Carries no insurance risk; carries operational and contractual (SLA) risk | No reserving, IBNR, reinsurance or solvency modules |
| Premium | Rates, quotes, bills and collects premium | No premium. Earns administration fees: per member per month, per claim, % of claims paid, or fixed | Premium engine replaced by a TPA fee engine |
| Policy issuance | Quotation → underwriting → policy → endorsements | Receives the policy and scheme from the IC as reference data; never issues | "Policy / Scheme Reference" module: imported, versioned, read-mostly |
| Member administration | Member changes are endorsements with premium impact | Adds, deletes and changes members on the IC's behalf; no pricing; must stay in sync with the IC's register | Enrollment without endorsement pricing; IC member reconciliation BUSINESS CONFIRMATION REQUIRED |
| Provider network | The insurer's own network | Often the TPA's main commercial asset: one network serving many ICs, with IC-specific tiers | Network is shared across ICs; scheme selects a network tier |
| Provider contracting | Insurer contracts providers directly | TPA contracts for itself or on behalf of a specific IC; tariffs may be TPA-wide or IC-specific | Contract carries an owner (TPA or IC) and an IC applicability list BUSINESS CONFIRMATION REQUIRED |
| Pre-authorization | Insurer decides | TPA decides inside a delegated-authority limit per IC; above it, escalates to the IC | Delegated-authority matrix per IC, service and amount |
| Claims adjudication | Single rule set for one book | Many rule sets at once, one per IC (and per contract/scheme); some claims need IC approval | Rule resolution by IC; "Payer Approval" state in the claim machine |
| Medical coding | National code sets and edits | Same code sets, plus IC-specific coding edits and exclusions | Shared reference codes, IC-scoped edit rules |
| Fraud, waste, abuse | Protects the insurer's loss ratio | Contractual service to the IC; findings are reported to and decided with the IC | FWA cases visible to the owning IC; recoveries credited to the IC ledger |
| Provider settlement | Pays from its own funds | Prepares payment; funds belong to the IC (or a self-funded client). TPA may or may not execute payment | Separate "payment instruction" from "payment execution" BUSINESS CONFIRMATION REQUIRED |
| Client billing | Premium invoices to policyholders | Fee invoices to ICs; claim-fund recharges where the TPA manages a fund | Fee invoicing with VAT e-invoicing EXTERNAL VALIDATION REQUIRED |
| Insurer settlement | Not applicable | Periodic statement per IC: claims paid, recoveries, fees, fund balance | IC-wise sub-ledger and statements |
| Member services | Under the insurer's own brand | Under the IC's brand (white-label) or the TPA's brand, per contract | Multi-brand card, app and portal BUSINESS CONFIRMATION REQUIRED |
| SLA | Internal KPIs plus regulator timelines | Contractual SLAs per IC with reporting and possible penalties | SLA engine with per-IC calendars, clocks and breach reports |
| NPHIES | Registered as a payer | Receives transactions as a TPA acting for multiple payers | One gateway, multi-payer routing EXTERNAL VALIDATION REQUIRED |
| Utilization management | For its own book | A sellable service, reported per IC and per corporate client | UM analytics scoped by IC and client |
| Medical management | Case and disease management for own members | Delegated service only where contracted | Optional module (Phase 3) |
03What we reuse from OptimaX
Based on a read-only review of E:\SALAMA\OptimaX_Unified (Angular Salama_OptimaX, API Salama_OptimaX_Api). Here "reuse" means domain knowledge, screens, stored-procedure logic and shared libraries used as a starting point. TPA is a new codebase, built for many insurers and high volume from the start. The OptimaX databases could not be reached during the review, so the table structures and claim status values still need checking. BUSINESS CONFIRMATION REQUIRED
| What OptimaX has today | Where | Treatment |
|---|---|---|
| Angular 21 + PrimeNG 21, ngx-translate with Arabic and English | Salama_OptimaX/src/app/common, module_shared | REUSE Shell, shared components and i18n become the TPA design-system starting point |
| .NET 8 modular monolith, Dapper and stored procedures, IDbHelper / ConnProvider | OptimaX.Shared | ADAPT Keep the module pattern. Move to .NET 10 LTS, because .NET 8 support ends in November 2026. |
| JWT, [Permission] attribute, user data scope (SELF / OFFICE / REGION / COUNTRY) | Modules/Admin, tblUsers_Scope | ADAPT Add an Insurance Company scope dimension. Add the missing refresh token, interceptor and real route guard. |
| Document module (files on disk, metadata in SQL) | Modules/Documents | ADAPT Swap the local provider for object storage and add a virus scan |
| Pre-authorization and claims screens, adjudication, re-adjudication, provider batching, price calculation incl. ClaimPriceCalctpa | ClaimsLib (Approvals.cs, Claims.cs), SPME_ClaimAdjudication, SPME_ApprovalAdjudication | ADAPT · logic reference Mine the stored procedures for rules. Rebuild them as a queue-driven, versioned rule engine scoped by IC. |
| MRE / PBM validation (external medical and pharmacy rule services) | MedicalRuleEngineLib | ADAPT Keep as a pluggable step in the claims pipeline (step 7). Review the licence for TPA use. BUSINESS CONFIRMATION REQUIRED |
| Outbound NPHIES calls through a separate gateway (pre-auth, advance pre-auth, communication, claim decisions) | CommonClass.GetNphiesLinks, Spme_UpdateNphiesResponse | REDESIGN OptimaX does not receive or parse FHIR itself. For TPA the gateway has to be built or sourced, and it must route to multiple payers. |
| Provider master, contracts, discounts, service price lists, networks | ProviderController, MasterController (NetworkMasterNew) | ADAPT Add contract ownership (TPA or IC), tariff versions and network tiers shared by several ICs |
| Benefit and coverage masters, plan templates, class eligibility, ICD and specialty masters | MasterController, SPME_GetPlanDetails* | ADAPT Becomes the starting point for scheme templates and the benefit engine |
| TPA fee setup, TPA claim screens, TCS integration | TPAFeeSetup, tpaclaim-enquiry, IntegrationController | REFERENCE Shows how an insurer works with a TPA today. Useful for the IC-side interface spec. |
| Client portal, online/member portal (reimbursement, complaints) | module_client, module_online | ADAPT Drop the purchase and payment journeys. Add utilization, SLA, fee invoices and the digital card. |
| SMS (Cequens), Yakeen/CCHI, ZATCA invoicing, SignalR notifications | CequensSMSLibrary, YakeenLib, PaymentLib, NotificationHub | REUSE Shared integration libraries. Yakeen currently hard-codes CompanyId 115, so that must become per-IC. |
| Quotation, corporate quote, premium and loading, renewals | QuoteController, CorporateQuoteController, RenewalController | DROP Not a TPA function |
| Policy issuance, endorsements | PolicyController, EndorsementController | REPLACE Replaced by Policy / Scheme Reference and by enrollment changes that carry no premium |
| Reinsurance, treaty posting, UPR, Sadad / PayFort premium collection | module_reinsurance, PaymentController | DROP These stay with the insurer |
Patterns we will not carry over, because they block the volume and multi-insurer requirements:
- Everything runs synchronously inside the request: about 122 blocking .Result calls, and a new HttpClient per call.
- There is no queue, outbox or idempotency, and a failed NPHIES call needs a manual resend.
- Adjudication logic lives in stored procedures, which makes it hard to test or scale out.
- There is no tenant or payer column.
- Permissions are cached in memory only, so they don't work across multiple instances.
- Logging is not structured.
- Security issues: CORS open to any origin, credentials in code, and SQL-execution endpoints.
04Module map and phase allocation
All 43 modules from the brief (A–AQ), grouped into ten business domains. Phase badges are the proposed allocation; reasons for the MVP items are in section 15.
Platform administration
- ATPA administrationMVP
- APUser and role managementMVP
- AQConfiguration managementMVP·core
- AOAuditMVP
- AFNotificationsMVP·core
- AGDocument managementMVP·core
Payer and client
- CInsurance company / payerMVP
- BClient / corporateMVP
- DGroup / contractMVP
- GPolicy / scheme referenceMVP
Members
- EMember managementMVP
- FBeneficiary managementMVP
Provider and network
- HProvider managementMVP
- IProvider networkMVP
- JProvider contractMVP
- KProvider tariffMVP
- LMedical network configurationMVP
Benefits
- MMedical benefitsMVP
- NBenefit / coverage configMVP
Medical and authorization
- OPre-authorizationMVP
- AJUtilization managementP2
- AKMedical / case managementP3
Claims
- PClaims intakeMVP
- QClaims adjudicationMVP
- RMedical claims reviewMVP
- SClaims assessmentMVP
- TApproval / rejectionMVP
- UReconsiderationMVP
- VAppeals / disputesP2
- AIFraud, abuse, wasteP2
Finance
- WClaims payment / settlementMVP·core
- XProvider settlementMVP·core
- YClient billing / TPA feesMVP·core
Channels and integration
- ZNPHIES integrationMVP
- AANon-NPHIES provider portalMVP
- ABProvider portalMVP
- ACClient portalMVP·core
- ADMember portalP2
- AEMobile applicationP2
Operations and insight
- AHSLA managementMVP·core
- ALReportingMVP·core
- AMDashboardsMVP·core
- ANAnalyticsP2
05Multi-insurance-company design
Reference scenario used throughout the BRD and architecture: one TPA, 15 insurance companies, all sending claims through NPHIES, millions of claims and claim lines.
flowchart LR
subgraph PRV["Healthcare providers"]
P1["NPHIES-integrated hospitals and clinics"]
P2["Non-NPHIES providers"]
end
NPH["NPHIES national platform"]
subgraph TPA["TPA platform"]
GW["NPHIES integration gateway"]
PP["Provider portal"]
CORE["TPA core: members, benefits, authorization, claims, settlement"]
CP["Client portal"]
MP["Member app and portal"]
BI["Reporting and data warehouse"]
end
subgraph ICS["Insurance companies"]
IC1["IC-001"]
IC2["IC-002"]
ICN["IC-015"]
end
P1 -->|"eligibility, preauth, claims"| NPH
NPH --> GW
P2 --> PP
GW --> CORE
PP --> CORE
ICS -->|"policies, schemes, members, funding"| CORE
CORE -->|"approvals, statements, invoices, reports"| ICS
CP --> CORE
MP --> CORE
CORE --> BI
Fig. 1 · TPA ecosystem with multiple insurance companies
Rules that apply everywhere
InsuranceCompanyIdis a non-null column on every transactional table (authorization, claim, claim line, settlement, invoice, ledger entry, NPHIES message) and the leading column of their main indexes.- The IC is resolved once, at intake, and stamped on the record. It is never re-derived later from a join.
- Every query passes through an IC-scope filter enforced in the data-access layer and backed by SQL Server row-level security. A user granted IC-001 sees nothing of IC-002.
- Consolidated (cross-IC) views are a separate permission, and every cross-IC access is audited.
- No IC-specific code branches. IC differences live in configuration.
Configuration resolution order
- Platform default (TPA-wide)
- Insurance company override
- TPA–IC service contract
- Policy / group contract
- Scheme / plan
- Benefit line (most specific wins)
Applies to benefit rules, adjudication edits, authorization thresholds, tariffs, SLA clocks, fee models, notifications and escalation. Each item is versioned with effective dates so a claim is always judged by the rules valid on its service date.
Noisy-neighbour protection
One IC's spike must not breach another IC's SLA. The plan: queues partitioned by IC, a fair scheduler that gives each IC a guaranteed share of adjudication workers, per-IC and per-provider rate limits at the gateway, separate priority lanes (real-time eligibility and pre-authorization ahead of batch claims), and autoscaling worker pools. Large ICs can later get dedicated worker pools or database shards without code change. ARCHITECTURE DECISION REQUIRED
Deployment model: the product is sold to multiple TPAs. Proposed: a dedicated deployment per TPA customer (simpler data residency and regulator conversations), with a TenantId kept in the schema so a shared SaaS model remains possible. ARCHITECTURE DECISION REQUIRED
06NPHIES integration architecture
Four clearly separated parties: provider systems, NPHIES, the TPA's NPHIES integration layer, and the TPA core. The core never speaks FHIR directly.
flowchart TD
A["NPHIES bundle received by gateway"] --> B["Persist raw bundle, message id, timestamps"]
B --> C{"Message id already processed?"}
C -->|"Yes"| D["Return stored response, no reprocessing"]
C -->|"No"| E["Read insurer and coverage from bundle"]
E --> F{"Mapped to an InsuranceCompanyCode?"}
F -->|"No"| G["Quarantine queue and operations alert"]
F -->|"Yes"| H["Stamp IC code and correlation id"]
H --> I["Publish to IC-partitioned queue"]
I --> J["Resolve policy, scheme, member, provider contract"]
J --> K["Validate and adjudicate with the IC rule set"]
K --> L["Build FHIR response"]
L --> M["Return to NPHIES directly or via poll"]
Fig. 2 · NPHIES → TPA → insurance company routing
| Transaction | Pattern | TPA handling |
|---|---|---|
| Eligibility | Synchronous, latency-critical | Served from cached member/coverage snapshot per IC; no queue hop. |
| Pre-authorization | Sync acknowledgement, async decision | Auto-decide where rules allow; otherwise queued to medical review; final response delivered when decided. |
| Claim | Async, high volume | Store, acknowledge, queue, adjudicate, respond. Line-level outcomes. |
| Communication request / communication | Async, bi-directional | Request additional info or attachments; moves claim to Pending Info; provider reply resumes processing. |
| Status check, poll, cancel | Sync | Answered from the message-tracking store; cancel moves the claim to Cancelled if not yet settled. |
| Payment notice / reconciliation | Async | Sent after settlement; reconciled against NPHIES acknowledgements per IC. |
The exact transaction list, the FHIR profiles, how a TPA is identified as message receiver for multiple payers, response-time limits, attachment size limits and certification steps must be taken from the current NPHIES implementation guide. EXTERNAL VALIDATION REQUIRED
Reliability controls
- Store first, process second: the raw bundle is durably saved before any business logic, so nothing received is ever lost.
- Idempotency: key on the NPHIES message identifier plus bundle identifier; duplicates return the original response.
- Correlation id: one id flows from gateway through queue, core, response and audit, and across OpenTelemetry traces.
- Retry and dead-letter: exponential backoff with jitter for outbound calls, circuit breaker on NPHIES endpoints, dead-letter queue with an operations replay screen.
- Message tracking: every inbound and outbound message with status, IC, provider, timings and error payloads, searchable by operations staff.
- Reconciliation: daily per-IC counts and amounts, NPHIES vs TPA, with exceptions listed for action.
07Claims engine
The example lifecycle in the brief mixes processing states with outcomes and financial states. The proposed model separates them: a processing status on the claim, a decision on each line (approved, partially approved, rejected, with reason codes) and a financial status (not payable, payable, in batch, paid, reconciled).
stateDiagram-v2 [*] --> Received Received --> IntakeRejected: unreadable, unmapped IC, duplicate Received --> Registered: IC, member, provider resolved Registered --> Validating Validating --> ValidationFailed: hard edits fail Validating --> PendingInfo: information requested PendingInfo --> Validating: provider responds PendingInfo --> Adjudicated: no response within window Validating --> AutoAdjudication AutoAdjudication --> Adjudicated: all lines decided by rules AutoAdjudication --> ManualReview: pended by rule AutoAdjudication --> FWAHold: fraud score above threshold FWAHold --> ManualReview ManualReview --> MedicalReview: clinical question MedicalReview --> ManualReview ManualReview --> PayerApproval: above delegated authority PayerApproval --> ManualReview ManualReview --> Adjudicated Adjudicated --> ResponseSent ResponseSent --> Reconsideration: provider disputes lines Reconsideration --> AutoAdjudication: reprocess ResponseSent --> ReadyForSettlement: payable amount exists ResponseSent --> Closed: nothing payable, window expired ReadyForSettlement --> InSettlementBatch InSettlementBatch --> Paid: payment confirmed Paid --> Reconciled Reconciled --> Closed ValidationFailed --> Closed IntakeRejected --> [*] Closed --> [*]
Fig. 3 · Proposed claim processing lifecycle (line-level decisions and financial status tracked separately)
- Resubmission creates a new claim linked to the original (not an edit of the old one), preserving the audit trail and NPHIES semantics. EXTERNAL VALIDATION REQUIRED
- Appeal / dispute (Phase 2) is a case attached to a closed or adjudicated claim, with its own workflow and SLA, so it does not reopen the claim state machine.
- Payer Approval exists only because the TPA works under delegated authority. An insurer system would not need it.
- Cancelled (by provider) and Reversed (after payment, through a debit/credit adjustment) are also states, omitted from the figure for readability.
Pipeline stages
| # | Stage | Checks | Mode |
|---|---|---|---|
| 1 | Intake | NPHIES, provider portal, API, batch file; persist, acknowledge, de-duplicate | Auto |
| 2 | Registration | Resolve IC, policy, scheme, member, provider branch, contract | Auto |
| 3 | Validation | Member, provider, eligibility on service date, coding (ICD-10-AM, procedure/service codes, drug codes EXTERNAL VALIDATION REQUIRED), mandatory fields, duplicate and near-duplicate | Auto |
| 4 | Pricing | Tariff and contract price by effective date, package rules, discounts | Auto |
| 5 | Benefit application | Coverage, limits and accumulators, copay, deductible, coinsurance, waiting periods, network restriction | Auto |
| 6 | Authorization match | Match lines to approved pre-authorization, quantities and validity | Auto |
| 7 | Medical edits | Diagnosis–procedure consistency, gender/age edits, frequency, medical necessity flags | Auto, pends to medical review |
| 8 | FWA scoring | Rule-based in Phase 2, model-based in Phase 3 | Auto, pends to fraud analyst |
| 9 | Decision | Line-level approve, partial, reject with reason codes; delegated-authority check | Auto or manual |
| 10 | Response and settlement handoff | Response to NPHIES or portal; payable lines to settlement | Auto |
Target auto-adjudication rate is a business KPI set per IC, not a system constant. BUSINESS CONFIRMATION REQUIRED
08Benefit engine and rule engine
Benefits must be configurable without code changes. Rules split into what business users configure and what developers build once as reusable rule types.
Benefit engine supports
- Annual, per-service, per-member and per-family limits, by amount and by count
- Copay (fixed or %), deductible, coinsurance, with caps
- Waiting periods, age, gender and diagnosis restrictions
- Frequency limits (e.g. one optical claim per 12 months)
- Network and provider restrictions; pre-authorization required flags
- Accumulators per member and family, posted when a claim line is approved and reversed on adjustment, with concurrency control
- Benefit templates per IC (e.g. a regulator-defined basic benefit table) cloned into schemes EXTERNAL VALIDATION REQUIRED
Configuration vs code
| Configured by business | Built in code |
|---|---|
| Limit values, copay %, waiting days | Limit and accumulator calculation types |
| Edit rules as decision tables per IC | Rule evaluation engine and rule operators |
| Authorization thresholds and service lists | Delegated-authority evaluation |
| Tariff prices and versions | Pricing methods (fee schedule, % of charge, package, per diem) |
| SLA clocks, calendars, escalations | Timer service and escalation actions |
| Fraud thresholds and rule weights | Scoring framework, model hosting (P3) |
| Notification templates (Arabic and English) | Channels, delivery, retry |
Rule engine options to evaluate: a home-grown decision-table engine compiled to expression trees, the open-source Microsoft RulesEngine (JSON rules), or NRules. Every rule set is versioned, effective-dated, IC-scoped, testable against sample claims before activation and protected by maker–checker approval. ARCHITECTURE DECISION REQUIRED
09Financial and settlement boundary
The TPA does not own insurance risk. It owns the calculation, instruction, tracking and reconciliation of money that belongs to insurers or self-funded clients, plus its own fee revenue.
| Inside TPA ERP | Stays in the insurer's ERP / finance system |
|---|---|
| Provider payables per claim line, settlement batches per IC and provider | General ledger, premium accounting, reserves and IBNR |
| Payment instruction files; payment status tracking | Bank payment execution (unless the TPA manages a claim fund) |
| Remittance advice to providers | Reinsurance recoveries |
| Adjustments, debit and credit notes on claims and fees | Statutory financial reporting |
| TPA fee calculation and invoicing per IC (VAT e-invoicing EXTERNAL VALIDATION REQUIRED) | Insurer's accounts payable for TPA fees |
| IC-wise sub-ledger: claims paid, recoveries, fees, fund balance, outstanding | Premium receivables and collections |
| Reconciliation: claim, line, provider, NPHIES, IC | Investment and treasury |
sequenceDiagram
participant P as Provider
participant T as TPA platform
participant I as Insurance company
participant B as Bank
T->>T: Group payable lines by IC, provider, cycle
T->>I: Settlement batch and funding request
alt Model A, insurer pays
I->>B: Execute payments from instruction file
B-->>I: Bank confirmation
I-->>T: Payment confirmation file
else Model B, TPA-managed claim fund
I->>B: Fund TPA claim account for IC
T->>B: Execute payments
B-->>T: Bank confirmation
end
T->>P: Remittance advice and payment notice
T->>T: Reconcile line, claim, provider, IC ledger
T->>I: Periodic IC statement and TPA fee invoice
Fig. 4 · Provider settlement with the two candidate funding models
Which funding model each IC uses, whether self-funded corporate (ASO) schemes are in scope, and whether TPA fees are netted from the fund are commercial decisions to confirm during discovery. BUSINESS CONFIRMATION REQUIRED
10Technical architecture
flowchart TB
subgraph CH["Channels"]
WEB["Angular portals: TPA operations, provider, client, member"]
MOB["Mobile app"]
EXT["IC and partner APIs"]
end
NPH["NPHIES"]
APIGW["API gateway: WAF, rate limits per IC and provider"]
IDP["Identity provider: OIDC, OAuth2, MFA"]
subgraph CORE["TPA core, .NET modular monolith"]
M1["Payer, client, policy reference"]
M2["Members and enrollment"]
M3["Providers, network, tariffs"]
M4["Benefit and rule engine"]
M5["Authorization and claims"]
M6["Settlement and billing"]
end
subgraph WK["Background workers, scaled independently"]
W1["Adjudication workers"]
W2["Batch and file intake"]
W3["Notification service"]
W4["Document service and virus scan"]
W5["SLA timers and escalation"]
end
NGW["NPHIES integration gateway"]
MQ["Message broker: per-IC queues, dead-letter"]
RDS["Redis cache"]
SQL[("SQL Server OLTP, partitioned, readable replicas")]
OBJ[("Object storage for documents")]
SRCH[("Search index")]
DW[("Reporting database and warehouse")]
OBS["Observability: OpenTelemetry logs, metrics, traces"]
WEB --> APIGW
MOB --> APIGW
EXT --> APIGW
APIGW --> IDP
APIGW --> CORE
NPH --- NGW
NGW --> MQ
CORE --> MQ
MQ --> WK
CORE --> SQL
WK --> SQL
CORE --> RDS
W4 --> OBJ
SQL -->|"CDC"| DW
SQL -->|"CDC"| SRCH
CORE -.-> OBS
WK -.-> OBS
Fig. 5 · High-level system architecture
| Component | Proposed choice | Why it is needed |
|---|---|---|
| Frontend | Angular 21+ with PrimeNG, standalone and zoneless as in OptimaX, ngx-translate for Arabic RTL and English | Same stack the team already runs in OptimaX; one component library across four portals |
| Backend | .NET 10 LTS, ASP.NET Core, modular monolith | Clear module boundaries without microservice overhead at MVP; workers split out where scale demands |
| Database | SQL Server with table partitioning, Always On readable secondaries | Team skill, partitioning and columnstore support the volume path in section 11 |
| Data access | EF Core for masters and configuration; Dapper for claims hot paths, bulk and reporting reads | Productivity where volume is low, control where volume is high |
| Identity | OIDC / OAuth2 identity provider, JWT access plus rotating refresh tokens, MFA | Four user populations with different policies; silent refresh in the Angular interceptor from day one |
| Messaging | RabbitMQ (quorum queues) or Azure Service Bus, via MassTransit, with transactional outbox ARCHITECTURE DECISION REQUIRED | Claims must not depend on one synchronous process; buffering, retry, dead-letter and per-IC fairness |
| Cache | Redis | Eligibility snapshots, reference codes, tariff lookups, rate-limit counters, distributed locks for accumulators |
| API gateway | YARP or a managed gateway | Single entry for authentication, throttling per IC and provider, versioning |
| Documents | S3-compatible object storage, metadata in SQL, ClamAV scan, encryption at rest | Large attachments stay out of SQL Server; retention and secure, time-limited access |
| Search | OpenSearch / Elasticsearch fed by CDC (Phase 2 onward) | Fast claim and member search across hundreds of millions of rows without loading OLTP |
| Reporting | Reporting replica for MVP; warehouse with star schema, IC as conformed dimension, BI tool | Heavy consolidated reports never run against transactional claims tables |
| Observability | OpenTelemetry, Serilog, Prometheus/Grafana or equivalent, separate immutable audit store | Trace one claim end-to-end by correlation id; operational and regulatory evidence |
Hosting must be inside Saudi Arabia. On-premises, a Saudi-region cloud, or a hybrid are all candidates; the choice drives the broker, gateway and storage products above. ARCHITECTURE DECISION REQUIRED EXTERNAL VALIDATION REQUIRED
11Scalability and performance
The goal is to grow from one million to a billion-plus claims by adding capacity and moving data, not by redesigning the product. The decisions that make this possible are taken at MVP even though the later stages are not built then.
| Volume stage | Database | Processing | Reporting and search |
|---|---|---|---|
| Up to ~10M claims | One primary plus readable secondary; Claim and ClaimLine partitioned monthly by received date; IC leads key indexes | Worker pool behind per-IC queues | Reporting replica, pre-aggregated daily tables |
| ~10M–100M | Older partitions moved to read-only compressed filegroups; columnstore for history | Autoscaled workers; dedicated pools for the largest ICs | Warehouse via CDC; search index for claim lookup |
| ~100M–1B+ | Shard by Insurance Company (shard map; a large IC gets its own database); archive tier for closed claims past retention | Workers routed to shard by IC | Warehouse is the only consolidated source; archive restorable on demand |
Decided at MVP so later stages need no redesign: globally unique, time-ordered claim ids (not per-database identity); IC on every transactional row; no cross-IC joins in transactional code; all reads for reports go through the reporting path; documents in object storage; idempotent message handlers.
flowchart LR H["Hot: current and previous year, monthly partitions"] --> W["Warm: older years, read-only compressed filegroups"] W --> C["Cold archive: past retention threshold, restorable"] H -->|"CDC"| D["Warehouse: IC-level and consolidated reporting"] W -->|"CDC history"| D
Fig. 6 · Hot, warm and cold data tiers (retention periods to be confirmed BUSINESS CONFIRMATION REQUIRED)
Proposed performance targets
Starting points for discussion, to be validated by load testing during the architecture POC. They are not commitments.
| Measure | Proposed target | Notes |
|---|---|---|
| Eligibility response, TPA internal processing | p95 ≤ 500 ms | Excludes NPHIES network time |
| Pre-authorization auto-decision | p95 ≤ 3 s | Manual review time governed by per-IC SLA and NPHIES limits EXTERNAL VALIDATION REQUIRED |
| Claim acknowledgement after receipt | ≤ 2 s | Store-then-queue; adjudication is asynchronous |
| Sustained claim ingestion per cluster | 100,000 claims / hour | Bursts absorbed by queue; scale by adding workers |
| Batch file of 50,000 claims | ≤ 30 min to adjudicated | Assuming normal auto-adjudication ratio |
| Portal API response | p95 ≤ 1 s | At 2,000 concurrent portal users |
| Core availability | 99.9% | Excluding planned maintenance BUSINESS CONFIRMATION REQUIRED |
| Disaster recovery | RPO ≤ 15 min · RTO ≤ 4 h | Secondary site inside KSA |
12Data architecture
erDiagram
INSURANCE_COMPANY ||--o{ TPA_SERVICE_CONTRACT : "engages TPA under"
INSURANCE_COMPANY ||--o{ POLICY : "issues"
CLIENT ||--o{ POLICY : "holds"
POLICY ||--o{ SCHEME : "defines"
SCHEME ||--o{ BENEFIT : "includes"
BENEFIT ||--o{ BENEFIT_LIMIT : "constrained by"
SCHEME }o--|| NETWORK : "uses tier"
POLICY ||--o{ MEMBER : "covers"
MEMBER ||--o{ BENEFICIARY : "has dependants"
MEMBER }o--|| SCHEME : "enrolled in"
PROVIDER ||--o{ PROVIDER_BRANCH : "operates"
PROVIDER ||--o{ PROVIDER_CONTRACT : "signs"
PROVIDER_CONTRACT ||--o{ PROVIDER_TARIFF : "prices services"
NETWORK }o--o{ PROVIDER_BRANCH : "includes"
MEMBER ||--o{ AUTHORIZATION : "requests"
MEMBER ||--o{ CLAIM : "receives care under"
PROVIDER_BRANCH ||--o{ CLAIM : "submits"
INSURANCE_COMPANY ||--o{ CLAIM : "owns"
CLAIM ||--|{ CLAIM_LINE : "contains"
AUTHORIZATION |o--o{ CLAIM_LINE : "authorizes"
NPHIES_MESSAGE |o--o{ CLAIM : "carries"
SETTLEMENT_BATCH ||--o{ CLAIM_LINE : "pays"
SETTLEMENT_BATCH ||--o{ PAYMENT : "settled by"
INSURANCE_COMPANY ||--o{ INVOICE : "billed TPA fees"
Fig. 7 · Core logical ERD (diagnosis, procedure, service, document, notification, audit, user and role entities detailed in 12_ERD.md)
| Category | Examples | Handling |
|---|---|---|
| Master | Insurance company, client, group, policy, scheme, member, beneficiary, provider, branch, network, contract | Versioned, effective-dated, maker–checker on critical changes |
| Transaction | Authorization, claim, claim line, settlement, payment, invoice, adjustment | IC-stamped, partitioned, append-mostly, archived by retention |
| Reference | ICD-10-AM, procedure and service codes, drug codes, specialties, cities and regions, reason codes, NPHIES value sets | Loaded from authoritative sources with version history EXTERNAL VALIDATION REQUIRED |
| Audit | Who, what, when, before and after, source, IP or device, correlation id | Separate append-only store, never updated or deleted by the application |
| Integration | NPHIES raw bundles, message tracking, inbound files, outbound files | Retained per regulation, linked to business records by correlation id |
13Security and compliance
Controls in the design
- Access by role and permission, further scoped by TPA, IC, client, provider and branch
- MFA for internal staff, provider admins and client admins; OTP-based for members
- TLS 1.2+ everywhere; TDE plus column encryption for national ID and medical fields
- Secrets in a vault, never in config files or developer environment variables
- Data masking of national ID, phone and diagnosis by role
- Rate limiting, input validation, OWASP Top 10 and OWASP API Top 10 controls
- Document access through short-lived signed URLs; virus scan before availability
- Session timeout, refresh-token rotation and revocation
- Backups encrypted, restore-tested; DR site in KSA; annual DR drill
Saudi dependencies to validate before implementation
| Area | Status |
|---|---|
| Council of Health Insurance (CHI) rules for licensed TPAs, delegated authority and reporting | EXTERNAL VALIDATION REQUIRED |
| NPHIES implementation guide, TPA onboarding and certification | EXTERNAL VALIDATION REQUIRED |
| Insurance Authority requirements on outsourcing by insurers | EXTERNAL VALIDATION REQUIRED |
| Personal Data Protection Law (SDAIA): health data, consent, cross-border transfer | EXTERNAL VALIDATION REQUIRED |
| NCA Essential Cybersecurity Controls and Cloud Cybersecurity Controls | EXTERNAL VALIDATION REQUIRED |
| Data residency for hosting, backups and DR | EXTERNAL VALIDATION REQUIRED |
| ZATCA e-invoicing for TPA fee invoices | EXTERNAL VALIDATION REQUIRED |
| Retention periods for medical and claims records | BUSINESS CONFIRMATION REQUIRED |
14Roles and permissions
Condensed matrix. Every grant is additionally limited by data scope: the ICs, clients, providers or branches assigned to the user. The full action-level matrix goes into 13_Roles_Permissions.md.
| Role | Config and masters | Payer and client | Member | Provider and network | Benefits | Pre-auth | Claims | Medical review | FWA | Finance | Reports | Users and audit |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Super Admin | F | F | V | V | V | V | V | – | – | V | V | F |
| TPA Admin | F | F | E | E | E | V | V | – | – | V | V | E |
| Operations Manager | V | V | E | V | V | A | A | V | V | V | V | V |
| Claims Manager | V | V | V | V | V | A | A | V | V | V | V | – |
| Claims Processor | – | V | V | V | V | E | E | – | – | – | V | – |
| Medical Reviewer | – | – | V | V | V | A | E | F | V | – | V | – |
| Medical Auditor | – | – | V | V | V | V | V | A | V | – | V | V |
| Provider Manager | – | – | – | F | – | V | V | – | – | V | V | – |
| Network Manager | – | V | – | E | V | – | V | – | – | – | V | – |
| Contract Manager | – | V | – | A | V | – | V | – | – | V | V | – |
| Client Manager | – | F | E | V | E | V | V | – | – | V | V | – |
| Finance User | – | V | – | V | – | – | V | – | – | F | V | – |
| Customer Service | – | V | E | V | V | V | V | – | – | – | – | – |
| Fraud Analyst | – | – | V | V | V | V | V | V | F | V | V | – |
| Reporting User | – | – | – | – | – | – | – | – | – | – | V | – |
| Provider Admin | – | – | S | S | S | S | S | – | – | S | S | S |
| Provider User | – | – | S | – | S | S | S | – | – | – | – | – |
| Client Admin | – | S | S | V | S | – | S | – | – | S | S | S |
| Client User | – | – | S | V | S | – | S | – | – | – | S | – |
| Member | – | – | S | V | S | S | S | – | – | – | – | – |
F full · A approve within limits · E create and edit · V view · S self-scope only (own provider, own client, own record) · – none
15MVP, Phase 2 and Phase 3
| MVP item | Why it cannot wait |
|---|---|
| Insurance company, client, group, scheme | Nothing can be routed, priced or reported without the IC and its scheme. Multi-IC is a core requirement. |
| Member and beneficiary | Eligibility, authorization and claims all start with a valid member on a service date. |
| Provider, network, contract, tariff | Claims cannot be validated or priced without them. |
| Benefits and eligibility | Every adjudication decision depends on the benefit engine and accumulators. |
| Pre-authorization | Required by many services before care; providers expect it on day one through NPHIES. |
| Claims and adjudication | The TPA's core service and the basis of its fee. |
| NPHIES | The main channel for Saudi claims; without it there is no volume. |
| Provider portal | Non-NPHIES providers have no other way to submit claims or check status. |
| Client portal (core) | ICs and corporates need member lists, enrollment and claim visibility as a condition of the contract. |
| Settlement instruction and fee invoicing (core) | Providers must be paid and the TPA must bill; without it the cycle does not close. |
| Core reporting and SLA timers | IC-wise claims, turnaround and SLA reports are contractual deliverables. |
| Users, roles, audit | IC data isolation and auditability cannot be added afterwards without rework. |
| Notifications (core) | Providers and members need status changes; email and SMS only at MVP. |
Phase 2 P2
- Member portal and mobile app with digital card and provider search
- Appeals and disputes case management
- Rule-based fraud, waste and abuse detection
- Utilization management and analytics warehouse
- Full SLA management with penalties and IC SLA dashboards
- Advanced fee models, claim-fund management
- Search index, provider credentialing workflow, workflow configuration UI
Phase 3 P3
- Medical and case management, disease management
- Model-based FWA scoring and predictive analytics
- Open APIs for ICs and partners, self-service IC onboarding
- IC-level database sharding where volumes require it
- Shared SaaS option for smaller TPAs, if chosen in the deployment ADR
16Implementation roadmap
All durations are proposed estimates for a team of about 28, assuming discovery answers arrive on time and NPHIES TPA onboarding is not blocked. Many phases overlap. The start date is illustrative.
gantt title Proposed MVP roadmap, illustrative dates dateFormat YYYY-MM-DD axisFormat %b %Y section Shape Discovery :d1, 2026-11-02, 6w Architecture and POC :a1, 2026-11-30, 6w UX and UI :u1, 2026-12-14, 8w section Build Foundation :f1, after a1, 8w Masters :m1, after f1, 5w Client and member :c1, after m1, 7w Provider and network :p1, after m1, 7w Benefits :b1, after c1, 7w Authorization :au1, after b1, 6w Claims :cl1, after c1, 14w NPHIES gateway :n1, after f1, 24w Portals :po1, after p1, 14w Financial settlement :fs1, after b1, 8w Reporting :r1, after b1, 8w section Assure Security hardening :s1, after cl1, 4w SIT and performance :t1, after cl1, 7w UAT with pilot IC :ua1, after t1, 6w Go-live and hypercare :g1, after ua1, 6w
Fig. 8 · Proposed MVP roadmap, about 12–15 months to first go-live
| Phase | Proposed duration | Depends on | Teams | Deliverables | Exit criteria |
|---|---|---|---|---|---|
| Discovery | 4–6 wks | Sponsor, access to TPA and IC SMEs | SA, BA, PO, medical SME | Answered discovery questions, vision, scope | Scope signed by management |
| Architecture | 4–6 wks | Hosting and NPHIES answers | SA, tech leads, DBA, security | ADRs, architecture docs, POC of gateway and partitioned claim store | POC meets proposed throughput; ADRs approved |
| UX / UI | 6–8 wks | Scope, personas | UI/UX, BA | Design system (Arabic RTL and English), portal prototypes | Prototype accepted by pilot users |
| Foundation | 6–8 wks | ADRs | Backend, frontend, DevOps | Identity, IC-scoped RBAC, audit, config framework, messaging and outbox, CI/CD, observability | Walking skeleton deployed to SIT |
| Masters | 4–6 wks | Foundation | Backend, DBA, BA | Reference codes, IC master, NPHIES payer mapping | Reference data loaded and versioned |
| Client / member | 6–8 wks | Masters | Backend, frontend | Client, policy reference, scheme, enrollment, bulk upload, card data | Pilot IC member file imported and reconciled |
| Provider | 6–8 wks | Masters | Backend, frontend | Provider, branch, contract, tariff versions, network | Pilot network and tariffs loaded |
| Benefits | 6–8 wks | Client / member | Backend, BA, medical SME | Benefit engine, limits, accumulators, scheme templates | Pilot schemes configured without code |
| Authorization | 5–6 wks | Benefits, provider | Backend, frontend | Pre-auth workflow, medical review queue, delegated authority | End-to-end pre-auth on test data |
| Claims | 12–14 wks | Client / member, provider, benefits | Backend (largest share), QA | Intake, validation, pricing, adjudication, manual and medical review, reconsideration | Rule test pack passes; volume test at proposed targets |
| NPHIES | 20–24 wks (parallel) | Foundation, NPHIES sandbox access | Integration developers | Gateway, all message types, tracking, reconciliation | NPHIES certification passed EXTERNAL VALIDATION REQUIRED |
| Portals | 12–14 wks (parallel) | Provider, claims APIs | Frontend | Provider portal including non-NPHIES claims, client portal core | Pilot provider submits and tracks claims |
| Financial settlement | 6–8 wks | Claims decisions | Backend, finance SME | Settlement batches, payment files, remittance, fee invoices, reconciliation | One full settlement cycle reconciled |
| Reporting | 6–8 wks | Claims data | BI, DBA | Reporting replica, IC-level and consolidated core reports | Contractual reports produced per IC |
| Security | continuous + 3–4 wks | Feature complete | Security, DevOps | Hardening, penetration test, NCA control mapping | No open critical or high findings |
| Testing (SIT, performance) | 6–8 wks | Feature complete | QA, automation, DevOps | Regression, performance, DR test results | Exit criteria met for UAT |
| UAT | 4–6 wks | SIT exit | Pilot TPA and IC users, BA | UAT sign-off, data migration rehearsal | Business sign-off |
| Production | 2–4 wks + 4–8 wks hypercare | UAT sign-off | All, plus support team | Cutover, go-live, hypercare | Stable operations, handover to support |
17Development team
| Role | MVP | Phase 2 | Focus |
|---|---|---|---|
| Solution Architect | 1 | 1 | Blueprint, ADRs, design authority |
| Product Owner | 1 | 1 | Backlog, priorities, acceptance |
| Business Analyst (incl. medical claims SME) | 3 | 3 | BRD, FRD, rules, UAT support |
| Technical Lead | 2 | 2 | Core and integration streams |
| Backend Developers | 8 | 9 | Core modules, rule engine, workers |
| Integration Developers | 2 | 2 | NPHIES gateway, IC files and APIs |
| Frontend Developers | 4 | 5 | Operations, provider and client portals |
| Mobile Developer | 0 | 2 | Member app |
| UI/UX Designer | 1 | 1 | Design system, Arabic RTL |
| Database Engineer | 1 | 1 | Partitioning, performance, migration |
| QA (manual) | 2 | 3 | Functional, claims rule tests |
| Automation QA | 1 | 2 | API, UI, regression, performance |
| DevOps | 1 | 2 | CI/CD, environments, observability |
| Security | 0.5 | 1 | Threat modelling, NCA mapping, testing |
| Data / BI | 1 | 2 | Reporting, warehouse |
| Total (approximate) | ~28 | ~37 | Proposed sizing, to be revisited after discovery |
18Testing, deployment and production support
Testing strategy
- Unit: domain logic, especially benefit and pricing calculations
- Claims rule testing: versioned packs of sample claims with expected line outcomes, run on every rule change before activation
- Integration and API: contract tests per module and per IC file format
- NPHIES: sandbox scenarios per message type, negative cases, certification
- UI: automated journeys in Arabic and English
- Performance: proposed targets in section 11, multi-IC noisy-neighbour scenario
- Security: SAST, DAST, dependency scanning, external penetration test
- Regression, UAT, DR: automated regression per release, business UAT, annual failover drill
Deployment
- Environments: Dev, SIT, UAT, Pre-prod (production-sized for performance), Prod, DR
- CI/CD with infrastructure as code, versioned database migrations
- Containers on Kubernetes, or IIS / Windows services if the customer mandates it; the IIS lessons from LifeX (web.config rewrite, WebDAV removal, CORS order, base href) baked into templates from day one
- Blue-green or rolling releases for zero-downtime core deployments
- Feature flags per IC for staged rollout of rule and workflow changes
Production support
- L1 TPA service desk, L2 application support, L3 product engineering
- Severity-based response targets agreed with each TPA customer BUSINESS CONFIRMATION REQUIRED
- Runbooks for NPHIES outage, queue backlog, dead-letter replay, settlement failure
19Risks, assumptions and dependencies
| Risk | Impact | Mitigation |
|---|---|---|
| No inbound NPHIES gateway exists in OptimaX; TPA-side rules and certification timeline unclear | Go-live delay (critical path) | Decide early whether to build the gateway or source it. Start it right after Foundation. Engage NPHIES early. |
| Copying insurer workflows by habit | Wrong product, rework | Section 02 table as a review gate for every module |
| Funding and settlement model undecided | Finance module redesign | Support both models in the design; decide per IC in discovery |
| Clinical rule content (edits, medical necessity) not available | Low auto-adjudication rate | Medical SME on team; start with OptimaX rule knowledge; licensed edit content as option |
| Performance at scale underestimated | SLA breaches, costly redesign | Partition-ready schema and load-tested POC in architecture phase |
| IC data leaking across insurers | Contract and regulatory breach | Row-level security, IC scope in every query, automated isolation tests |
| Data migration from incumbent TPA or IC systems | Delayed onboarding | Standard import formats, reconciliation reports, rehearsal before UAT |
| Key-person dependency on the OptimaX team | Delivery slowdown on both products | Dedicated TPA team; documented blueprint; knowledge sessions |
| Scope growth during build | MVP slips | Fixed MVP scope after sign-off; change board |
| Regulatory changes during build | Rework | Configuration-driven rules; regulatory watch owner |
Assumptions
- The TPA does not carry insurance risk in any scenario.
- Insurers remain the system of record for policy issuance and premium.
- A pilot TPA and at least one IC are available for discovery and UAT.
- Hosting will be inside Saudi Arabia.
Dependencies
- NPHIES sandbox access and TPA onboarding
- IC policy, member and benefit data feeds
- Authoritative code sets and their licences
- Infrastructure decision and procurement lead time
20Key discovery questions
Highest-impact questions for management and the business team. The full list goes into 00_Discovery_Questions.md, the first document produced.
Business model
- Who is our first customer: an existing TPA, a new TPA, or an insurer running its own administration?
- Is the product sold as a dedicated deployment per customer, or as shared SaaS?
- Which TPA fee models must MVP support: PMPM, per claim, % of claims, fixed?
- Are self-funded corporate (ASO) schemes in scope?
- White-label under each IC's brand or TPA-branded member experience?
Regulatory and NPHIES
- Which CHI licence conditions apply to the TPA's system (reporting, delegated authority, data)?
- How does NPHIES identify a TPA receiving on behalf of several payers?
- What is the NPHIES TPA certification process and lead time?
- Which code sets and versions are mandated for claims?
- Required retention periods for claims and medical records?
Insurance company relationship
- How will ICs send policies, schemes and members: file, API, portal?
- What are typical delegated-authority limits for pre-auth and claims?
- Does the TPA hold provider contracts itself, or per IC, or both?
- Who pays providers, and from which account, per IC?
- What SLAs and penalties do ICs typically impose?
Operations and volume
- Expected ICs, members, providers and claims per year for the pilot and for year 3?
- Peak patterns: month-end batches, seasonal spikes?
- Target auto-adjudication rate and medical review capacity?
- Is data migration from a previous TPA required at go-live?
Technology
- On-premises, Saudi cloud, or hybrid hosting?
- Any customer-mandated platforms (Windows/IIS, specific cloud, SSO provider)?
- Which OptimaX components and code may be reused under licensing and IP terms?
- Who operates the current NPHIES gateway OptimaX calls, and can it be extended for inbound TPA traffic, or do we build our own?
- Can the MRE / PBM validation services be licensed for TPA use?
- Which BI tool is preferred for reporting?
21Documentation package and working sequence
Produced in four stages, as the brief requires. Each stage is reviewed before the next begins. Output folder: E:\TPA\docs\, with all Mermaid sources in E:\TPA\docs\diagrams\.
| Stage | Document | Content |
|---|---|---|
| 1 · Discover | 00_Discovery_Questions.md | All questions for management, TPA, IC and regulator, with owner and due date |
| 1 · Discover | 01_Product_Vision.md | Vision, market, positioning against incumbents, insurer vs TPA distinction |
| 1 · Discover | 02_Scope.md | In and out of scope, module map, phase allocation, OptimaX reuse |
| 2 · Design | 03_BRD.md | 19-section BRD; each module with objective, actors, flows, rules, data, exceptions, audit, notifications, reports |
| 2 · Design | 04_Functional_Architecture.md | Domains, modules, capabilities, member and provider journeys |
| 2 · Design | 05_Business_Rules.md | Eligibility, benefit, authorization, claims, tariff, SLA, fee rules; config vs code |
| 2 · Design | 06_Module_Specification.md | FRD-level scope for modules A–AQ |
| 2 · Design | 07_System_Architecture.md | Application, technical, performance and scalability architecture |
| 2 · Design | 08_Integration_Architecture.md | IC feeds, provider integration, APIs, files, messaging |
| 2 · Design | 09_Data_Architecture.md | Entities, classification, partitioning, archival, warehouse |
| 2 · Design | 10_Security_Architecture.md | Identity, IC isolation, encryption, audit, compliance mapping |
| 2 · Design | 15_NPHIES_Integration.md | Gateway design, message handling, routing, reconciliation |
| 3 · Detail | 11_Workflow_Diagrams.md | All 25 required Mermaid diagrams (15 general + 10 multi-IC) |
| 3 · Detail | 12_ERD.md | Logical ERD and entity definitions |
| 3 · Detail | 13_Roles_Permissions.md | Action-level permission matrix and data scopes |
| 3 · Detail | 14_Reports.md | Dashboards and reports per audience, IC-level and consolidated |
| 3 · Detail | 16_API_Architecture.md | API conventions, versioning, security, rate limits, idempotency |
| 3 · Detail | 17_MVP_Roadmap.md | MVP, Phase 2 and Phase 3 with reasons |
| 3 · Detail | 18_Implementation_Plan.md | Phases, durations, teams, deliverables, exit criteria, testing, deployment, support |
| 3 · Detail | 19_Risks_Assumptions_Dependencies.md | RAID log |
| 3 · Detail | 20_Technical_Decisions.md | ADR log with status |
| 4 · Review | 00_Gap_Analysis.md | Missing and ambiguous requirements, regulatory, integration, architecture, data, performance, security and delivery risks |
| 4 · Review | FINAL_ARCHITECTURE_REVIEW.md | Consistency checks, major decisions, open questions, readiness assessment |
Next step
On approval of this plan, produce Stage 1 (00_Discovery_Questions.md, 01_Product_Vision.md, 02_Scope.md) in E:\TPA\docs\, then hold the discovery sessions. Stage 2 starts once the high-impact questions in section 20 have answers.