Cedar Ridge Intake JSON
Use the portal data as the source of truth and the provided input/payloads/answer_template.json as the output contract. Return exactly one JSON object and no prose.
First Pass
- Read the prompt and template. Extract the task family, identifiers, required top-level keys, controlled values, and ordering rules.
- Replace
<TASK_ENV_BASE_URL> with the actual base URL from the prompt or environment access notes.
- Pull only records related to the requested roster, batch, program, transfer IDs, referral IDs, and linked patient IDs.
- Prefer
/query with read-only SELECT statements for joins and grouping. The useful tables are:
patients, intake_rosters, coverage, pbm, patient_pharmacy, pharmacies, lifestyle, clinical_history, referrals, icd_codes, documents, transfer_requests, facility_capacity, chart_artifacts, and program_candidates.
- Build results in the exact template shape. Include required keys with zero counts or empty arrays when no records qualify.
- Recompute summaries from the per-item rows after all statuses are assigned. Validate counts and ordering before answering.
Never call judge/evaluator endpoints. Do not infer from distractor records outside the requested identifiers.
Query Patterns
Use placeholders, not literal examples:
-- Roster access verification
SELECT r.*, p.*, c.status AS coverage_status, c.effective_date, c.termination_date,
c.network_status, c.service_lines,
pb.status AS pbm_status, pb.active AS pbm_active, pb.formulary_status,
pb.specialty_required,
pp.pharmacy_id, ph.network_status AS pharmacy_network_status,
l.smoking_status, l.alcohol_use, l.exercise_frequency, l.sleep_hours,
ch.recent_hospitalization, ch.risk_flags
FROM intake_rosters r
JOIN patients p ON p.patient_id = r.patient_id
LEFT JOIN coverage c ON c.patient_id = r.patient_id
LEFT JOIN pbm pb ON pb.patient_id = r.patient_id
LEFT JOIN patient_pharmacy pp
ON pp.patient_id = r.patient_id AND pp.preference_rank = 1
LEFT JOIN pharmacies ph ON ph.pharmacy_id = pp.pharmacy_id
LEFT JOIN lifestyle l ON l.patient_id = r.patient_id
LEFT JOIN clinical_history ch ON ch.patient_id = r.patient_id
WHERE r.roster_id = :roster_id
ORDER BY r.patient_id;
-- Referral batch with ICD metadata
SELECT r.*, i.description AS icd_description, i.chapter, i.service_family, i.laterality
FROM referrals r
LEFT JOIN icd_codes i ON i.code = r.icd10_code
WHERE r.batch_id = :batch_id
ORDER BY r.referral_id;
-- Transfer packet and capacity
SELECT t.*, d.doc_type, d.status, d.finalized, d.received_date
FROM transfer_requests t
LEFT JOIN documents d ON d.transfer_id = t.transfer_id
WHERE t.batch_id = :batch_id
ORDER BY t.transfer_id, d.doc_type;
SELECT t.transfer_id, COALESCE(SUM(fc.open_chairs), 0) AS open_chairs_total
FROM transfer_requests t
LEFT JOIN facility_capacity fc
ON fc.date = t.requested_start_date AND fc.modality = t.modality
WHERE t.batch_id = :batch_id
GROUP BY t.transfer_id
ORDER BY t.transfer_id;
For program panels, start with GET /programs/{program_code}/candidates, then query clinical_history and chart_artifacts for those patient IDs.
Access Verification
Use this for new-patient roster tasks.
Coverage:
valid: an active coverage row, in network, requested service date within effective/termination bounds, and requested service line included in service_lines.
missing: no coverage row.
invalid: any present row that fails the validity test.
- Reason codes: expired coverage ->
coverage_expired; pending coverage -> coverage_pending; requested service line absent -> excluded_service_line.
Prescription benefit:
valid: PBM row is active and approved.
missing: no PBM row.
invalid: inactive, rejected, pending/review, not found, or a policy/service mismatch.
- Reason codes: no PBM ->
pbm_missing; rejected/pending/review/not-found -> pbm_invalid; active policy that conflicts with the requested service or required benefit rules -> pbm_policy_mismatch.
Pharmacy:
- Use the rank-1 preferred pharmacy. Map its
network_status to in_network or out_of_network.
- If no preferred pharmacy or no pharmacy status is available, use
unknown.
- Reason codes:
pharmacy_out_of_network or pharmacy_unknown.
Demographic/contact reason codes:
missing_address when address is null/blank.
preferred_contact_unavailable when the preferred channel has no usable value: phone/sms require phone, email requires email, portal generally requires an existing chart/portal-capable record.
emergency_contact_missing when the emergency contact flag is false.
Lifestyle risk:
high if any high-risk signal is present: current smoking, heavy alcohol use, no/unknown exercise, sleep under 6 hours, recent hospitalization, or strong risk flags.
medium if moderate risk remains without a high-risk signal: former smoking, moderate alcohol use, borderline sleep, elevated medication burden, or mild flags.
low only when lifestyle fields are reassuring and no clinical flags are present.
Overall risk and registration:
overall_risk is high if lifestyle risk is high or any serious blocker exists: invalid/missing coverage, excluded service line, invalid/mismatched PBM, out-of-network/unknown pharmacy, missing address/contact/emergency contact, recent hospitalization, or high-risk clinical flags.
- Use
medium for medium lifestyle or repairable noncritical issues; otherwise low.
registration_status precedence: rejected for excluded service line or nonrepairable coverage; clinical_review for high overall risk, PBM/pharmacy blockers, or clinical/demographic safety concerns; hold for repairable administrative pending/missing items only; approved when no blockers remain.
- Add
overall_risk_high whenever overall_risk is high.
Referral Readiness
Use this for specialty referral audits and referral-to-chart activation.
Clinical code checks:
- Join each referral to
icd_codes.
- Flag service-family mismatch when
icd_codes.service_family does not match the referral service_line.
- For orthopedic audits that ask for ICD chapter mismatches, expect musculoskeletal
M00-M99; injury/poisoning or other chapters are discrepancies even when the service family is orthopedics.
- Flag narrative/clinical reason mismatch when the referral reason or diagnosis narrative is incompatible with the ICD/service family, such as a musculoskeletal pain reason attached to a pulmonary activation.
- Flag laterality mismatch only when both the ICD metadata and referral narrative mention conflicting sides.
- Put observed and expected chapters in discrepancy objects when the template requests them.
Operational blockers:
missing_records or records_missing: records_received = 0.
missing_imaging or imaging_missing: imaging_received = 0.
auth_blocker or authorization_blocked: auth_required = 1 and auth_status is pending, denied, or not_submitted.
already_scheduled or scheduled_before_clearance: appointment already scheduled while other clearance issues remain.
Duplicates and insurance anomalies:
- Duplicate referrals are same-patient repeated referrals in the same batch with matching clinical/request details. Keep the earliest or lowest referral ID as primary; recommend consolidation.
- Same insurance ID across different patient IDs is a shared-insurance anomaly; disposition should verify distinct patient policy ID.
- A note like "possible duplicate" is not enough by itself; if no same-patient duplicate group exists, list it as cleared when the template has a cleared-duplicates field.
Readiness status:
ready: no clinical discrepancy, duplicate issue, admin anomaly, authorization/document blocker, or premature appointment blocker.
blocked: authorization, records, or imaging blockers are present. Keep blocked even if clinical issues are also present.
under_review: clinical code/narrative/laterality discrepancy, duplicate review, or already-scheduled review without hard document/auth blockers.
admin_followup: only administrative anomalies such as shared insurance and no clinical/document/auth blocker.
Actions, correspondence, and priority:
- Map code discrepancies to
request_corrected_icd, confirm_narrative, or confirm_laterality; map duplicates to consolidate_duplicate; shared insurance to verify_insurance_id; records/imaging/auth to request_records, request_imaging, and resolve_authorization; appointments to review_existing_appointment.
- Correspondence template precedence: appointment hold notice first, then duplicate resolution, then combined auth/records request, then clinical code clarification.
- Use
wrong_service_family for ICD service-family mismatch and clinical_reason_mismatch for narrative mismatch when the template uses those reason codes.
- Priority tiers: urgent clinical discrepancies ->
tier_1_immediate; routine clinical, duplicate, appointment, auth, records, or imaging issues -> tier_2_short_term; admin-only insurance follow-up -> tier_3_administrative.
- For priority-ordered lists, include only non-ready referrals. Sort by tier, then urgent before routine, then scheduled/multiple blockers, clinical discrepancies, auth/document blockers, duplicate/admin work, and finally referral ID.
Chart activation:
- Chart gaps are reported for referrals that are otherwise ready; they do not make the referral non-ready.
- Required activation artifacts are the template's chart artifacts. Create/update every missing or non-current required artifact.
chart_action: create_chart when no chart exists, update_chart when a chart exists but artifacts are missing/stale, otherwise no_chart_action.
Dialysis Transfers
Use this for seasonal dialysis transfer reviews.
Packet completeness:
- Required packet items are the document codes in the answer template plus any non-document fields listed there, such as transportation.
- A document counts as present only when
status = 'final' and finalized = 1.
- Draft, missing, or null transportation values are missing required items.
packet_completeness_status is complete when all required items are present, even if some freshness-limited documents are stale.
Freshness:
- Compare
received_date to the requested start date for that transfer.
- Use 30 days for
hbsag, monthly_labs, and ppd_or_cxr.
- Use 365 days for
history_physical and hep_b_antibody_core when the template asks for those stale document types.
- Include stale document objects with the document type, received date, and freshness limit. Sort by doc type.
Capacity and decision:
- Sum
facility_capacity.open_chairs across all locations for the requested date and modality. Treat no rows as zero.
capacity_status is available when open chairs total is greater than zero; otherwise unavailable.
- Feasibility values combine packet readiness and capacity:
ready_on_requested_start, packet_not_ready_capacity_available, packet_not_ready_capacity_unavailable, or capacity_unavailable.
final_intake_decision: accept only when documents are complete, freshness passes, and capacity is available; hold when packet is ready but capacity is unavailable; clinical_review when required or freshness-limited clinical packet items are missing/stale.
- Contact routing: missing/stale packet items go to
clinical_nurse via fax_referring_facility; capacity-only holds go to scheduling/internal routing if the template allows it; accepted rows use none.
Chronic-Care Program Panels
Use this for program candidate enrollment outputs.
Data and dates:
- Include every current candidate returned by
/programs/{program_code}/candidates; do not filter out candidates unless the prompt explicitly says to.
- Use the program/report as-of date from the prompt or portal metadata when available. Do not use individual
candidate_date values as the panel as_of_date unless the template says so.
Eligibility and reasons:
- Determine the target condition from the program and candidate. For diabetes-hypertension programs, eligibility requires the diabetes-hypertension target and active diabetes plus hypertension in clinical history.
eligible means condition eligibility only; consent declined or inactive chart can still produce eligible: true with a reject disposition.
- Add
meets_dmhtn_criteria for eligible diabetes-hypertension candidates when that code is allowed.
- Add
wrong_target_condition and missing_active_dmhtn_diagnosis for candidates whose target/active diagnoses do not match.
- Add
consent_declined or consent_missing from candidate consent, but suppress repairable missing-consent/chart-maintenance codes for already ineligible rejects unless declined consent or inactive chart is explicitly important.
- Add
chart_not_active when no active/existing chart is available.
- Add stale/missing chart artifact codes from
chart_artifacts: stale active problems -> stale_active_problems; no current vitals/labs/medications/consent -> missing_recent_vitals, missing_recent_labs, missing_medication_list, consent.
Disposition and cadence:
reject: ineligible target/diagnosis or declined consent.
hold: eligible but consent is missing or the chart/artifacts need repair before enrollment.
enroll: eligible, signed consent, active chart, and required artifacts current enough.
weekly: recent hospitalization, recent ED risk flag, or low adherence.
biweekly: CKD/renal comorbidity without weekly triggers.
monthly: standard eligible enrollment.
deferred: holds.
none: rejects.
Outreach and monitoring:
- Prefer the candidate's outreach channel when it is allowed and usable. If it is unavailable, fall back to the patient preferred contact with usable data; portal requires an active chart, phone/sms require phone, and email requires email. Use
none only when no allowed route works.
- High-touch package:
bp_cuff, glucometer, lab_order_a1c_cmp_lipid, medication_reconciliation, and care_plan_setup, with first check-in at 7 days.
- Standard CKD/biweekly package:
bp_cuff, glucometer, lab_order_a1c_cmp_lipid, and medication_reconciliation, with first check-in at 14 days.
- Standard monthly package:
bp_cuff, glucometer, and lab_order_a1c_cmp_lipid, with first check-in at 30 days.
- Holds use a deferred package with
consent_packet and/or chart_update_request as applicable and null first check-in.
- Rejects use
not_applicable, no components, and null first check-in.
Final Validation
Before returning:
- Sort arrays exactly as the template specifies.
- Keep reason-code/blocker-code arrays as sets, preferably in stable alphabetical or logical order.
- Ensure all enum strings come from the template.
- Count from the final item rows, not from intermediate queries.
- Include zero-valued keys required by summary count objects.
- Emit strict JSON only.
1---2name: cedar-ridge-intake-json-33description: Solve Cedar Ridge Intake Coordination Portal tasks that require JSON-only healthcare intake outputs, including new-patient access verification, specialty referral readiness audits, dialysis transfer packet/capacity reviews, chronic-care enrollment panels, and referral-to-chart activation files. Use when the prompt names the Cedar Ridge portal, a task environment base URL, and an answer_template.json with controlled output values.4metadata:5 source: https://skillmd.com/skills/prism-shadow/cedar-ridge-intake-json-36---78# Cedar Ridge Intake JSON910Use the portal data as the source of truth and the provided `input/payloads/answer_template.json` as the output contract. Return exactly one JSON object and no prose.1112## First Pass13141. Read the prompt and template. Extract the task family, identifiers, required top-level keys, controlled values, and ordering rules.152. Replace `<TASK_ENV_BASE_URL>` with the actual base URL from the prompt or environment access notes.163. Pull only records related to the requested roster, batch, program, transfer IDs, referral IDs, and linked patient IDs.174. Prefer `/query` with read-only `SELECT` statements for joins and grouping. The useful tables are:18 `patients`, `intake_rosters`, `coverage`, `pbm`, `patient_pharmacy`, `pharmacies`, `lifestyle`, `clinical_history`, `referrals`, `icd_codes`, `documents`, `transfer_requests`, `facility_capacity`, `chart_artifacts`, and `program_candidates`.195. Build results in the exact template shape. Include required keys with zero counts or empty arrays when no records qualify.206. Recompute summaries from the per-item rows after all statuses are assigned. Validate counts and ordering before answering.2122Never call judge/evaluator endpoints. Do not infer from distractor records outside the requested identifiers.2324## Query Patterns2526Use placeholders, not literal examples:2728```sql29-- Roster access verification30SELECT r.*, p.*, c.status AS coverage_status, c.effective_date, c.termination_date,31 c.network_status, c.service_lines,32 pb.status AS pbm_status, pb.active AS pbm_active, pb.formulary_status,33 pb.specialty_required,34 pp.pharmacy_id, ph.network_status AS pharmacy_network_status,35 l.smoking_status, l.alcohol_use, l.exercise_frequency, l.sleep_hours,36 ch.recent_hospitalization, ch.risk_flags37FROM intake_rosters r38JOIN patients p ON p.patient_id = r.patient_id39LEFT JOIN coverage c ON c.patient_id = r.patient_id40LEFT JOIN pbm pb ON pb.patient_id = r.patient_id41LEFT JOIN patient_pharmacy pp42 ON pp.patient_id = r.patient_id AND pp.preference_rank = 143LEFT JOIN pharmacies ph ON ph.pharmacy_id = pp.pharmacy_id44LEFT JOIN lifestyle l ON l.patient_id = r.patient_id45LEFT JOIN clinical_history ch ON ch.patient_id = r.patient_id46WHERE r.roster_id = :roster_id47ORDER BY r.patient_id;48```4950```sql51-- Referral batch with ICD metadata52SELECT r.*, i.description AS icd_description, i.chapter, i.service_family, i.laterality53FROM referrals r54LEFT JOIN icd_codes i ON i.code = r.icd10_code55WHERE r.batch_id = :batch_id56ORDER BY r.referral_id;57```5859```sql60-- Transfer packet and capacity61SELECT t.*, d.doc_type, d.status, d.finalized, d.received_date62FROM transfer_requests t63LEFT JOIN documents d ON d.transfer_id = t.transfer_id64WHERE t.batch_id = :batch_id65ORDER BY t.transfer_id, d.doc_type;6667SELECT t.transfer_id, COALESCE(SUM(fc.open_chairs), 0) AS open_chairs_total68FROM transfer_requests t69LEFT JOIN facility_capacity fc70 ON fc.date = t.requested_start_date AND fc.modality = t.modality71WHERE t.batch_id = :batch_id72GROUP BY t.transfer_id73ORDER BY t.transfer_id;74```7576For program panels, start with `GET /programs/{program_code}/candidates`, then query `clinical_history` and `chart_artifacts` for those patient IDs.7778## Access Verification7980Use this for new-patient roster tasks.8182Coverage:83- `valid`: an active coverage row, in network, requested service date within effective/termination bounds, and requested service line included in `service_lines`.84- `missing`: no coverage row.85- `invalid`: any present row that fails the validity test.86- Reason codes: expired coverage -> `coverage_expired`; pending coverage -> `coverage_pending`; requested service line absent -> `excluded_service_line`.8788Prescription benefit:89- `valid`: PBM row is active and approved.90- `missing`: no PBM row.91- `invalid`: inactive, rejected, pending/review, not found, or a policy/service mismatch.92- Reason codes: no PBM -> `pbm_missing`; rejected/pending/review/not-found -> `pbm_invalid`; active policy that conflicts with the requested service or required benefit rules -> `pbm_policy_mismatch`.9394Pharmacy:95- Use the rank-1 preferred pharmacy. Map its `network_status` to `in_network` or `out_of_network`.96- If no preferred pharmacy or no pharmacy status is available, use `unknown`.97- Reason codes: `pharmacy_out_of_network` or `pharmacy_unknown`.9899Demographic/contact reason codes:100- `missing_address` when address is null/blank.101- `preferred_contact_unavailable` when the preferred channel has no usable value: phone/sms require phone, email requires email, portal generally requires an existing chart/portal-capable record.102- `emergency_contact_missing` when the emergency contact flag is false.103104Lifestyle risk:105- `high` if any high-risk signal is present: current smoking, heavy alcohol use, no/unknown exercise, sleep under 6 hours, recent hospitalization, or strong risk flags.106- `medium` if moderate risk remains without a high-risk signal: former smoking, moderate alcohol use, borderline sleep, elevated medication burden, or mild flags.107- `low` only when lifestyle fields are reassuring and no clinical flags are present.108109Overall risk and registration:110- `overall_risk` is `high` if lifestyle risk is high or any serious blocker exists: invalid/missing coverage, excluded service line, invalid/mismatched PBM, out-of-network/unknown pharmacy, missing address/contact/emergency contact, recent hospitalization, or high-risk clinical flags.111- Use `medium` for medium lifestyle or repairable noncritical issues; otherwise `low`.112- `registration_status` precedence: `rejected` for excluded service line or nonrepairable coverage; `clinical_review` for high overall risk, PBM/pharmacy blockers, or clinical/demographic safety concerns; `hold` for repairable administrative pending/missing items only; `approved` when no blockers remain.113- Add `overall_risk_high` whenever `overall_risk` is `high`.114115## Referral Readiness116117Use this for specialty referral audits and referral-to-chart activation.118119Clinical code checks:120- Join each referral to `icd_codes`.121- Flag service-family mismatch when `icd_codes.service_family` does not match the referral `service_line`.122- For orthopedic audits that ask for ICD chapter mismatches, expect musculoskeletal `M00-M99`; injury/poisoning or other chapters are discrepancies even when the service family is orthopedics.123- Flag narrative/clinical reason mismatch when the referral reason or diagnosis narrative is incompatible with the ICD/service family, such as a musculoskeletal pain reason attached to a pulmonary activation.124- Flag laterality mismatch only when both the ICD metadata and referral narrative mention conflicting sides.125- Put observed and expected chapters in discrepancy objects when the template requests them.126127Operational blockers:128- `missing_records` or `records_missing`: `records_received = 0`.129- `missing_imaging` or `imaging_missing`: `imaging_received = 0`.130- `auth_blocker` or `authorization_blocked`: `auth_required = 1` and `auth_status` is `pending`, `denied`, or `not_submitted`.131- `already_scheduled` or `scheduled_before_clearance`: appointment already scheduled while other clearance issues remain.132133Duplicates and insurance anomalies:134- Duplicate referrals are same-patient repeated referrals in the same batch with matching clinical/request details. Keep the earliest or lowest referral ID as primary; recommend consolidation.135- Same insurance ID across different patient IDs is a shared-insurance anomaly; disposition should verify distinct patient policy ID.136- A note like "possible duplicate" is not enough by itself; if no same-patient duplicate group exists, list it as cleared when the template has a cleared-duplicates field.137138Readiness status:139- `ready`: no clinical discrepancy, duplicate issue, admin anomaly, authorization/document blocker, or premature appointment blocker.140- `blocked`: authorization, records, or imaging blockers are present. Keep `blocked` even if clinical issues are also present.141- `under_review`: clinical code/narrative/laterality discrepancy, duplicate review, or already-scheduled review without hard document/auth blockers.142- `admin_followup`: only administrative anomalies such as shared insurance and no clinical/document/auth blocker.143144Actions, correspondence, and priority:145- Map code discrepancies to `request_corrected_icd`, `confirm_narrative`, or `confirm_laterality`; map duplicates to `consolidate_duplicate`; shared insurance to `verify_insurance_id`; records/imaging/auth to `request_records`, `request_imaging`, and `resolve_authorization`; appointments to `review_existing_appointment`.146- Correspondence template precedence: appointment hold notice first, then duplicate resolution, then combined auth/records request, then clinical code clarification.147- Use `wrong_service_family` for ICD service-family mismatch and `clinical_reason_mismatch` for narrative mismatch when the template uses those reason codes.148- Priority tiers: urgent clinical discrepancies -> `tier_1_immediate`; routine clinical, duplicate, appointment, auth, records, or imaging issues -> `tier_2_short_term`; admin-only insurance follow-up -> `tier_3_administrative`.149- For priority-ordered lists, include only non-ready referrals. Sort by tier, then urgent before routine, then scheduled/multiple blockers, clinical discrepancies, auth/document blockers, duplicate/admin work, and finally referral ID.150151Chart activation:152- Chart gaps are reported for referrals that are otherwise ready; they do not make the referral non-ready.153- Required activation artifacts are the template's chart artifacts. Create/update every missing or non-current required artifact.154- `chart_action`: `create_chart` when no chart exists, `update_chart` when a chart exists but artifacts are missing/stale, otherwise `no_chart_action`.155156## Dialysis Transfers157158Use this for seasonal dialysis transfer reviews.159160Packet completeness:161- Required packet items are the document codes in the answer template plus any non-document fields listed there, such as transportation.162- A document counts as present only when `status = 'final'` and `finalized = 1`.163- Draft, missing, or null transportation values are missing required items.164- `packet_completeness_status` is `complete` when all required items are present, even if some freshness-limited documents are stale.165166Freshness:167- Compare `received_date` to the requested start date for that transfer.168- Use 30 days for `hbsag`, `monthly_labs`, and `ppd_or_cxr`.169- Use 365 days for `history_physical` and `hep_b_antibody_core` when the template asks for those stale document types.170- Include stale document objects with the document type, received date, and freshness limit. Sort by doc type.171172Capacity and decision:173- Sum `facility_capacity.open_chairs` across all locations for the requested date and modality. Treat no rows as zero.174- `capacity_status` is `available` when open chairs total is greater than zero; otherwise `unavailable`.175- Feasibility values combine packet readiness and capacity:176 `ready_on_requested_start`, `packet_not_ready_capacity_available`, `packet_not_ready_capacity_unavailable`, or `capacity_unavailable`.177- `final_intake_decision`: `accept` only when documents are complete, freshness passes, and capacity is available; `hold` when packet is ready but capacity is unavailable; `clinical_review` when required or freshness-limited clinical packet items are missing/stale.178- Contact routing: missing/stale packet items go to `clinical_nurse` via `fax_referring_facility`; capacity-only holds go to scheduling/internal routing if the template allows it; accepted rows use `none`.179180## Chronic-Care Program Panels181182Use this for program candidate enrollment outputs.183184Data and dates:185- Include every current candidate returned by `/programs/{program_code}/candidates`; do not filter out candidates unless the prompt explicitly says to.186- Use the program/report as-of date from the prompt or portal metadata when available. Do not use individual `candidate_date` values as the panel `as_of_date` unless the template says so.187188Eligibility and reasons:189- Determine the target condition from the program and candidate. For diabetes-hypertension programs, eligibility requires the diabetes-hypertension target and active diabetes plus hypertension in clinical history.190- `eligible` means condition eligibility only; consent declined or inactive chart can still produce `eligible: true` with a reject disposition.191- Add `meets_dmhtn_criteria` for eligible diabetes-hypertension candidates when that code is allowed.192- Add `wrong_target_condition` and `missing_active_dmhtn_diagnosis` for candidates whose target/active diagnoses do not match.193- Add `consent_declined` or `consent_missing` from candidate consent, but suppress repairable missing-consent/chart-maintenance codes for already ineligible rejects unless declined consent or inactive chart is explicitly important.194- Add `chart_not_active` when no active/existing chart is available.195- Add stale/missing chart artifact codes from `chart_artifacts`: stale active problems -> `stale_active_problems`; no current vitals/labs/medications/consent -> `missing_recent_vitals`, `missing_recent_labs`, `missing_medication_list`, `consent`.196197Disposition and cadence:198- `reject`: ineligible target/diagnosis or declined consent.199- `hold`: eligible but consent is missing or the chart/artifacts need repair before enrollment.200- `enroll`: eligible, signed consent, active chart, and required artifacts current enough.201- `weekly`: recent hospitalization, recent ED risk flag, or low adherence.202- `biweekly`: CKD/renal comorbidity without weekly triggers.203- `monthly`: standard eligible enrollment.204- `deferred`: holds.205- `none`: rejects.206207Outreach and monitoring:208- Prefer the candidate's outreach channel when it is allowed and usable. If it is unavailable, fall back to the patient preferred contact with usable data; portal requires an active chart, phone/sms require phone, and email requires email. Use `none` only when no allowed route works.209- High-touch package: `bp_cuff`, `glucometer`, `lab_order_a1c_cmp_lipid`, `medication_reconciliation`, and `care_plan_setup`, with first check-in at 7 days.210- Standard CKD/biweekly package: `bp_cuff`, `glucometer`, `lab_order_a1c_cmp_lipid`, and `medication_reconciliation`, with first check-in at 14 days.211- Standard monthly package: `bp_cuff`, `glucometer`, and `lab_order_a1c_cmp_lipid`, with first check-in at 30 days.212- Holds use a deferred package with `consent_packet` and/or `chart_update_request` as applicable and null first check-in.213- Rejects use `not_applicable`, no components, and null first check-in.214215## Final Validation216217Before returning:218- Sort arrays exactly as the template specifies.219- Keep reason-code/blocker-code arrays as sets, preferably in stable alphabetical or logical order.220- Ensure all enum strings come from the template.221- Count from the final item rows, not from intermediate queries.222- Include zero-valued keys required by summary count objects.223- Emit strict JSON only.