Tross
ECLINICALWORKS

Upload document

Upload and file a patient chart document.

POSThttps://api.ontross.com/api/integrations/ecw/upload-document

Upload a file

Send multipart/form-data with auth_id, input serialized as JSON text, and exactly one original file in files. Let your HTTP client set the Content-Type boundary. In Try it, select a connection, fill in the input fields and choose the file.

The file must be non-empty and no larger than 50 MiB. Use the provider’s input fields below to select the patient and document destination.

Request Fields
auth_id
string
required
Saved connection to run this operation through, from the Authentication page. It decides which practice and login the call uses.
input.patientId
string
required
Patient chart the document is filed into, from fetch-patients.
Example
"407069"
input.folder
string
required
Document folder by its displayed name or category id.
Example
"RPM Reports"
input.title
string
Name the document is listed under; defaults to the file's own name.
Example
"RPM Monthly Report - BP"
Default
""
input.description
string
Free-text note stored alongside the document.
Example
"October remote monitoring summary"
Default
""
input.encounterId
string
Encounter to attach the document to, when it belongs to one.
Example
"1870494"
Default
""
input.reviewer_id
string
Staff id the document is routed to; defaults to the signed-in user.
Example
"19850"
Default
""
input.reviewer_name
string
Staff name shown as the reviewer on the filed document.
Example
"Klein, Solomon"
Default
""
input.scannedBy
string
Name recorded as having filed the document.
Example
"Klein, Solomon"
Default
""
input.tag_names
array
Document tags to apply, by their displayed name.
Example
["RPM"]
files
file
required
Exactly one original document file; send its bytes, not a path or base64 string.
Output Fields
documentId
string
Identifier eCW assigned to the filed chart document.
Example
"Z8170oRj2b"
patientId
string
Patient chart the document was filed into.
Example
"407069"
folder
string
Folder the document was filed under.
Example
"RPM Reports"
fileName
string
Name eCW stored the file under on its own server.
Example
"6f1c2e40-0a3b-4d7e-9f10-2b8c5d4e6a71_407069.pdf"
customName
string
Name the document is listed under in the chart.
Example
"RPM Monthly Report - BP"
tags
array
Tags applied to the filed document.
Example
["RPM"]
Code
curl 'https://api.ontross.com/api/integrations/ecw/upload-document' \
  -H 'X-API-Key: YOUR_API_KEY' \
  --form-string 'auth_id=YOUR_AUTH_ID' \
  --form-string 'input={"patientId":"407069","folder":"RPM Reports","title":"RPM Monthly Report - BP","description":"October remote monitoring summary","encounterId":"1870494","reviewer_id":"19850","reviewer_name":"Klein, Solomon","scannedBy":"Klein, Solomon","tag_names":["RPM"]}' \
  -F 'files=@document.pdf;type=application/pdf'
input form field (JSON)
{
  "patientId": "407069",
  "folder": "RPM Reports",
  "title": "RPM Monthly Report - BP",
  "description": "October remote monitoring summary",
  "encounterId": "1870494",
  "reviewer_id": "19850",
  "reviewer_name": "Klein, Solomon",
  "scannedBy": "Klein, Solomon",
  "tag_names": [
    "RPM"
  ]
}
Response BODY
{
  "id": "string",
  "workflow_id": "string",
  "auth_id": "string",
  "status": "string",
  "input": {},
  "output": {
    "documentId": "Z8170oRj2b",
    "patientId": "407069",
    "folder": "RPM Reports",
    "fileName": "6f1c2e40-0a3b-4d7e-9f10-2b8c5d4e6a71_407069.pdf",
    "customName": "RPM Monthly Report - BP",
    "tags": [
      "RPM"
    ]
  },
  "files": null,
  "created_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z"
}