LockFreeze |
Enables you to freeze/lock any existing MACRO object.
This single method has 4 overloads to allow a freeze/lock operation on a subject, visit instance, eForm instance or question response:
· To freeze/lock a subject, use Subject details only
· To freeze/lock a visit, use Subject and Visit details
· To freeze/lock an eForm, use the Subject, Visit and eForm details
· To freeze/lock a question, use the Subject, Visit, eForm and Question details
The LockFreeze() method takes a freeze/lock operation as a parameter, which is of type Enums.LFAction, and may be one of:
· Freeze
· Lock
· Unfreeze
· Unlock
Input
Parameter |
Description |
user |
Currently logged-in user as returned from Login |
op |
Type of lock/freeze operation to apply (Enums.LFAction) |
study |
Study name |
site |
Site code |
subjectid |
Subject ID (use 0 if specifying subject label) |
label |
Subject label (use empty string if specifying subject ID) |
visit |
Visit code (omit if target is subject) |
vcycle |
Visit cycle if a repeating visit (omit if target is subject) |
eform |
eForm code (omit if target is subject or visit) |
fcycle |
eForm cycle if a repeating eForm (omit if target is subject or visit) |
question |
Question code (omit if target is subject, visit or eForm) |
qcycle |
Question cycle if in a repeating question group (omit if target is subject, visit or eForm) |
Locking/freezing a subject:
public static Enums.eLFResult LockFreeze(UserProperties user, Enums.eLFAction op, string study, string site, int subjectid, string label) |
Locking/freezing a visit:
public static Enums.eLFResult LockFreeze(UserProperties user, Enums.eLFAction op, string study, string site, int subjectid, string label, string visit, int vcycle) |
Locking/freezing an eForm:
public static Enums.eLFResult LockFreeze(UserProperties user, Enums.eLFAction op, string study, string site, int subjectid, string label, string visit, int vcycle, string eform, int fcycle) |
Locking/freezing a question:
public static Enums.eLFResult LockFreeze(UserProperties user, Enums.eLFAction op, string study, string site, int subjectid, string label) string site, int subjectid, string label, string visit, int vcycle, string eform, int fcycle, string question, int qcycle) |
Output
· Return code indicating success or nature of failure
The Freeze/Lock routines return an integer code as type Enums.eLFResult indicating the result, as listed in the table below:
Code |
Value |
Description |
0 |
Success |
The operation was successful |
1 |
NoSubjectLock |
The subject is currently open for editing in DE |
2 |
InvalidOperation |
The operation was invalid, e.g. trying to Lock an object which is already Locked |
4 |
NotFound |
Specified object was not found |
5 |
NoPermission |
User does not have permission to carry out this operation |
6 |
StudySuspended |
The study has the status Suspended |
9 |
UnknownError |
An unknown error occurred |