Cedar Ridge Intake Coordination Portal — Solver Skill
Overview
This skill covers how to solve structured healthcare intake tasks against the Cedar Ridge Intake Coordination Portal. The portal exposes read-only REST endpoints for patients, referrals, transfers, documents, charts, programs, ICD codes, pharmacies, and a read-only SQL query interface.
Core Workflow
1. Read the prompt and payloads first
- Open the task
prompt.txt to identify the target batch/roster/program and the task type.
- Open
payloads/answer_template.json to understand the exact required JSON shape before querying any data.
- The template defines required keys, allowed enum values, list ordering, and numeric precision. Deviating from these constraints produces wrong answers.
2. Discover and query the API
The portal runs at the environment base URL. A GET to / returns an HTML page listing the available endpoints. Key endpoints:
| Endpoint |
Use |
GET /patients |
List/search patients |
GET /patients/{id} |
Full patient detail (demographics, coverage, PBM, pharmacies, lifestyle, clinical history, chart artifacts, documents, referrals, transfers, rosters, program candidates) |
GET /referrals?batch_id= |
List referrals in a batch |
GET /referrals/{id} |
Referral detail with ICD metadata and linked patient |
GET /transfers?batch_id= |
List transfers in a batch |
GET /transfers/{id} |
Transfer detail with capacity data and packet documents |
GET /programs/{code}/candidates |
Program candidate list |
GET /chart/{patient_id} |
Chart artifacts |
GET /icd/{code} |
ICD-10 metadata (chapter, service family, laterality, description) |
GET /documents |
Document index |
POST /query |
Read-only SQL (JSON body: {"sql": "SELECT ..."}) |
Always fetch the full detail endpoint (/patients/{id}, /referrals/{id}, /transfers/{id}) rather than relying on list results — the detail response includes nested coverage, PBM, pharmacy, lifestyle, clinical history, documents, and capacity data that the list endpoints omit.
3. Cross-reference with SQL when needed
The POST /query endpoint accepts read-only SELECT statements. Use it to reconcile records or aggregate across entities. Example: SELECT * FROM intake_rosters WHERE roster_id = '...' ORDER BY patient_id.
4. Derive fields from data, not assumptions
Every field in the answer must trace back to specific data values from the API. Common derivation patterns:
Insurance status
- valid: coverage
status is "active" AND the relevant service_line appears in the coverage's service_lines field.
- invalid: coverage exists but is
"expired" or does not cover the required service line.
- missing: no coverage record.
Prescription/PBM status
- valid: PBM
active = 1 AND status = "approved" AND policy_number matches the coverage policy.
- invalid: PBM exists but is inactive, rejected, pending, or has a policy mismatch.
- missing: no PBM record.
Pharmacy network
- Use the preferred pharmacy's
network_status ("in_network", "out_of_network"). If no pharmacy is listed, use "unknown".
Lifestyle and overall risk
Consider smoking status, alcohol use, exercise frequency, and sleep hours. Also factor in chronic conditions and risk flags from clinical_history for overall risk. Use only the enum values from the template.
Registration/readiness/decision status
Derive from the presence and combination of blockers:
- No issues →
"ready" / "approved" / "accept"
- Administrative issues →
"hold" / "admin_followup"
- Clinical uncertainty →
"clinical_review" / "under_review"
- Unfixable issues →
"rejected" / "blocked"
Reason codes and blocker codes
Only use codes from the template's allowed_values lists. Match each concrete data finding to the most specific code available.
Cohort summaries
Derive counts from the patient-level results. All counts must be integers that sum correctly to the total.
5. Respect ordering
- Patient/referral/transfer lists: ascending by ID (lexical sort of the identifier string).
- Document and reason-code arrays: alphabetical order (when template says "alphabetical").
- Unordered sets: any order is acceptable; the template will note this.
6. Validate before submitting
- Every required top-level key is present.
- Every enum value is from the allowed list.
- Every patient/referral/transfer in the batch appears in the results, sorted correctly.
- Counts in the summary match the patient-level data exactly.
Task-Type Patterns
Patient Access Verification (roster-based)
- Query the roster via SQL or the patients endpoint (roster data is nested in patient detail).
- For each patient: check insurance→service line coverage, PBM validity, pharmacy network, lifestyle risk, clinical risk, then derive registration status and blocker codes.
- Summarize by registration status, overall risk, and lifestyle risk.
Referral Readiness Audit (batch-based)
- Fetch all referrals for the batch, then fetch each referral's detail for ICD metadata.
- For each referral: check ICD chapter vs service family, records received, imaging received, authorization status, duplicate flags, shared insurance IDs.
- Identify ICD discrepancies (chapter mismatch, narrative mismatch, laterality mismatch).
- Group duplicates by shared patient+ICD+insurance. Identify shared insurance anomalies by shared insurance_id across different patients.
- List which referrals are ready to schedule (no blockers, records+imaging received, auth approved).
- Build action plan with priority tiers: urgent→tier_1, routine with blockers→tier_2 or tier_3.
Transfer/Dialysis Review (batch-based)
- Fetch all transfers, then each transfer's detail for documents and capacity.
- For each transfer: compare present documents against the required set. Check finalized status — non-finalized (draft) documents count as missing.
- Check document freshness: compare received_date against requested_start_date using the doc-type-specific freshness limit (e.g., monthly_labs: 30 days, others: 365 days).
- Capacity: sum open chairs across all locations for the requested start date. If date not in capacity data, capacity is unavailable.
- Derive feasibility from the combination of packet completeness and capacity availability.
- Final decision: accept if complete+capacity, hold if incomplete, clinical_review if complete but no capacity.
Program Enrollment Panel
- Fetch the candidate list from
/programs/{code}/candidates.
- For each candidate: fetch patient detail for clinical history and chart artifacts.
- Eligibility: target_condition matches the program's condition AND chart is active.
- Enrollment: enroll if eligible+consent signed, hold if consent missing, reject if consent declined or wrong target condition.
- Follow-up cadence: weekly (high-touch triggers: low adherence <50, recent hospitalization, recent ED), biweekly (moderate, CKD), monthly (stable), deferred/none (not enrolling).
- Monitoring package: high_touch_dm_htn for high-risk enrollees, standard_dm_htn for stable enrollees, deferred for hold, not_applicable for reject.
- Missing chart artifacts: list which of [chart_record, active_problems, vitals, labs, medications, consent] are absent from the chart.
Pulmonary/Service-Line Referral Reconciliation
- Fetch all referrals in the batch, each with ICD metadata.
- Clinical code discrepancy: ICD service_family does not match the referral's service_line (e.g., cardiology ICD for a pulmonary referral).
- Duplicate handling: referrals with
notes containing "possible duplicate" → check for same patient+ICD+insurance combinations. If no match found, add to cleared_duplicate_review_referrals.
- For each ready referral: check chart artifacts to determine if chart needs creation, update, or no action. List missing artifacts alphabetically.
- Correspondence queue: one entry per non-ready referral, with the appropriate template_type and reason codes.
- Priority order: rank non-ready referrals highest-priority-first (urgent+tier_1 before routine+tier_2 before admin+tier_3).
Common Pitfalls
- Missing nested data: The list endpoints omit coverage, PBM, pharmacy, documents, and capacity. Always call the detail endpoint.
- Transportation document: The transportation field on a transfer object IS the transportation document — null means missing, any value means present.
- Draft documents: Documents with
finalized: 0 count as missing from the packet.
- Capacity dates: Capacity data may not include every date. If the requested date is absent, open_chairs_total is 0 and capacity is unavailable.
- Insurance vs. payer: The
payer field on a referral is the referring entity, not the patient's insurance. Use insurance_id to cross-reference.
- ICD chapter mismatch: Compare the ICD code's
service_family against the referral's service_line, not the chapter letter against an expected range.
- Duplicate detection: Same patient + same ICD + same insurance across different referral IDs = duplicate group. Same insurance_id across different patients = shared insurance anomaly.
1---2name: reflect-3-attempt-01-533description: Cedar Ridge Intake Coordination Portal — Solver Skill4---5# Cedar Ridge Intake Coordination Portal — Solver Skill67## Overview89This skill covers how to solve structured healthcare intake tasks against the Cedar Ridge Intake Coordination Portal. The portal exposes read-only REST endpoints for patients, referrals, transfers, documents, charts, programs, ICD codes, pharmacies, and a read-only SQL query interface.1011## Core Workflow1213### 1. Read the prompt and payloads first1415- Open the task `prompt.txt` to identify the target batch/roster/program and the task type.16- Open `payloads/answer_template.json` to understand the **exact required JSON shape** before querying any data.17- The template defines required keys, allowed enum values, list ordering, and numeric precision. Deviating from these constraints produces wrong answers.1819### 2. Discover and query the API2021The portal runs at the environment base URL. A GET to `/` returns an HTML page listing the available endpoints. Key endpoints:2223| Endpoint | Use |24|---|---|25| `GET /patients` | List/search patients |26| `GET /patients/{id}` | Full patient detail (demographics, coverage, PBM, pharmacies, lifestyle, clinical history, chart artifacts, documents, referrals, transfers, rosters, program candidates) |27| `GET /referrals?batch_id=` | List referrals in a batch |28| `GET /referrals/{id}` | Referral detail with ICD metadata and linked patient |29| `GET /transfers?batch_id=` | List transfers in a batch |30| `GET /transfers/{id}` | Transfer detail with capacity data and packet documents |31| `GET /programs/{code}/candidates` | Program candidate list |32| `GET /chart/{patient_id}` | Chart artifacts |33| `GET /icd/{code}` | ICD-10 metadata (chapter, service family, laterality, description) |34| `GET /documents` | Document index |35| `POST /query` | Read-only SQL (JSON body: `{"sql": "SELECT ..."}`) |3637**Always fetch the full detail endpoint** (`/patients/{id}`, `/referrals/{id}`, `/transfers/{id}`) rather than relying on list results — the detail response includes nested coverage, PBM, pharmacy, lifestyle, clinical history, documents, and capacity data that the list endpoints omit.3839### 3. Cross-reference with SQL when needed4041The `POST /query` endpoint accepts read-only SELECT statements. Use it to reconcile records or aggregate across entities. Example: `SELECT * FROM intake_rosters WHERE roster_id = '...' ORDER BY patient_id`.4243### 4. Derive fields from data, not assumptions4445Every field in the answer must trace back to specific data values from the API. Common derivation patterns:4647#### Insurance status48- **valid**: coverage `status` is `"active"` AND the relevant `service_line` appears in the coverage's `service_lines` field.49- **invalid**: coverage exists but is `"expired"` or does not cover the required service line.50- **missing**: no coverage record.5152#### Prescription/PBM status53- **valid**: PBM `active` = 1 AND `status` = `"approved"` AND `policy_number` matches the coverage policy.54- **invalid**: PBM exists but is inactive, rejected, pending, or has a policy mismatch.55- **missing**: no PBM record.5657#### Pharmacy network58- Use the preferred pharmacy's `network_status` (`"in_network"`, `"out_of_network"`). If no pharmacy is listed, use `"unknown"`.5960#### Lifestyle and overall risk61Consider smoking status, alcohol use, exercise frequency, and sleep hours. Also factor in chronic conditions and risk flags from `clinical_history` for overall risk. Use only the enum values from the template.6263#### Registration/readiness/decision status64Derive from the presence and combination of blockers:65- No issues → `"ready"` / `"approved"` / `"accept"`66- Administrative issues → `"hold"` / `"admin_followup"`67- Clinical uncertainty → `"clinical_review"` / `"under_review"`68- Unfixable issues → `"rejected"` / `"blocked"`6970#### Reason codes and blocker codes71Only use codes from the template's allowed_values lists. Match each concrete data finding to the most specific code available.7273#### Cohort summaries74Derive counts from the patient-level results. All counts must be integers that sum correctly to the total.7576### 5. Respect ordering7778- Patient/referral/transfer lists: **ascending by ID** (lexical sort of the identifier string).79- Document and reason-code arrays: **alphabetical order** (when template says "alphabetical").80- Unordered sets: any order is acceptable; the template will note this.8182### 6. Validate before submitting8384- Every required top-level key is present.85- Every enum value is from the allowed list.86- Every patient/referral/transfer in the batch appears in the results, sorted correctly.87- Counts in the summary match the patient-level data exactly.8889## Task-Type Patterns9091### Patient Access Verification (roster-based)92- Query the roster via SQL or the patients endpoint (roster data is nested in patient detail).93- For each patient: check insurance→service line coverage, PBM validity, pharmacy network, lifestyle risk, clinical risk, then derive registration status and blocker codes.94- Summarize by registration status, overall risk, and lifestyle risk.9596### Referral Readiness Audit (batch-based)97- Fetch all referrals for the batch, then fetch each referral's detail for ICD metadata.98- For each referral: check ICD chapter vs service family, records received, imaging received, authorization status, duplicate flags, shared insurance IDs.99- Identify ICD discrepancies (chapter mismatch, narrative mismatch, laterality mismatch).100- Group duplicates by shared patient+ICD+insurance. Identify shared insurance anomalies by shared insurance_id across different patients.101- List which referrals are ready to schedule (no blockers, records+imaging received, auth approved).102- Build action plan with priority tiers: urgent→tier_1, routine with blockers→tier_2 or tier_3.103104### Transfer/Dialysis Review (batch-based)105- Fetch all transfers, then each transfer's detail for documents and capacity.106- For each transfer: compare present documents against the required set. Check finalized status — non-finalized (draft) documents count as missing.107- Check document freshness: compare received_date against requested_start_date using the doc-type-specific freshness limit (e.g., monthly_labs: 30 days, others: 365 days).108- Capacity: sum open chairs across all locations for the requested start date. If date not in capacity data, capacity is unavailable.109- Derive feasibility from the combination of packet completeness and capacity availability.110- Final decision: accept if complete+capacity, hold if incomplete, clinical_review if complete but no capacity.111112### Program Enrollment Panel113- Fetch the candidate list from `/programs/{code}/candidates`.114- For each candidate: fetch patient detail for clinical history and chart artifacts.115- Eligibility: target_condition matches the program's condition AND chart is active.116- Enrollment: enroll if eligible+consent signed, hold if consent missing, reject if consent declined or wrong target condition.117- Follow-up cadence: weekly (high-touch triggers: low adherence <50, recent hospitalization, recent ED), biweekly (moderate, CKD), monthly (stable), deferred/none (not enrolling).118- Monitoring package: high_touch_dm_htn for high-risk enrollees, standard_dm_htn for stable enrollees, deferred for hold, not_applicable for reject.119- Missing chart artifacts: list which of [chart_record, active_problems, vitals, labs, medications, consent] are absent from the chart.120121### Pulmonary/Service-Line Referral Reconciliation122- Fetch all referrals in the batch, each with ICD metadata.123- Clinical code discrepancy: ICD service_family does not match the referral's service_line (e.g., cardiology ICD for a pulmonary referral).124- Duplicate handling: referrals with `notes` containing "possible duplicate" → check for same patient+ICD+insurance combinations. If no match found, add to cleared_duplicate_review_referrals.125- For each ready referral: check chart artifacts to determine if chart needs creation, update, or no action. List missing artifacts alphabetically.126- Correspondence queue: one entry per non-ready referral, with the appropriate template_type and reason codes.127- Priority order: rank non-ready referrals highest-priority-first (urgent+tier_1 before routine+tier_2 before admin+tier_3).128129## Common Pitfalls130131- **Missing nested data**: The list endpoints omit coverage, PBM, pharmacy, documents, and capacity. Always call the detail endpoint.132- **Transportation document**: The transportation field on a transfer object IS the transportation document — null means missing, any value means present.133- **Draft documents**: Documents with `finalized: 0` count as missing from the packet.134- **Capacity dates**: Capacity data may not include every date. If the requested date is absent, open_chairs_total is 0 and capacity is unavailable.135- **Insurance vs. payer**: The `payer` field on a referral is the referring entity, not the patient's insurance. Use `insurance_id` to cross-reference.136- **ICD chapter mismatch**: Compare the ICD code's `service_family` against the referral's `service_line`, not the chapter letter against an expected range.137- **Duplicate detection**: Same patient + same ICD + same insurance across different referral IDs = duplicate group. Same insurance_id across different patients = shared insurance anomaly.