AttachDocument
Uploads and attaches a new document to the patient’s records.
JavaScript library method
patientportal.documents.attachDocument({
patient: <patient>,
documentName: <document-name>,
documentComments: <document-comments>,
uploading: {
file: <file>,
onProgress: <onProgress>,
}
});
HTTP Method
Verb | URL |
---|---|
POST | /patientportalapi/documents/attach |
URL Parameters
Parameter | Type | Description |
---|---|---|
patient | string | The key of the patient provided by the API upon GetPatients. |
document-name | string | The name of the document. |
document-comments | string (optional) | The document comments/description. |
uploading.file | javascript: File | File instance provided by JavaScript input element: file:document.getElementById(“myFile”).files[0] |
uploading.onProgress | javascript : function (int) | Progress callback. For example: onProgress: function (progress) { console.log(“Progress: “ + progress + “% uploaded.”); } |
Returns
Remarks
Please note the body of the request is the actual document content. For that reason you need to include ASP.NET_SessionId in cookies and the token in URL.