Edit the description for an existing subject group
Edit the Arezzo condition that defines a subject group
Specify whether a subject group is dynamic or static
Activate or deactivate a subject group
Assign user access to a subject group
Remove user access from a subject group
Evaluate the dynamic subject groups for a given subject
Evaluate a subject for a given group
Retrieve a list of subject groups
Retrieve a list of subject groups for a given study
Retrieve a list of subject groups for a given subject
Retrieve a list of subject groups for a given user role
Retrieve a list of subjects in a given subject group
Add a subject to a static subject group
Remove a subject from a static subject group
These calls cover a range of subject group administrative tasks.
From each SubjectGroupAdmin 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. Ensure you follow the required conventions when specifying user credentials.
Create a new subject group. New groups are automatically activated when they are created.
You need the 'Create subject group' permission
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"CreateSubjectGroup" |
subjectGroupCode |
The code for the new subject group |
studyName |
The name of the study for the new subject group |
subjectGroupDescription |
The description for the new subject group |
subjectGroupArezzoCondition |
The Arezzo condition used to define the subject group |
subjectGroupIsDynamic |
Indicates if the subject group is dynamic (1) or static (0) |
/SubjectGroupAdmin/Username/Password/Database/Role/CreateSubjectGroup/subjectGroupCode/studyName/subjectGroupDescription/subjectGroupArezzoCondition/subjectGroupIsDynamic |
Result,CreateSubjectGroup,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/CreateSubjectGroup/sg1/Demostudy40/Description of study group/screening:cover:sex = 2/1 |
Success,CreateSubjectGroup,sg1 |
Edit the description for an existing subject group.
You need the 'Edit subject group' permission
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"EditSubjectGroupDescription" |
subjectGroupCode |
The code for the subject group |
newDescription |
The new description for the subject group |
/SubjectGroupAdmin/Username/Password/Database/Role/EditSubjectGroupDescription/subjectGroupCode/newDescription |
Result,EditSubjectGroupDescription,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/EditSubjectGroupDescription/sg1/New Description |
Success,EditSubjectGroupDescription,sg1 |
Edit the Arezzo condition for a subject group.
You need the 'Edit subject group' permission
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"EditSubjectGroupCondition" |
subjectGroupCode |
The code for the subject group |
newArezoCondition |
The new Arezzo condition used to define the subject group |
/SubjectGroupAdmin/Username/Password/Database/Role/EditSubjectGroupCondition/subjectGroupCode/newArezzoCondition |
Result,EditSubjectGroupCondition,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/EditSubjectGroupCondition/sg1/screening:cover:sex = 1 |
Success,EditSubjectGroupCondition,sg1 |
Specify whether a subject group is dynamic or static.
You need the 'Edit subject group' permission
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"EditSubjectGroupIsDynamic" |
subjectGroupCode |
The code for the subject group |
newIsDynamic |
Indicates if the subject group is dynamic (1) or static (0) |
/SubjectGroupAdmin/Username/Password/Database/Role/EditSubjectGroupIsDynamic/subjectGroupCode/newIsDynamic[0 or 1] |
Result,EditSubjectGroupIsDynamic,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/EditSubjectGroupIsDynamic/sg1/0 |
Success,EditSubjectGroupIsDynamic,sg1 |
Activate or deactivate a subject group.
You need the 'Edit subject group' permission
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"EditSubjectGroupActive" |
subjectGroupCode |
The code for the subject group |
isActive |
Indicates if the subject group is active (1) or inactive (0) |
/SubjectGroupAdmin/Username/Password/Database/Role/SetSubjectGroupActive/subjectGroupCode/isActive[0 or 1] |
Result,SetSubjectGroupActive,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/SetSubjectGroupActive/sg1/1 |
Success,SetSubjectGroupActive,sg1 |
Assign a user access to a subject group with a particular role.
You need the 'Assign user role to subject group' permission
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"AssignUserRoleToSubjectGroup" |
userId |
The user who requires access |
roleCode |
The user role to assign |
subjectGroupCode |
The code for the subject group |
/SubjectGroupAdmin/Username/Password/Database/Role/AssignUserRoleToSubjectGroup/userId/roleCode/subjectGroupCode |
Result,AssignUserRoleToSubjectGroup,userId,roleCode,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/AssignUserRoleToSubjectGroup/rde/FullUser/sg1 |
Success,AssignUserRoleToSubjectGroup,rde,FullUser,sg1 |
Remove access for a user from a subject group for a particular user role.
You need the 'Assign user role to subject group' permission
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"RemoveUserRoleFromSubjectGroup" |
userId |
The user whose access is to be removed |
roleCode |
The user role to remove |
subjectGroupCode |
The code for the subject group |
/SubjectGroupAdmin/Username/Password/Database/Role/RemoveUserRoleToSubjectGroup/userId/roleCode/subjectGroupCode |
Result,RemoveUserRoleFromSubjectGroup,userId,roleCode,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/RemoveUserRoleFromSubjectGroup/rde/FullUser/sg1 |
Success,RemoveUserRoleFromSubjectGroup,rde,FullUser,sg1 |
Evaluate the dynamic subject groups for a given subject.
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"EvaluateSubjectGroupsForSubject" |
studyName |
The name of the study used to identify the subject |
siteName |
The name of the site used to identify the subject |
subjectId |
The ID of the subject |
/SubjectGroupAdmin/Username/Password/Database/Role/EvaluateSubjectGroupsForSubject/studyName/siteName/subjectId |
Result,EvaluateSubjectGroupsForSubject,studyName,site,subjectId |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/EvaluateSubjectGroupsForSubject/Demostudy40/london/1 |
Success,EvaluateSubjectGroupsForSubject,Demostudy40,london,1 |
Evaluate a subject for a given group.
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"EvaluateSubjectForSubjectGroup" |
studyName |
The name of the study used to identify the subject |
siteName |
The name of the site used to identify the subject |
subjectId |
The ID of the subject |
subjectGroupCode |
The code of the subject group |
/SubjectGroupAdmin/Username/Password/Database/Role/EvaluateSubjectForSubjectGroup/studyName/siteName/subjectId/subjectGroupCode |
Result,EvaluateSubjectForSubjectGroup,studyName,site,subjectId,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/EvaluateSubjectForSubjectGroup/Demostudy40/london/1/sg1 |
Success,EvaluateSubjectForSubjectGroup,Demostudy40,london,1,sg1 |
Retrieve a list of subject groups. This returns the number of subject groups, followed by a pipe-separated list of the group codes.
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"GetSubjectGroups" |
/SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectGroups |
Result,GetSubjectGroups,studyName,numberOfSubjectGroups,pipeSeparatedListOfGroupCodes |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectGroups/ |
Success,GetSubjectGroups,Demostudy40,2,sg1|sg2 |
Retrieve a list of subject groups for a particular study. This returns the number of subject groups, followed by a pipe-separated list of the group codes.
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"GetSubjectGroupsForStudy" |
studyName |
The name of the study |
/SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectGroupsForStudy/studyName |
Result,GetSubjectGroupsForStudy,studyName,NoOfSubjectGroups,pipeSeparatedListOfGroupCodes |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectGroupsForStudy/demostudy40 |
Success,GetSubjectGroupsForStudy,Demostudy40,2,sg1|sg2 |
Retrieve a list of subject groups in which a given subject is included. This returns the number of subject groups, followed by a pipe-separated list of the group codes.
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"GetSubjectGroupsForSubject" |
studyName |
The name of the study used to identify the subject |
siteName |
The name of the site used to identify the subject |
subjectId |
The ID of the subject |
/SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectGroupsForSubject/studyName/siteName/subjectId |
Result,GetSubjectGroupsForSubject,studyName/site/subjectId,numberOfSubjectGroups,pipeSeparatedListOfGroupCodes |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectGroupsForSubject/Demostudy40/london/1 |
Success,GetSubjectGroupsForSubject,Demostudy40/london/1,2,sg1|sg2 |
Retrieve a list of subject groups in which a given user is included with a particular user role. This returns the number of subject groups, followed by a pipe-separated list of the group codes.
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"GetSubjectGroupsForUserRole" |
userId |
The user |
roleCode |
The user role |
/SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectGroupsForUserRole/userId/roleCode |
Result,GetSubjectGroupsForUserRole,userId,roleCode,numberOfSubjectGroups,pipeSeparatedListOfGroupCodes |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectGroupsForUserRole/rde/FullUser |
Success,GetSubjectGroupsForUserRole,rde,FullUser,2,sg1|sg2 |
Retrieve a list of subjects in a particular subject group. This returns the number of subject groups, followed by a pipe-separated list of the group codes.
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"GetSubjectsInSubjectGroup" |
subjectGroupCode |
The subject group |
/SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectsInSubjectGroup/subjectGroupCode |
Result,GetSubjectsInSubjectGroup,subjectGroupCode,numberOfSubjectsInGroup,pipeSeparatedListOfSubjectReferences |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/GetSubjectsInSubjectGroup/sg1 |
Success,GetSubjectsInSubjectGroup,sg1,2,Demostudy40/london/1|Demostudy40/london/2 |
Add a subject to a static subject group.
You need the 'Add subject to subject group' permission
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"AddSubjectToSubjectGroup" |
studyName |
The name of the study used to identify the subject |
siteName |
The name of the site used to identify the subject |
subjectId |
The ID of the subject to be added |
subjectGroupCode |
The subject group |
/SubjectGroupAdmin/Username/Password/Database/Role/AddSubjectToSubjectGroup/studyName/siteName/subjectId/subjectGroupCode |
Result,AddSubjectToSubjectGroup,studyName/site/subjectId,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/AddSubjectToSubjectGroup/Demostudy40/london/1/sg1 |
Success,AddSubjectToSubjectGroup,Demostudy40/london/1,sg1 |
Remove a subject from a static subject group.
You need the 'Add subject to subject group' permission.
Parameter |
Description |
Functionality identifier |
"SubjectGroupAdmin" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
"RemoveSubjectFromSubjectGroup" |
studyName |
The name of the study used to identify the subject |
siteName |
The name of the site used to identify the subject |
subjectId |
The ID of the subject to be removed |
subjectGroupCode |
The subject group |
/SubjectGroupAdmin/Username/Password/Database/Role/RemoveSubjectFromSubjectGroup/studyName/siteName/subjectId/subjectGroupCode |
Result,RemoveSubjectFromSubjectGroup,studyName/site/subjectId,subjectGroupCode |
InferMed.M40.MACRO_CL.exe /SubjectGroupAdmin/Username/Password/Database/Role/RemoveSubjectFromSubjectGroup/Demostudy40/london/1/sg1 |
Success,RemoveSubjectFromSubjectGroup,Demostudy40/london/1,sg1 |
Each subject group operation returns an individual result to the console as a comma-separated message with one of the following result codes:
Code |
Description |
Success |
The subject group 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 |
InvalidGroupCode |
The specified code is null or empty or does not exist |
InvalidSubjectGroupDescription |
The specified description is null or empty or does not exist |
SubjectGroupExists |
An existing subject group has been specified in "CreateSubjectGroup" |
InvalidStudyError |
The specified study is null or empty, does not exist, or does not have the required status |
InvalidSubjectGroupError | The specified subject group is null or empty or does not exist |
InvalidUserError |
The specified user is null or empty or does not exist |
InvalidRoleError |
The specified user role is null or empty or does not exist |
InvalidSiteError |
The specified site is null or empty or does not exist |
InvalidSubjectError |
The specified subject is null or empty or does not exist |
SubjectGroupMustBeStatic |
The requested action can only be performed on a static subject group |
SubjectGroupInactive |
The requested action can only be performed on an active subject group |
Unknown |
An unknown error occurred when processing the study/site administration action |