advancedmd_upload_ehr_document_from_file uploads a file the task already holds to a patient’s AdvancedMD EHR chart.
The typical source is docusign_get_envelope_document, whose file_url is passed by its task variable reference.
Use it instead of the catalog operation advancedmd_op_ehr_upload_document when the content is a stored file rather than base64 text.
Authentication and enablement
Uses the workspace’s AdvancedMD connection (office code, username, password are bound from it and hidden from the model). Off by default: enable it on the agent.Inputs
Output
status: "dry_run" with the patient id, document name and size, and writes nothing. It applies the same file checks as a real upload but does not call AdvancedMD, so it checks only the patient id’s format, not that the patient exists or the credentials work.
Limits and side effects
- Posts to AdvancedMD’s ehr-api
files/documents. AdvancedMD files the document on the patient timeline without a category and cannot attach it to a visit. - Each call creates a new document. Calling it twice for the same file uploads it twice.
- Files over 25 MB are refused while downloading, before the whole file is read.
Errors
patient_id must be a positive number— the id has no digits.could not read file_url— the reference does not point at a stored file this task can read, or the file is over 25 MB.file extension … is not a short alphanumeric extension—file_extensionwas not 1–5 letters or digits.the document is empty— the stored file has no content.AdvancedMD rejected the document: …— AdvancedMD’s own message, for example an unknown patient.- An AdvancedMD-not-connected result when the workspace has no AdvancedMD connection.