ISPatientDocument.ExportTo

Description

This function exports the patient's document to an external file.

Syntax

object.ExportTo aFileName

Part Attribute Type Description
object Required
The object always implements the ISPatientDocument interface
aFileName In, Required
string
The path for the document export

Example

Export the selected patient's document to an external file.

Dim aPatient
Dim aFilter
Dim aDocuments
Dim aDocument

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreatePatientDocumentFilter
aFilter.PatientId = aPatient.ID 
aFilter.IncludeScanDoc = True
set aDocuments = Profile.LoadPatientDocuments(aFilter)
set aDocument = aDocuments.Items(0)
aDocument.ExportTo("D:\Temp\" & aDocument.FileName & "_" & i & aDocument.Extension)

Profile.MsgBox("The document was exported successfully!")    
Note:

In Profile Client v8 on User Interface Documents can be exported by clicking the Export To File button in Clinical > Medical Record > Documents.

Version information

Added in v7.8.0