coding_skip_check deterministically decides whether a coding encounter should be skipped before the workflow spends API/LLM budget. It is part of the Nanonets Coding Engine tool group and implements the rules described in coding-skip-checks.md.
This is a pure-compute tool (no LLM, no external calls). Run it twice: once after the summary fetch, and again after the patient-level signal fetch.
Inputs
Required:ehr_type:athenaHealth,DrChrono, oramd.
string in the schema and should be passed as the ${VAR_N} variable that holds
the matching tool’s output — the EHR read tools register their structuredContent
as a variable, and the reference is expanded to JSON before the tool runs. A
literal JSON string is also accepted; the tool parses either. They are typed as
string (not object) so the model reliably passes the ${VAR_N} reference
rather than an empty object to satisfy a strict object schema.
summary: output of the matching EHR summary tool (e.g.${VAR_1}).chart_alert: AthenaHealth chart-alert output.doctor_flags: DrChrono doctor-flags output.referral_authorization: AthenaHealth referral-authorization output.documentation: optional (reserved).
force_recode(bool): when true, existing procedure codes do not trigger a skip.allowed_appointment_types([]string): when non-empty, an appointment type outside this list triggers a skip.blocked_department_ids([]string): department IDs that should be skipped.
has_existing_procedure_codes,encounter_ready,note_locked,multi_appointment_same_day,chart_alert_self_pay,cash_pay(booleans)department_id,appointment_type(strings)spravato_status_mismatch,required_provider_mismatch(booleans; explicit-only, no derivation)
Derivation behavior
When an explicit field is not provided, the tool derives the signal from the raw payloads:- existing procedure codes: a non-empty array under a procedure-code-ish key, or a positive
*procedure_codes_foundcounter. - department id / appointment type: derived from common summary keys.
- DrChrono note-locked: derived from a
lock-ish boolean (only applied whenehr_typeis DrChrono). - Athena multi-appointment same-day (only applied for AthenaHealth): the nearby
appointmentsare grouped by calendar day (parsing each appointment’s date/time) and the check fires when 2+ fall on the encounter’s day (fromencounter_date/encounterdate). When the encounter date is unknown it falls back to flagging any day with 2+ appointments. This deliberately does not flag a ±window that merely returns several appointments on different days. The explicitmulti_appointment_same_dayoverride always wins. - self-pay / cash-pay: parsed boolean true values under self-pay/cash-pay keys count, and text values containing self-pay/cash-pay keywords count. Key names alone do not count when the value is false, so payloads such as
{"is_self_pay": false}or text likeis_self_pay:falsedo not trigger a skip. Raw chart-alert / doctor-flags prose still counts when it contains phrases likeself-pay,cash pay, orcash-pay.
Output
skip=false, status="proceed", and reasons is empty.
Agent Instruction Guidance
Ifskip=true, stop the workflow, set status: "skipped" and escalation_reason to the reason, and do not fetch documentation or call LLM tools.
Human-readable text
In the task feed the tool renders a## Skip Check table (decision SKIP/PROCEED, status) and a ## Reasons list with every skip reason. The full result struct stays in structuredContent.
Notes
- Deterministic tool. Free to call.
default_enabledis false.