AttachDocument

Uploads and attaches a new document to the existing referral.

JavaScript library method

patientportal.referrals.attachDocument({
    referral: <referral>,
    documentName: <document-name>,
    documentComments: <document-comments>,
    uploading: {
        file: <file>,
        onProgress: <onProgress>,
    }
});

HTTP Method

Verb URL
POST /patientportalapi/referrals/attach-document

URL Parameters

Parameter Type Description
referral string The key of the referral provided by the API upon GetReferrals.
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

ReferralData

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.