Skip to main content
This document covers drchrono_find_charge, the native DrChrono EOB-to-charge matching tool exposed through the Agents Platform.

Authentication

DrChrono tools use the DrChrono OAuth connector. The platform injects:
  • access_token
The token is minted and refreshed by the integration service. Tools do not accept raw DrChrono API keys, Nanonets API keys, webhook URLs, or caller-supplied token-fetch endpoints in their input schema.

drchrono_find_charge

Matches an EOB line item to a DrChrono billing line item by patient name, date of service, and procedure code. This is a read-only lookup tool. It does not post payments and does not mutate Nanonets document fields.

Inputs

Required:
  • patient_name: Patient name from the EOB line item, such as Jane Smith, Smith, Jane, or SMITH JANE.
  • date_of_service: Date of service. Prefer YYYY-MM-DD; MM/DD/YYYY is also accepted.
  • procedure_code: Procedure/CPT code to match. Modifiers are allowed; matching uses the base CPT, so 99213 25 matches 99213.
Optional:
  • insurance_name: Insurance name from the EOB. Used only for deterministic matching against DrChrono appointment insurance.
  • check_number: Check or trace number from the EOB. Used to detect if the payment was already posted.
  • max_patients: Defaults to 10. Maximum patient candidates to inspect.
  • max_line_items: Defaults to 50. Maximum line items to inspect per patient.
  • max_transactions: Defaults to 50. Maximum transactions to inspect for the matched line item.

Matching Behavior

The tool:
  • generates common patient-name candidates, including EOB-style last-first names,
  • searches DrChrono patients by first and last name,
  • fetches line items for the patient and service date,
  • matches by exact service date and base CPT code,
  • enriches the match with doctor, appointment insurance, and transaction data,
  • normalizes check_number and transaction trace_number for duplicate-check detection,
  • returns deterministic insurance candidates and match confidence without calling an LLM.

Output

On success, structured content includes:
  • found: true
  • patient: matched DrChrono patient summary
  • match: EHR charge, balance, provider, carrier, duplicate-check, and status fields
  • payment_input: forward-compatible data for a future payment-posting tool
Example shape:
Common failure reasons:
  • drchrono_not_connected: DrChrono is not connected. The agent should ask the user to either connect DrChrono and try again, or stop the task.
  • patient_not_found: no DrChrono patient matched the supplied name candidates.
  • charge_not_found: patients were found, but no line item matched the date of service and procedure code.
  • ambiguous_insurance: a charge was found, but the supplied insurance name could not be deterministically matched to multiple DrChrono insurance candidates.

Agent Instruction Guidance

Recommended EOB workflow:
Payment posting is intentionally separate. A future DrChrono payment-posting tool should consume payment_input after review.