Command Line module

 

Managing sites with the Command Line module

Create/edit site

Activate/De-activate site

Associate a site with a study

Remove site from study

Retrieve a list of studies

Retrieve a list of sites

 

From each StudySiteAdmin 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.

 

 

Create or edit a site

Create a new site or edit an existing one.

Parameters

Ensure you follow the required conventions when specifying user credentials.

 

Parameter

Description

Functionality identifier

"StudySiteAdmin"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"CreateSite" or "EditSite"

Site code

Code of site to be created/edited

Site description

Description of site to be created/edited

Remote site

"1" for a remote site (to be used for remote data transfer) or "0" for a server site

Country

Numeric ID of country in which site is located See list of country IDs

Command Line and result format

Creating a site:

/StudySiteAdmin/Username/Password/Database/Role/CreateSite/Site/Description/IsRemote/CountryId

ResultCode,CreateSite,Site

 

Editing a site:

/StudySiteAdmin/Username/Password/Database/Role/EditSite/Site/Description/IsRemote/CountryId

ResultCode,EditSite,Site

Examples

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/rde/macrotm/TESTDB/FullUser/CreateSite/barts/Bartholomews/0/1223

Success,CreateSite,barts

 

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/rde/macrotm/TESTDB/FullUser/EditSite/bernard/St. Bernards Hospital/0/1082

InvalidSiteError,EditSite,bernard

 

Return to top

 

Activate or de-activate a site

Enable/disable an existing site. New sites are automatically enabled when they are created.

Parameters

Ensure you follow the required conventions when specifying user credentials.

 

Parameter

Description

Functionality identifier

"StudySiteAdmin"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"ActivateSite" or "DeactivateSite"

Site

Site code of site to be activated/deactivated

Command Line and result format

Activating a site:

/StudySiteAdmin/Username/Password/Database/Role/ActivateSite/Site

ResultCode,ActivateSite,Site

 

Deactivating a site:

/StudySiteAdmin/Username/Password/Database/Role/DeactivateSite/Site

ResultCode,DeactivateSite,Site

Examples

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/rde/macrotm/TESTDB/FullUser/ActivateSite/barts

Success,ActivateSite,barts

 

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/rde/macrotm/TESTDB/FullUser/DeactivateSite/gretna

InvalidSiteError,DeactivateSite,gretna

Return to top

 

Assign site to study

Associate a site with a study.

 

The site must be active, and the study status must not be Suspended or ClosedToFollowup. A result of Success will be returned if the site is already associated with the study.

Parameters

Ensure you follow the required conventions when specifying user credentials.

 

Parameter

Description

Functionality identifier

"StudySiteAdmin"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"AssignSiteToStudy"

Site

Site code

Study

Name of study to be associated with the site

Command Line and result format

/StudySiteAdmin/Username/Password/Database/Role/AssignSiteToStudy/Site/Study

ResultCode,AssignSiteToStudy,Study:Site

Examples

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/wam/pwd123/JUPITERDB/FullUser/AssignSiteToStudy/barts/MyStudy

Success,AssignSiteToStudy,MyStudy:barts

Return to top

 

Remove site from study

Remove an association between a site and a study.

 

The site must be active, and the study status must not be Suspended or ClosedToFollowup. A result of Success will be returned if the site is already not associated with the study.

Parameters

Ensure you follow the required conventions when specifying user credentials.

 

Parameter

Description

Functionality identifier

"StudySiteAdmin"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"RemoveSiteFromStudy"

Site

Site code

Study

Name of study to be disassociated from the site

Command Line and result format

/StudySiteAdmin/Username/Password/Database/Role/RemoveSiteFromStudy/Site/Study

ResultCode,RemoveSiteFromStudy,Study:Site

Examples

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/ncj/mypwd/SEPTDB/FullUser/RemoveSiteFromStudy/dumfries/ScotScanStudy

Success,RemoveSiteFromStudy,ScotScanStudy:dumfries

Return to top

 

Retrieve a list of studies

Retrieve a list of all studies in the database, or all studies  associated with a particular site. This returns the number of studies, followed by a pipe-separated list of the study names.

Parameters

Ensure you follow the required conventions when specifying user credentials.

 

Parameter

Description

Functionality identifier

"StudySiteAdmin"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"GetStudiesForSite"

Site

Site code (include this to return a list of all associated studies or leave blank to return all studies in the current database)

Command Line and result format

/StudySiteAdmin/Username/Password/Database/Role/GetStudiesForSite/Site

ResultCode,GetStudiesForSite,Site,NoOfStudies,Study1|Study2|Study3|…

Examples

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/ncj/mypwd/SEPTDB/FullUser/GetStudiesForSite/dumfries

Success,GetStudiesForSite,dumfries,2,DinoDrugs|ScotScanStudy

Return to top

 

Retrieve a list of sites

Retrieve a list of all sites in the database, or all sites associated with a particular study. This returns the number of sites, followed by a pipe-separated list of the site codes.

Parameters

Ensure you follow the required conventions when specifying user credentials.

 

Parameter

Description

Functionality identifier

"StudySiteAdmin"

User credentials

User name/Password/Database/Userrole

Operation Identifier

"GetSitesForStudy"

Study

Name of study (include this to return a list of all associated sites or leave blank to return all sites in the current database)

Command Line and result format

/StudySiteAdmin/Username/Password/Database/Role/GetSitesForStudy/Study

ResultCode,GetSitesForStudy,Study,NoOfSites,Site1|Site2|Site3|…

Examples

Retrieving sites for DinoDrugs study:

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/ncj/mypwd/SEPTDB/FullUser/GetSitesForStudy/DinoDrugs

Success,GetSitesForStudy,DinoDrugs,3,dumfries|kirkbean|newabbey

 

Retrieving all sites in the database:

InferMed.M40.MACRO_CL.exe /StudySiteAdmin/ncj/mypwd/SEPTDB/FullUser/GetSitesForStudy/

Success,GetSitesForStudy,,5,dumfries|kirkbean|newabbey|kingholm|bankend

Return to top

 

Study/Site administration result codes

Each study/site operation returns an individual result to the console as a comma-separated message with one of the following result codes:

 

Code

Description

Success

The study/site administration operation was successful

PermissionError

The current user does not have the relevant MACRO permissions to perform the action

DatabaseError

An unexpected error occurred while accessing the database

SiteExists

An existing site has been specified when creating a site

InvalidSiteError

The specified site is null or empty, or does not exist

InvalidStudyError

The specified study is null or empty, or does not exist, or does not have the required status

InvalidSiteName

An invalid site name has been specified when creating a site

InvalidSiteDescription An invalid site description has been specified when creating or editing a site

InvalidSiteCountryId

The country ID specified is not a recognised MACRO country ID See list of country IDs

Unknown

An unknown error occurred when processing the study/site administration action

 

Return to top

 

Related Topics

About sites

Managing site with the API