Randomize or dispense subject
post
/ec-dc-svc/rest/v6.0/studies/{studyId}/{mode}/subjects/randomizeordispense
Randomizes, dispenses or activates a subject, based on visit type, and completes the visit status. ORS dispensation or randomization is called.
Request
Path Parameters
-
mode(required): string
Mode of the study. Accepts test, active, or training.
-
studyId(required): string
ID of the study where a subject is being randomized or dispensed.
Supported Media Types
- application/json
Root Schema : schema
Type:
objectRequest Object for visit.
Show Source
-
parameters: array
parameters
-
siteId(required): string
(uuid)
ID of the site
-
studyVersion(required): string
Version of the studyExample:
1.0.0.5 -
subjectId(required): string
ID of the subjectExample:
B1B8327AFAA6412287106192AB5984EF -
visitId(required): string
(uuid)
ID of the visit
-
visitTimestamp: string
Pattern:
(\d){4}-(\d){2}-(\d){2} (\d){2}:(\d){2}:(\d){2}Visit date and timeExample:2018-11-23 08:43:01
Nested Schema : parameters
Type:
Show Source
array-
Array of:
object Parameter
Contains details about parameters of the form
Nested Schema : Parameter
Type:
objectContains details about parameters of the form
Show Source
-
formId: string
(uuid)
ID of the form
-
itemId: string
(uuid)
ID of the item
-
value: string
(uuid)
Value of the item
Response
Supported Media Types
- application/json
200 Response
Success
Root Schema : RandomizeDetails
Type:
Show Source
object-
randomization: object
VisitResult v16.0
Title:
VisitResult v16.0Visit Result. -
subject: object
SubjectDto10
Subject attributes including screen failure date information
-
visit: object
VisitsStatusDto13
Nested Schema : VisitResult v16.0
Type:
objectTitle:
VisitResult v16.0Visit Result.
Show Source
-
countOfKitTypesOnDoseHold: integer
(int32)
countOfKitTypesOnDoseHold.Example:
1 -
kits: array
kits
-
needsToVisitPharmacist: boolean
Unblinded pharmacist kitExample:
true -
pendingKitQuantity: integer
(int32)
pendingKitQuantity.Example:
1 -
randomNumber: string
Random NumberExample:
10 -
treatmentTitle: string
Treatment TitleExample:
A -
visitTimestamp: string
(date-time)
Visit Timestamp
Nested Schema : SubjectDto10
Type:
objectSubject attributes including screen failure date information
Show Source
-
codeBreak: string
Code break note if applicableExample:
N -
comment: string
Minimum Length:
0Maximum Length:2048Comment for latest subject updateExample:Initial enrollment -
description: string
Minimum Length:
0Maximum Length:500Free text description for the subjectExample:Screened subject -
dob: string
(date-time)
Date of birth
-
enrollmentFailure: string
Minimum Length:
0Maximum Length:255Reason for enrollment failure, if anyExample:Consent withdrawn -
enrollmentOverride: string
Minimum Length:
0Maximum Length:255Enrollment override note if appliedExample:Subject Enrollment Overridden -
eventType: string
Type of event associated with the subjectExample:
Screened -
freezedStatus: string
Freeze status of the subjectExample:
FROZEN -
fromStudyId: string
(uuid)
Origin study identifier from which the subject was transferred
-
gender: string
Minimum Length:
0Maximum Length:10Gender valueExample:[{"value":"1","label":"male"}] -
id: string
(uuid)
Unique identifier of the subject
-
informedConsentDate: string
(date-time)
Informed consent dateExample:
2025-09-25T09:00:00Z -
lastSigned: string
(date-time)
Timestamp when the subject was last signedExample:
2025-10-16T14:30:31.892Z -
mhealthSubjectId: string
(uuid)
Identifier of the subject in mHealth system
-
objectVersionNumber: number
Object version number used for concurrency controlExample:
14 -
operationType: string
Operation type for the subject eventExample:
MODIFIED -
previousSubjectNumber: string
Previous subject number if renumbered or transferredExample:
SUBJECT-0001-OLD -
reason: string
Minimum Length:
0Maximum Length:255Reason for latest subject updateExample:Protocol break happened -
screenFailureDate: string
(date-time)
Date when the subject was marked as screen failureExample:
2025-10-16T14:30:31.892Z -
screeningDate: string
(date-time)
Screening date if applicableExample:
2025-10-01T10:00:00Z -
screeningFailure: string
Minimum Length:
0Maximum Length:255Reason for screening failure, if anyExample:Inclusion criteria not met -
signedStatus: string
Signed status of the subjectExample:
SIGNED -
siteId: string
Site identifier in uppercase hex formatExample:
ABCDEF1234567890ABCDEF1234567890 -
softwareVersionNumber: number
Software version number associated with the eventExample:
14 -
sourceTimeStamp: string
(date-time)
Source system timestamp for the subject payloadExample:
2025-10-16T14:30:31.892Z -
state(required): string
Minimum Length:
0Maximum Length:100Lifecycle state of the subjectExample:ACTIVE -
stateDate: string
(date-time)
Timestamp when the subject transitioned to current stateExample:
2025-10-16T14:30:31.892Z -
studyId: string
Study identifier in uppercase hex formatExample:
ABCDEF1234567890ABCDEF1234567890 -
studyVersion(required): string
Study version stringExample:
3.0.0.1 -
subjectNumber(required): string
Minimum Length:
0Maximum Length:500Human readable subject numberExample:SUBJ-0001 -
subjectSiteSerialNumber: string
Site-level serial number assigned to the subjectExample:
SITE-0001-001 -
subjectStudySerialNumber: string
Study-level serial number assigned to the subjectExample:
STUDY-0001-001 -
subjectTransferId: string
(uuid)
Identifier of a subject transfer if applicable
-
subjNumSiteOrgId: string
Subject number site organization identifierExample:
SITE-ORG-0001 -
userId: string
(uuid)
User identifier associated with the subject modification
-
verifiedStatus: string
Verified status of the subjectExample:
VERIFIED -
versionEnd: string
(date-time)
End timestamp of the subject version recordExample:
2025-10-16T14:30:31.892Z -
versionStart: string
(date-time)
Start timestamp of the subject versionExample:
2025-10-16T14:30:31.892Z
Nested Schema : VisitsStatusDto13
Type:
Show Source
object-
associatedStudyVersion: string
Study version with which the visit status is associatedExample:
3.0.0.1 -
comment: string
Minimum Length:
0Maximum Length:2048Additional comment for the visit statusExample:All data verified -
doseHoldAction: string
-
eventId: string
Event identifier in uppercase hex formatExample:
ABCDEF1234567890ABCDEF1234567890 -
eventInstanceNum: integer
(int32)
Unscheduled/cycle visit instance number when applicable.Example:
1 -
eventType: string
Event type corresponding to the visitExample:
Visit_Not_Started -
freezedStatus: string
Freeze status of the visitExample:
FROZEN -
id: string
(uuid)
Unique identifier of the visit status record
-
lockedDateTime: string
(date-time)
Timestamp when the visit was lockedExample:
2025-10-16T14:30:31.892Z -
lockedStatus: string
Locked status of the visitExample:
UNLOCKED -
objectVersionNumber: number
Object version number used for concurrency controlExample:
14 -
operationType: string
-
reason: string
Minimum Length:
0Maximum Length:255Reason associated with the visit statusExample:Subject completed the visit successfully -
repeatingFormCount: number
Number of repeating form instances for the visitExample:
2 -
scheduledWindowEndDate: string
(date-time)
Scheduled window end date for the visitExample:
2025-10-16T14:30:31.892Z -
scheduledWindowStartDate: string
(date-time)
Scheduled window start date for the visitExample:
2025-10-16T14:30:31.892Z -
signedStatus: string
Signed status of the visitExample:
SIGNED -
siteId: string
Site identifier in uppercase hex formatExample:
ABCDEF1234567890ABCDEF1234567890 -
softwareVersionNumber: number
-
studyVersion(required): string
Minimum Length:
0Maximum Length:100Study version string under which the visit is recordedExample:3.0.0.1 -
subjectId: string
Subject identifier in uppercase hex formatExample:
ABCDEF1234567890ABCDEF1234567890 -
userId: string
(uuid)
-
verifiedStatus: string
Verified status of the visitExample:
VERIFIED -
versionEnd: string
(date-time)
-
versionStart: string
(date-time)
Start timestamp of the version recordExample:
2025-10-16T14:30:31.892Z -
visitAction: string
Action to be taken for the visitExample:
SCREEN_DISABLE -
visitStartDate: string
(date-time)
Visit start date timestampExample:
2025-10-16T14:30:31.892Z -
visitStartDateLockedDateTime: string
(date-time)
Timestamp when the visit start date was lockedExample:
2025-10-16T14:30:31.892Z -
visitStartDateLockedStatus: string
Locked status for the visit start dateExample:
UNLOCKED -
visitStatus: string
Status of the visit as per VisitsStatusEnumExample:
COMPLETED -
visitType: string
Type of visit as per the visit type enumerationExample:
Screening Visit -
visitWindowWarning: string
Nested Schema : kits
Type:
Show Source
array-
Array of:
object DispensationKit
Title:
DispensationKitContains information for the kit dispensation
Nested Schema : DispensationKit
Type:
objectTitle:
DispensationKitContains information for the kit dispensation
Show Source
-
barcode: string
Barcode for kitExample:
1000 -
conserved: boolean
Conserved for dispensationExample:
true -
consumeAcrossDoses: boolean
Indicate if consume across dosed allowed.Example:
true -
deviceConnection: string
Allowed Values:
[ "CloudtoCloud", "DevicetoCloud", "NoConnection" ]Device Connection TypeExample:DevicetoCloud -
deviceType: string
Allowed Values:
[ "ActivityWatch", "BloodPressureMonitor", "WeightScale", "ECGReader", "Spirometer", "MobileApp", "SmartPillBottle", "PulseOximeter", "WearablePatch", "Other", "GlucoseMonitor" ]Device TypeExample:ActivityWatch -
dispensationConfirmed: string
Barcode confirmation while dispensing kitExample:
1000 -
dose: number
(double)
Dose.Example:
5 -
dosingInstruction: string
Dosing InstructionExample:
Take one capsule daily -
dosingUnblinded: boolean
Indicate if unblinded or blinded.Example:
true -
frequency: string
Allowed Values:
[ "Once", "QD", "BID", "TID", "QID", "Q3", "Q4", "Q8", "Q12", "Q24", "Bedtime", "With meals", "With meals and at bedtime" ]Dosing frequency.Example:BID -
groupingNumber: integer
(int32)
Grouping number for a kit.Example:
1 -
id: number
(Integer)
Id of the dispensing kit.Example:
2 -
inventoryId: string
Inventory IdExample:
D313327EF13845169A8ADADDA435431E -
kitDescription: string
Kit descriptionExample:
Kit A -
kitNumberUTF: string
Alpha-numeric KitNumberExample:
A-1 -
locallySourced: boolean
Kit is locally sourcedExample:
true -
lotId: string
Lot IdExample:
D313327EF13845169A8ADADDA435431E -
lotNumber: string
Lot NumberExample:
LOT20240605A -
measurement: string
Dose Measurement.Example:
ml -
quantity: number
(double)
kit quantity.Example:
5 -
titrationKitLabel: string
Titration Kit LabelExample:
High dose -
titrationOption: string
Allowed Values:
[ "up", "down", "maintain" ]Titration OptionExample:up -
trialSupplyType: string
Trial Supply TypeExample:
BOTTLE
400 Response
Bad request.
Root Schema : DcsResponse
Type:
Show Source
object-
errorData: object
ErrorResponseData
Structure representing an error response from the reporting service. Contains an error code, human-readable message, and details.
-
result: object
result
-
status: string
-
version: integer
(int32)
Nested Schema : ErrorResponseData
Type:
objectStructure representing an error response from the reporting service. Contains an error code, human-readable message, and details.
Show Source
-
details: string
Detailed error context or debugging information such as validation error, stack trace, or field/parameter cause.Example:
User role is missing required permission REPORTING_VIEW. Field: userId -
errorCode: string
Application or business-specific error code representing the error type.Example:
REPT_401 -
errorMessage: string
Human-readable error message describing the failure or issue.Example:
Unauthorized: User does not have access to the requested resource
Nested Schema : result
Type:
object500 Response
Internal server error.
Root Schema : DcsResponse
Type:
Show Source
object-
errorData: object
ErrorResponseData
Structure representing an error response from the reporting service. Contains an error code, human-readable message, and details.
-
result: object
result
-
status: string
-
version: integer
(int32)
Nested Schema : ErrorResponseData
Type:
objectStructure representing an error response from the reporting service. Contains an error code, human-readable message, and details.
Show Source
-
details: string
Detailed error context or debugging information such as validation error, stack trace, or field/parameter cause.Example:
User role is missing required permission REPORTING_VIEW. Field: userId -
errorCode: string
Application or business-specific error code representing the error type.Example:
REPT_401 -
errorMessage: string
Human-readable error message describing the failure or issue.Example:
Unauthorized: User does not have access to the requested resource
Nested Schema : result
Type:
object