Skip to main content
This guide walks you through running the RCI Platform locally, seeding it with CMS sample data, and verifying every API endpoint works. Follow the section for your operating system.

Prerequisites


1. Clone and install


2. Start infrastructure

Start PostgreSQL and Redis with Docker Compose. This is the same on all platforms.
Wait for containers to be healthy:
You should see both postgres and redis with status healthy.

3. Apply database migrations

Expected output:
All 10 migrations should apply cleanly. If you hit enum errors on a re-run, see the Troubleshooting section.

4. Start the API server

If you started the full Docker stack in step 2, the API is already running at http://localhost:8000. Skip to step 5.To run with hot-reload for development:

5. Verify the server

Expected: {"status":"ok"}

6. Bootstrap a tenant and API key

Expected response:
Copy the api_key value now — it cannot be retrieved later. Store it in an environment variable for the rest of this guide.

7. Seed all reference data

This single call loads RVU fee schedules, GPCI geographic indices, NCCI coding edits (MUE + PTP + AOC), MAC contractors, CBSA mappings, Medicaid programs, and sample facilities.
Expected response:
If all counts are 0, see Troubleshooting.

8. Test every endpoint

The commands below use macOS/Linux curl syntax. On Windows, replace curl with curl.exe, replace \ line continuations with `, and use $env:API_KEY instead of $API_KEY.

Knowledge resolution

Expected payment result: $86.02 for CPT 99213 at CCN 170001.

NCCI MUE limits

NCCI PTP edits

Expected: modifier: "1" (modifier allowed), is_bundled: true.

NCCI Add-On Code edits

Expected: 99417 returns 3 primary codes (99213, 99214, 99215). NPI search calls the live CMS NPPES registry. No seeded data needed.

Facilities

Expected: response includes mac, gpci, and cbsa_detail fields.

AI agents

Agent jobs require the rcm-agents service running at RCM_AGENTS_URL. Without it, jobs stay in pending status — the rest of the platform works independently.

Audit

Admin


9. Run the test suite


10. Open interactive docs

Open your browser to http://localhost:8000/docs for the Swagger UI. Every endpoint is documented with request/response schemas and you can execute requests directly from the browser.

Sample data reference

The seed data loaded in step 7 includes:

NCCI MUE (56 entries)

NCCI PTP (42 pairs)

Available in both professional (/ptp/prac) and institutional (/ptp/hosp) tables.

NCCI AOC (29 relationships)

Other reference data


Troubleshooting

Data refresh returns all zeros

If POST /v1/admin/data/refresh returns 0 for all row counts:
  1. Docker stack: Make sure you started the full stack with docker compose up -d (not just postgres redis). The API container needs access to the data/ directory via volume mount.
  2. Local dev server: If running with uvicorn directly, the data files are resolved from the project root. Make sure you’re running from the repository root directory.
  3. Verify files exist: Check that the data/cms/ directory contains the CSV files:

Migration errors: duplicate_object

If alembic upgrade head fails with type "..." already exists:

Windows: curl syntax

PowerShell requires different quoting rules than bash:

Windows: uvicorn not found

If uvicorn is not recognized:

Agent jobs stuck in pending

Agent jobs require the rcm-agents service. If it’s not running:
  • Jobs will be created with status: "pending" but never complete
  • All other endpoints (knowledge, NCCI, NPI, facilities, audit) work independently
  • Set RCM_AGENTS_URL in .env to point to a running rcm-agents instance

Redis connection refused

If NPI search or rate limiting fails:

Cleanup