Cedar Ridge Intake JSON
Workflow
- Read the task prompt and
input/payloads/answer_template.json completely.
- Identify the target identifier from the prompt: roster ID, referral batch ID, transfer batch ID, program code, or explicit patient/referral/transfer IDs.
- Read any other payload files in
input/payloads/; treat them as constraints, not as optional hints.
- Collect portal data from the task environment. For the domain rules and endpoint/table map, read domain_rules.md.
- Build the answer against the template, using only allowed enum/code values and preserving required keys.
- Recompute all summary counts from the final emitted rows.
- Validate JSON syntax locally before final response. Return JSON only when the prompt asks for JSON only.
Portal Snapshot Helper
Use portal_snapshot.py to gather a focused snapshot when the task uses the Cedar Ridge portal:
cd /path/to/this/skill
python3 scripts/portal_snapshot.py \
--base-url "$TASK_ENV_BASE_URL" \
--schema \
--roster-id ROSTER-ID \
--referral-batch-id BATCH-ID \
--transfer-batch-id TRANSFER-BATCH-ID \
--program-code PROGRAM-CODE
Pass only the identifiers relevant to the current task. The script prints JSON containing the matching records, linked patients, chart data, documents, ICD metadata, pharmacy lookups, coverage/PBM/lifestyle rows, and capacity rows.
If the task gives a literal base URL instead of TASK_ENV_BASE_URL, pass that URL. If the prompt only contains <TASK_ENV_BASE_URL>, use the environment access instructions supplied with the task workspace.
Reasoning Rules
Apply these invariants before assigning statuses:
- Filter to the target cohort first; ignore distractor batches and unrelated patients.
- Join records by stable IDs (
patient_id, referral_id, transfer_id, program_code) rather than names.
- Treat integer booleans
0/1 as false/true.
- Distinguish missing data from invalid data when the template has separate values.
- Separate packet/document completeness from staleness when both are requested.
- Separate code discrepancies, administrative blockers, and chart artifact needs; templates often ask for each in a different section.
- Use the template vocabulary exactly, even if portal fields use different terms.
Answer Construction
For each row-level object:
- Start from the required keys in the template.
- Populate direct identifiers and dates from the target records.
- Add normalized status fields from the portal evidence and domain rules.
- Add reason/blocker/action arrays as deduplicated sets in the requested ordering.
- Omit prose and free-form explanations unless the template has an explicit field for them.
For summaries:
- Count the emitted row objects, not the raw portal rows.
- Include every named count key from the template, including zeroes.
- For cross-tab summaries, emit only combinations required by the template or present in the final rows, following the specified sort order.
Before final output, parse the answer with jq . or python3 -m json.tool, compare top-level keys with the template, and verify that every enum value appears in the template's allowed values.
1---2name: cedar-ridge-intake-json3description: Solve Cedar Ridge Intake Coordination Portal tasks that require reconciling healthcare intake data and returning a controlled JSON object. Use for new-patient access verification, referral readiness or chart activation, dialysis transfer review, chronic-care program enrollment, and similar portal tasks involving answer_template.json, patient/referral/transfer/program records, ICD metadata, documents, benefits, pharmacies, capacity, chart artifacts, or cohort summaries.4metadata:5 source: https://skillmd.com/skills/prism-shadow/cedar-ridge-intake-json6---78# Cedar Ridge Intake JSON910## Workflow11121. Read the task prompt and `input/payloads/answer_template.json` completely.132. Identify the target identifier from the prompt: roster ID, referral batch ID, transfer batch ID, program code, or explicit patient/referral/transfer IDs.143. Read any other payload files in `input/payloads/`; treat them as constraints, not as optional hints.154. Collect portal data from the task environment. For the domain rules and endpoint/table map, read [domain_rules.md](references/domain_rules.md).165. Build the answer against the template, using only allowed enum/code values and preserving required keys.176. Recompute all summary counts from the final emitted rows.187. Validate JSON syntax locally before final response. Return JSON only when the prompt asks for JSON only.1920## Portal Snapshot Helper2122Use [portal_snapshot.py](scripts/portal_snapshot.py) to gather a focused snapshot when the task uses the Cedar Ridge portal:2324```bash25cd /path/to/this/skill26python3 scripts/portal_snapshot.py \27 --base-url "$TASK_ENV_BASE_URL" \28 --schema \29 --roster-id ROSTER-ID \30 --referral-batch-id BATCH-ID \31 --transfer-batch-id TRANSFER-BATCH-ID \32 --program-code PROGRAM-CODE33```3435Pass only the identifiers relevant to the current task. The script prints JSON containing the matching records, linked patients, chart data, documents, ICD metadata, pharmacy lookups, coverage/PBM/lifestyle rows, and capacity rows.3637If the task gives a literal base URL instead of `TASK_ENV_BASE_URL`, pass that URL. If the prompt only contains `<TASK_ENV_BASE_URL>`, use the environment access instructions supplied with the task workspace.3839## Reasoning Rules4041Apply these invariants before assigning statuses:4243- Filter to the target cohort first; ignore distractor batches and unrelated patients.44- Join records by stable IDs (`patient_id`, `referral_id`, `transfer_id`, `program_code`) rather than names.45- Treat integer booleans `0`/`1` as false/true.46- Distinguish missing data from invalid data when the template has separate values.47- Separate packet/document completeness from staleness when both are requested.48- Separate code discrepancies, administrative blockers, and chart artifact needs; templates often ask for each in a different section.49- Use the template vocabulary exactly, even if portal fields use different terms.5051## Answer Construction5253For each row-level object:5455- Start from the required keys in the template.56- Populate direct identifiers and dates from the target records.57- Add normalized status fields from the portal evidence and domain rules.58- Add reason/blocker/action arrays as deduplicated sets in the requested ordering.59- Omit prose and free-form explanations unless the template has an explicit field for them.6061For summaries:6263- Count the emitted row objects, not the raw portal rows.64- Include every named count key from the template, including zeroes.65- For cross-tab summaries, emit only combinations required by the template or present in the final rows, following the specified sort order.6667Before final output, parse the answer with `jq .` or `python3 -m json.tool`, compare top-level keys with the template, and verify that every enum value appears in the template's allowed values.