Export a laboratory definition
Import a laboratory definition
When using the Command Line module, you can only export data from sites/studies to which you have access, as defined by your study/site access permissions. This differs from the SM module, where you can currently export subject data from all sites/studies in the database, regardless of permissions. User access permissions are not taken into account for importing via the Command Line module.
There is a separate procedure to import data that has been transferred from a remote site.
For each ExportImport call, a Command Line error may be returned if the command line is not in the correct format, e.g. missing or empty parameters. Otherwise a comma-separated message is output with the appropriate result code. The ErrMsg will only appear in the output if additional error details are available.
For all Import operations, only the file name will be included in the output.
Export subject data from the current MACRO v4 database in MACRO or CDISC format.
You can only export subject data from sites/studies to which you have access, as defined by your study/site access permissions. This differs from the SM module, where you can currently export subject data from all sites/studies in the database, regardless of permissions.
Ensure you follow the required conventions when specifying user credentials and subject parameters.
Parameters not specified in the Command Line will not be included in the output.
Parameter |
Description |
Functionality identifier |
"ExportImport" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"ExportSubjects" or "ExportSubjectsCDISC" |
Filepath |
Location in which the exported data is to be saved |
Study |
Name of study from which to export subject data |
Site |
Code of site from which to export subject data (leave blank to export subjects from all sites) |
Subject Id From |
The first subject ID in the range to be exported (leave blank to export all subjects in the site/study) |
Subject Id To |
The last subject ID in the range to be exported (leave blank to export all subjects in the site/study) |
Exporting a range of subjects:
/ExportImport/Username/Password/Database/Role/ExportSubjects/Filepath/Study/Site/SubjectIdFrom/SubjectIdTo |
ResultCode,ExportSubjects,Study:Site:SubjectIdFrom-SubjectIdTo,ErrMsg |
Exporting all subjects at a site:
/ExportImport/Username/Password/Database/Role/ExportSubjects/Filepath/Study/Site// |
ResultCode,ExportSubjects,Study:Site,ErrMsg |
Exporting all subjects in a study:
/ExportImport/Username/Password/Database/Role/ExportSubjects/Filepath/Study/// |
ResultCode,ExportSubjects,Study,ErrMsg |
Exporting a range of subjects in CDISC format:
/ExportImport/Username/Password/Database/Role/ExportSubjectsCDISC/Filepath/Study/Site/SubjectIdFrom/SubjectIdTo |
ResultCode,ExportSubjectsCDISC,Study:Site:SubjectIdFrom-SubjectIdTo,ErrMsg |
Exporting all subjects at a site in CDISC format:
/ExportImport/Username/Password/Database/Role/ExportSubjectsCDISC/Filepath/Study/Site// |
ResultCode,ExportSubjectsCDISC,Study:Site,ErrMsg |
Exporting all subjects in a study in CDISC format:
/ExportImport/Username/Password/Database/Role/ExportSubjectsCDISC/Filepath/Study/// |
ResultCode,ExportSubjectsCDISC,Study,ErrMsg |
Attempting to export subjects 1 to 10 from Demostudy40 at site london:
InferMed.M40.MACRO_CL.exe /ExportImport/user1/pwd1234/TESTDB/AdminUser/ExportSubjects/C:\MyFolder\DemoSubjects.prd/Demostudy40/london/1/10 |
PermissionError,ExportSubjects,Demostudy40:elsevier:1-10,Study or site permission denied |
To export all subjects in CDISC format from Demostudy40 at site elsevier:
InferMed.M40.MACRO_CL.exe /ExportImport/user1/pwd1234/TESTDB/AdminUser/ExportSubjectsCDISC/C:\OutFolder\DemoSubjectsCD.xml/Demostudy40/elsevier// |
Success,ExportSubjectsCDISC,Demostudy40:elsevier |
Import subject data into the current MACRO v4 database in MACRO v3/v4 or CDISC format.
You can import subject data into all sites/studies in the database regardless of user access permissions.
Ensure you follow the required conventions when specifying user credentials.
Parameter |
Description |
Functionality identifier |
"ExportImport" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"ImportSubjects", "ImportSubjectsCDISC" or "ImportSubjectsM3" |
Filepath |
Location of the subject data file to be imported. A file error will be returned if the import file does not have the correct extension. |
Importing subjects in MACRO format:
/ExportImport/Username/Password/Database/Role/ImportSubjects/Filepath |
ResultCode,ImportSubjects,FileName,ErrMsg |
Importing subjects in CDISC format:
/ExportImport/Username/Password/Database/Role/ImportSubjectsCDISC/Filepath |
ResultCode,ImportSubjectsCDISC,FileName,ErrMsg |
Importing subjects from MACRO v3:
/ExportImport/Username/Password/Database/Role/ImportSubjectsM3/Filepath |
ResultCode,ImportSubjectsM3,FileName,ErrMsg |
InferMed.M40.MACRO_CL.exe /ExportImport/rde/macrotm/TESTDB/SMRole/ImportSubjects/C:\MyFolder\MySubjs.prd |
Success,ImportSubjects,MySubjs.prd, |
InferMed.M40.MACRO_CL.exe /ExportImport/rde/macrotm/TESTDB/SMRole/ImportSubjectsCDISC/C:\MyFolder\CLAP.ldd |
FileError,ImportSubjectsCDISC,CLAP.ldd,File does not have expected .xml extension |
InferMed.M40.MACRO_CL.exe /ExportImport/rde/macrotm/TESTDB/SMRole/ImportSubjectsM3/C:\MyFolder\M3Subjs.zip |
Success,ImportSubjects,M3Subjs.zip |
Export a study definition from the current MACRO v4 database in MACRO or CDISC format.
You can only export a study to which you have access, as defined by your study/site access permissions. This differs from the SM module, where you can currently export all studies in a database, regardless of permissions.
Ensure you follow the required conventions when specifying user credentials.
Parameter |
Description |
Functionality identifier |
"ExportImport" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"ExportStudy" or "ExportStudyCDISC" |
Filepath |
Location in which the exported data is to be saved |
Study |
Name of study to export |
Study version |
Version number of the study that has been distributed to remote sites; if you do not use RDT the version will always be 1 |
Exporting a study definition in MACRO format:
/ExportImport/Username/Password/Database/Role/ExportStudy/Filepath/Study/StudyVersion |
ResultCode,ExportStudy,Study [StudyVersion],ErrMsg |
Exporting a study definition in CDISC format:
/ExportImport/Username/Password/Database/Role/ExportStudyCDISC/Filepath/Study/StudyVersion |
ResultCode,ExportStudyCDISC,Study [StudyVersion],ErrMsg |
InferMed.M40.MACRO_CL.exe /ExportImport/rde/macrotm/TESTDB/SMRole/ExportStudy/C:\MyFolder\MyStudy.sdd/MyStudy/1 |
Success,ExportStudy,MyStudy [v1], |
InferMed.M40.MACRO_CL.exe /ExportImport/rde/macrotm/TESTDB/SMRole/ExportStudy/C:\MyFolder\xyz.sdd/XYZ/1 |
InvalidStudyError,ExportStudy,XYZ [v1],Study not found |
Import a study definition into the current MACRO v4 database in MACRO v3/v4 or CDISC format.
You can import study definitions into all sites/studies in the database regardless of user access permissions.
Ensure you follow the required conventions when specifying user credentials.
Parameter |
Description |
Functionality identifier |
"ExportImport" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"ImportStudy", "ImportStudyCDISC" or "ImportStudyM3" |
Filepath |
Location of the study definition file to be imported. A file error will be returned if the import file does not have the correct extension. |
Importing a MACRO v4 study definition:
/ExportImport/Username/Password/Database/Role/ImportStudy/Filepath |
ResultCode,ImportStudy,FileName,ErrMsg |
Importing a study definition in MACRO CDISC format:
/ExportImport/Username/Password/Database/Role/ImportStudyCDISC/Filepath |
ResultCode,ImportStudyCDISC,FileName,ErrMsg |
Importing a MACRO v3 study definition:
/ExportImport/Username/Password/Database/Role/ImportStudyM3/Filepath |
ResultCode,ImportStudyM3,FileName,ErrMsg |
InferMed.M40.MACRO_CL.exe /ExportImport/rde/macrotm/TESTDB/SMRole/ImportStudy/C:\MyFolder\MyStudy.sdd |
Success,ImportStudy,MyStudy.sdd, |
InferMed.M40.MACRO_CL.exe /ExportImport/joe/joepwd/JOESDB/JoeRole/ImportStudyM3/C:\MyFolder\JoeStudy.zip |
FileError,ImportStudyM3,JoeStudy.zip,File does not exist |
Export a laboratory definition from the current MACRO v4 database.
Ensure you follow the required conventions when specifying user credentials.
Parameter |
Description |
Functionality identifier |
"ExportImport" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"ExportLaboratory" |
Filepath |
Location in which the exported data is to be saved |
Laboratory |
Name of laboratory to export |
/ExportImport/Username/Password/Database/Role/ExportLaboratory/Filepath/LabName |
ResultCode,ExportLaboratory,LabName,ErrMsg |
InferMed.M40.MACRO_CL.exe /ExportImport/rde/macrotm/TESTDB/SMRole/ExportLaboratory/C:\MyFolder\BARN.ldd/BARN |
Success,ExportLaboratory,BARN, |
InferMed.M40.MACRO_CL.exe /ExportImport/abc/abc123/TESTDB/FullUser/ExportLaboratory/C:\MyFolder\MyLab.ldd/ |
An empty laboratory name was entered |
Import a laboratory definition into the current database in MACRO v3 or v4 format.
You can import laboratory definitions into all sites/studies in the database regardless of user access permissions.
Ensure you follow the required conventions when specifying user credentials.
Parameter |
Description |
Functionality identifier |
"ExportImport" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"ImportLaboratory"or "ImportLaboratoryM3" |
Filepath |
Location of the laboratory definition file to be imported. A file error will be returned if the import file does not have the correct extension. |
Laboratory |
Name of laboratory to import |
Importing a MACROv4 laboratory definition:
/ExportImport/Username/Password/Database/Role/ImportLaboratory/Filepath |
ResultCode,ImportLaboratory,FileName,ErrMsg |
Importing a MACRO v3 laboratory definition:
/ExportImport/Username/Password/Database/Role/ImportLaboratoryM3/Filepath |
ResultCode,ImportLaboratoryM3,FileName,ErrMsg |
InferMed.M40.MACRO_CL.exe /ExportImport/anna/annapwd/ANNADB/AnnaRole/ImportLaboratory/C:\MyFolder\AnnaLab.ldd |
Success,ImportLaboratory,AnnaLab.ldd, |
InferMed.M40.MACRO_CL.exe /ExportImport/helen/helenpwd/HELENDB/FullUser/ImportLaboratoryM3/C:\MyFolder\HelenLab.ldd |
FileError,ImportLaboratoryM3,HelenLab.ldd,File does not have expected .zip extension |
The standard file extensions for each type of file are as follows. A file error will be returned if an import file does not have the correct extension.
File type |
File extension |
MACRO v4 study definition |
.sdd |
MACRO v4 subject data |
.prd |
MACRO v4 laboratory definition |
.ldd |
CDISC study definition |
.xml |
CDISC subject data |
.xml |
MACRO v3 study definition |
.zip |
MACRO v3 subject data |
.zip |
MACRO v3 laboratory definition |
.zip |
Each export/import operation returns an individual result to the console as a comma-separated message with one of the following result codes:
Code |
Description |
Success |
The export/import operation was successful |
FileError |
The given file path was blank, or does not exist, or the current user does not have file access to the given path, or an incorrect file type was selected for import |
PermissionError |
The current user does not have the relevant MACRO permissions to perform the action |
InvalidStudyError |
The given study name was blank, or does not exist in the MACRO database |
InvalidSubjectError |
The given subject does not exist in the MACRO database, or no subjects exist in the MACRO database for the given range of subject IDs |
InvalidSiteError |
The given site name was blank, or does not exist in the MACRO database |
InvalidLaboratoryError | The given laboratory name was blank, or does not exist in the MACRO database |
Unknown |
An unknown error occurred when processing the export/import action |