Subject data can be frozen or locked to prevent anyone making changes to it. You can use the Command Line to freeze or lock questions, eForms, visits or entire subjects.
A freeze/lock operation will only succeed if:
· The user login details are correct, e.g. existing user, correct password, correct database or role
· The user has the appropriate permissions, i.e. access to the specified study/site, together with the relevant freeze/lock permission
· No other user is editing the subject in Data Entry, i.e. there is no database lock for the subject
· The target object has the correct lock status:
For this operation |
Target status must be |
Freeze |
Unlocked |
Lock |
Unlocked or Frozen |
Unfreeze |
Frozen |
Unlock |
Locked |
From each LockFreeze call, a Command Line error may be returned if the command line is not in the correct format, e.g. missing or unexpected parameters. Otherwise a comma-separated message is output for each individual freeze/lock operation, with the appropriate result code. So if a range of subjects is specified, a result will be output for each one. Parameters not specified in the Command Line will not be included in the output.
Ensure you follow the required conventions when specifying user credentials, subject parameters and visit/eForm parameters.
Parameter |
Description |
Functionality identifier |
"LockFreeze" |
User credentials |
User name/Password/Database/Userrole |
Operation Identifier |
One of "Freeze", “Lock”, "Unfreeze", "Unlock" |
Study |
Study name |
Site |
Site code |
Subject Id From |
Starting subject id (integer) - blank for first subject |
Subject Id To |
End subject id (integer) - blank for last subject, same as From for single subject |
Visit |
Visit code (leave blank when freezing/locking a subject) |
Visit cycle number |
Visit cycle number (if you specify a visit code, you must also specify a cycle number as an integer greater than zero) |
eForm |
eForm code (leave blank when freezing/locking a subject or visit) |
eForm cycle number |
eForm cycle number (if you specify an eForm code, you must also specify a cycle number as an integer greater than zero) |
Question |
Question code (leave blank when freezing a subject, visit or eForm) |
Question cycle number |
Question repeat number (if you specify a question code, you must also specify a cycle number as an integer greater than zero) |
Freezing an object:
/LockFreeze/Username/Password/Database/Role/Freeze/Study/Site/SubjectIdFrom/SubjectIdTo/Visit/Visitcycle/eForm/eFormcycle/Question/Questioncycle |
ResultCode,Operation,Study,Site,SubjectId,Visit,Visitcycle,eForm,eFormcycle,Question,Questioncycle |
Locking an object:
/LockFreeze/Username/Password/Database/Role/Lock/Study/Site/SubjectIdFrom/SubjectIdTo/Visit/Visitcycle/eForm/eFormcycle/Question/Questioncycle |
ResultCode,Operation,Study,Site,SubjectId,Visit,Visitcycle,eForm,eFormcycle |
Unfreezing an object:
/LockFreeze/Username/Password/Database/Role/Unfreeze/Study/Site/SubjectIdFrom/SubjectIdTo/Visit/Visitcycle/eForm/eFormcycle/Question/Questioncycle |
ResultCode,Operation,Study,Site,SubjectId,Visit,Visitcycle |
Unlocking an object:
/LockFreeze/Username/Password/Database/Role/Unlock/Study/Site/SubjectIdFrom/SubjectIdTo/Visit/Visitcycle/eForm/eFormcycle/Question/Questioncycle |
ResultCode,Operation,Study,Site,SubjectId |
To freeze the cover eForm for Demostudy40 subjects 1 to 10 at site toulouse:
InferMed.M40.MACRO_CL.exe /LockFreeze/joe/joe123/JOESDB/DataReviewer/Freeze/Demostudy40/toulouse/1/10/screening/1/cover/1// |
A separate result is output for each of the subjects from 1 to 10, such as:
Success,Freeze,Demostudy40,toulouse,1,screening,1,cover,1 |
Success,Freeze,Demostudy40,toulouse,2,screening,1,cover,1 |
InvalidOperation,Freeze,Demostudy40,toulouse,3,screening,1,cover,1 |
Success,Freeze,Demostudy40,toulouse,4,screening,1,cover,1 |
To lock the screening visit for Demostudy40 subject 12 at site Cahors:
InferMed.M40.MACRO_CL.exe /LockFreeze/User1/pwd123/TESTDB/FullUser/Lock/Demostudy40/cahors/12/12/screening/1//// |
Success,Lock,Demostudy40,cahors,12,screening,1 |
To unlock the Date of Birth question for Demostudy40 subjects 3 and 4 at site Brisbane:
InferMed.M40.MACRO_CL.exe /LockFreeze/rde/macrotm/M4StudyDB/FullUser/Unlock/Demostudy40/brisbane/3/4/screening/1/cover/1/dobirth/1 |
A separate result is output for each of the subjects 3 and 4:
Success,Unlock,Demostudy40,brisbane,3,screening,1,cover,1,dobirth,1 |
NoSubjectLock,Unlock,Demostudy40,brisbane,4,screening,1,cover,1,dobirth,1 |
To Freeze all Demostudy40 subjects at site London:
InferMed.M40.MACRO_CL.exe /LockFreeze/rde/macrotm/M4StudyDB/FullUser/Freeze/Demostudy/london//////// |
A separate result is output for each of the subjects at site london, such as:
Success,Freeze,Demostudy40,london,1 |
Success,Freeze,Demostudy40,london,2 |
Each freeze/lock operation returns an individual result to the console as a comma-separated message with one of the following result codes:
Code |
Description |
Success |
Operation completed successfully |
NoSubjectLock |
Operation could not be processed because of database lock |
InvalidOperation |
Operation not allowed on this target because: · Incorrect status · Visit or eForm inactive · Target cycle does not exist |
NotFound |
Object not found, e.g. non-existent visit, eForm or question code |
NoPermission |
User does not have permission to perform this operation |
UnknownError |
Unexpected error occurred |