# Upload Document to Patient

> Perform Upload Document to Patient through NikoHealth.

Source: [https://genhealth.ai/docs/workflows/integrations/nikohealth/nikohealth_upload_document](https://genhealth.ai/docs/workflows/integrations/nikohealth/nikohealth_upload_document)

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

- Handler: `nikohealth_upload_document`

- Connection type: `nikohealth`

## Inputs

- `patient_id` — Patient Id (text, required)
  Required text value.
- `document_id` — Document Id (expression)
  Optional literal value or workflow expression.
- `s3_key` — S3 Key (expression)
  Optional literal value or workflow expression.
- `s3_uri` — S3 Uri (expression)
  Optional literal value or workflow expression.
- `filename` — Filename (expression)
  Optional literal value or workflow expression.
- `sha256` — Sha256 (expression)
  Optional literal value or workflow expression.
- `content_type` — Content Type (expression)
  Optional literal value or workflow expression.
  Default: `"application/pdf"`
- `document_type` — Document Type (select, dynamic options)
  Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.
  Default: `"auto"`
- `enabled` — Enabled (boolean)
  Optional true-or-false value.
  Default: `true`
- `skip_if_missing_source` — Skip If Missing Source (boolean)
  Optional true-or-false value.
  Default: `false`
- `delete_source_artifact_after_upload` — Delete Source Artifact After Upload (boolean)
  Optional true-or-false value.
  Default: `false`

## Outputs

- `success` — Success
- `status` — Status
- `uploaded` — Uploaded
- `skipped` — Skipped
- `document_id` — Document Id
- `patient_id` — Patient Id
- `patient_document_id` — Patient Document Id
- `workflow_artifact_deleted` — Workflow Artifact Deleted
- `s3_key` — S3 Key
- `filename` — Filename
- `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"
  ],
  "properties": {
    "s3_key": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "s3_uri": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "sha256": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "enabled": {
      "type": "boolean",
      "default": true,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "filename": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "patient_id": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "document_id": {
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "content_type": {
      "default": "application/pdf",
      "description": "Optional literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "document_type": {
      "type": "string",
      "default": "auto",
      "description": "Optional selected identifier or value. Retrieve allowed values from the dynamic options endpoint.",
      "x-dynamic-options": true,
      "x-workflow-field-type": "select"
    },
    "skip_if_missing_source": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "delete_source_artifact_after_upload": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "s3_key": {},
    "status": {},
    "skipped": {},
    "success": {},
    "filename": {},
    "uploaded": {},
    "patient_id": {},
    "document_id": {},
    "patient_document_id": {},
    "workflow_artifact_deleted": {}
  },
  "additionalProperties": true
}
```
