Cedar Ridge Intake Coordination
Overview
The Cedar Ridge Intake Coordination Portal is a read-only REST API plus a SQL query endpoint. Five intake workflows recur across the system: new-patient access verification, referral readiness audit, dialysis transfer review, chronic-care program enrollment panels, and referral-to-chart activation.
Quick Start
Replace <TASK_ENV_BASE_URL> with the actual environment base URL from the task prompt. All endpoints are read-only GET except the SQL endpoint, which uses POST /query with {"sql": "..."}.
# List all patients
curl -s "<TASK_ENV_BASE_URL>/patients"
# Get one patient (composite: demographics, coverage, PBM, pharmacy, lifestyle, documents, referrals, transfers, rosters, program candidates)
curl -s "<TASK_ENV_BASE_URL>/patients/<patient_id>"
# Get patient chart (chart_artifacts, active_problems, meds_allergies, clinical_history, recent_vitals_labs)
curl -s "<TASK_ENV_BASE_URL>/chart/<patient_id>"
# List referrals for a batch
curl -s "<TASK_ENV_BASE_URL>/referrals?batch_id=<batch_id>"
# Get a single referral
curl -s "<TASK_ENV_BASE_URL>/referrals/<referral_id>"
# List transfers for a batch
curl -s "<TASK_ENV_BASE_URL>/transfers?batch_id=<batch_id>"
# List all documents (or filter with query params)
curl -s "<TASK_ENV_BASE_URL>/documents"
# Get ICD metadata
curl -s "<TASK_ENV_BASE_URL>/icd/<code>"
# List pharmacies
curl -s "<TASK_ENV_BASE_URL>/pharmacies"
# Get program candidates
curl -s "<TASK_ENV_BASE_URL>/programs/<program_code>/candidates"
# Run a read-only SQL query
curl -s -X POST "<TASK_ENV_BASE_URL>/query" \
-H "Content-Type: application/json" \
-d '{"sql": "SELECT * FROM intake_rosters WHERE roster_id = ''NPI-JUN-01''"}'
Workflow Decision Tree
| Task signature |
Workflow |
| Rosters, patient insurance/PBM/pharmacy, registration_status, blocked_reason_codes |
Access Verification — see references/business_rules.md |
| Referral batch, ICD codes, duplicates, insurance anomalies, authorization, records/imaging |
Referral Readiness Audit — see references/business_rules.md |
| Transfer batch, packet documents, freshness checks, chair capacity |
Transfer Review — see references/business_rules.md |
| Program candidates, chart records, eligibility, monitoring packages |
Enrollment Panel — see references/business_rules.md |
| Referral batch + chart needs, correspondence templates, chart activation |
Referral-to-Chart Activation — see references/business_rules.md |
General Patterns
Fetching Patient Data
The /patients/<patient_id> endpoint returns a composite object: patient, coverage[], pbm[], pharmacies[], lifestyle, clinical_history, chart_artifacts[], documents[], referrals[], transfers[], rosters[], and program_candidates[]. Use this single call first.
For chart-specific data (active_problems, allergies, vitals, labs) use /chart/<patient_id>.
SQL Endpoint
The POST /query endpoint supports read-only SELECT statements. Use it to:
- Fetch intake roster data:
SELECT * FROM intake_rosters WHERE roster_id = '...'
- Cross-check referral or patient data when batch endpoints are insufficient
- Verify aggregate counts
Always quote string literals carefully in curl (escape single quotes with ''').
Answer Template
Each task provides an answer_template.json defining the exact output shape, required keys, allowed enum values, and ordering constraints. Read it before starting and build the response to match its schema exactly. Lists named with ordering must be sorted as specified (typically ascending by ID). Lists of codes treated as "unordered set" should still be alphabetically sorted for determinism.
API Reference
Complete endpoint documentation, response shapes, and field definitions are in references/api_reference.md.
Business Rules
Detailed decision rules for each workflow (insurance evaluation, ICD discrepancy detection, stale-document checks, eligibility logic, chart-activation rules) are in references/business_rules.md.
Data Integrity Notes
- When a patient has no records for a given resource (e.g., no PBM, no pharmacy, no chart), the corresponding array is empty. Treat empty arrays the same as missing data for status determination.
- Document
status can be "draft" or "final". Only final documents count as received.
- Referral
notes containing "possible duplicate" or "duplicate faxed by second practice" are signals for duplicate detection.
- ICD
service_family should match referral service_line. Mismatch indicates an ICD chapter discrepancy.
- Coverage
service_lines is a comma-separated string (e.g., "primary_care,cardiology"). Split on comma for individual check.
- All patient IDs in the portal use uppercase
P prefix (e.g., P001). Referral IDs use REF prefix. Transfer IDs use TR prefix.
Response Construction
- Read the prompt and
answer_template.json to understand the required output shape and controlled values.
- Fetch all relevant portal data for every target patient/referral/transfer/candidate.
- Apply business rules from references/business_rules.md to produce the per-entity determinations.
- Compute cohort summary counts from the individual results.
- Validate that every required key is present and every value is from the allowed enum set.
- Output a single JSON object with no prose outside the JSON.
1---2name: cedar-ridge-intake-113description: Navigate the Cedar Ridge Intake Coordination Portal API to process patient intake verification, referral audit, transfer review, program enrollment panels, and referral-to-chart activation. Use when working with Cedar Ridge intake tasks that involve the portal's REST API (patients, referrals, transfers, documents, charts, ICD codes, pharmacies, programs, and the read-only SQL endpoint).4metadata:5 source: https://skillmd.com/skills/prism-shadow/cedar-ridge-intake-116---78# Cedar Ridge Intake Coordination910## Overview1112The Cedar Ridge Intake Coordination Portal is a read-only REST API plus a SQL query endpoint. Five intake workflows recur across the system: new-patient access verification, referral readiness audit, dialysis transfer review, chronic-care program enrollment panels, and referral-to-chart activation.1314## Quick Start1516Replace `<TASK_ENV_BASE_URL>` with the actual environment base URL from the task prompt. All endpoints are read-only GET except the SQL endpoint, which uses `POST /query` with `{"sql": "..."}`.1718```bash19# List all patients20curl -s "<TASK_ENV_BASE_URL>/patients"2122# Get one patient (composite: demographics, coverage, PBM, pharmacy, lifestyle, documents, referrals, transfers, rosters, program candidates)23curl -s "<TASK_ENV_BASE_URL>/patients/<patient_id>"2425# Get patient chart (chart_artifacts, active_problems, meds_allergies, clinical_history, recent_vitals_labs)26curl -s "<TASK_ENV_BASE_URL>/chart/<patient_id>"2728# List referrals for a batch29curl -s "<TASK_ENV_BASE_URL>/referrals?batch_id=<batch_id>"3031# Get a single referral32curl -s "<TASK_ENV_BASE_URL>/referrals/<referral_id>"3334# List transfers for a batch35curl -s "<TASK_ENV_BASE_URL>/transfers?batch_id=<batch_id>"3637# List all documents (or filter with query params)38curl -s "<TASK_ENV_BASE_URL>/documents"3940# Get ICD metadata41curl -s "<TASK_ENV_BASE_URL>/icd/<code>"4243# List pharmacies44curl -s "<TASK_ENV_BASE_URL>/pharmacies"4546# Get program candidates47curl -s "<TASK_ENV_BASE_URL>/programs/<program_code>/candidates"4849# Run a read-only SQL query50curl -s -X POST "<TASK_ENV_BASE_URL>/query" \51 -H "Content-Type: application/json" \52 -d '{"sql": "SELECT * FROM intake_rosters WHERE roster_id = ''NPI-JUN-01''"}'53```5455## Workflow Decision Tree5657| Task signature | Workflow |58|---|---|59| Rosters, patient insurance/PBM/pharmacy, registration_status, blocked_reason_codes | **Access Verification** — see [references/business_rules.md](references/business_rules.md#access-verification) |60| Referral batch, ICD codes, duplicates, insurance anomalies, authorization, records/imaging | **Referral Readiness Audit** — see [references/business_rules.md](references/business_rules.md#referral-readiness-audit) |61| Transfer batch, packet documents, freshness checks, chair capacity | **Transfer Review** — see [references/business_rules.md](references/business_rules.md#transfer-review) |62| Program candidates, chart records, eligibility, monitoring packages | **Enrollment Panel** — see [references/business_rules.md](references/business_rules.md#enrollment-panel) |63| Referral batch + chart needs, correspondence templates, chart activation | **Referral-to-Chart Activation** — see [references/business_rules.md](references/business_rules.md#referral-to-chart-activation) |6465## General Patterns6667### Fetching Patient Data6869The `/patients/<patient_id>` endpoint returns a composite object: `patient`, `coverage[]`, `pbm[]`, `pharmacies[]`, `lifestyle`, `clinical_history`, `chart_artifacts[]`, `documents[]`, `referrals[]`, `transfers[]`, `rosters[]`, and `program_candidates[]`. Use this single call first.7071For chart-specific data (active_problems, allergies, vitals, labs) use `/chart/<patient_id>`.7273### SQL Endpoint7475The `POST /query` endpoint supports read-only SELECT statements. Use it to:76- Fetch intake roster data: `SELECT * FROM intake_rosters WHERE roster_id = '...'`77- Cross-check referral or patient data when batch endpoints are insufficient78- Verify aggregate counts7980Always quote string literals carefully in curl (escape single quotes with `'''`).8182### Answer Template8384Each task provides an `answer_template.json` defining the exact output shape, required keys, allowed enum values, and ordering constraints. Read it before starting and build the response to match its schema exactly. Lists named with `ordering` must be sorted as specified (typically ascending by ID). Lists of codes treated as "unordered set" should still be alphabetically sorted for determinism.8586### API Reference8788Complete endpoint documentation, response shapes, and field definitions are in [references/api_reference.md](references/api_reference.md).8990### Business Rules9192Detailed decision rules for each workflow (insurance evaluation, ICD discrepancy detection, stale-document checks, eligibility logic, chart-activation rules) are in [references/business_rules.md](references/business_rules.md).9394## Data Integrity Notes9596- When a patient has no records for a given resource (e.g., no PBM, no pharmacy, no chart), the corresponding array is empty. Treat empty arrays the same as missing data for status determination.97- Document `status` can be `"draft"` or `"final"`. Only final documents count as received.98- Referral `notes` containing `"possible duplicate"` or `"duplicate faxed by second practice"` are signals for duplicate detection.99- ICD `service_family` should match referral `service_line`. Mismatch indicates an ICD chapter discrepancy.100- Coverage `service_lines` is a comma-separated string (e.g., `"primary_care,cardiology"`). Split on comma for individual check.101- All patient IDs in the portal use uppercase `P` prefix (e.g., `P001`). Referral IDs use `REF` prefix. Transfer IDs use `TR` prefix.102103## Response Construction1041051. Read the prompt and `answer_template.json` to understand the required output shape and controlled values.1062. Fetch all relevant portal data for every target patient/referral/transfer/candidate.1073. Apply business rules from [references/business_rules.md](references/business_rules.md) to produce the per-entity determinations.1084. Compute cohort summary counts from the individual results.1095. Validate that every required key is present and every value is from the allowed enum set.1106. Output a single JSON object with no prose outside the JSON.