This is currently a collection of notes on possible categories for app level demographics.
Ideally, the demographics are collected once for a participant during their first enrollment in a study. Future enrollments should not need to repeat that process in the same app assuming the demographic questions are consistent.
The information collected initially could change so updates need to be possible.
At least for different apps, the available answers for various categories (and which categories are necessary) could vary. So the categories/values will most likely be determined in the app config.
Demographic info could be used to determine which group or schedule a participant will be assigned. So totals by answer will need to be fairly easy to query.
Checking adherence across a group might also be necessary.
Sample categories:
Race (enum)
Ethnicity (enum)
Education (enum)
Sex (enum)
Gender (enum)
Disease (enum?)
DateYear of BirthBlood Pressure (two scalars?)
Height (scalar, what UOM?)
Weight (scalar, what UOM?)
Country Code (enum)
Language (enum)
Postal Code Prefix (scalar)
Employment Status (enum)
Occupation (enum? write in?)
Dwelling
Veteran Status (enum)
Disability Status (enum)
Marital Status (enum)
Income (enum categories?)
Religious Affiliation (enum)
Political Affiliation (enum)
Sexual Orientation (enum)
Custom? (Would this be possible or even useful?)
...
Choose one
Choose multiple
Required(A question shouldn’t be asked if it’s not required.)Skippable(Would at least require an opt-out.)Explicitly opt-out (Are there times when a “Do not wish to answer” option is presented?)
Other as option (would write-in ever be useful?)
Endpoints:
v3/participant/{userId}/demographics
GET for list of categories? Enumerated values? Might not be necessary if those are determined by the app config.
GET or POST to query stored demographic data. Seems like it might need to be a POST for the convenience of formatting it in JSON. (Self endpoint?)
POST to create (or update?) user’s demographics.
DELETE (not sure this is useful, maybe for testing)
Q: How do we decide what is too specific? Is it a population cutoff? As in some combination of answers could represent a group of less than 50 people?
...
Q: Is there a way to make the data easier to query for groups (get all participants with English language, Veteran, 123 postal code)? Is that even an expected use case?
Config:
Code Block | ||
---|---|---|
| ||
"bridge:demographics": {
"education": {
"type": "enum",
"values": ["kinder","pre","grad"],
"format": "1"
},
"height": {
"type": "int",
"max": 120,
"min": 12,
"format": "1"
},
"language": {
"type": "enum",
"values": ["english","spanish","french"],
"format": "+"
}
} |
POST body:
Code Block | ||
---|---|---|
| ||
{
"education": "kinder",
"height", 30,
"language": ["english", "spanish"]
} |
Data:
appId | userId | key | value |
---|---|---|---|
sample-app-id | sample-user-id | education | kinder |
sample-app-id | sample-user-id | height | 30 |
sample-app-id | sample-user-id | language | [english, spanish] |