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 a new site or edit an existing one.
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 |
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 |
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 |
Enable/disable an existing site. New sites are automatically enabled when they are created.
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 |
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 |
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 |
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.
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 |
/StudySiteAdmin/Username/Password/Database/Role/AssignSiteToStudy/Site/Study |
ResultCode,AssignSiteToStudy,Study:Site |
InferMed.M40.MACRO_CL.exe /StudySiteAdmin/wam/pwd123/JUPITERDB/FullUser/AssignSiteToStudy/barts/MyStudy |
Success,AssignSiteToStudy,MyStudy:barts |
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.
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 |
/StudySiteAdmin/Username/Password/Database/Role/RemoveSiteFromStudy/Site/Study |
ResultCode,RemoveSiteFromStudy,Study:Site |
InferMed.M40.MACRO_CL.exe /StudySiteAdmin/ncj/mypwd/SEPTDB/FullUser/RemoveSiteFromStudy/dumfries/ScotScanStudy |
Success,RemoveSiteFromStudy,ScotScanStudy:dumfries |
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.
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) |
/StudySiteAdmin/Username/Password/Database/Role/GetStudiesForSite/Site |
ResultCode,GetStudiesForSite,Site,NoOfStudies,Study1|Study2|Study3|… |
InferMed.M40.MACRO_CL.exe /StudySiteAdmin/ncj/mypwd/SEPTDB/FullUser/GetStudiesForSite/dumfries |
Success,GetStudiesForSite,dumfries,2,DinoDrugs|ScotScanStudy |
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.
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) |
/StudySiteAdmin/Username/Password/Database/Role/GetSitesForStudy/Study |
ResultCode,GetSitesForStudy,Study,NoOfSites,Site1|Site2|Site3|… |
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 |
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 |