Cortex API
Search…
Subject object
A subject represents a human being who is the subject of a record (ie an experiment).

Description

A subject object includes these fields:
Name
Type
Description
subjectName
string
The name of the subject.
dateOfBirth
string
The date of birth of the subject. The format is "YYYY-MM-DD", e.g. "1980-12-25".
sex
string
Can be "M", "F" or "U". These letters stands for male, female and unknown respectively.
experimentsCount
number
countryCode
string
The Alpha-2 ISO code of the country the subject lives in.
countryName
string
The name of the country the subject lives in.
state
string
The state the subject lives in.
city
string
The city the subject lives in.
attributes
array of objects
A list of demographic attribute objects. See below.

Demographic attribute object

The field attributes is a list of attributes. A demographic attribute is an object with 2 fields:
Name
Type
Required
Description
name
string
yes
The name of the attribute.
value
string
yes
The value of the attribute.
You must call getDemographicAttributes to know what are the valid attribute names, and what are the possible values for each attribute.
For example, to tell that the subject is right handed, you can add the attribute { "name":"Handedness", "value":"Right"}

Example

1
{
2
"attributes": [
3
{
4
"name": "Handedness",
5
"value": "Left"
6
},
7
{
8
"name": "Education",
9
"value": "Master's degree"
10
}
11
],
12
"city": "London",
13
"countryCode": "GB",
14
"countryName": "",
15
"dateOfBirth": "1980-12-25",
16
"experimentsCount": 3,
17
"modifiedDatetime": "2019-07-01T11:23:11.644+07:00",
18
"sex": "F",
19
"state": "",
20
"subjectName": "Alice Smith"
21
}
Copied!