# Upload Patient Document

> Perform Upload Patient Document through athenahealth.

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

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

- Handler: `athena_upload_patient_document`

- Connection type: `athenahealth`

## Inputs

- `patient_id` — Patient Id (expression, required)
  Required literal value or workflow expression.
- `chart_id` — Chart Id (expression, required)
  Required literal value or workflow expression.
- `file_path` — File Path (expression)
  Optional literal value or workflow expression.
- `s3_path` — S3 Path (expression)
  Optional literal value or workflow expression.
- `source_document_id` — Source Document Id (expression)
  Optional literal value or workflow expression.
- `file_name` — File Name (expression)
  Optional literal value or workflow expression.
- `content_type` — Content Type (expression)
  Optional literal value or workflow expression.
- `document_label` — Document Label (select, required)
  Required selected identifier or value.
  Default: `"ADMIN"`
  Options: Admin ("ADMIN"), Admin - Billing Document ("ADMIN_BILLING"), Admin - Consent ("ADMIN_CONSENT"), Admin - HIPAA/Privacy ("ADMIN_HIPAA"), Admin - Insurance Approval Notification ("ADMIN_INSURANCEAPPROVAL"), Admin - Insurance Card ("ADMIN_INSURANCECARD"), Admin - Insurance Denial Notification ("ADMIN_INSURANCEDENIAL"), Admin - Legal ("ADMIN_LEGAL"), Admin - Medical Records Request ("ADMIN_MEDICALRECORDREQ"), Admin - Referral ("ADMIN_REFERRAL"), Admin - Signed Forms & Letters ("ADMIN_SIGNEDFORMSLETTERS"), Clinical Document ("CLINICALDOCUMENT"), Clinical Document - Admission/Discharge Summary ("CLINICALDOCUMENT_ADMISSIONDISCHARGE"), Clinical Document - Consult Note ("CLINICALDOCUMENT_CONSULTNOTE"), Clinical Document - Emergency/Urgent Care ("CLINICALDOCUMENT_URGENTCARE"), Clinical Document - Mental Health Consult ("CLINICALDOCUMENT_MENTALHEALTH"), Clinical Document - Operative Note ("CLINICALDOCUMENT_OPERATIVENOTE"), Cover Sheet ("COVERSHEET"), Encounter Document - Authorization ("ENCOUNTERDOCUMENT_AUTHORIZATION"), Encounter Document - Health History Questionnaire ("ENCOUNTERDOCUMENT_PATIENTHISTORY"), Encounter Document - Image Documentation ("ENCOUNTERDOCUMENT_IMAGEDOC"), Encounter Document - Procedure Documentation ("ENCOUNTERDOCUMENT_PROCEDUREDOC"), Encounter Document - Progress Note ("ENCOUNTERDOCUMENT_PROGRESSNOTE"), Imaging/Diagnostic Result ("IMAGINGRESULT"), Lab Result ("LABRESULT"), Medical Record Document - Chart for Abstraction ("MEDICALRECORD_CHARTTOABSTRACT"), Medical Record Document - Flowsheet ("MEDICALRECORD_COUMADIN"), Medical Record Document - Growth Chart ("MEDICALRECORD_GROWTHCHART"), Medical Record Document - Historical Medical Record ("MEDICALRECORD_HISTORICAL"), Medical Record Document - Patient Diary ("MEDICALRECORD_PATIENTDIARY"), Medical Record Document - Vaccination Record ("MEDICALRECORD_VACCINATION"), Order (Already Signed) ("ORDER"), Phone Message ("PHONEMESSAGE"), Physician Authorization ("PHYSICIANAUTH"), Physician Authorization - Care Plan Oversight ("PHYSICIANAUTH_CAREPLANOVERSIGHT"), Prescription - Change ("PRESCRIPTION_CHANGE"), Prescription - Clarification ("PRESCRIPTION_CLARIFICATION"), Prescription - New ("PRESCRIPTION_NEW"), Prescription - Prior Authorization Request ("PRESCRIPTION_PRIORAUTHREQUEST"), Prescription - Renewal ("PRESCRIPTION_RENEWAL")
- `provider_username` — Provider Username (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
- `order_type` — Order Type (remote_search_select, dynamic options)
  Optional value. Retrieve allowed values from the dynamic options endpoint.
- `assigned_to` — Assigned To (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
- `department_id` — Department Id (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
- `action_note` — Action Note (text)
  Optional text value.
- `close_document` — Close Document (boolean)
  Optional true-or-false value.
  Default: `false`
- `write_enabled` — Write Enabled (boolean)
  Optional true-or-false value.
  Default: `false`

## Outputs

- `success` — Success
- `document_id` — Document Id
- `document_class` — Document Class
- `document_sub_class` — Document Sub Class
- `document_label` — Document Label
- `document_label_name` — Document Label Name
- `patient_id` — Patient Id
- `chart_id` — Chart Id
- `department_id` — Department Id
- `provider_username` — Provider Username
- `assigned_to` — Assigned To
- `order_type_id` — Order Type Id
- `order_type_name` — Order Type Name
- `labeling_applied` — Labeling Applied
- `filename` — Filename
- `source_document_id` — Source Document Id
- `write_skipped` — Write Skipped
- `skip_reason` — Skip Reason
- `error` — Error
- `error_message` — Error Message

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",
    "chart_id",
    "document_label"
  ],
  "properties": {
    "s3_path": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "chart_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "file_name": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "file_path": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "order_type": {
      "description": "Optional value. Retrieve allowed values from the dynamic options endpoint.",
      "x-dynamic-options": true,
      "x-workflow-field-type": "remote_search_select"
    },
    "patient_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "action_note": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "assigned_to": {
      "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"
    },
    "content_type": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "department_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"
    },
    "write_enabled": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "close_document": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "document_label": {
      "enum": [
        "ADMIN",
        "ADMIN_BILLING",
        "ADMIN_CONSENT",
        "ADMIN_HIPAA",
        "ADMIN_INSURANCEAPPROVAL",
        "ADMIN_INSURANCECARD",
        "ADMIN_INSURANCEDENIAL",
        "ADMIN_LEGAL",
        "ADMIN_MEDICALRECORDREQ",
        "ADMIN_REFERRAL",
        "ADMIN_SIGNEDFORMSLETTERS",
        "CLINICALDOCUMENT",
        "CLINICALDOCUMENT_ADMISSIONDISCHARGE",
        "CLINICALDOCUMENT_CONSULTNOTE",
        "CLINICALDOCUMENT_URGENTCARE",
        "CLINICALDOCUMENT_MENTALHEALTH",
        "CLINICALDOCUMENT_OPERATIVENOTE",
        "COVERSHEET",
        "ENCOUNTERDOCUMENT_AUTHORIZATION",
        "ENCOUNTERDOCUMENT_PATIENTHISTORY",
        "ENCOUNTERDOCUMENT_IMAGEDOC",
        "ENCOUNTERDOCUMENT_PROCEDUREDOC",
        "ENCOUNTERDOCUMENT_PROGRESSNOTE",
        "IMAGINGRESULT",
        "LABRESULT",
        "MEDICALRECORD_CHARTTOABSTRACT",
        "MEDICALRECORD_COUMADIN",
        "MEDICALRECORD_GROWTHCHART",
        "MEDICALRECORD_HISTORICAL",
        "MEDICALRECORD_PATIENTDIARY",
        "MEDICALRECORD_VACCINATION",
        "ORDER",
        "PHONEMESSAGE",
        "PHYSICIANAUTH",
        "PHYSICIANAUTH_CAREPLANOVERSIGHT",
        "PRESCRIPTION_CHANGE",
        "PRESCRIPTION_CLARIFICATION",
        "PRESCRIPTION_NEW",
        "PRESCRIPTION_PRIORAUTHREQUEST",
        "PRESCRIPTION_RENEWAL"
      ],
      "type": "string",
      "default": "ADMIN",
      "description": "Required selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "provider_username": {
      "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"
    },
    "source_document_id": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "chart_id": {},
    "filename": {},
    "patient_id": {},
    "assigned_to": {},
    "document_id": {},
    "skip_reason": {},
    "department_id": {},
    "error_message": {},
    "order_type_id": {},
    "write_skipped": {},
    "document_class": {},
    "document_label": {},
    "order_type_name": {},
    "labeling_applied": {},
    "provider_username": {},
    "document_sub_class": {},
    "source_document_id": {},
    "document_label_name": {}
  },
  "additionalProperties": true
}
```
