# Resolve Patient Chart Context

> Resolve a known athenahealth patient ID to chart and department context for provider workflows across specialties. Requires an organization-configured athenahealth connection. patient_id is the vendor ID, not the local GenHealth patient UUID. An omitted department_id uses the connection's default department. Check success before using chart_id in insurance reads or Patient Case writeback. This action does not create a Patient Case or write a note. Missing input or connection failure returns an error; route the node's error output with fail_branch for explicit review.

Source: [https://genhealth.ai/docs/workflows/integrations/athenahealth/athena_resolve_patient_chart_context](https://genhealth.ai/docs/workflows/integrations/athenahealth/athena_resolve_patient_chart_context)

Integration: [athenahealth](https://genhealth.ai/docs/workflows/integrations/athenahealth.md)

- Handler: `athena_resolve_patient_chart_context`

- Connection type: `athenahealth`

## Use in a workflow

Copy this discovered node config, fill params from the input contract, and validate the complete graph. Integration results are available as {{node_id.default.field}}. Check business success before dependent writes; completion alone does not prove business success.

```json

{
  "_group": "athenahealth",
  "params": {},
  "handler": "athena_resolve_patient_chart_context"
}

```

[Action contracts](https://genhealth.ai/docs/workflows/action-contracts.md) · [Run recovery](https://genhealth.ai/docs/workflows/operations.md)

## Inputs

- `patient_id` — Patient Id (expression, required)
  Required athenahealth patient ID from a verified patient match. Do not pass a local GenHealth patient UUID.
- `department_id` — Department Id (expression)
  Optional athenahealth department ID. Omit to use the configured connection's default department.

## Outputs

- `success` — Success
- `patient_id` — Patient Id
- `chart_id` — Chart Id
- `department_id` — Department Id
- `athena` — Athena
- `error` — Error
- `error_message` — Error Message

Output schema completeness: `reviewed_partial`

## Safety

- External effect: `read`
- Confirmation recommended: no
- Retry safe: yes
- Dry run supported: no

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "required": [
    "patient_id"
  ],
  "properties": {
    "patient_id": {
      "description": "Required athenahealth patient ID from a verified patient match. Do not pass a local GenHealth patient UUID.",
      "x-workflow-field-type": "expression"
    },
    "department_id": {
      "description": "Optional athenahealth department ID. Omit to use the configured connection's default department.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "athena": {},
    "success": {
      "type": "boolean"
    },
    "chart_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "patient_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "department_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "error_message": {}
  },
  "additionalProperties": true
}
```
