# Upload Attachment to Patient

> Perform Upload Attachment to Patient through ModMed.

Source: [https://genhealth.ai/docs/workflows/integrations/mod-med/modmed_upload_attachment_to_patient](https://genhealth.ai/docs/workflows/integrations/mod-med/modmed_upload_attachment_to_patient)

Integration: [ModMed](https://genhealth.ai/docs/workflows/integrations/mod-med.md)

- Handler: `modmed_upload_attachment_to_patient`

- Connection type: `modmed`

## Inputs

- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `document_id` — Document Id (expression, required)
  Required literal value or workflow expression.
- `category_id` — Category Id (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.

## Outputs

- `success` — Success
- `attachment_id` — Attachment Id
- `file_name` — File Name
- `patient_id` — Patient Id
- `error` — Error

Output schema completeness: `best_effort_declared`

## Safety

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

## Schemas

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

### Input schema

```json
{
  "type": "object",
  "required": [
    "patient_id",
    "document_id"
  ],
  "properties": {
    "patient_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "category_id": {
      "type": "string",
      "description": "Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.",
      "x-dynamic-options": true,
      "x-workflow-field-type": "select"
    },
    "document_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "file_name": {},
    "patient_id": {},
    "attachment_id": {}
  },
  "additionalProperties": true
}
```
